Hello! I want made Code system that check if TextBox.Text is some value from list, but this dousn’t work This is my Script:
local Codes = {
["underthewater"] = 50,
["CONSOLE"] = 343,
["Jarro"] = 300,
["alpha"] = 1000,
["devs"] = 2000
}
local Box = script.Parent.MainHandlerCode.TextBox
local code = Box.Text
local btn = script.Parent.MainHandlerCode.TextButton
local Value = game.Workspace.Values.Credits -- I used this for example :D
btn.MouseButton1Up:Connect(function(player)
if Box.Text == (Codes[code]) then
Value.Value = Value.Value + code
end
end)
What’s wrong is with this script?
Have a great day