· 7 years ago · Dec 07, 2018, 06:26 AM
1-- This script has been converted to FE by iPxter
2
3
4if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
5local Player,Mouse,mouse,UserInputService,ContextActionService = owner
6do
7 print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
8 script.Parent = Player.Character
9
10 --RemoteEvent for communicating
11 local Event = Instance.new("RemoteEvent")
12 Event.Name = "UserInput_Event"
13
14 --Fake event to make stuff like Mouse.KeyDown work
15 local function fakeEvent()
16 local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
17 t.connect = t.Connect
18 return t
19 end
20
21 --Creating fake input objects with fake variables
22 local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
23 local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
24 local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
25 CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
26 end}
27 --Merged 2 functions into one by checking amount of arguments
28 CAS.UnbindAction = CAS.BindAction
29
30 --This function will trigger the events that have been :Connect()'ed
31 local function te(self,ev,...)
32 local t = m[ev]
33 if t and t._fakeEvent and t.Function then
34 t.Function(...)
35 end
36 end
37 m.TrigEvent = te
38 UIS.TrigEvent = te
39
40 Event.OnServerEvent:Connect(function(plr,io)
41 if plr~=Player then return end
42 if io.isMouse then
43 m.Target = io.Target
44 m.Hit = io.Hit
45 else
46 local b = io.UserInputState == Enum.UserInputState.Begin
47 if io.UserInputType == Enum.UserInputType.MouseButton1 then
48 return m:TrigEvent(b and "Button1Down" or "Button1Up")
49 end
50 for _,t in pairs(CAS.Actions) do
51 for _,k in pairs(t.Keys) do
52 if k==io.KeyCode then
53 t.Function(t.Name,io.UserInputState,io)
54 end
55 end
56 end
57 m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
58 UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
59 end
60 end)
61 Event.Parent = NLS([==[
62 local Player = game:GetService("Players").LocalPlayer
63 local Event = script:WaitForChild("UserInput_Event")
64
65 local UIS = game:GetService("UserInputService")
66 local input = function(io,a)
67 if a then return end
68 --Since InputObject is a client-side instance, we create and pass table instead
69 Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
70 end
71 UIS.InputBegan:Connect(input)
72 UIS.InputEnded:Connect(input)
73
74 local Mouse = Player:GetMouse()
75 local h,t
76 --Give the server mouse data 30 times every second, but only if the values changed
77 --If player is not moving their mouse, client won't fire events
78 while wait(1/30) do
79 if h~=Mouse.Hit or t~=Mouse.Target then
80 h,t=Mouse.Hit,Mouse.Target
81 Event:FireServer({isMouse=true,Target=t,Hit=h})
82 end
83 end]==],Player.Character)
84 Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
85end
86--Converted with ttyyuu12345's model to script plugin v4
87function sandbox(var,func)
88 local env = getfenv(func)
89 local newenv = setmetatable({},{
90 __index = function(self,k)
91 if k=="script" then
92 return var
93 else
94 return env[k]
95 end
96 end,
97 })
98 setfenv(func,newenv)
99 return func
100end
101cors = {}
102mas = Instance.new("Model",game:GetService("Lighting"))
103Model0 = Instance.new("Model")
104Part1 = Instance.new("Part")
105Configuration2 = Instance.new("Configuration")
106NumberValue3 = Instance.new("NumberValue")
107NumberValue4 = Instance.new("NumberValue")
108BoolValue5 = Instance.new("BoolValue")
109NumberValue6 = Instance.new("NumberValue")
110Part7 = Instance.new("Part")
111Part8 = Instance.new("Part")
112Sound9 = Instance.new("Sound")
113Sound10 = Instance.new("Sound")
114Sound11 = Instance.new("Sound")
115VehicleSeat12 = Instance.new("VehicleSeat")
116BlockMesh13 = Instance.new("BlockMesh")
117Script14 = Instance.new("Script")
118LocalScript15 = Instance.new("LocalScript")
119ObjectValue16 = Instance.new("ObjectValue")
120Script17 = Instance.new("Script")
121Part18 = Instance.new("Part")
122VehicleSeat19 = Instance.new("VehicleSeat")
123Part20 = Instance.new("Part")
124CylinderMesh21 = Instance.new("CylinderMesh")
125Decal22 = Instance.new("Decal")
126Part23 = Instance.new("Part")
127BlockMesh24 = Instance.new("BlockMesh")
128Decal25 = Instance.new("Decal")
129Part26 = Instance.new("Part")
130Part27 = Instance.new("Part")
131Part28 = Instance.new("Part")
132Part29 = Instance.new("Part")
133SpecialMesh30 = Instance.new("SpecialMesh")
134Part31 = Instance.new("Part")
135CylinderMesh32 = Instance.new("CylinderMesh")
136Decal33 = Instance.new("Decal")
137Part34 = Instance.new("Part")
138CylinderMesh35 = Instance.new("CylinderMesh")
139Decal36 = Instance.new("Decal")
140Part37 = Instance.new("Part")
141CylinderMesh38 = Instance.new("CylinderMesh")
142Decal39 = Instance.new("Decal")
143Part40 = Instance.new("Part")
144Part41 = Instance.new("Part")
145SpecialMesh42 = Instance.new("SpecialMesh")
146Part43 = Instance.new("Part")
147SpecialMesh44 = Instance.new("SpecialMesh")
148Model0.Name = "16x6 car chassis"
149Model0.Parent = mas
150Part1.Parent = Model0
151Part1.CFrame = CFrame.new(71.3899536, 1.35003054, -10.4250937, 1, 1.19209474e-07, -8.67636027e-06, -1.1920924e-07, 1, 3.90586692e-08, 2.06419645e-06, -4.01838562e-08, 1)
152Part1.Position = Vector3.new(71.3899536, 1.35003054, -10.4250937)
153Part1.Color = Color3.new(0.105882, 0.164706, 0.207843)
154Part1.Transparency = 1
155Part1.Size = Vector3.new(5.99999905, 1, 2.00000238)
156Part1.BackSurface = Enum.SurfaceType.SmoothNoOutlines
157Part1.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
158Part1.BrickColor = BrickColor.new("Black")
159Part1.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
160Part1.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
161Part1.Material = Enum.Material.SmoothPlastic
162Part1.RightSurface = Enum.SurfaceType.SmoothNoOutlines
163Part1.brickColor = BrickColor.new("Black")
164Part1.FormFactor = Enum.FormFactor.Custom
165Part1.formFactor = Enum.FormFactor.Custom
166Configuration2.Parent = Model0
167NumberValue3.Name = "Reverse Speed"
168NumberValue3.Parent = Configuration2
169NumberValue3.Value = 20
170NumberValue4.Name = "Forwards Speed"
171NumberValue4.Parent = Configuration2
172NumberValue4.Value = 60
173BoolValue5.Name = "Allow Flipping"
174BoolValue5.Parent = Configuration2
175BoolValue5.Value = true
176NumberValue6.Name = "Torque"
177NumberValue6.Parent = Configuration2
178NumberValue6.Value = 5
179Part7.Parent = Model0
180Part7.CFrame = CFrame.new(71.3899231, 1.35003018, 4.09491634, 1, 1.1920929e-07, -4.92264398e-08, -1.1920929e-07, 1, 4.05266221e-08, 2.92969453e-08, -4.05303311e-08, 1)
181Part7.Position = Vector3.new(71.3899231, 1.35003018, 4.09491634)
182Part7.Color = Color3.new(0.105882, 0.164706, 0.207843)
183Part7.Transparency = 1
184Part7.Size = Vector3.new(5.99999905, 1, 2.00000238)
185Part7.BackSurface = Enum.SurfaceType.SmoothNoOutlines
186Part7.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
187Part7.BrickColor = BrickColor.new("Black")
188Part7.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
189Part7.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
190Part7.Material = Enum.Material.SmoothPlastic
191Part7.RightSurface = Enum.SurfaceType.SmoothNoOutlines
192Part7.brickColor = BrickColor.new("Black")
193Part7.FormFactor = Enum.FormFactor.Custom
194Part7.formFactor = Enum.FormFactor.Custom
195Part8.Name = "EngineBlock"
196Part8.Parent = Model0
197Part8.CFrame = CFrame.new(71.3899231, 2.85003662, -7.92511177, -1, 1.19209375e-07, 3.18911179e-06, 1.19209361e-07, 1, -3.99775892e-08, 3.28543365e-06, -4.1079776e-08, -1)
198Part8.Orientation = Vector3.new(0, 180, 0)
199Part8.Position = Vector3.new(71.3899231, 2.85003662, -7.92511177)
200Part8.Rotation = Vector3.new(180, 0, -180)
201Part8.Transparency = 1
202Part8.Size = Vector3.new(3, 2, 3.00000048)
203Part8.BackSurface = Enum.SurfaceType.SmoothNoOutlines
204Part8.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
205Part8.CanCollide = false
206Part8.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
207Part8.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
208Part8.Material = Enum.Material.SmoothPlastic
209Part8.RightSurface = Enum.SurfaceType.SmoothNoOutlines
210Part8.TopSurface = Enum.SurfaceType.SmoothNoOutlines
211Part8.FormFactor = Enum.FormFactor.Custom
212Part8.formFactor = Enum.FormFactor.Custom
213Sound9.Name = "Starting"
214Sound9.Parent = Part8
215Sound9.EmitterSize = 0
216Sound9.MinDistance = 0
217Sound9.SoundId = "http://www.roblox.com/asset/?id=174967904"
218Sound10.Name = "Running"
219Sound10.Parent = Part8
220Sound10.Looped = true
221Sound10.EmitterSize = 0
222Sound10.MinDistance = 0
223Sound10.SoundId = "http://www.roblox.com/asset/?id=174967895"
224Sound11.Name = "Stopping"
225Sound11.Parent = Part8
226Sound11.EmitterSize = 0
227Sound11.MinDistance = 0
228Sound11.SoundId = "http://www.roblox.com/asset/?id=174967918"
229VehicleSeat12.Name = "Drive"
230VehicleSeat12.Parent = Model0
231VehicleSeat12.CFrame = CFrame.new(71.3899384, 1.33500803, -3.42506099, 1, 1.1920929e-07, -4.92264398e-08, -1.1920929e-07, 1, 4.05266221e-08, 2.92969453e-08, -4.05303311e-08, 1)
232VehicleSeat12.Position = Vector3.new(71.3899384, 1.33500803, -3.42506099)
233VehicleSeat12.Color = Color3.new(0.768628, 0.156863, 0.109804)
234VehicleSeat12.MaxSpeed = 0
235VehicleSeat12.Size = Vector3.new(2, 0.350000054, 1)
236VehicleSeat12.Torque = 0
237VehicleSeat12.BackSurface = Enum.SurfaceType.Weld
238VehicleSeat12.BottomSurface = Enum.SurfaceType.Glue
239VehicleSeat12.BrickColor = BrickColor.new("Bright red")
240VehicleSeat12.CanCollide = false
241VehicleSeat12.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
242VehicleSeat12.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
243VehicleSeat12.Material = Enum.Material.SmoothPlastic
244VehicleSeat12.RightSurface = Enum.SurfaceType.SmoothNoOutlines
245VehicleSeat12.TopSurface = Enum.SurfaceType.SmoothNoOutlines
246VehicleSeat12.brickColor = BrickColor.new("Bright red")
247VehicleSeat12.HeadsUpDisplay = false
248VehicleSeat12.TurnSpeed = 0
249BlockMesh13.Name = "Part"
250BlockMesh13.Parent = VehicleSeat12
251BlockMesh13.Offset = Vector3.new(0, 0, -0.5)
252BlockMesh13.Scale = Vector3.new(1, 1, 2)
253Script14.Name = "FE Script"
254Script14.Parent = VehicleSeat12
255table.insert(cors,sandbox(Script14,function()
256--MADE BY NWSPACEK
257wait(0.1)
258Players = game:GetService("Players")
259
260seat = script.Parent-- the driving seat
261car = seat.Parent
262
263Player = nil
264
265forwardsSpeed = 60--if you removed the Configuration folder, it defaults to this speed forwards
266reverseSpeed = 20--if you removed the Configuration folder, it defaults to this speed backwards
267allowFlipping = true--if you removed the Configuration folder, it defaults to automatically flipping
268StartTime = 1.2--how long (in seconds) the car should wait before starting up. This is dependant on the starting sfx
269
270engineBlock = car:FindFirstChild("EngineBlock")--maybe someone doesn't like sound?
271
272lightsOn = false-- whether or not the lights turn on
273carRunning = false--whether or not the car is running
274
275RemoteControlled = car:FindFirstChild("ControlByRemote")--this is so the car turns properly
276
277function CalculatePitch()--this returns the pitch that the engine should be at when its travelling
278 return 1+RemoteControlled.Velocity.magnitude/100
279end
280
281Configuration = car:FindFirstChild("Configuration")-- so you can change the stats of the car
282if Configuration then-- if we found an object named Configuration in the car then do this stuff:
283 local ReverseSpeedValue = Configuration:FindFirstChild("Reverse Speed")-- do we have a reverse speed?
284 if ReverseSpeedValue ~= nil then
285 if type(ReverseSpeedValue.Value) == "number" then
286 reverseSpeed = ReverseSpeedValue.Value
287 end
288 ReverseSpeedValue.Changed:connect(function()-- level 1 scripting: go
289 if ReverseSpeedValue.Parent ~= nil then-- this script works, but there are some things
290 if type(ReverseSpeedValue.Value) == "number" then-- to make it look a little better
291 reverseSpeed = ReverseSpeedValue.Value
292 UpdateVehicle()
293 end
294 end
295 end)
296 end
297 local ForwardsSpeedValue = Configuration:FindFirstChild("Forwards Speed")
298 if ForwardsSpeedValue then
299 if type(ForwardsSpeedValue.Value) == "number" then
300 forwardsSpeed = ForwardsSpeedValue.Value
301 end
302 ForwardsSpeedValue.Changed:connect(function()-- level 2 scripting: go
303 if ForwardsSpeedValue.Parent then -- asking if something 'is' is the same as
304 if ForwardsSpeedValue.Value then-- asking if it is "~= nil"
305 forwardsSpeed = ForwardsSpeedValue.Value
306 UpdateVehicle()
307 end
308 end
309 end)
310 end
311
312 local AllowFlippingValue = Configuration:FindFirstChild("Allow Flipping")
313 if AllowFlippingValue then
314 if type(AllowFlippingValue.Value)=="boolean" then
315 allowFlipping = AllowFlippingValue.Value
316 end -- level 3 scripting: go
317 AllowFlippingValue.Changed:connect(function()-- the script executes a chain of
318 if AllowFlippingValue.Parent and type(AllowFlippingValue.Value) == "boolean" then-- "and" statements in the order they
319 allowFlipping = AllowFlippingValue.Value-- come in so if the first one isn't "true" then
320 -- it will skip the rest
321 end
322 end)
323 end
324 local TorqueValue = Configuration:FindFirstChild("Torque")
325 if TorqueValue then
326 if type(TorqueValue.Value)=="number" and RemoteControlled then
327 RemoteControlled.Torque = TorqueValue.Value
328 end
329 TorqueValue.Changed:connect(function()
330 if TorqueValue.Parent and type(TorqueValue.Value) == "number" and RemoteControlled then
331 RemoteControlled.Torque = TorqueValue.Value
332 end
333 end)
334 end
335end
336
337script.CarSteering.Seat.Value = seat
338
339if not RemoteControlled:IsA("VehicleSeat") then-- how dare you try to disturb this ancient harmony
340 RemoteControlled = nil-- no food 4 u!
341end
342
343seat.ChildAdded:connect(function(it)-- something was added to our seat!
344 if it:IsA("Weld") and it.Name == "SeatWeld" then-- is it the kind of thing players use to sit with?
345 Player = Players:GetPlayerFromCharacter(it.Part1.Parent)-- is there a player attached to it?
346 if Player then-- hooray! a player WAS attached to the seat weld. It's time to start the car!
347 script.CarSteering:Clone().Parent = Player.Backpack-- for better driving
348 RemoteControlled.MaxSpeed = 0-- not yet little child
349 if engineBlock and engineBlock:FindFirstChild("Starting") and engineBlock.Starting:IsA("Sound") then
350 engineBlock.Starting:Play()
351 end
352 if engineBlock and engineBlock:FindFirstChild("Stopping") and engineBlock.Stopping:IsA("Sound") then
353 engineBlock.Stopping:Stop()
354 end
355 wait(StartTime)-- just in case you use different starting sound effects
356 if it.Parent ~= seat then-- DID OUR LOVELY PLAYER LEAVE WHILE WE WEREN'T LOOKING???????
357 byebye()--maybe they did, so it's time to shut down the car
358 else-- they didn't leave!
359 lightsOn = true-- turn on the lights
360 carRunning = true-- turn on the car
361 updatelights()-- make sure we turn on the lights
362 UpdateVehicle()-- maybe they're in a hurry, so we better check if they have their foot on the gas
363 if engineBlock and engineBlock:FindFirstChild("Running") and engineBlock.Running:IsA("Sound") then
364 engineBlock.Running:Play()
365 engineBlock.Running.Pitch = CalculatePitch()
366 end
367 end
368 end
369 end
370end)
371
372seat.ChildRemoved:connect(function(it)--did an object get removed?
373 if it:isA("Weld") and it.Name == "SeatWeld" then-- if it's a weld and named like a seat weld
374 byebye()-- time to shut down the car
375 end
376end)
377
378function byebye()
379 if engineBlock and carRunning then-- remember scripting level 3? that applies to below:
380 if engineBlock and engineBlock:FindFirstChild("Stopping") and engineBlock.Stopping:IsA("Sound") then
381 engineBlock.Stopping:Play()-- where if it didn't do it like that, the above would error!
382 wait(0.1) -- because engineBlock.Stopping would not exist, so :IsA() is
383 end -- "not a valid member"
384 if engineBlock and engineBlock:FindFirstChild("Running") and engineBlock.Running:IsA("Sound") then
385 engineBlock.Running:Stop()-- WE MUST NOT STOP
386 end
387 if engineBlock and engineBlock:FindFirstChild("Starting") and engineBlock.Starting:IsA("Sound") then
388 engineBlock.Starting:Stop()-- THIS SCRIPT IS BREAK-PROOF >:U
389 end
390 end
391 RemoteControlled.MaxSpeed = 0--make sure that the car doesn't drive off without us
392 carRunning = false
393 lightsOn = false
394 updatelights()--turn the lights off
395 UpdateVehicle()--make sure the car stops now that it's off
396end
397
398RearLight = {}--all the brake lights. These contain one SpotLight that gets manipulated
399RearBulb = {}--the brake lights that use a Surface GUI to light up
400FrontLight = {}--same as the RearLight but for the front
401FrontBulb = {}--same as the RearBulb but for the front
402ReverseLight = {}--These light up when you reverse
403ReverseBulb = {}--these also light up when you reverse: SurfaceGui style
404
405for _, i in pairs (car:GetChildren()) do--populate the tables for ease of modularity.
406 if i.Name == "RearBulb" then-- you can have any number of these items you want
407 table.insert(RearBulb,i)-- and you don't have to change the script one bit!
408 elseif i.Name == "RearLight" then
409 table.insert(RearLight,i.SpotLight)
410 elseif i.Name == "FrontLight" then
411 table.insert(FrontLight,i.SpotLight)
412 elseif i.Name == "ReverseLight" then
413 table.insert(ReverseLight,i.SpotLight)
414 elseif i.Name == "FrontBulb" then
415 table.insert(FrontBulb,i)
416 elseif i.Name == "ReverseBulb" then
417 table.insert(ReverseBulb,i)
418 end
419end
420
421function updatelights()-- this turns the lights on and off based on the lightsOn value
422 for _,i in pairs (RearLight) do
423 i.Enabled = lightsOn
424 end
425 for _,i in pairs (FrontLight) do
426 i.Enabled = lightsOn
427 end
428 for _,i in pairs (FrontBulb) do
429 SurfaceGuiStandard(i,lightsOn)
430 end
431 for _,g in pairs (RearBulb) do
432 SurfaceGuiBrightness(g,lightsOn,seat.Throttle == 0)
433 end
434end
435
436flippingDebounce = false-- a debounce is a simple way of preventing a function from
437 -- being called multiple times while it's still running
438function Flip()
439 if not flippingDebounce then-- here's how it works: the function checks if the debounce is off
440 flippingDebounce = true-- if it's on, then the function stops, but if it's off, set it to true
441 local bodypos = Instance.new("BodyPosition",seat)-- so we get uninterupted function fun
442 bodypos.maxForce = Vector3.new(100000,10000000,100000)
443 bodypos.position = seat.Position + Vector3.new(0,2,0)
444 local bodygyro = Instance.new("BodyGyro",seat)
445 game:GetService("Debris"):AddItem(bodypos, 3)-- this makes sure that the flippy bit
446 game:GetService("Debris"):AddItem(bodygyro, 3)-- deletes itself automatically
447 wait(3)
448 flippingDebounce = false-- when we are done with our fun, allow the function to work again
449 end
450end
451
452function SurfaceGuiStandard(part,on)-- this makes it so the lights turn on or off
453 for _,i in pairs (part:GetChildren()) do
454 if i:IsA("SurfaceGui") then
455 i.Enabled = on
456 end
457 end
458end
459
460function SurfaceGuiBrightness(part,on,bright)-- this is so the brake lights dim when we drive
461 for _,i in pairs (part:GetChildren()) do
462 if i:IsA("SurfaceGui") then
463 i.Enabled = on
464 if i:FindFirstChild("Frame") and i.Frame:IsA("Frame") then
465 i.Frame.Transparency = bright and 0 or 0.5-- scripting level 4: go
466 end-- for simple statements, you can have a boolean value decide between 2 values
467 -- which is the same as writing
468 -- "if bright then
469 -- i.Frame.Transparency = 0
470 -- else
471 -- i.Frame.Transparency = 0.5
472 -- end"
473 --but instead of "then" and "else", you use "and" and "or"
474 end
475 end
476end
477
478hornDebounce = false
479function Honk()-- if you are reading this then congratulations! you win a prize!
480 if hornDebounce then return end-- unfortunately, I could not think of a way
481 if engineBlock and engineBlock:FindFirstChild("Horn") and engineBlock.Horn:IsA("Sound") then
482 hornDebounce = true-- to allow people to be able to honk the horn for both PC and mobile
483 engineBlock.horn:Play() -- in an unobtrusive way. Sorry! :(
484 print("beep beep") -- UristMcSparks, the guy in charge of the toolbox, doesn't want print statements
485 wait(0.5)-- but since this is a secret, lets keep it between you and me, OK?
486 engineBlock.horn:Stop()
487 hornDebounce = false
488 end
489end
490
491function UpdateVehicle()-- this is for the brake lights and speed and stuff like that
492 if seat.Torque ~= 0 and type(seat.Torque) == "number" and RemoteControlled then
493 RemoteControlled.Torque = math.abs(seat.Torque)
494 seat.Torque = 0
495 else
496 seat.Torque = 0
497 end
498 if seat.Throttle == 1 and carRunning then-- if we're going forwards
499 RemoteControlled.MaxSpeed = forwardsSpeed-- give it forwards speed
500 elseif seat.Throttle == -1 and carRunning then-- if we're going backwards
501 RemoteControlled.MaxSpeed = reverseSpeed-- give it backwards speed
502 else
503 RemoteControlled.MaxSpeed = 0 -- otherwise, give it 0 speed
504 end
505 if workspace.FilteringEnabled and RemoteControlled and RemoteControlled.Parent then--the idea from scripting level 2 applies to false as well
506 RemoteControlled.Throttle = seat.Throttle-- that is, it also works for "~= false"
507 end-- the reason this line exists is to prevent the server from doing something the client
508 -- is already doing.
509 for _,h in pairs (ReverseLight) do-- all these loops below are just updating the lights
510 h.Enabled = lightsOn and seat.Throttle == -1
511 end
512 for _,i in pairs (ReverseBulb) do
513 SurfaceGuiStandard(i,lightsOn and seat.Throttle == -1)
514 end
515 for _,j in pairs (RearLight) do
516 j.Brightness = 4-math.abs(seat.Throttle)*3
517 end
518 for _,k in pairs (RearBulb) do
519 SurfaceGuiBrightness(k,lightsOn,seat.Throttle == 0)
520 end
521end
522
523seat.Changed:connect(UpdateVehicle)-- this is so that when someone drives the car
524 -- the brake and reverse lights change
525 -- and the speed of the car changes
526
527while true do
528 for i = 1, 60 do--60/30 == 2, 2 seconds between deciding if it's upside down
529 wait()-- we want the steering and sfx to update as many times a second as we can
530 if workspace.FilteringEnabled then
531 if car:FindFirstChild("LeftMotor") then
532 car.LeftMotor.DesiredAngle = 100
533 car.LeftMotor.DesiredAngle = seat.Steer*math.rad(40-RemoteControlled.Velocity.magnitude/4)
534 end
535 if car:FindFirstChild("RightMotor") then
536 car.RightMotor.DesiredAngle = 100
537 car.RightMotor.DesiredAngle = seat.Steer*math.rad(40-RemoteControlled.Velocity.magnitude/4)
538 end
539 end
540 -- below: make sure there's a sound to play
541 if RemoteControlled and carRunning and engineBlock and engineBlock:FindFirstChild("Running") and engineBlock.Running:IsA("Sound") then
542 engineBlock.Running.Pitch = CalculatePitch()-- and make sure that the car is on before trying
543 -- to make sure the engine sounds good
544 end
545 end
546 -- V this allows people to say if they want the car to flip over or not
547 if allowFlipping and (seat.CFrame*CFrame.Angles(math.pi/2,0,0)).lookVector.Y < 0.2 then--am I upside down?
548 Flip()--flip the car right side up
549
550 -- as a fun experiment, see what happens if you replace "Flip()" with "Spawn(Flip)"
551 -- and see what the difference is when you drive the car off the baseplate
552 -- if you did it right, you'll notice that the engine sound changes differently!
553 end
554end
555
556-- scripting level 1000000: go
557-- if you type 2 dashes like this "--" you can create a comment
558-- comments aren't executed, so you can type stuff like this!
559
560--[==[
561
562 if you want to make longer comments
563
564 you can surround them with the double dashes and double square brackets "--[[" and "--]]"
565
566 and you can surround those by ones with equals signs in them too
567
568 so you don't have to type the "--" every single line
569
570--]==]
571
572
573--Thanks for watching!
574--NWSpacek
575end))
576LocalScript15.Name = "CarSteering"
577LocalScript15.Parent = Script14
578table.insert(cors,sandbox(LocalScript15,function()
579--MADE BY NWSPACEK
580wait(1)-- give it time to adjust to the scary and new environment of Backpack
581SeatValue = script:WaitForChild("Seat")-- orient ourselves to the car we are sitting in
582if SeatValue:IsA("ObjectValue") and SeatValue.Value and SeatValue.Value:IsA("VehicleSeat") then
583 seat = SeatValue.Value
584 car = seat.Parent
585 local RemoteControlled = car:FindFirstChild("ControlByRemote")
586 while seat:FindFirstChild("SeatWeld") and RemoteControlled do--what this loop does is continue running until the
587 wait()--statement between the "while" and "do" is not true.
588 if not RemoteControlled:IsA("VehicleSeat") then --think you can make ControlByRemote a different part and make it break?
589 break-- NOPE!!!!! Still won't break!
590 end-- (well, I suppose so because it says break over there)
591 RemoteControlled.Throttle = seat.Throttle-- but the important bit is no red text
592 if car:FindFirstChild("LeftMotor") then
593 car.LeftMotor.DesiredAngle = 100
594 car.LeftMotor.DesiredAngle = seat.Steer*math.rad(40-RemoteControlled.Velocity.magnitude/4)
595 end
596 if car:FindFirstChild("RightMotor") then
597 car.RightMotor.DesiredAngle = 100
598 car.RightMotor.DesiredAngle = seat.Steer*math.rad(40-RemoteControlled.Velocity.magnitude/4)
599 end
600 if car:FindFirstChild("Configuration") then
601 if seat.Throttle == 1 and car.Configuration:FindFirstChild("Forwards Speed") then
602 RemoteControlled.MaxSpeed = car.Configuration["Forwards Speed"].Value
603 elseif seat.Throttle == 0 then
604 RemoteControlled.MaxSpeed = 0
605 elseif seat.Throttle == -1 and car.Configuration:FindFirstChild("Reverse Speed") then
606 RemoteControlled.MaxSpeed = car.Configuration["Reverse Speed"].Value
607 end
608 end
609 end
610 -- the interesting thing about loops is they stop everything below them from running
611 -- until the loop stops. When the loop stops because the player is no longer sitting
612end
613script:Destroy()-- momma always said to clean up after yourself
614end))
615ObjectValue16.Name = "Seat"
616ObjectValue16.Parent = LocalScript15
617Script17.Name = "Create Motors And Doors 2"
618Script17.Parent = VehicleSeat12
619table.insert(cors,sandbox(Script17,function()
620--MADE BY NWSPACEK
621
622--the reason for this script being 2 instead of 1 is MAGIC
623
624WheelSize = 3--diameter of the wheel
625
626--When you are editing the car, make sure that the Left, Right, and Base parts are in a
627--straight line, and in the orientation the models comes with, or they won't be where you expect
628--them to be at all!
629
630motorSpeed = 0.05 -- a typical number is 0.1 but lower is better if you get weird behavior
631
632
633--don't touch below, very delicate
634car = script.Parent.Parent
635
636Base = car:FindFirstChild("Base")
637Left = car:FindFirstChild("Left")
638Right = car:FindFirstChild("Right")
639
640function MakeDoor(hinge,door,hingeOffset,doorOffset)
641 local doorMotor = Instance.new("Motor",car)
642 doorMotor.Name = hinge.Name.."Motor"
643 doorMotor.Part0 = door
644 doorMotor.Part1 = hinge
645 doorMotor.C0 = doorOffset
646 doorMotor.C1 = hingeOffset
647 doorMotor.MaxVelocity = 0.05
648 door.CanCollide = true
649 local doorDebounce = false
650 door.Touched:connect(function(it)
651 if not doorDebounce and it.Parent and it.Name == "HumanoidRootPart" and game:GetService("Players"):GetPlayerFromCharacter(it.Parent) then
652 doorDebounce = true
653 door.CanCollide = false
654 doorMotor.DesiredAngle = math.pi/3
655 wait(1.5)
656 doorMotor.DesiredAngle = 0
657 wait(0.5)
658 door.CanCollide = true
659 doorDebounce = false
660 end
661 end)
662end
663function MakeWeldDoor(hinge,door)
664 local doorMotor = Instance.new("Motor6D",car)
665 doorMotor.Name = hinge.Name.."Motor"
666 doorMotor.Part0 = door
667 doorMotor.Part1 = hinge
668 doorMotor.C1 = hinge.CFrame:inverse()*door.CFrame
669 door.CanCollide = false
670end
671
672function GetCFrame(object)--we'll get a CFrame value out of a CFrameValue or a StringValue formatted like a CFrame
673 if object:IsA("CFrameValue") then--if someone is using a CFrame value then we'll just pull the value directly
674 return object.Value
675 elseif object:IsA("StringValue") then--added functionality for this because I dislike interfacing with CFrame values
676 local cframe = nil
677 pcall(function()--using pcall because i'm lazy
678 cframe = CFrame.new(object.Value:match("(.+),(.+),(.+),(.+),(.+),(.+),(.+),(.+),(.+),(.+),(.+),(.+)"))
679 --if you print your CFrame and paste it into the string value, this will find that out and use it properly
680 end)
681 return cframe
682 end
683end
684
685for _,h in pairs (car:GetChildren()) do
686 if h:IsA("Motor6D") then--make sure we start with a blank slate
687 h:Destroy()
688 end
689end
690
691for _,i in pairs (car:GetChildren()) do
692 if i:IsA("BasePart") and i.Name:find("DoorHinge") then-- found a door with regex!
693 local DoorID = i.Name:match("DoorHinge(.*)")--haha regex is fun
694 local MatchingDoor = car:FindFirstChild("Door"..DoorID)--can we use our regex powers to find a matching door?
695 if MatchingDoor then-- yay we found one!
696 local DoorCFrameValue = MatchingDoor:FindFirstChild("DoorCFrame")
697 local HingeCFrameValue = MatchingDoor:FindFirstChild("HingeCFrame")
698 if DoorCFrameValue and HingeCFrameValue then
699 local doorCFrame = GetCFrame(DoorCFrameValue)
700 local hingeCFrame = GetCFrame(HingeCFrameValue)
701 if doorCFrame and hingeCFrame then
702 MakeDoor(i,MatchingDoor,hingeCFrame,doorCFrame)
703 else
704 MakeWeldDoor(i,MatchingDoor)
705 end
706 else
707 MakeWeldDoor(i,MatchingDoor)
708 end
709 end
710 end
711end
712
713if Base then
714 if Left then
715 leftMotor = Instance.new("Motor6D", car)
716 leftMotor.Name = "LeftMotor"
717 leftMotor.Part0 = Left
718 leftMotor.Part1 = Base
719 leftMotor.C0 = CFrame.new(-WheelSize/2-Left.Size.x/2,0,0)*CFrame.Angles(math.pi/2,0,-math.pi/2)
720 leftMotor.C1 = CFrame.new(Base.Size.x/2+Left.Size.x+WheelSize/2,0,0)*CFrame.Angles(math.pi/2,0,math.pi/2)
721 leftMotor.MaxVelocity = motorSpeed
722 end
723 if Right then
724 rightMotor = Instance.new("Motor6D", car)
725 rightMotor.Name = "RightMotor"
726 rightMotor.Part0 = Right
727 rightMotor.Part1 = Base
728 rightMotor.C0 = CFrame.new(-WheelSize/2-Right.Size.x/2,0,0)*CFrame.Angles(math.pi/2,0,math.pi/2)
729 rightMotor.C1 = CFrame.new(-Base.Size.x/2-Right.Size.x-WheelSize/2,0,0)*CFrame.Angles(math.pi/2,0,math.pi/2)
730 rightMotor.MaxVelocity = motorSpeed
731 end
732end
733end))
734Part18.Parent = Model0
735Part18.CFrame = CFrame.new(71.3899231, 1.0000273, -3.42509913, 1, 1.1920929e-07, -5.06949291e-08, -1.1920929e-07, 1, 4.05263485e-08, 2.7828456e-08, -4.05306047e-08, 1)
736Part18.Position = Vector3.new(71.3899231, 1.0000273, -3.42509913)
737Part18.Color = Color3.new(0.105882, 0.164706, 0.207843)
738Part18.Transparency = 1
739Part18.Size = Vector3.new(5.99999857, 0.300000131, 6.00000191)
740Part18.BackSurface = Enum.SurfaceType.SmoothNoOutlines
741Part18.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
742Part18.BrickColor = BrickColor.new("Black")
743Part18.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
744Part18.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
745Part18.Material = Enum.Material.SmoothPlastic
746Part18.RightSurface = Enum.SurfaceType.SmoothNoOutlines
747Part18.brickColor = BrickColor.new("Black")
748Part18.FormFactor = Enum.FormFactor.Custom
749Part18.formFactor = Enum.FormFactor.Custom
750VehicleSeat19.Name = "ControlByRemote"
751VehicleSeat19.Parent = Model0
752VehicleSeat19.CFrame = CFrame.new(71.3899841, 2.05004215, -7.92511559, 1, -5.76478156e-14, -3.23716768e-06, -5.28870025e-14, 1, -5.50894441e-10, -3.23716768e-06, -5.50894441e-10, 1)
753VehicleSeat19.Position = Vector3.new(71.3899841, 2.05004215, -7.92511559)
754VehicleSeat19.MaxSpeed = 0
755VehicleSeat19.Size = Vector3.new(0.400000006, 0.400000006, 0.400000006)
756VehicleSeat19.Torque = 0
757VehicleSeat19.BackSurface = Enum.SurfaceType.SmoothNoOutlines
758VehicleSeat19.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
759VehicleSeat19.CanCollide = false
760VehicleSeat19.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
761VehicleSeat19.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
762VehicleSeat19.RightSurface = Enum.SurfaceType.SmoothNoOutlines
763VehicleSeat19.TopSurface = Enum.SurfaceType.Weld
764VehicleSeat19.HeadsUpDisplay = false
765VehicleSeat19.TurnSpeed = 0
766Part20.Name = "Powered Wheel"
767Part20.Parent = Model0
768Part20.CFrame = CFrame.new(69.6649246, 1.25003517, -7.92511082, 7.54979013e-08, -1, -5.51505508e-09, 1, 7.54979013e-08, -3.18473425e-09, 3.18102167e-09, 1.44144447e-08, 1)
769Part20.Orientation = Vector3.new(0, 0, 90)
770Part20.Position = Vector3.new(69.6649246, 1.25003517, -7.92511082)
771Part20.Rotation = Vector3.new(0, 0, 90)
772Part20.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
773Part20.Size = Vector3.new(2.45000005, 2.45000005, 2.45000005)
774Part20.BackParamA = 0
775Part20.BackParamB = 0
776Part20.BottomParamA = 0
777Part20.BottomParamB = 0
778Part20.BottomSurface = Enum.SurfaceType.Hinge
779Part20.BrickColor = BrickColor.new("Really black")
780Part20.FrontParamA = 0
781Part20.FrontParamB = 0
782Part20.LeftParamA = 0
783Part20.LeftParamB = 0
784Part20.RightParamA = 0
785Part20.RightParamB = 0
786Part20.TopParamA = 0
787Part20.TopParamB = 0
788Part20.TopSurface = Enum.SurfaceType.Smooth
789Part20.brickColor = BrickColor.new("Really black")
790Part20.FormFactor = Enum.FormFactor.Symmetric
791Part20.formFactor = Enum.FormFactor.Symmetric
792Part20.Shape = Enum.PartType.Ball
793CylinderMesh21.Parent = Part20
794CylinderMesh21.Offset = Vector3.new(0, 0.666666627, 0)
795CylinderMesh21.Scale = Vector3.new(1, 0.5, 1)
796Decal22.Parent = Part20
797Decal22.Texture = "http://www.roblox.com/asset/?id=119364419"
798Decal22.Face = Enum.NormalId.Top
799Part23.Name = "Logo Holder"
800Part23.Parent = Model0
801Part23.CFrame = CFrame.new(71.3949203, 2.0150342, -11.0000925, 1, 1.1920929e-07, 1.13032115e-07, -1.1920929e-07, 1, 4.05247249e-08, -1.58135606e-07, -4.05322496e-08, 1)
802Part23.Position = Vector3.new(71.3949203, 2.0150342, -11.0000925)
803Part23.Color = Color3.new(0.105882, 0.164706, 0.207843)
804Part23.Transparency = 1
805Part23.Size = Vector3.new(0.410000235, 0.350000024, 0.639999747)
806Part23.BackSurface = Enum.SurfaceType.Weld
807Part23.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
808Part23.BrickColor = BrickColor.new("Black")
809Part23.CanCollide = false
810Part23.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
811Part23.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
812Part23.Material = Enum.Material.SmoothPlastic
813Part23.RightSurface = Enum.SurfaceType.SmoothNoOutlines
814Part23.TopSurface = Enum.SurfaceType.SmoothNoOutlines
815Part23.brickColor = BrickColor.new("Black")
816Part23.FormFactor = Enum.FormFactor.Custom
817Part23.formFactor = Enum.FormFactor.Custom
818BlockMesh24.Parent = Part23
819BlockMesh24.Offset = Vector3.new(0, 0, 0.189999998)
820Decal25.Parent = Part23
821Decal25.Texture = "http://www.roblox.com/asset/?id=146872602"
822Part26.Name = "Base"
823Part26.Parent = Model0
824Part26.CFrame = CFrame.new(71.3899307, 1.35002923, -7.92511177, -1, 1.19209403e-07, 5.29428871e-06, 1.1920919e-07, 1, -3.96192661e-08, -5.27142265e-06, -3.9622897e-08, -1)
825Part26.Orientation = Vector3.new(0, 180, 0)
826Part26.Position = Vector3.new(71.3899307, 1.35002923, -7.92511177)
827Part26.Rotation = Vector3.new(180, 0, -180)
828Part26.Color = Color3.new(0.105882, 0.164706, 0.207843)
829Part26.Size = Vector3.new(0.200000003, 1, 3.00000048)
830Part26.BackSurface = Enum.SurfaceType.Weld
831Part26.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
832Part26.BrickColor = BrickColor.new("Black")
833Part26.FrontSurface = Enum.SurfaceType.Weld
834Part26.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
835Part26.Material = Enum.Material.SmoothPlastic
836Part26.RightSurface = Enum.SurfaceType.SmoothNoOutlines
837Part26.TopSurface = Enum.SurfaceType.Weld
838Part26.brickColor = BrickColor.new("Black")
839Part26.FormFactor = Enum.FormFactor.Custom
840Part26.formFactor = Enum.FormFactor.Custom
841Part27.Name = "Right"
842Part27.Parent = Model0
843Part27.CFrame = CFrame.new(71.6899185, 1.35003006, -7.92511082, -1, 1.1920929e-07, -3.81963403e-08, 1.1920929e-07, 1, -4.05266505e-08, 5.81258277e-08, -4.05303311e-08, -1)
844Part27.Orientation = Vector3.new(0, -180, 0)
845Part27.Position = Vector3.new(71.6899185, 1.35003006, -7.92511082)
846Part27.Rotation = Vector3.new(180, 0, -180)
847Part27.Color = Color3.new(0.105882, 0.164706, 0.207843)
848Part27.Velocity = Vector3.new(0.0149893714, -0.0475157201, -0.0262569152)
849Part27.Size = Vector3.new(0.400000006, 1, 1)
850Part27.BottomSurface = Enum.SurfaceType.Smooth
851Part27.BrickColor = BrickColor.new("Black")
852Part27.LeftSurface = Enum.SurfaceType.Inlet
853Part27.Material = Enum.Material.SmoothPlastic
854Part27.TopSurface = Enum.SurfaceType.Smooth
855Part27.brickColor = BrickColor.new("Black")
856Part27.FormFactor = Enum.FormFactor.Custom
857Part27.formFactor = Enum.FormFactor.Custom
858Part28.Name = "Left"
859Part28.Parent = Model0
860Part28.CFrame = CFrame.new(71.0899277, 1.35002995, -7.92511082, 1, 1.1920929e-07, -4.92264398e-08, -1.1920929e-07, 1, 4.05266221e-08, 2.92969453e-08, -4.05303311e-08, 1)
861Part28.Position = Vector3.new(71.0899277, 1.35002995, -7.92511082)
862Part28.Color = Color3.new(0.105882, 0.164706, 0.207843)
863Part28.Size = Vector3.new(0.400000006, 0.99999994, 1)
864Part28.BottomSurface = Enum.SurfaceType.Smooth
865Part28.BrickColor = BrickColor.new("Black")
866Part28.LeftSurface = Enum.SurfaceType.Inlet
867Part28.Material = Enum.Material.SmoothPlastic
868Part28.TopSurface = Enum.SurfaceType.Smooth
869Part28.brickColor = BrickColor.new("Black")
870Part28.FormFactor = Enum.FormFactor.Custom
871Part28.formFactor = Enum.FormFactor.Custom
872Part29.Parent = Model0
873Part29.CFrame = CFrame.new(71.3899231, 1.35004354, 1.34487557, 1, 1.1920929e-07, -7.39809849e-08, -1.1920929e-07, 1, 4.0522e-08, 4.54241089e-09, -4.05349425e-08, 1)
874Part29.Position = Vector3.new(71.3899231, 1.35004354, 1.34487557)
875Part29.Color = Color3.new(0.105882, 0.164706, 0.207843)
876Part29.Size = Vector3.new(1, 1.00000036, 3.54000187)
877Part29.BackSurface = Enum.SurfaceType.Weld
878Part29.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
879Part29.BrickColor = BrickColor.new("Black")
880Part29.FrontSurface = Enum.SurfaceType.Weld
881Part29.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
882Part29.Material = Enum.Material.SmoothPlastic
883Part29.RightSurface = Enum.SurfaceType.SmoothNoOutlines
884Part29.brickColor = BrickColor.new("Black")
885Part29.FormFactor = Enum.FormFactor.Custom
886Part29.formFactor = Enum.FormFactor.Custom
887SpecialMesh30.Parent = Part29
888SpecialMesh30.Scale = Vector3.new(3, 1, 1)
889SpecialMesh30.MeshType = Enum.MeshType.Brick
890Part31.Name = "Powered Wheel"
891Part31.Parent = Model0
892Part31.CFrame = CFrame.new(73.1099243, 1.25003505, -7.92511082, 7.54979013e-08, 1, 9.31476194e-08, 1, -7.54979084e-08, 3.18469162e-09, 3.18106075e-09, 7.27985494e-08, -1)
893Part31.Orientation = Vector3.new(0, 180, 90)
894Part31.Position = Vector3.new(73.1099243, 1.25003505, -7.92511082)
895Part31.Rotation = Vector3.new(-180, 0, -90)
896Part31.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
897Part31.Size = Vector3.new(2.44000006, 2.44000006, 2.44000006)
898Part31.BackParamA = 0
899Part31.BackParamB = 0
900Part31.BottomParamA = 0
901Part31.BottomParamB = 0
902Part31.BottomSurface = Enum.SurfaceType.Hinge
903Part31.BrickColor = BrickColor.new("Really black")
904Part31.FrontParamA = 0
905Part31.FrontParamB = 0
906Part31.LeftParamA = 0
907Part31.LeftParamB = 0
908Part31.RightParamA = 0
909Part31.RightParamB = 0
910Part31.TopParamA = 0
911Part31.TopParamB = 0
912Part31.TopSurface = Enum.SurfaceType.Smooth
913Part31.brickColor = BrickColor.new("Really black")
914Part31.FormFactor = Enum.FormFactor.Symmetric
915Part31.formFactor = Enum.FormFactor.Symmetric
916Part31.Shape = Enum.PartType.Ball
917CylinderMesh32.Parent = Part31
918CylinderMesh32.Offset = Vector3.new(0, 0.666666627, 0)
919CylinderMesh32.Scale = Vector3.new(1, 0.5, 1)
920Decal33.Parent = Part31
921Decal33.Texture = "http://www.roblox.com/asset/?id=119364419"
922Decal33.Face = Enum.NormalId.Top
923Part34.Name = "Powered Wheel"
924Part34.Parent = Model0
925Part34.CFrame = CFrame.new(69.6399231, 1.25003529, 1.32489324, 7.54979013e-08, -1, -5.51505508e-09, 1, 7.54979013e-08, -3.18473425e-09, 3.18102167e-09, 1.44144447e-08, 1)
926Part34.Orientation = Vector3.new(0, 0, 90)
927Part34.Position = Vector3.new(69.6399231, 1.25003529, 1.32489324)
928Part34.Rotation = Vector3.new(0, 0, 90)
929Part34.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
930Part34.Size = Vector3.new(2.5, 2.5, 2.5)
931Part34.BackParamA = 0
932Part34.BackParamB = 0
933Part34.BottomParamA = 0
934Part34.BottomParamB = 0
935Part34.BottomSurface = Enum.SurfaceType.Hinge
936Part34.BrickColor = BrickColor.new("Really black")
937Part34.FrontParamA = 0
938Part34.FrontParamB = 0
939Part34.LeftParamA = 0
940Part34.LeftParamB = 0
941Part34.RightParamA = 0
942Part34.RightParamB = 0
943Part34.TopParamA = 0
944Part34.TopParamB = 0
945Part34.TopSurface = Enum.SurfaceType.Smooth
946Part34.brickColor = BrickColor.new("Really black")
947Part34.FormFactor = Enum.FormFactor.Symmetric
948Part34.formFactor = Enum.FormFactor.Symmetric
949Part34.Shape = Enum.PartType.Ball
950CylinderMesh35.Parent = Part34
951CylinderMesh35.Offset = Vector3.new(0, 0.666666627, 0)
952CylinderMesh35.Scale = Vector3.new(1, 0.5, 1)
953Decal36.Parent = Part34
954Decal36.Texture = "http://www.roblox.com/asset/?id=119364419"
955Decal36.Face = Enum.NormalId.Top
956Part37.Name = "Powered Wheel"
957Part37.Parent = Model0
958Part37.CFrame = CFrame.new(73.1399231, 1.25003517, 1.32489324, 7.54979013e-08, 1, 9.31476194e-08, 1, -7.54979084e-08, 3.18469162e-09, 3.18106075e-09, 7.27985494e-08, -1)
959Part37.Orientation = Vector3.new(0, 180, 90)
960Part37.Position = Vector3.new(73.1399231, 1.25003517, 1.32489324)
961Part37.Rotation = Vector3.new(-180, 0, -90)
962Part37.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
963Part37.Size = Vector3.new(2.5, 2.5, 2.5)
964Part37.BackParamA = 0
965Part37.BackParamB = 0
966Part37.BottomParamA = 0
967Part37.BottomParamB = 0
968Part37.BottomSurface = Enum.SurfaceType.Hinge
969Part37.BrickColor = BrickColor.new("Really black")
970Part37.FrontParamA = 0
971Part37.FrontParamB = 0
972Part37.LeftParamA = 0
973Part37.LeftParamB = 0
974Part37.RightParamA = 0
975Part37.RightParamB = 0
976Part37.TopParamA = 0
977Part37.TopParamB = 0
978Part37.TopSurface = Enum.SurfaceType.Smooth
979Part37.brickColor = BrickColor.new("Really black")
980Part37.FormFactor = Enum.FormFactor.Symmetric
981Part37.formFactor = Enum.FormFactor.Symmetric
982Part37.Shape = Enum.PartType.Ball
983CylinderMesh38.Parent = Part37
984CylinderMesh38.Offset = Vector3.new(0, 0.666666627, 0)
985CylinderMesh38.Scale = Vector3.new(1, 0.5, 1)
986Decal39.Parent = Part37
987Decal39.Texture = "http://www.roblox.com/asset/?id=119364419"
988Decal39.Face = Enum.NormalId.Top
989Part40.Parent = Model0
990Part40.CFrame = CFrame.new(71.3899155, 2.60002804, -2.72510219, 1, 1.1920929e-07, -5.17438501e-08, -1.1920929e-07, 1, 4.05261531e-08, 2.6779535e-08, -4.05308e-08, 1)
991Part40.Position = Vector3.new(71.3899155, 2.60002804, -2.72510219)
992Part40.Color = Color3.new(0.768628, 0.156863, 0.109804)
993Part40.Size = Vector3.new(1.99999857, 2.74000025, 0.400001884)
994Part40.BackSurface = Enum.SurfaceType.SmoothNoOutlines
995Part40.BottomSurface = Enum.SurfaceType.Weld
996Part40.BrickColor = BrickColor.new("Bright red")
997Part40.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
998Part40.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
999Part40.Material = Enum.Material.SmoothPlastic
1000Part40.RightSurface = Enum.SurfaceType.SmoothNoOutlines
1001Part40.TopSurface = Enum.SurfaceType.SmoothNoOutlines
1002Part40.brickColor = BrickColor.new("Bright red")
1003Part40.FormFactor = Enum.FormFactor.Custom
1004Part40.formFactor = Enum.FormFactor.Custom
1005Part41.Parent = Model0
1006Part41.CFrame = CFrame.new(71.3899231, 2.1000309, -10.1850939, -1, -1.98656945e-15, 9.85985693e-09, 1.59539619e-15, 1, 1.83675297e-12, 9.85985871e-09, -1.83675297e-12, -1)
1007Part41.Orientation = Vector3.new(0, 180, 0)
1008Part41.Position = Vector3.new(71.3899231, 2.1000309, -10.1850939)
1009Part41.Rotation = Vector3.new(-180, 0, 180)
1010Part41.Color = Color3.new(0.105882, 0.164706, 0.207843)
1011Part41.Size = Vector3.new(1.99999905, 0.5, 1.00000238)
1012Part41.BackSurface = Enum.SurfaceType.SmoothNoOutlines
1013Part41.BottomSurface = Enum.SurfaceType.Glue
1014Part41.BrickColor = BrickColor.new("Black")
1015Part41.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
1016Part41.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
1017Part41.Material = Enum.Material.SmoothPlastic
1018Part41.RightSurface = Enum.SurfaceType.SmoothNoOutlines
1019Part41.brickColor = BrickColor.new("Black")
1020Part41.FormFactor = Enum.FormFactor.Custom
1021Part41.formFactor = Enum.FormFactor.Custom
1022SpecialMesh42.Parent = Part41
1023SpecialMesh42.MeshId = "rbxassetid://2459836315"
1024SpecialMesh42.Offset = Vector3.new(0, -0.150000006, -7.11000013)
1025SpecialMesh42.Scale = Vector3.new(0.0500000007, 0.0500000007, 0.0500000007)
1026SpecialMesh42.MeshType = Enum.MeshType.FileMesh
1027Part43.Parent = Model0
1028Part43.CFrame = CFrame.new(71.3899231, 3.10002995, -10.1850939, -1, 3.35415052e-14, 1.36778709e-07, 6.73899328e-15, 1, 2.10036433e-11, 1.36778709e-07, -2.10036433e-11, -1)
1029Part43.Orientation = Vector3.new(0, 180, 0)
1030Part43.Position = Vector3.new(71.3899231, 3.10002995, -10.1850939)
1031Part43.Rotation = Vector3.new(-180, 0, -180)
1032Part43.Color = Color3.new(0.105882, 0.164706, 0.207843)
1033Part43.Size = Vector3.new(1.99999905, 1.5, 1.00000238)
1034Part43.BackSurface = Enum.SurfaceType.SmoothNoOutlines
1035Part43.BottomSurface = Enum.SurfaceType.Glue
1036Part43.BrickColor = BrickColor.new("Black")
1037Part43.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
1038Part43.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
1039Part43.Material = Enum.Material.SmoothPlastic
1040Part43.RightSurface = Enum.SurfaceType.SmoothNoOutlines
1041Part43.brickColor = BrickColor.new("Black")
1042Part43.FormFactor = Enum.FormFactor.Custom
1043Part43.formFactor = Enum.FormFactor.Custom
1044SpecialMesh44.Parent = Part43
1045SpecialMesh44.MeshId = "rbxassetid://2459832503"
1046SpecialMesh44.Offset = Vector3.new(0, 0, -7.19999981)
1047SpecialMesh44.Scale = Vector3.new(0.0500000007, 0.0500000007, 0.0500000007)
1048SpecialMesh44.TextureId = "rbxassetid://2459835234"
1049SpecialMesh44.MeshType = Enum.MeshType.FileMesh
1050for i,v in pairs(mas:GetChildren()) do
1051 v.Parent = workspace
1052 pcall(function() v:MakeJoints() end)
1053end
1054mas:Destroy()
1055for i,v in pairs(cors) do
1056 spawn(function()
1057 pcall(v)
1058 end)
1059end