SHOW:
|
|
- or go back to the newest paste.
| 1 | script.Parent = owner.Character | |
| 2 | - | Seat.Parent = owner.Character |
| 2 | + | |
| 3 | Seat.Parent = script | |
| 4 | Seat.Size = Vector3.new(4,1,10) | |
| 5 | Seat.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(0,8,-8.057) | |
| 6 | Seat.TopSurface = Enum.SurfaceType.Smooth | |
| 7 | Seat.BottomSurface = Enum.SurfaceType.Smooth | |
| 8 | - | Bumper.Parent = owner.Character |
| 8 | + | |
| 9 | - | Bumper.Size = Vector3.new(7.75,2.25,2.75) |
| 9 | + | Bumper.Parent = script |
| 10 | Bumper.Size = Vector3.new(7.75,2.25,1) | |
| 11 | Weldlol3 = Instance.new("Weld")
| |
| 12 | Weldlol3.Parent = Seat | |
| 13 | Weldlol3.Part0 = Seat | |
| 14 | - | Weldlol3.C1 = Weldlol3.C1 * CFrame.new(0,-1.25,11) |
| 14 | + | |
| 15 | Weldlol3.C1 = Weldlol3.C1 * CFrame.new(0,-1.25,9.75) | |
| 16 | - | Bumper2.Parent = owner.Character |
| 16 | + | side = Instance.new("Part")
|
| 17 | - | Bumper2.Size = Vector3.new(7.75,2.25,2.5) |
| 17 | + | side.Parent = script |
| 18 | side.Size = Vector3.new(1.75,0.25,17.15) | |
| 19 | Weldside = Instance.new("Weld")
| |
| 20 | Weldside.Parent = Seat | |
| 21 | Weldside.Part0 = Seat | |
| 22 | - | Weldlol31.C1 = Weldlol31.C1 * CFrame.new(0,-1.25,-11) |
| 22 | + | Weldside.Part1 = side |
| 23 | - | Bumper.Transparency = 1 |
| 23 | + | Weldside.C1 = Weldside.C1 * CFrame.new(3.0625,-2.25,0.625) |
| 24 | - | Bumper2.Transparency = 1 |
| 24 | + | side2 = Instance.new("Part")
|
| 25 | - | Mesh = Instance.new("SpecialMesh")
|
| 25 | + | side2.Parent = script |
| 26 | - | Mesh.Parent = Seat |
| 26 | + | side2.Size = Vector3.new(1.75,0.25,17.15) |
| 27 | - | Mesh.MeshId = "http://www.roblox.com/asset/?id=439129429" |
| 27 | + | Weldside2 = Instance.new("Weld")
|
| 28 | - | Mesh.TextureId = "http://www.roblox.com/asset/?id=439125379" |
| 28 | + | Weldside2.Parent = Seat |
| 29 | - | Mesh.Scale = Vector3.new(0.045, 0.045, 0.045) |
| 29 | + | Weldside2.Part0 = Seat |
| 30 | - | Mesh.Offset = Vector3.new(0, 2.5, 0) |
| 30 | + | Weldside2.Part1 = side2 |
| 31 | Weldside2.C1 = Weldside2.C1 * CFrame.new(-3.0625,-2.25,0.625) | |
| 32 | Bumper3 = Instance.new("Part")
| |
| 33 | Bumper3.Parent = script | |
| 34 | Bumper3.Size = Vector3.new(4,2.25,4.65) | |
| 35 | Weldlol32 = Instance.new("Weld")
| |
| 36 | Weldlol32.Parent = Bumper | |
| 37 | Weldlol32.Part0 = Bumper | |
| 38 | Weldlol32.Part1 = Bumper3 | |
| 39 | Weldlol32.C1 = Weldlol32.C1 * CFrame.new(0,0,-2.5) | |
| 40 | Bumper2 = Instance.new("Part")
| |
| 41 | Bumper2.Parent = script | |
| 42 | Bumper2.Size = Vector3.new(7.75,2.25,1) | |
| 43 | Weldlol31 = Instance.new("Weld")
| |
| 44 | Weldlol31.Parent = Seat | |
| 45 | Weldlol31.Part0 = Seat | |
| 46 | Weldlol31.Part1 = Bumper2 | |
| 47 | Weldlol31.C1 = Weldlol31.C1 * CFrame.new(0,-1.25,-8.5) | |
| 48 | Bumper4 = Instance.new("Part")
| |
| 49 | Bumper4.Parent = script | |
| 50 | Bumper4.Size = Vector3.new(4,2.25,4.65) | |
| 51 | Weldlol33 = Instance.new("Weld")
| |
| 52 | Weldlol33.Parent = Bumper2 | |
| 53 | Weldlol33.Part0 = Bumper2 | |
| 54 | Weldlol33.Part1 = Bumper4 | |
| 55 | Weldlol33.C1 = Weldlol33.C1 * CFrame.new(0,0,2.5) | |
| 56 | wheel = Instance.new("Part")
| |
| 57 | wheel.Parent = Seat | |
| 58 | wheel.Size = Vector3.new(1,3,3) | |
| 59 | steer = Instance.new("Part")
| |
| 60 | steer.Parent = Seat | |
| 61 | steer.Size = Vector3.new(1,1,1) | |
| 62 | steer2 = Instance.new("Part")
| |
| 63 | steer2.Parent = Seat | |
| 64 | steer2.Size = Vector3.new(1,1,1) | |
| 65 | steer.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(-3.739,1,-7.25) | |
| 66 | steer2.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(3.739,1,-7.25) | |
| 67 | steer.Transparency = 1 | |
| 68 | steer.CanCollide = false | |
| 69 | steer2.Transparency = 1 | |
| 70 | steer2.CanCollide = false | |
| 71 | wheelsus = Instance.new("Part")
| |
| 72 | wheelsus.Parent = Seat | |
| 73 | wheelsus.Size = Vector3.new(1,1,1) | |
| 74 | wheelsus2 = Instance.new("Part")
| |
| 75 | wheelsus2.Parent = Seat | |
| 76 | wheelsus2.Size = Vector3.new(1,1,1) | |
| 77 | wheelsus.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(-3.739,1,-7.25) | |
| 78 | wheelsus2.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(3.739,1,-7.25) | |
| 79 | wheelsus.Transparency = 1 | |
| 80 | wheelsus.CanCollide = false | |
| 81 | wheelsus2.Transparency = 1 | |
| 82 | wheelsus2.CanCollide = false | |
| 83 | Seat.Anchored = true | |
| 84 | wheel.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(-3.739,6.5,-7.25) | |
| 85 | wheel.TopSurface = Enum.SurfaceType.Smooth | |
| 86 | wheel.BottomSurface = Enum.SurfaceType.Smooth | |
| 87 | wheel2 = Instance.new("Part")
| |
| 88 | wheel2.Parent = Seat | |
| 89 | wheel2.Size = Vector3.new(1,3,3) | |
| 90 | wheel2.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(3.739,6.5,-7.25) | |
| 91 | wheel2.TopSurface = Enum.SurfaceType.Smooth | |
| 92 | wheel2.BottomSurface = Enum.SurfaceType.Smooth | |
| 93 | wheel3 = Instance.new("Part")
| |
| 94 | wheel3.Parent = Seat | |
| 95 | wheel3.Size = Vector3.new(1,3,3) | |
| 96 | wheel3.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(-3.739,6.5,5.75) | |
| 97 | wheel3.TopSurface = Enum.SurfaceType.Smooth | |
| 98 | wheel3.BottomSurface = Enum.SurfaceType.Smooth | |
| 99 | wheel4 = Instance.new("Part")
| |
| 100 | wheel4.Parent = Seat | |
| 101 | wheel4.Size = Vector3.new(1,3,3) | |
| 102 | wheel4.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(3.739,6.5,5.75) | |
| 103 | wheel4.TopSurface = Enum.SurfaceType.Smooth | |
| 104 | - | attachment131.Parent = steer |
| 104 | + | |
| 105 | wheel.Shape = Enum.PartType.Cylinder | |
| 106 | wheel2.Shape = Enum.PartType.Cylinder | |
| 107 | wheel3.Shape = Enum.PartType.Cylinder | |
| 108 | wheel4.Shape = Enum.PartType.Cylinder | |
| 109 | local attachment0 = Instance.new("Attachment")
| |
| 110 | - | attachment131.WorldCFrame = attachment131.Parent.CFrame * CFrame.new(-1,0,0) * CFrame.Angles(0,0,math.rad(-90)) |
| 110 | + | |
| 111 | local attachment1 = Instance.new("Attachment")
| |
| 112 | attachment1.Parent = Seat | |
| 113 | alignposition = Instance.new("HingeConstraint")
| |
| 114 | - | attachment1231.Parent = steer2 |
| 114 | + | |
| 115 | alignposition.ActuatorType = "Servo" | |
| 116 | alignposition.TargetAngle = 0 | |
| 117 | alignposition.Name = "Hinge4" | |
| 118 | alignposition.ServoMaxTorque = 10000000 | |
| 119 | alignposition.AngularSpeed = 10000000 | |
| 120 | - | attachment1231.WorldCFrame = attachment1231.Parent.CFrame * CFrame.new(-1,0,0) * CFrame.Angles(0,0,math.rad(-90)) |
| 120 | + | |
| 121 | alignposition.Attachment1 = attachment1 | |
| 122 | attachment1.WorldCFrame = attachment1.Parent.CFrame * CFrame.new(-3.739,1,-7.25) * CFrame.Angles(0,math.rad(180),math.rad(90)) | |
| 123 | local attachment02 = Instance.new("Attachment")
| |
| 124 | attachment02.Parent = steer2 | |
| 125 | local attachment12 = Instance.new("Attachment")
| |
| 126 | attachment12.Parent = Seat | |
| 127 | alignposition2 = Instance.new("HingeConstraint")
| |
| 128 | alignposition2.Parent = Seat | |
| 129 | alignposition2.ActuatorType = "Servo" | |
| 130 | alignposition2.TargetAngle = 0 | |
| 131 | alignposition2.Name = "Hinge3" | |
| 132 | alignposition2.ServoMaxTorque = 10000000 | |
| 133 | alignposition2.AngularSpeed = 10000000 | |
| 134 | alignposition2.Attachment0 = attachment02 | |
| 135 | alignposition2.Attachment1 = attachment12 | |
| 136 | attachment12.WorldCFrame = attachment12.Parent.CFrame * CFrame.new(3.739,1,-7.25) * CFrame.Angles(0,0,math.rad(90)) | |
| 137 | task.wait() | |
| 138 | local attachment031 = Instance.new("Attachment")
| |
| 139 | attachment031.Parent = wheel | |
| 140 | local attachment131 = Instance.new("Attachment")
| |
| 141 | attachment131.Parent = wheelsus | |
| 142 | alignposition31 = Instance.new("HingeConstraint")
| |
| 143 | alignposition31.Parent = Seat | |
| 144 | alignposition31.ActuatorType = Enum.ActuatorType.None | |
| 145 | alignposition31.Attachment0 = attachment031 | |
| 146 | alignposition31.Attachment1 = attachment131 | |
| 147 | local attachment0231 = Instance.new("Attachment")
| |
| 148 | attachment0231.Parent = wheel2 | |
| 149 | local attachment1231 = Instance.new("Attachment")
| |
| 150 | attachment1231.Parent = wheelsus2 | |
| 151 | alignposition231 = Instance.new("HingeConstraint")
| |
| 152 | alignposition231.Parent = Seat | |
| 153 | alignposition231.ActuatorType = Enum.ActuatorType.None | |
| 154 | alignposition231.Attachment0 = attachment0231 | |
| 155 | alignposition231.Attachment1 = attachment1231 | |
| 156 | local attachment03 = Instance.new("Attachment")
| |
| 157 | attachment03.Parent = wheel3 | |
| 158 | local attachment13 = Instance.new("Attachment")
| |
| 159 | attachment13.Parent = Seat | |
| 160 | alignposition3 = Instance.new("HingeConstraint")
| |
| 161 | alignposition3.Parent = Seat | |
| 162 | alignposition3.ActuatorType = "Motor" | |
| 163 | alignposition3.MotorMaxAcceleration = 10000000 | |
| 164 | alignposition3.MotorMaxTorque = 10000000 | |
| 165 | alignposition3.Name = "Hinge1" | |
| 166 | alignposition3.Attachment0 = attachment03 | |
| 167 | alignposition3.Attachment1 = attachment13 | |
| 168 | attachment13.WorldCFrame = attachment13.Parent.CFrame * CFrame.new(-3.739,0,5.75)* CFrame.Angles(0,math.rad(180),0) | |
| 169 | local attachment023 = Instance.new("Attachment")
| |
| 170 | attachment023.Parent = wheel4 | |
| 171 | local attachment123 = Instance.new("Attachment")
| |
| 172 | attachment123.Parent = Seat | |
| 173 | alignposition23 = Instance.new("HingeConstraint")
| |
| 174 | alignposition23.Parent = Seat | |
| 175 | alignposition23.ActuatorType = "Motor" | |
| 176 | alignposition23.MotorMaxAcceleration = 10000000 | |
| 177 | - | function killfunction(part) |
| 177 | + | |
| 178 | - | pcall(function() |
| 178 | + | |
| 179 | - | if Seat.Throttle == 1 or Seat.Throttle == -1 then |
| 179 | + | |
| 180 | - | local Model = part:FindFirstAncestorOfClass("Model")
|
| 180 | + | |
| 181 | - | if Model then |
| 181 | + | |
| 182 | - | local PC = game:GetService("Players"):GetPlayerFromCharacter(Model)
|
| 182 | + | |
| 183 | - | if PC then |
| 183 | + | |
| 184 | - | if PC ~= owner then |
| 184 | + | |
| 185 | - | if PC.Character.Humanoid.Health ~= 0 then |
| 185 | + | |
| 186 | - | PC.Character.Humanoid.BreakJointsOnDeath = false |
| 186 | + | |
| 187 | - | PC.Character.Humanoid.Health = 0 |
| 187 | + | |
| 188 | - | BAHAHHAHAHA = Instance.new("Sound", PC.Character.Head)
|
| 188 | + | |
| 189 | - | BAHAHHAHAHA.SoundId = "rbxassetid://6069962045" |
| 189 | + | |
| 190 | - | BAHAHHAHAHA.Volume = 1 |
| 190 | + | |
| 191 | - | BAHAHHAHAHA:Play() |
| 191 | + | |
| 192 | - | local limbcollider = Instance.new("Part", PC.Character:findFirstChild("Right Arm"))
|
| 192 | + | |
| 193 | - | limbcollider.Size = Vector3.new(1.4,1,1) |
| 193 | + | |
| 194 | - | limbcollider.Shape = "Cylinder" |
| 194 | + | |
| 195 | - | limbcollider.Transparency = 1 |
| 195 | + | |
| 196 | - | limbcollider.Name = "LimbCollider" |
| 196 | + | |
| 197 | - | local limbcolliderweld = Instance.new("Weld", limbcollider)
|
| 197 | + | |
| 198 | - | limbcolliderweld.Part0 = PC.Character:findFirstChild("Right Arm")
|
| 198 | + | |
| 199 | - | limbcolliderweld.Part1 = limbcollider |
| 199 | + | |
| 200 | - | limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0) |
| 200 | + | |
| 201 | - | local limbcollider2 = Instance.new("Part", PC.Character:findFirstChild("Left Arm"))
|
| 201 | + | |
| 202 | - | limbcollider2.Size = Vector3.new(1.4,1,1) |
| 202 | + | |
| 203 | - | limbcollider2.Shape = "Cylinder" |
| 203 | + | |
| 204 | - | limbcollider2.Transparency = 1 |
| 204 | + | |
| 205 | - | limbcollider2.Name = "LimbCollider" |
| 205 | + | |
| 206 | - | local limbcolliderweld2 = Instance.new("Weld", limbcollider)
|
| 206 | + | |
| 207 | - | limbcolliderweld2.Part0 = PC.Character:findFirstChild("Left Arm")
|
| 207 | + | |
| 208 | - | limbcolliderweld2.Part1 = limbcollider2 |
| 208 | + | |
| 209 | - | limbcolliderweld2.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0) |
| 209 | + | |
| 210 | - | local limbcollider3 = Instance.new("Part", PC.Character:findFirstChild("Right Leg"))
|
| 210 | + | |
| 211 | - | limbcollider3.Size = Vector3.new(1.3,1,1) |
| 211 | + | |
| 212 | - | limbcollider3.Shape = "Cylinder" |
| 212 | + | |
| 213 | - | limbcollider3.Transparency = 1 |
| 213 | + | |
| 214 | - | limbcollider3.Name = "LimbCollider" |
| 214 | + | |
| 215 | - | local limbcolliderweld3 = Instance.new("Weld", limbcollider)
|
| 215 | + | |
| 216 | - | limbcolliderweld3.Part0 = PC.Character:findFirstChild("Right Leg")
|
| 216 | + | |
| 217 | - | limbcolliderweld3.Part1 = limbcollider3 |
| 217 | + | |
| 218 | - | limbcolliderweld3.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0) |
| 218 | + | |
| 219 | - | local limbcollider4 = Instance.new("Part", PC.Character:findFirstChild("Left Leg"))
|
| 219 | + | |
| 220 | - | limbcollider4.Size = Vector3.new(1.3,1,1) |
| 220 | + | |
| 221 | - | limbcollider4.Shape = "Cylinder" |
| 221 | + | |
| 222 | - | limbcollider4.Transparency = 1 |
| 222 | + | |
| 223 | - | limbcollider4.Name = "LimbCollider" |
| 223 | + | |
| 224 | - | local limbcolliderweld4 = Instance.new("Weld", limbcollider)
|
| 224 | + | |
| 225 | - | limbcolliderweld4.Part0 = PC.Character:findFirstChild("Left Leg")
|
| 225 | + | |
| 226 | - | limbcolliderweld4.Part1 = limbcollider4 |
| 226 | + | |
| 227 | - | limbcolliderweld4.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0) |
| 227 | + | |
| 228 | - | for i,v in pairs(PC.Character:GetDescendants()) do |
| 228 | + | |
| 229 | - | if v:IsA("Motor6D") and v.Parent.Name ~= "HumanoidRootPart" then
|
| 229 | + | |
| 230 | - | local Socket = Instance.new("BallSocketConstraint")
|
| 230 | + | Mesh5.Scale = Vector3.new(0.045, 0.045, 0.045) |
| 231 | - | local a1 = Instance.new("Attachment")
|
| 231 | + | local carHealth = 125 |
| 232 | - | local a2 = Instance.new("Attachment")
|
| 232 | + | times = 0 |
| 233 | - | a1.Parent = v.Part0 |
| 233 | + | function byecar() |
| 234 | - | a2.Parent = v.Part1 |
| 234 | + | times = times + 1 |
| 235 | - | Socket.Parent = v.Parent |
| 235 | + | if times == 1 then |
| 236 | - | Socket.Attachment0 = a1 |
| 236 | + | leftpart = Instance.new("Part", Seat)
|
| 237 | - | Socket.Attachment1 = a2 |
| 237 | + | leftpart.Transparency = 1 |
| 238 | - | a1.CFrame = v.C0 |
| 238 | + | leftpart.Anchored = true |
| 239 | - | a2.CFrame = v.C1 |
| 239 | + | leftpart.CanCollide = false |
| 240 | - | Socket.LimitsEnabled = true |
| 240 | + | leftpart.CFrame = Seat.CFrame |
| 241 | - | Socket.TwistLimitsEnabled = true |
| 241 | + | leftpart.Name = "soundpart" |
| 242 | - | v:Destroy() |
| 242 | + | local goodbye = Instance.new("Sound", leftpart)
|
| 243 | - | end |
| 243 | + | goodbye.SoundId = "rbxassetid://4407929531" |
| 244 | local windows = Instance.new("Sound", leftpart)
| |
| 245 | windows.SoundId = "rbxassetid://5994223709" | |
| 246 | windows.Volume = 1.5 | |
| 247 | goodbye.Volume = 1.5 | |
| 248 | goodbye:Play() | |
| 249 | task.wait() | |
| 250 | goodbye.Ended:Wait() | |
| 251 | windows:Play() | |
| 252 | - | Bumper.Touched:Connect(killfunction) |
| 252 | + | |
| 253 | - | Bumper2.Touched:Connect(killfunction) |
| 253 | + | for i,v in pairs(script:GetDescendants()) do |
| 254 | if v:IsA("BasePart") or v:IsA("VehicleSeat") then
| |
| 255 | local tweenService = game:GetService("TweenService")
| |
| 256 | ||
| 257 | local timeToFade = windows.TimeLength * 0.5 | |
| 258 | local object = v | |
| 259 | local tweenInfo = TweenInfo.new(timeToFade) | |
| 260 | local goal = {}
| |
| 261 | goal.Transparency = 1 | |
| 262 | ||
| 263 | local tween = tweenService:Create(object, tweenInfo, goal) | |
| 264 | tween:Play() | |
| 265 | end | |
| 266 | end | |
| 267 | task.wait() | |
| 268 | wait(windows.TimeLength * 0.5) | |
| 269 | for i,v in pairs(script:GetDescendants()) do | |
| 270 | if v:IsA("BasePart") or v:IsA("VehicleSeat") and v.Name ~= "soundpart" then
| |
| 271 | v:Destroy() | |
| 272 | end | |
| 273 | - | Mesh5.Scale = Vector3.new(0.045, 0.045, 0.045) |
| 273 | + | |
| 274 | windows.Ended:Wait() | |
| 275 | goodbye:Destroy() | |
| 276 | windows:Destroy() | |
| 277 | leftpart:Destroy() | |
| 278 | end | |
| 279 | end | |
| 280 | Bumper.Touched:Connect(function(Hit) | |
| 281 | ||
| 282 | local Speed = math.floor((Bumper.Velocity - Hit.Velocity).magnitude) | |
| 283 | ||
| 284 | if Speed > 30 and not game.Players:GetPlayerFromCharacter(Hit.Parent) and not Hit.CanCollide == false then | |
| 285 | ||
| 286 | carHealth = carHealth - Bumper.Velocity.Magnitude / 1.06 | |
| 287 | ||
| 288 | end | |
| 289 | ||
| 290 | if carHealth <= 10 then | |
| 291 | Seat.Disabled = true | |
| 292 | byecar() | |
| 293 | end | |
| 294 | end) | |
| 295 | ||
| 296 | Bumper2.Touched:Connect(function(Hit) | |
| 297 | ||
| 298 | local Speed = math.floor((Bumper2.Velocity - Hit.Velocity).magnitude) | |
| 299 | ||
| 300 | if Speed > 30 and not game.Players:GetPlayerFromCharacter(Hit.Parent) and not Hit.CanCollide == false then | |
| 301 | ||
| 302 | carHealth = carHealth - Bumper2.Velocity.Magnitude / 1.06 | |
| 303 | ||
| 304 | end | |
| 305 | if carHealth <= 10 then | |
| 306 | Seat.Disabled = true | |
| 307 | byecar() | |
| 308 | end | |
| 309 | end) | |
| 310 | for i,v in pairs(script:GetDescendants()) do | |
| 311 | if v:IsA("BasePart") or v:IsA("VehicleSeat") then
| |
| 312 | v.TopSurface = Enum.SurfaceType.Smooth | |
| 313 | v.BottomSurface = Enum.SurfaceType.Smooth | |
| 314 | end | |
| 315 | end | |
| 316 | E = Instance.new("RemoteEvent", owner.Character)
| |
| 317 | E.Name = "the" | |
| 318 | function lightslol(plr, action) | |
| 319 | if plr == Seat.Occupant then | |
| 320 | if action == "Lights" then | |
| 321 | print("on")
| |
| 322 | elseif action == "off" then | |
| 323 | print("off")
| |
| 324 | end | |
| 325 | end | |
| 326 | end | |
| 327 | local lightsnls = NLS([[ | |
| 328 | E = owner.Character:WaitForChild("the")
| |
| 329 | local mouse | |
| 330 | script.AncestryChanged:Connect(function() | |
| 331 | local mouse = script.Parent.Parent:GetMouse() | |
| 332 | end) | |
| 333 | local count = 0 | |
| 334 | mouse.KeyDown:connect(function(key) | |
| 335 | key = key:lower() | |
| 336 | if key == "l" then | |
| 337 | count = count + 1 | |
| 338 | if count == 1 then | |
| 339 | E:FireServer("Lights")
| |
| 340 | elseif count == 2 then | |
| 341 | E:FireServer("off")
| |
| 342 | task.wait() | |
| 343 | count = 0 | |
| 344 | end | |
| 345 | end | |
| 346 | end) | |
| 347 | task.wait() | |
| 348 | script.Parent = owner.PlayerGui | |
| 349 | ]],owner.PlayerGui) | |
| 350 | wait(0.1) | |
| 351 | lightsnls.Parent = owner.PlayerGui | |
| 352 | E.OnServerEvent:Connect(lightslol) | |
| 353 | Seat.ChildAdded:connect(function() | |
| 354 | local plr = game.Players:GetPlayerFromCharacter(Seat.Occupant.Parent) | |
| 355 | local screengui = Instance.new("ScreenGui", plr:findFirstChildOfClass("PlayerGui"))
| |
| 356 | screengui.ResetOnSpawn = true | |
| 357 | screengui.Name = "youfailed" | |
| 358 | local tl = Instance.new("TextLabel", screengui)
| |
| 359 | tl.Size = UDim2.new(1,0,1,0) | |
| 360 | tl.AnchorPoint = Vector2.new(0.5, 0.5) | |
| 361 | tl.Position = UDim2.new(0.5, 0, 0.5, 0) | |
| 362 | tl.Text = "The local script is controls for car lights" | |
| 363 | tl.BackgroundTransparency = 1 | |
| 364 | tl.TextTransparency = 0 | |
| 365 | tl.TextColor3 = Color3.new(1, 1, 1) | |
| 366 | tl.TextSize = 50 | |
| 367 | lightsnls.Parent = plr.PlayerGui | |
| 368 | wait(2.5) | |
| 369 | screengui:Destroy() | |
| 370 | end) | |
| 371 | local at0 = Instance.new("Attachment" , steer)
| |
| 372 | at0.CFrame = CFrame.Angles(0,0,math.rad(-90)) | |
| 373 | local at1 = Instance.new("Attachment" , wheelsus)
| |
| 374 | at1.CFrame = CFrame.Angles(0,0,math.rad(-90)) | |
| 375 | local spring = Instance.new("SpringConstraint" , steer)
| |
| 376 | spring.Attachment0 = at0 | |
| 377 | spring.Attachment1 = at1 | |
| 378 | spring.Stiffness = 700 | |
| 379 | spring.Damping = 200 | |
| 380 | spring.FreeLength = 8 | |
| 381 | spring.LimitsEnabled = true | |
| 382 | spring.MaxForce = 10000 | |
| 383 | spring.MaxLength = 15 | |
| 384 | spring.MinLength = 2 | |
| 385 | spring.Enabled = true | |
| 386 | spring.Visible = true | |
| 387 | local prism = Instance.new("PrismaticConstraint" , steer)
| |
| 388 | prism.Attachment0 = at0 | |
| 389 | prism.Attachment1 = at1 | |
| 390 | local at2 = Instance.new("Attachment" , steer2)
| |
| 391 | at2.CFrame = CFrame.Angles(0,0,math.rad(-90)) | |
| 392 | local at3 = Instance.new("Attachment" , wheelsus2)
| |
| 393 | at3.CFrame = CFrame.Angles(0,0,math.rad(-90)) | |
| 394 | local spring2 = Instance.new("SpringConstraint" , steer2)
| |
| 395 | spring2.Attachment0 = at3 | |
| 396 | spring2.Attachment1 = at4 | |
| 397 | spring2.Stiffness = 700 | |
| 398 | spring2.Damping = 200 | |
| 399 | spring2.FreeLength = 8 | |
| 400 | spring2.LimitsEnabled = true | |
| 401 | spring2.MaxForce = 10000 | |
| 402 | spring2.MaxLength = 15 | |
| 403 | spring2.MinLength = 2 | |
| 404 | spring2.Enabled = true | |
| 405 | spring2.Visible = true | |
| 406 | local prism2 = Instance.new("PrismaticConstraint" , steer2)
| |
| 407 | prism2.Attachment0 = at3 | |
| 408 | prism2.Attachment1 = at4 | |
| 409 | at4.WorldCFrame = at4.Parent.CFrame * CFrame.new(-1,0,0) * CFrame.Angles(0,0,math.rad(-90)) | |
| 410 | at3.WorldCFrame = at3.Parent.CFrame * CFrame.new(-1,0,0) * CFrame.Angles(0,0,math.rad(-90)) | |
| 411 | at1.WorldCFrame = at1.Parent.CFrame * CFrame.new(-1,0,0) * CFrame.Angles(0,0,math.rad(-90)) | |
| 412 | at2.WorldCFrame = at2.Parent.CFrame * CFrame.new(-1,0,0) * CFrame.Angles(0,0,math.rad(-90)) |