Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local car = nil
- local plr = game:GetService("Players").LocalPlayer
- for i, v in pairs(game:GetService("Workspace").Vehicles:GetChildren()) do
- local NoClip = function()
- if v.Name ~= "Heli" then
- if v:FindFirstChild("Seat") then
- v.Seat.PlayerName.Changed:Connect(function()
- if v.Seat.PlayerName.Value == plr.Name then
- print("Player Found in a "..v.Name)
- car = v
- if car:FindFirstChild("Model") then
- for i, k in pairs(car.Model:GetChildren()) do
- if k.Name ~= "Lights" then
- noclip = k.Touched:Connect(function(obj)
- if car.Seat.PlayerName.Value == plr.Name then
- if obj ~= game:GetService("Workspace").Terrain then
- if obj:IsA("Part") then
- obj.CanCollide = false
- end
- end
- else
- noclip:Disconnect()
- end
- end)
- end
- end
- end
- end
- end)
- end
- end
- end
- NoClip()
- v.ChildAdded:Connect(function()
- NoClip()
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment