dannthebesttt

Untitled

Aug 11th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. local lp = game:GetService"Players".LocalPlayer
  2. local main = workspace["_Main"]
  3. local vehicles = main.Vehicles
  4.  
  5. local originalcframe = lp.Character:FindFirstChild"HumanoidRootPart".CFrame
  6. local gas = "Regular" -- Regular, Plus, Premium
  7. local gasamount = 20 -- change to how low gas has to be for it to autofill
  8.  
  9. _G.toggle = true
  10.  
  11. while _G.toggle do
  12. for _,v in pairs(vehicles:GetChildren()) do
  13. if v:IsA"Model" then
  14. if v.VehicleSeat.Values.Driver.Value == lp then
  15. if v.VehicleSeat.Values.Gas.Value < gasamount then
  16. v.PrimaryPart.Anchored = true
  17. v:SetPrimaryPartCFrame(CFrame.new(36935, 38, 27576))
  18. game:GetService"ReplicatedStorage".Events.RemoteEvent:FireServer("VehicleFillGas",{
  19. gas,
  20. lp.PlayerGui.Menus.GasStationMenu.GasStation.Value
  21. })
  22. else
  23. v.PrimaryPart.Anchored = false
  24. v:SetPrimaryPartCFrame(originalcframe)
  25. end
  26. end
  27. end
  28. end
  29. wait(1)
  30. end
Add Comment
Please, Sign In to add comment