Advertisement
NiceBBMBThai

Cart Ride Into Rdite! auto turn off cart script

Jun 21st, 2021
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. local function hook(cart)
  2. pcall(function()
  3. cart:WaitForChild("On")
  4. cart.On:WaitForChild("Click")
  5.  
  6. cart:WaitForChild("Configuration")
  7. local onValue = cart.Configuration:WaitForChild("CarOn")
  8.  
  9. if onValue.Value == true then
  10. fireclickdetector(cart.On.Click, math.random(50,100) / 100)
  11. end
  12. onValue:GetPropertyChangedSignal("Value"):Connect(function()
  13. if onValue.Value == true then
  14. fireclickdetector(cart.On.Click, math.random(50,100) / 100)
  15. end
  16. end)
  17. end)
  18. end
  19.  
  20. local cartFolder
  21. for _,v in pairs(workspace:GetChildren()) do if v.Name == "Carts" and not v:FindFirstChildOfClass("Part") then cartFolder = v end end
  22.  
  23. for _,cart in pairs(cartFolder:GetChildren()) do
  24. if string.find(cart.Name:lower(), "cart") then hook(cart) end
  25. end
  26. cartFolder.ChildAdded:Connect(function(child)
  27. if string.find(child.Name:lower(), "cart") then hook(child) end
  28. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement