Skip to content

Commit 90ef2ac

Browse files
author
AliksusFootages
committed
1.4.1
1 parent adea6e4 commit 90ef2ac

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

dist/main.lua

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

src/init.lua

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ local Creator = require("./Creator")
1111
local New = Creator.New
1212
local Tween = Creator.Tween
1313

14+
local LocalPlayer = game:GetService("Players") and game:GetService("Players").LocalPlayer or nil
15+
1416
WindUI.Themes = Themes
1517

1618
local ProtectGui = protectgui or (syn and syn.protect_gui) or function() end
@@ -101,11 +103,15 @@ function WindUI:CreateWindow(Config)
101103

102104
Creator.SetTheme(Theme)
103105

106+
107+
local Filename = LocalPlayer.Name or"Random"
108+
104109
function KeySystem()
105110
CanLoadWindow = false
106111
local KeyDialogInit = require("./Components/Dialog").Init(WindUI.ScreenGui.KeySystem)
107112
local KeyDialog = KeyDialogInit.Create(true)
108113

114+
109115
KeyDialog.UIElements.Main.AutomaticSize = "XY"
110116

111117
local Blur = New("ImageLabel", {
@@ -361,7 +367,7 @@ function WindUI:CreateWindow(Config)
361367
end
362368
if Config.KeySystem.SaveKey and Config.Folder then
363369
local WindowTitle = New("TextLabel", {
364-
Text = "Your key will be saved in Workspace/" .. Config.Folder .. "/" .. game.Players.LocalPlayer.Name .. ".key",
370+
Text = "Your key will be saved in Workspace/" .. Config.Folder .. "/" .. Filename .. ".key",
365371
TextSize = 13,
366372
FontFace = Font.new(Creator.Font, Enum.FontWeight.SemiBold),
367373
TextXAlignment = "Left",
@@ -393,7 +399,7 @@ function WindUI:CreateWindow(Config)
393399
Tween(Blur, .1, {ImageTransparency = 1}):Play()
394400
CanLoadWindow = true
395401
if Config.KeySystem.SaveKey and Config.Folder then
396-
writefile(Config.Folder .. "/" .. game.Players.LocalPlayer.Name .. ".key", tostring(Key))
402+
writefile(Config.Folder .. "/" .. Filename .. ".key", tostring(Key))
397403
end
398404
task.spawn(function()
399405
task.wait(0.1)
@@ -433,8 +439,8 @@ function WindUI:CreateWindow(Config)
433439
end
434440

435441
if Config.KeySystem then
436-
if Config.KeySystem.SaveKey then
437-
if isfile(Config.Folder .. "/" .. game.Players.LocalPlayer.Name .. ".key") and Config.KeySystem.Key == readfile(Config.Folder .. "/" .. game.Players.LocalPlayer.Name .. ".key" ) then
442+
if Config.KeySystem.SaveKey and Config.Folder then
443+
if isfile(Config.Folder .. "/" .. Filename .. ".key") and Config.KeySystem.Key == readfile(Config.Folder .. "/" .. Filename .. ".key" ) then
438444
CanLoadWindow = true
439445
else
440446
KeySystem()

0 commit comments

Comments
 (0)