Adam_RBLX

Untitled

Jan 1st, 2023
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. function countButtons()
  2. local n = 0
  3. for i, v in pairs(getPlayerTycoon()["P1 Stuff"].Buttons:GetChildren()) do
  4. if v:FindFirstChild("Head") and not v:FindFirstChild("GamePass") then
  5. n = n+1
  6. end
  7. end
  8. return n
  9. end
  10.  
  11. function getPlayerTycoon()
  12. local Tycoon = "None"
  13. for i, v in pairs(game:GetService("Workspace")["Legend's 2P Tycoon Kit"].Tycoons:GetChildren()) do
  14. if v:FindFirstChild("P1 Stuff") and v["P1 Stuff"]:FindFirstChild("P1") and v["P1 Stuff"].P1.Value == game.Players.LocalPlayer.Name then
  15. Tycoon = v
  16. end
  17. end
  18. return Tycoon
  19. end
  20.  
  21. game:GetService("ReplicatedStorage").Events.CrateClaim:FireServer("Cash", 1e+16)
  22.  
  23. task.spawn(function()
  24. while true do
  25. if countButtons() <= 0 then break end
  26. task.wait()
  27. for i, v in pairs(getPlayerTycoon()["P1 Stuff"].Buttons:GetChildren()) do
  28. if v:FindFirstChild("Head") and not v:FindFirstChild("GamePass") then
  29. firetouchinterest(game.Players.LocalPlayer.Character.Torso, v.Head, 0)
  30. end
  31. if v.Name == " " then
  32. v:Destroy()
  33. end
  34. end
  35. end
  36. end)
Add Comment
Please, Sign In to add comment