Here's the script:
local Frame = script.Parent.Parent
local CodeBox = Frame.UserCodeBox
local Code = script.Code
local Instruction = Frame.Instructions
local Player = script.Player
script.Parent.MouseButton1Click:Connect(function(click)
if Instruction.Text == "Please input your Username now to continue." then
local Plr = game.Players:FindFirstChild(CodeBox.Text)
if Plr ~= nil then
Player.Value = CodeBox.Text
CodeBox.Text = ""
Instruction.Text = "Username accepted. Please input your new Password now to continue."
else
CodeBox.Text = ""
Instruction.Text = "Username "..CodeBox.Text.." has been rejected. Please retry."
wait(2)
Instruction.Text = "Please input your Username now to continue."
end
elseif Instruction.Text == "Username accepted. Please input your new Password now to continue." then
if CodeBox.Text == "" then
Instruction.Text = "Your password needs to have at least one character."
wait(2)
Instruction.Text = "Username accepted. Please input your new Password now to continue."
else
Code.Value = CodeBox.Text
Instruction.Text = "Password accepted. Please input your password again to verify and finish."
end
elseif Instruction.Text == "Password accepted. Please input your password again to verify and finish." then
if CodeBox.Text == Code.Value then
game.ReplicatedStorage.PlayerStats[Player.Value].UserCode.Value = CodeBox.Text
Instruction.Text = "New password set! Returning to Login page now!"
wait(2)
Instruction.Text = "Please input your Username now to continue."
Frame.Parent.Login.Visible = true
Frame.Visible = false
else
Instruction.Text = "Codes do not match. Please retry."
wait(2)
Instruction.Text = "Password accepted. Please input your password again to verify and finish."
end
end
end)
It's a Complex Script, but I need help with my new PC Software. Little help. Thanks!
Btw, the error is from line 8 to 19

1 comment
On line 20 you put an elseif condition, meaning if the text changed in one result of a condition, that part will not run, so it is stuck. I suggest you try and make it more short and simple, in some way, idk how though.