4bcuy

rodevs2

Apr 29th, 2022
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.96 KB | None | 0 0
  1. --// Functions \\--
  2.  
  3. function onOpen()
  4. script.Parent.CodeFrame.Visible = true
  5. end
  6.  
  7. function onClose()
  8. script.Parent.CodeFrame.Visible = false
  9. end
  10. function onCode()
  11. if script.Parent.CodeFrame.CodeHere.Text == "FreeCode" then
  12. script.Parent.CodeFrame.Enter.Text = "Code redeemed!"
  13. wait(0.3)
  14. --Put what the code will reward you.
  15. local plr = script.Parent.Parent.Parent
  16. local RewardFolder = script.Parent
  17. local ls = plr.leaderstats.Gold
  18. ls.Value = ls.Value + 200000
  19. wait(2)
  20. script.Parent.CodeFrame.Enter.Text = "Enter"
  21. elseif script.Parent.CodeFrame.CodeHere.Text == not "FreeCode" then
  22. script.Parent.CodeFrame.Enter.Text = "Invalid code!"
  23. wait(2)
  24. script.Parent.CodeFrame.Enter.Text = "Enter"
  25. end
  26.  
  27. if script.Parent.CodeFrame.CodeHere.Text == "GameReleaseCelebration" then
  28. script.Parent.CodeFrame.Enter.Text = "Code redeemed!"
  29. wait(0.3)
  30. --Put what the code will reward you.
  31. local plr = script.Parent.Parent.Parent
  32. local RewardFolder = script.Parent
  33. local ls = plr.leaderstats.Crystals
  34. ls.Value = ls.Value + 250
  35. wait(2)
  36. script.Parent.CodeFrame.Enter.Text = "Enter"
  37. elseif script.Parent.CodeFrame.CodeHere.Text == not "FreeCode" then
  38. script.Parent.CodeFrame.Enter.Text = "Invalid code!"
  39. wait(2)
  40. script.Parent.CodeFrame.Enter.Text = "Enter"
  41. end
  42. end
  43. --------------------
  44. --// Functions Call \\--
  45.  
  46. script.Parent.CB.MouseButton1Click:Connect(onOpen)
  47. script.Parent.CodeFrame.X.MouseButton1Click:Connect(onClose)
  48. script.Parent.CodeFrame.Enter.MouseButton1Click:Connect(onCode)
  49. -----------------------------
  50.  
  51. --// Settings \\--
  52. local Codes = "FreeCode"
  53.  
  54. ------------------
Advertisement
Add Comment
Please, Sign In to add comment