Advertisement
giganciprogramowania

l16 codesServer

Jun 9th, 2023
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.04 KB | None | 0 0
  1. local remotes = game.ReplicatedStorage.Remotes
  2. local httpService = game:GetService("HttpService")
  3. local replicatedStorage = game.ReplicatedStorage
  4. local remotes = replicatedStorage:WaitForChild("Remotes")
  5. local createTemplate = remotes:WaitForChild("CreateTemplate")
  6.  
  7.  
  8. local codes = {
  9. ["PLAY"] = {
  10. function(player)
  11. player.leaderstats.Diamonds.Value += 100000
  12. end,
  13. false,
  14. false
  15. },
  16. ["PET"] = {
  17. function(player)
  18. local petName = "18"
  19. local id = httpService:GenerateGUID()
  20. local pet = Instance.new("StringValue", player.Pets)
  21. pet.Name = petName
  22. pet.Value = id
  23. createTemplate:FireClient(player, petName, id)
  24. end,
  25. false,
  26. false
  27. },
  28. ["TURBO"] = {
  29. function(player)
  30. player.Character.Humanoid.WalkSpeed = 100
  31. end,
  32. false,
  33. true
  34. },
  35. ["BIGHEAD"] = {
  36. function(player)
  37. player.Character.Head.Size = Vector3.new(5,5,5)
  38. end,
  39. false,
  40. true
  41. },
  42. ["MINI"] = {
  43. function(player)
  44. player.Character:ScaleTo(0.5)
  45. end,
  46. false,
  47. true
  48. },
  49. ["BIG"] = {
  50. function(player)
  51. player.Character:ScaleTo(10)
  52. end,
  53. false,
  54. true
  55. },
  56. ["NIGHT"] = {
  57. function(player)
  58. game.Lighting.ClockTime = 0
  59. end,
  60. false,
  61. true
  62. },
  63. ["DAY"] = {
  64. function(player)
  65. game.Lighting.ClockTime = 11.5
  66. end,
  67. false,
  68. true
  69. },
  70. ["TACOS"] = {
  71. function(player)
  72. local sound = Instance.new("Sound")
  73. sound.SoundId = "rbxassetid://142376088"
  74. sound.Parent = player
  75. sound:Play()
  76. end,
  77. false,
  78. true
  79. }
  80. }
  81.  
  82.  
  83. remotes:WaitForChild("UseCode").OnServerInvoke = function(player,code)
  84. if codes[tostring(code)] then
  85. if player.Codes then
  86. if type(codes) == "table" then
  87. if player.Codes:FindFirstChild(tostring(code)) then
  88. return "Already"
  89. else
  90. if codes[tostring(code)][2] == true then
  91. return "Expired"
  92. else
  93. if codes[tostring(code)][3] == false then
  94. codes[tostring(code)][1](player)
  95. local usedCode = Instance.new("StringValue", player.Codes)
  96. usedCode.Name = tostring(code)
  97. return "Successfully"
  98. else
  99. codes[tostring(code)][1](player)
  100. return "Successfully"
  101. end
  102. end
  103. end
  104. else
  105. return "Unknown"
  106. end
  107. else
  108. return "Unknown"
  109. end
  110. else
  111. return "Invalid"
  112. end
  113. end
  114.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement