****code = "testing" --type your code local gear = game.ReplicatedStorage:WaitForChild('Handgun') Input = script.Parent.Parent.CodeInput Output = script.Parent Output.MouseButton1Down:Connect(function() if Input.Text == code then gear:Clone().Parent = game.Players.LocalPlayer.Backpack gear:Clone().Parent = game.Players.LocalPlayer.StarterGear input.Text = 'Correct' wait (1) input.Text = 'Enter' else input.Text = 'Invalid/Used' wait (1) input.Text = 'Enter' end
thats my script i put and it says expected end to close function at line 5 tried couple times to fix but it ain't gonna fix.
code = "testing" --type your code local gear = game.ReplicatedStorage:WaitForChild('Handgun') Input = script.Parent.Parent.CodeInput Output = script.Parent Output.MouseButton1Down:Connect(function() if Input.Text == code then gear:Clone().Parent = game.Players.LocalPlayer.Backpack gear:Clone().Parent = game.Players.LocalPlayer.StarterGear input.Text = 'Correct' wait (1) input.Text = 'Enter' else input.Text = 'Invalid/Used' wait (1) input.Text = 'Enter' end end)
You forgot to add the "end)" at the end of the code block.