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)
This isn't a request site but I'm not going to skip out on helping you.
You have to set the OnServerInvoke for your RemoteFunction to be able to determine the rightfulness of the key.
function RemoteFunction.OnServerInvoke(Player, Key) local Tool = nil -- Replace nil with path to your tool. if Key == "" then Tool:Clone().Parent = Player:FindFirstChildWhichIsA("Backpack") return "right" end return "wrong" end