Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --// Functions \\--
- function onOpen()
- script.Parent.CodeFrame.Visible = true
- end
- function onClose()
- script.Parent.CodeFrame.Visible = false
- end
- function onCode()
- if script.Parent.CodeFrame.CodeHere.Text == "FreeCode" then
- script.Parent.CodeFrame.Enter.Text = "Code redeemed!"
- wait(0.3)
- --Put what the code will reward you.
- local plr = script.Parent.Parent.Parent
- local RewardFolder = script.Parent
- local ls = plr.leaderstats.Gold
- ls.Value = ls.Value + 200000
- wait(2)
- script.Parent.CodeFrame.Enter.Text = "Enter"
- elseif script.Parent.CodeFrame.CodeHere.Text == not "FreeCode" then
- script.Parent.CodeFrame.Enter.Text = "Invalid code!"
- wait(2)
- script.Parent.CodeFrame.Enter.Text = "Enter"
- end
- if script.Parent.CodeFrame.CodeHere.Text == "GameReleaseCelebration" then
- script.Parent.CodeFrame.Enter.Text = "Code redeemed!"
- wait(0.3)
- --Put what the code will reward you.
- local plr = script.Parent.Parent.Parent
- local RewardFolder = script.Parent
- local ls = plr.leaderstats.Crystals
- ls.Value = ls.Value + 250
- wait(2)
- script.Parent.CodeFrame.Enter.Text = "Enter"
- elseif script.Parent.CodeFrame.CodeHere.Text == not "FreeCode" then
- script.Parent.CodeFrame.Enter.Text = "Invalid code!"
- wait(2)
- script.Parent.CodeFrame.Enter.Text = "Enter"
- end
- end
- --------------------
- --// Functions Call \\--
- script.Parent.CB.MouseButton1Click:Connect(onOpen)
- script.Parent.CodeFrame.X.MouseButton1Click:Connect(onClose)
- script.Parent.CodeFrame.Enter.MouseButton1Click:Connect(onCode)
- -----------------------------
- --// Settings \\--
- local Codes = "FreeCode"
- ------------------
Advertisement
Add Comment
Please, Sign In to add comment