Advertisement
Guest User

twitter code script - TSSRafa

a guest
Mar 15th, 2022
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. local player = game.Players.LocalPlayer
  2. local Codes = script.Parent:WaitForChild("holder"):WaitForChild("Codes"):GetChildren()
  3. local CodeText = script.Parent.holder.__Codes.__EnterCode:WaitForChild("EnterCode")
  4.  
  5. local Cash = player:WaitForChild("leaderstats"):WaitForChild("Coins")
  6. local Gems = player:WaitForChild("leaderstats"):WaitForChild("Gems")
  7.  
  8. script.Parent.holder.__Codes.__Confirm:WaitForChild("Confirm").MouseButton1Click:connect(function()
  9. for i, v in pairs(Codes) do
  10. if CodeText.Text == v.Name then
  11. if v.Redeemed.Value == false then
  12. Cash.Value = Cash.Value + v.CashToGive.Value
  13. Gems.Value = Gems.Value + v.GemsToGive.Value
  14. game.Workspace.Sounds.MoneySound:Play()
  15. local Trans = script.Parent.holder.__Codes.Success
  16. Trans.TextTransparency = 0
  17. Trans.TextStrokeTransparency = 0
  18. v.Redeemed.Value = true
  19. wait(2.5)
  20. for i = 0, 1, 0.1 do
  21. wait(0)
  22. Trans.TextTransparency = i
  23. Trans.TextStrokeTransparency = i
  24.  
  25. end
  26. end
  27. end
  28. end
  29. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement