Nova355killer

Car Noclip

Nov 21st, 2018
309
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. local car = nil
  2. local plr = game:GetService("Players").LocalPlayer
  3. for i, v in pairs(game:GetService("Workspace").Vehicles:GetChildren()) do
  4. local NoClip = function()
  5. if v.Name ~= "Heli" then
  6. if v:FindFirstChild("Seat") then
  7. v.Seat.PlayerName.Changed:Connect(function()
  8. if v.Seat.PlayerName.Value == plr.Name then
  9. print("Player Found in a "..v.Name)
  10. car = v
  11. if car:FindFirstChild("Model") then
  12. for i, k in pairs(car.Model:GetChildren()) do
  13. if k.Name ~= "Lights" then
  14. noclip = k.Touched:Connect(function(obj)
  15. if car.Seat.PlayerName.Value == plr.Name then
  16. if obj ~= game:GetService("Workspace").Terrain then
  17. if obj:IsA("Part") then
  18. obj.CanCollide = false
  19. end
  20. end
  21. else
  22. noclip:Disconnect()
  23. end
  24. end)
  25. end
  26. end
  27. end
  28. end
  29. end)
  30. end
  31. end
  32. end
  33. NoClip()
  34. v.ChildAdded:Connect(function()
  35. NoClip()
  36. end)
  37. end
Advertisement
Add Comment
Please, Sign In to add comment