epicllllllllllllllll

city boi script diddy

Jan 18th, 2026
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.16 KB | None | 0 0
  1. --[[
  2. WARNING: Heads up! This script has not been verified by ScriptBlox. Use at your own risk!
  3. ]]
  4. -- Services
  5. local Players = game:GetService("Players")
  6. local RunService = game:GetService("RunService")
  7.  
  8. local player = Players.LocalPlayer
  9. local collecting = false
  10. local connection
  11.  
  12. -- GUI
  13. local gui = Instance.new("ScreenGui")
  14. gui.Name = "AutoCollectGui"
  15. gui.ResetOnSpawn = false
  16. gui.Parent = player:WaitForChild("PlayerGui")
  17.  
  18. local button = Instance.new("TextButton")
  19. button.Size = UDim2.new(0, 240, 0, 50)
  20. button.Position = UDim2.new(0.5, -120, 0.8, 0)
  21. button.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  22. button.TextColor3 = Color3.fromRGB(255, 255, 255)
  23. button.TextScaled = true
  24. button.Text = "Auto Collect: OFF"
  25. button.Parent = gui
  26.  
  27. -- Coin teleport function
  28. local function teleportCoins()
  29. local character = player.Character
  30. if not character then return end
  31.  
  32. local hrp = character:FindFirstChild("HumanoidRootPart")
  33. if not hrp then return end
  34.  
  35. local eventParts = workspace:FindFirstChild("EventParts")
  36. if not eventParts then return end
  37.  
  38. for _, coin in ipairs(eventParts:GetChildren()) do
  39. if coin:IsA("BasePart") then
  40. coin.CFrame = hrp.CFrame
  41. elseif coin:IsA("Model") then
  42. if not coin.PrimaryPart then
  43. local part = coin:FindFirstChildWhichIsA("BasePart")
  44. if part then
  45. coin.PrimaryPart = part
  46. end
  47. end
  48. if coin.PrimaryPart then
  49. coin:SetPrimaryPartCFrame(hrp.CFrame)
  50. end
  51. end
  52. end
  53. end
  54.  
  55. -- Toggle logic
  56. button.MouseButton1Click:Connect(function()
  57. collecting = not collecting
  58.  
  59. if collecting then
  60. button.Text = "Auto Collect: ON"
  61. button.BackgroundColor3 = Color3.fromRGB(0, 170, 0)
  62.  
  63. connection = RunService.Heartbeat:Connect(function()
  64. teleportCoins()
  65. end)
  66. else
  67. button.Text = "Auto Collect: OFF"
  68. button.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  69.  
  70. if connection then
  71. connection:Disconnect()
  72. connection = nil
  73. end
  74. end
  75. end)
Advertisement
Add Comment
Please, Sign In to add comment