I am making a game with secret codes. When you press the button "submit", it checks if they had put in a correct code. I haven't tested this yet, but it is 95 percent it won't work. This is in a local script in starterGui:
code1 = 1643543
code2 = 3728492
code3 = 5638593
code4 = 5483759
code5 = 4759485
code6 = 4739583
weapon1 = game.ReplicatedStorage.Weapon1
weapon2 = game.ReplicatedStorage.Weapon2
weapon3 = game.ReplicatedStorage.Weapon3
weapon4 = game.ReplicatedStorage.Weapon4
weapon5 = game.ReplicatedStorage.Weapon5
weapon6 = game.ReplicatedStorage.Weapon6
textButton = game.Players.LocalPlayer.PlayerGui.ScreenGui.TextButton
textBox = game.Players.LocalPlayer.PlayerGui.ScreenGui.TextBox
backPack = game.Players.LocalPlayer.Backpack
textButton.MouseButton1Down:connect(function()
if textBox.Text = code1 then
local weapon1b = weapon1:clone()
weapon1b.Parent = backPack
elseif textBox.Text = code2 then
local weapon2b = weapon2:clone()
weapon2b.Parent = backPack
elseif textBox.Text = code3 then
local weapon3b = weapon3:clone()
weapon3b.Parent = backpack
elseif textBox.Text = code4 then
local weapon4b = weapon4:clone()
weapon4b.Parent = backPack
elseif textBox.Text = code5 then
local weapon5b = weapon5:clone()
weapon5b.Parent = backpack
elseif textBox.Text = code6 then
local weapon6b = weapon6:clone()
weapon6b.Parent = backpack
end

2 comments
Should this be in a local script in StarterGui?
You use LocalPlayer, so yes, this has to be a LocalScript. LocalScripts usually go in the StarterGui.