Don't worry about the GUI part I have that figured out (with a passcode too) I just need to know how to make it give a weapon
the localscript:
local textbox = script.Parent:WaitForChild("TextBox")
local button = script.Parent:WaitForChild("TextButton")
button.MouseButton1Click:Connect(function()
local result = game.ReplicatedStorage.RemoteFunction:InvokeServer(textbox.Text)
if result == "right" then
button.Text = "you did it yay"
wait(2)
button.Text = "Gun"
else
button.Text = "YOU FAILED I HATE YOU"
wait(2)
button.Text = "Gun"
end
end)

2 comments
I would put this in a server script correct?
Yes I already determined the key, but thanks this helps