function awarding(class, howmuch, Box)
if Folder:FindFirstChild(Box) then
print('found')
if Folder:FindFirstChild(Box).Value == true then
return function()
class(howmuch)
end
end
end
end
function money(amount, can)
print('plz')
plr:WaitForChild("Zeni").Value = plr.Zeni.Value + amount
can = true
end
function power(amountt, cam)
print("working?")
plr:WaitForChild("Stats"):WaitForChild("Strength").Value = plr.Stats.Strength.Value + amountt
print('strength+')
cam = true
end
print('Functions')
--VARIABLES
plr = game.Players.LocalPlayer
Input = script.Parent.Parent.CodeInput
Enter = script.Parent
Folder = plr:WaitForChild("Codes")
--CODES
codes = {
["Release!"] = awarding(money, 1000000, "Release"),
["Beta!"] = awarding(power, 5000000, "Beta"),
["ITS OVER 9000!!!"] = awarding(power, 9000, "ITS OVER 9000")
}
print('codes')
Enter.MouseButton1Click:Connect(function()
print('Clicked')
local test = codes[Input.Text]
if test then
test()
print('SENT')--doesn't print
else
print(':(')--prints :(
end
end)
I'm trying to add datastore. There's a script in serverscriptservice for this. If you need I'll gladly hand it.

3 comments
does not work
wait oh u made a } a ) and it didn't work
oh sorry I tried to respect your awarding function by modifying my script a bit but it didn’t work