LelXD

Jeep

Feb 14th, 2016
516
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.12 KB | None | 0 0
  1. --Created with ttyyuu12345's compiler
  2. --Errors: UnionOperation,LocalScript,ModuleScript
  3. Create = function(itemClass,tabl)
  4. local item = Instance.new(itemClass)
  5. for i,v in pairs(tabl) do
  6. local a,b = ypcall(function() return item[i] end)
  7. if a then
  8. item[i] = tabl[i]
  9. end
  10. end
  11. return item
  12. end
  13. function runDummyScript(f,scri)
  14. local oldenv = getfenv(f)
  15. local newenv = setmetatable({}, {
  16. __index = function(_, k)
  17. if k:lower() == 'script' then
  18. return scri
  19. else
  20. return oldenv[k]
  21. end
  22. end
  23. })
  24. setfenv(f, newenv)
  25. ypcall(function() f() end)
  26. end
  27. cors = {}
  28. mas = Instance.new("Model",game:GetService("Lighting"))
  29. mas.Name = "CompiledModel"
  30. o1 = Create("Model",{
  31. ["Name"] = "Jeep",
  32. ["Parent"] = mas,
  33. })
  34. o2 = Create("Part",{
  35. ["Name"] = "Thruster",
  36. ["Parent"] = o1,
  37. ["Transparency"] = 1,
  38. ["Position"] = Vector3.new(-68.8000031, 2.51002169, 47.7999992),
  39. ["CFrame"] = CFrame.new(-68.8000031, 2.51002169, 47.7999992, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  40. ["CanCollide"] = false,
  41. ["FormFactor"] = Enum.FormFactor.Custom,
  42. ["Size"] = Vector3.new(1, 1, 2),
  43. ["BackSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  44. ["BottomSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  45. ["FrontSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  46. ["LeftSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  47. ["RightSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  48. ["TopSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  49. })
  50. o3 = Create("Weld",{
  51. ["Parent"] = o2,
  52. ["Part0"] = o17,
  53. ["Part1"] = o2,
  54. })
  55. o4 = Create("Weld",{
  56. ["Name"] = "WheelWeld",
  57. ["Parent"] = o2,
  58. ["Part0"] = o2,
  59. ["Part1"] = mas,
  60. })
  61. o6 = Create("Weld",{
  62. ["Parent"] = mas,
  63. ["Part0"] = o17,
  64. ["Part1"] = mas,
  65. })
  66. o7 = Create("Part",{
  67. ["Parent"] = o1,
  68. ["BrickColor"] = BrickColor.new("Really black"),
  69. ["Position"] = Vector3.new(-66.3000031, 2.26002169, 46.5499992),
  70. ["CFrame"] = CFrame.new(-66.3000031, 2.26002169, 46.5499992, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  71. ["FormFactor"] = Enum.FormFactor.Custom,
  72. ["Size"] = Vector3.new(5, 0.5, 0.5),
  73. ["BackSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  74. ["BottomSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  75. ["FrontSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  76. ["LeftSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  77. ["RightSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  78. ["TopSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  79. ["Color"] = Color3.new(0.0666667, 0.0666667, 0.0666667),
  80. })
  81. o8 = Create("Weld",{
  82. ["Parent"] = o7,
  83. ["Part0"] = o17,
  84. ["Part1"] = o7,
  85. })
  86. o9 = Create("Part",{
  87. ["Name"] = "Thruster",
  88. ["Parent"] = o1,
  89. ["Transparency"] = 1,
  90. ["Position"] = Vector3.new(-63.8000031, 2.51002169, 47.7999992),
  91. ["CFrame"] = CFrame.new(-63.8000031, 2.51002169, 47.7999992, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  92. ["CanCollide"] = false,
  93. ["FormFactor"] = Enum.FormFactor.Custom,
  94. ["Size"] = Vector3.new(1, 1, 2),
  95. ["BackSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  96. ["BottomSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  97. ["FrontSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  98. ["LeftSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  99. ["RightSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  100. ["TopSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  101. })
  102. o10 = Create("Weld",{
  103. ["Parent"] = o9,
  104. ["Part0"] = o17,
  105. ["Part1"] = o9,
  106. })
  107. o11 = Create("Weld",{
  108. ["Name"] = "WheelWeld",
  109. ["Parent"] = o9,
  110. ["Part0"] = o9,
  111. ["Part1"] = mas,
  112. })
  113. o13 = Create("Weld",{
  114. ["Parent"] = mas,
  115. ["Part0"] = o17,
  116. ["Part1"] = mas,
  117. })
  118. o14 = Create("Part",{
  119. ["Name"] = "Thruster",
  120. ["Parent"] = o1,
  121. ["Transparency"] = 1,
  122. ["Position"] = Vector3.new(-63.8000031, 2.51002169, 55.2999992),
  123. ["CFrame"] = CFrame.new(-63.8000031, 2.51002169, 55.2999992, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  124. ["CanCollide"] = false,
  125. ["FormFactor"] = Enum.FormFactor.Custom,
  126. ["Size"] = Vector3.new(1, 1, 2),
  127. ["BackSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  128. ["BottomSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  129. ["FrontSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  130. ["LeftSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  131. ["RightSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  132. ["TopSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  133. })
  134. o15 = Create("Weld",{
  135. ["Parent"] = o14,
  136. ["Part0"] = o17,
  137. ["Part1"] = o14,
  138. })
  139. o16 = Create("Weld",{
  140. ["Name"] = "WheelWeld",
  141. ["Parent"] = o14,
  142. ["Part0"] = o14,
  143. ["Part1"] = mas,
  144. })
  145. o17 = Create("Part",{
  146. ["Name"] = "Chassis",
  147. ["Parent"] = o1,
  148. ["BrickColor"] = BrickColor.new("Really black"),
  149. ["Position"] = Vector3.new(-66.3000031, 2.51002169, 51.7999992),
  150. ["CFrame"] = CFrame.new(-66.3000031, 2.51002169, 51.7999992, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  151. ["FormFactor"] = Enum.FormFactor.Custom,
  152. ["Size"] = Vector3.new(4, 1, 10),
  153. ["BackSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  154. ["BottomSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  155. ["FrontSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  156. ["LeftSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  157. ["RightSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  158. ["TopSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  159. ["Color"] = Color3.new(0.0666667, 0.0666667, 0.0666667),
  160. })
  161. o18 = Create("Part",{
  162. ["Parent"] = o1,
  163. ["BrickColor"] = BrickColor.new("Institutional white"),
  164. ["Position"] = Vector3.new(-66.3000031, 3.76002169, 55.2999992),
  165. ["CFrame"] = CFrame.new(-66.3000031, 3.76002169, 55.2999992, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  166. ["FormFactor"] = Enum.FormFactor.Custom,
  167. ["Size"] = Vector3.new(4, 1.5, 3),
  168. ["BackSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  169. ["BottomSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  170. ["FrontSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  171. ["LeftSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  172. ["RightSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  173. ["TopSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  174. ["Color"] = Color3.new(0.972549, 0.972549, 0.972549),
  175. })
  176. o19 = Create("Weld",{
  177. ["Parent"] = o18,
  178. ["Part0"] = o17,
  179. ["Part1"] = o18,
  180. })
  181. o21 = Create("Weld",{
  182. ["Parent"] = mas,
  183. ["Part0"] = o17,
  184. ["Part1"] = mas,
  185. })
  186. o23 = Create("Weld",{
  187. ["Parent"] = mas,
  188. ["Part0"] = o17,
  189. ["Part1"] = mas,
  190. })
  191. o24 = Create("Part",{
  192. ["Name"] = "Thruster",
  193. ["Parent"] = o1,
  194. ["Transparency"] = 1,
  195. ["Position"] = Vector3.new(-68.8000031, 2.51002169, 55.2999992),
  196. ["CFrame"] = CFrame.new(-68.8000031, 2.51002169, 55.2999992, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  197. ["CanCollide"] = false,
  198. ["FormFactor"] = Enum.FormFactor.Custom,
  199. ["Size"] = Vector3.new(1, 1, 2),
  200. ["BackSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  201. ["BottomSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  202. ["FrontSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  203. ["LeftSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  204. ["RightSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  205. ["TopSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  206. })
  207. o25 = Create("Weld",{
  208. ["Parent"] = o24,
  209. ["Part0"] = o17,
  210. ["Part1"] = o24,
  211. })
  212. o26 = Create("Weld",{
  213. ["Name"] = "WheelWeld",
  214. ["Parent"] = o24,
  215. ["Part0"] = o24,
  216. ["Part1"] = mas,
  217. })
  218. o28 = Create("Weld",{
  219. ["Parent"] = mas,
  220. ["Part0"] = o17,
  221. ["Part1"] = mas,
  222. })
  223. o29 = Create("Part",{
  224. ["Parent"] = o1,
  225. ["BrickColor"] = BrickColor.new("Institutional white"),
  226. ["Position"] = Vector3.new(-66.3000031, 3.76002169, 57.0499992),
  227. ["CFrame"] = CFrame.new(-66.3000031, 3.76002169, 57.0499992, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  228. ["FormFactor"] = Enum.FormFactor.Custom,
  229. ["Size"] = Vector3.new(4, 2.5, 0.5),
  230. ["BackSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  231. ["BottomSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  232. ["FrontSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  233. ["LeftSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  234. ["RightSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  235. ["TopSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  236. ["Color"] = Color3.new(0.972549, 0.972549, 0.972549),
  237. })
  238. o30 = Create("Weld",{
  239. ["Parent"] = o29,
  240. ["Part0"] = o17,
  241. ["Part1"] = o29,
  242. })
  243. o31 = Create("Part",{
  244. ["Parent"] = o1,
  245. ["BrickColor"] = BrickColor.new("Really black"),
  246. ["Position"] = Vector3.new(-66.3000031, 2.26002169, 57.0499992),
  247. ["CFrame"] = CFrame.new(-66.3000031, 2.26002169, 57.0499992, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  248. ["FormFactor"] = Enum.FormFactor.Custom,
  249. ["Size"] = Vector3.new(5, 0.5, 0.5),
  250. ["BackSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  251. ["BottomSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  252. ["FrontSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  253. ["LeftSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  254. ["RightSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  255. ["TopSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  256. ["Color"] = Color3.new(0.0666667, 0.0666667, 0.0666667),
  257. })
  258. o32 = Create("Weld",{
  259. ["Parent"] = o31,
  260. ["Part0"] = o17,
  261. ["Part1"] = o31,
  262. })
  263. o34 = Create("Weld",{
  264. ["Parent"] = mas,
  265. ["Part0"] = o17,
  266. ["Part1"] = mas,
  267. })
  268. o35 = Create("Seat",{
  269. ["Name"] = "DriveSeat",
  270. ["Parent"] = o1,
  271. ["Position"] = Vector3.new(-66.3000031, 3.06002188, 52.2999992),
  272. ["CFrame"] = CFrame.new(-66.3000031, 3.06002188, 52.2999992, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  273. ["FormFactor"] = Enum.FormFactor.Custom,
  274. ["Size"] = Vector3.new(2, 0.200000003, 2),
  275. ["BottomSurface"] = Enum.SurfaceType.Smooth,
  276. ["TopSurface"] = Enum.SurfaceType.Smooth,
  277. })
  278. o36 = Create("Weld",{
  279. ["Parent"] = o35,
  280. ["Part0"] = o17,
  281. ["Part1"] = o35,
  282. })
  283. o37 = Create("Part",{
  284. ["Name"] = "Light",
  285. ["Parent"] = o1,
  286. ["BrickColor"] = BrickColor.new("Really black"),
  287. ["Position"] = Vector3.new(-64.8000031, 4.01002169, 46.4499969),
  288. ["Rotation"] = Vector3.new(3.4154782e-006, 1.41473743e-006, 45),
  289. ["CFrame"] = CFrame.new(-64.8000031, 4.01002169, 46.4499969, 0.707106769, -0.707106769, 2.46918255e-008, 0.707106769, 0.707106769, -5.96113381e-008, 2.46918255e-008, 5.96113381e-008, 1),
  290. ["FormFactor"] = Enum.FormFactor.Custom,
  291. ["Size"] = Vector3.new(1, 1, 0.5),
  292. ["BackSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  293. ["BottomSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  294. ["FrontSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  295. ["LeftSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  296. ["RightSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  297. ["TopSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  298. ["Color"] = Color3.new(0.0666667, 0.0666667, 0.0666667),
  299. })
  300. o38 = Create("SurfaceGui",{
  301. ["Parent"] = o37,
  302. ["CanvasSize"] = Vector2.new(100, 100),
  303. })
  304. o39 = Create("Frame",{
  305. ["Parent"] = o38,
  306. ["Position"] = UDim2.new(0.10000000149012,0,0.10000000149012,0),
  307. ["Size"] = UDim2.new(0.80000001192093,0,0.80000001192093,0),
  308. ["BackgroundColor3"] = Color3.new(1, 1, 1),
  309. ["BorderSizePixel"] = 0,
  310. })
  311. o40 = Create("SurfaceLight",{
  312. ["Parent"] = o37,
  313. ["Brightness"] = 0.5,
  314. ["Range"] = 32,
  315. ["Angle"] = 60,
  316. })
  317. o41 = Create("Weld",{
  318. ["Parent"] = o37,
  319. ["Part0"] = o17,
  320. ["Part1"] = o37,
  321. })
  322. o42 = Create("Part",{
  323. ["Name"] = "Light",
  324. ["Parent"] = o1,
  325. ["BrickColor"] = BrickColor.new("Really black"),
  326. ["Position"] = Vector3.new(-67.8000031, 4.01002169, 46.4499969),
  327. ["Rotation"] = Vector3.new(-3.91961748e-006, -1.62355889e-006, 45),
  328. ["CFrame"] = CFrame.new(-67.8000031, 4.01002169, 46.4499969, 0.707106769, -0.707106769, -2.83364479e-008, 0.707106769, 0.707106769, 6.84102304e-008, -2.83364479e-008, -6.84102304e-008, 1),
  329. ["FormFactor"] = Enum.FormFactor.Custom,
  330. ["Size"] = Vector3.new(1, 1, 0.5),
  331. ["BackSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  332. ["BottomSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  333. ["FrontSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  334. ["LeftSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  335. ["RightSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  336. ["TopSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  337. ["Color"] = Color3.new(0.0666667, 0.0666667, 0.0666667),
  338. })
  339. o43 = Create("SurfaceGui",{
  340. ["Parent"] = o42,
  341. ["CanvasSize"] = Vector2.new(100, 100),
  342. })
  343. o44 = Create("Frame",{
  344. ["Parent"] = o43,
  345. ["Position"] = UDim2.new(0.10000000149012,0,0.10000000149012,0),
  346. ["Size"] = UDim2.new(0.80000001192093,0,0.80000001192093,0),
  347. ["BackgroundColor3"] = Color3.new(1, 1, 1),
  348. ["BorderSizePixel"] = 0,
  349. })
  350. o45 = Create("SurfaceLight",{
  351. ["Parent"] = o42,
  352. ["Brightness"] = 0.5,
  353. ["Range"] = 32,
  354. ["Angle"] = 60,
  355. })
  356. o46 = Create("Weld",{
  357. ["Parent"] = o42,
  358. ["Part0"] = o17,
  359. ["Part1"] = o42,
  360. })
  361. o47 = Create("Configuration",{
  362. ["Name"] = "Configurations",
  363. ["Parent"] = o1,
  364. })
  365. o48 = Create("NumberValue",{
  366. ["Name"] = "Bounce",
  367. ["Parent"] = o47,
  368. ["Value"] = 100,
  369. })
  370. o49 = Create("NumberValue",{
  371. ["Name"] = "Height",
  372. ["Parent"] = o47,
  373. ["Value"] = 3,
  374. })
  375. o50 = Create("NumberValue",{
  376. ["Name"] = "Speed",
  377. ["Parent"] = o47,
  378. ["Value"] = 80,
  379. })
  380. o51 = Create("NumberValue",{
  381. ["Name"] = "Suspension",
  382. ["Parent"] = o47,
  383. ["Value"] = 4,
  384. })
  385. o52 = Create("NumberValue",{
  386. ["Name"] = "TurnSpeed",
  387. ["Parent"] = o47,
  388. ["Value"] = 2,
  389. })
  390. o53 = Create("Script",{
  391. ["Name"] = "CarScript",
  392. ["Parent"] = o1,
  393. })
  394. table.insert(cors,coroutine.create(function()
  395. wait()
  396. runDummyScript(function()
  397. --Scripted by DermonDarble
  398.  
  399. local car = script.Parent
  400. local stats = car.Configurations
  401. local Raycast = require(script.RaycastModule)
  402.  
  403. local mass = 0
  404.  
  405. for i, v in pairs(car:GetChildren()) do
  406. if v:IsA("BasePart") then
  407. mass = mass + (v:GetMass() * 196.2)
  408. end
  409. end
  410.  
  411. local bodyPosition = Instance.new("BodyPosition", car.Chassis)
  412. bodyPosition.MaxForce = Vector3.new()
  413. local bodyGyro = Instance.new("BodyGyro", car.Chassis)
  414. bodyGyro.MaxTorque = Vector3.new()
  415.  
  416. local function UpdateThruster(thruster)
  417. -- Raycasting
  418. local hit, position = Raycast.new(thruster.Position, thruster.CFrame:vectorToWorldSpace(Vector3.new(0, -1, 0)) * stats.Height.Value) --game.Workspace:FindPartOnRay(ray, car)
  419. local thrusterHeight = (position - thruster.Position).magnitude
  420.  
  421. -- Wheel
  422. local wheelWeld = thruster:FindFirstChild("WheelWeld")
  423. wheelWeld.C0 = CFrame.new(0, -math.min(thrusterHeight, stats.Height.Value * 0.8) + (wheelWeld.Part1.Size.Y / 2), 0)
  424. -- Wheel turning
  425. local offset = car.Chassis.CFrame:inverse() * thruster.CFrame
  426. local speed = car.Chassis.CFrame:vectorToObjectSpace(car.Chassis.Velocity)
  427. if offset.Z < 0 then
  428. local direction = 1
  429. if speed.Z > 0 then
  430. direction = -1
  431. end
  432. wheelWeld.C0 = wheelWeld.C0 * CFrame.Angles(0, (car.Chassis.RotVelocity.Y / 2) * direction, 0)
  433. end
  434.  
  435. -- Particles
  436. if hit and thruster.Velocity.magnitude >= 5 then
  437. wheelWeld.Part1.ParticleEmitter.Enabled = true
  438. else
  439. wheelWeld.Part1.ParticleEmitter.Enabled = false
  440. end
  441. end
  442.  
  443. car.DriveSeat.Changed:connect(function(property)
  444. if property == "Occupant" then
  445. if car.DriveSeat.Occupant then
  446. local player = game.Players:GetPlayerFromCharacter(car.DriveSeat.Occupant.Parent)
  447. if player then
  448. car.DriveSeat:SetNetworkOwner(player)
  449. local localCarScript = script.LocalCarScript:Clone()
  450. localCarScript.Parent = player.PlayerGui
  451. localCarScript.Car.Value = car
  452. localCarScript.Disabled = false
  453. end
  454. end
  455. end
  456. end)
  457.  
  458. spawn(function()
  459. while true do
  460. game:GetService("RunService").Stepped:wait()
  461. for i, part in pairs(car:GetChildren()) do
  462. if part.Name == "Thruster" then
  463. UpdateThruster(part)
  464. end
  465. end
  466. if car.DriveSeat.Occupant then
  467. bodyPosition.MaxForce = Vector3.new()
  468. bodyGyro.MaxTorque = Vector3.new()
  469. else
  470. local hit, position, normal = Raycast.new(car.Chassis.Position, car.Chassis.CFrame:vectorToWorldSpace(Vector3.new(0, -1, 0)) * stats.Height.Value)
  471. if hit and hit.CanCollide then
  472. bodyPosition.MaxForce = Vector3.new(mass / 5, math.huge, mass / 5)
  473. bodyPosition.Position = (CFrame.new(position, position + normal) * CFrame.new(0, 0, -stats.Height.Value + 0.5)).p
  474. bodyGyro.MaxTorque = Vector3.new(math.huge, 0, math.huge)
  475. bodyGyro.CFrame = CFrame.new(position, position + normal) * CFrame.Angles(-math.pi/2, 0, 0)
  476. else
  477. bodyPosition.MaxForce = Vector3.new()
  478. bodyGyro.MaxTorque = Vector3.new()
  479. end
  480. end
  481. end
  482. end)
  483. end,o53)
  484. end))
  485. o55 = Create("ObjectValue",{
  486. ["Name"] = "Car",
  487. ["Parent"] = mas,
  488. })
  489. o56 = Create("ScreenGui",{
  490. ["Name"] = "MobileGui",
  491. ["Parent"] = mas,
  492. })
  493. o57 = Create("Frame",{
  494. ["Name"] = "DrivePad",
  495. ["Parent"] = o56,
  496. ["Transparency"] = 1,
  497. ["Position"] = UDim2.new(0,32,1,-156),
  498. ["Size"] = UDim2.new(0,64,0,128),
  499. ["BackgroundColor3"] = Color3.new(1, 1, 1),
  500. ["BackgroundTransparency"] = 1,
  501. })
  502. o58 = Create("ImageButton",{
  503. ["Name"] = "Up",
  504. ["Parent"] = o57,
  505. ["Transparency"] = 1,
  506. ["Size"] = UDim2.new(0,64,0,64),
  507. ["BackgroundColor3"] = Color3.new(1, 1, 1),
  508. ["BackgroundTransparency"] = 1,
  509. ["Image"] = "rbxasset://textures/ui/DPadSheet.png",
  510. ["ImageRectOffset"] = Vector2.new(0, 256),
  511. ["ImageRectSize"] = Vector2.new(128, 128),
  512. })
  513. o59 = Create("ImageButton",{
  514. ["Name"] = "Down",
  515. ["Parent"] = o57,
  516. ["Transparency"] = 1,
  517. ["Position"] = UDim2.new(0,0,1,-64),
  518. ["Size"] = UDim2.new(0,64,0,64),
  519. ["BackgroundColor3"] = Color3.new(1, 1, 1),
  520. ["BackgroundTransparency"] = 1,
  521. ["Image"] = "rbxasset://textures/ui/DPadSheet.png",
  522. ["ImageRectSize"] = Vector2.new(128, 128),
  523. })
  524. o60 = Create("Frame",{
  525. ["Name"] = "TurnPad",
  526. ["Parent"] = o56,
  527. ["Transparency"] = 1,
  528. ["Position"] = UDim2.new(1,-156,1,-96),
  529. ["Size"] = UDim2.new(0,128,0,64),
  530. ["BackgroundColor3"] = Color3.new(1, 1, 1),
  531. ["BackgroundTransparency"] = 1,
  532. })
  533. o61 = Create("ImageButton",{
  534. ["Name"] = "Left",
  535. ["Parent"] = o60,
  536. ["Transparency"] = 1,
  537. ["Size"] = UDim2.new(0,64,0,64),
  538. ["BackgroundColor3"] = Color3.new(1, 1, 1),
  539. ["BackgroundTransparency"] = 1,
  540. ["Image"] = "rbxasset://textures/ui/DPadSheet.png",
  541. ["ImageRectOffset"] = Vector2.new(128, 128),
  542. ["ImageRectSize"] = Vector2.new(128, 128),
  543. })
  544. o62 = Create("ImageButton",{
  545. ["Name"] = "Right",
  546. ["Parent"] = o60,
  547. ["Transparency"] = 1,
  548. ["Position"] = UDim2.new(1,-64,0,0),
  549. ["Size"] = UDim2.new(0,64,0,64),
  550. ["BackgroundColor3"] = Color3.new(1, 1, 1),
  551. ["BackgroundTransparency"] = 1,
  552. ["Image"] = "rbxasset://textures/ui/DPadSheet.png",
  553. ["ImageRectOffset"] = Vector2.new(0, 128),
  554. ["ImageRectSize"] = Vector2.new(128, 128),
  555. })
  556. o63 = Create("TextButton",{
  557. ["Name"] = "ExitButton",
  558. ["Parent"] = o56,
  559. ["Transparency"] = 0.5,
  560. ["Position"] = UDim2.new(1,-128,0,0),
  561. ["Size"] = UDim2.new(0,128,0,32),
  562. ["Text"] = "Exit",
  563. ["BackgroundColor3"] = Color3.new(0.121569, 0.121569, 0.121569),
  564. ["BackgroundTransparency"] = 0.5,
  565. ["BorderSizePixel"] = 0,
  566. ["Font"] = Enum.Font.SourceSans,
  567. ["FontSize"] = Enum.FontSize.Size18,
  568. ["TextColor3"] = Color3.new(1, 1, 1),
  569. ["TextStrokeColor3"] = Color3.new(0.133333, 0.133333, 0.133333),
  570. ["TextStrokeTransparency"] = 0.75,
  571. })
  572. o66 = Create("Texture",{
  573. ["Parent"] = mas,
  574. ["Transparency"] = 0.5,
  575. ["Texture"] = "http://www.roblox.com/asset/?id=259149256",
  576. ["Face"] = Enum.NormalId.Top,
  577. ["StudsPerTileU"] = 3,
  578. ["StudsPerTileV"] = 3,
  579. })
  580. o67 = Create("Texture",{
  581. ["Parent"] = mas,
  582. ["Transparency"] = 0.5,
  583. ["Texture"] = "http://www.roblox.com/asset/?id=259149256",
  584. ["StudsPerTileU"] = 3,
  585. ["StudsPerTileV"] = 3,
  586. })
  587. o68 = Create("Texture",{
  588. ["Parent"] = mas,
  589. ["Transparency"] = 0.5,
  590. ["Texture"] = "http://www.roblox.com/asset/?id=259149256",
  591. ["Face"] = Enum.NormalId.Back,
  592. ["StudsPerTileU"] = 3,
  593. ["StudsPerTileV"] = 3,
  594. })
  595. o69 = Create("Texture",{
  596. ["Parent"] = mas,
  597. ["Transparency"] = 0.5,
  598. ["Texture"] = "http://www.roblox.com/asset/?id=259149256",
  599. ["Face"] = Enum.NormalId.Bottom,
  600. ["StudsPerTileU"] = 3,
  601. ["StudsPerTileV"] = 3,
  602. })
  603. o70 = Create("ParticleEmitter",{
  604. ["Parent"] = mas,
  605. ["Transparency"] = NumberSequence.new(1,0.80000001192093,0.66874998807907,0.67499995231628,0.8125,1),
  606. ["Rotation"] = NumberRange.new(0,360),
  607. ["Size"] = NumberSequence.new(0,0.53763449192047,0.80645143985748,0.91397821903229),
  608. ["Color"] = ColorSequence.new(Color3.new(0.121569, 0.121569, 0.121569),Color3.new(0.121569, 0.121569, 0.121569)),
  609. ["Enabled"] = false,
  610. ["LightEmission"] = 0.20000000298023,
  611. ["Texture"] = "rbxassetid://287259619",
  612. ["Acceleration"] = Vector3.new(0, -5, 0),
  613. ["Lifetime"] = NumberRange.new(0.80000001192093,1.2000000476837),
  614. ["Rate"] = 50,
  615. ["RotSpeed"] = NumberRange.new(-200,200),
  616. ["Speed"] = NumberRange.new(0,0),
  617. ["VelocitySpread"] = 40,
  618. })
  619. o72 = Create("Texture",{
  620. ["Parent"] = mas,
  621. ["Transparency"] = 0.5,
  622. ["Texture"] = "http://www.roblox.com/asset/?id=259149256",
  623. ["Face"] = Enum.NormalId.Top,
  624. ["StudsPerTileU"] = 3,
  625. ["StudsPerTileV"] = 3,
  626. })
  627. o73 = Create("Texture",{
  628. ["Parent"] = mas,
  629. ["Transparency"] = 0.5,
  630. ["Texture"] = "http://www.roblox.com/asset/?id=259149256",
  631. ["StudsPerTileU"] = 3,
  632. ["StudsPerTileV"] = 3,
  633. })
  634. o74 = Create("Texture",{
  635. ["Parent"] = mas,
  636. ["Transparency"] = 0.5,
  637. ["Texture"] = "http://www.roblox.com/asset/?id=259149256",
  638. ["Face"] = Enum.NormalId.Back,
  639. ["StudsPerTileU"] = 3,
  640. ["StudsPerTileV"] = 3,
  641. })
  642. o75 = Create("Texture",{
  643. ["Parent"] = mas,
  644. ["Transparency"] = 0.5,
  645. ["Texture"] = "http://www.roblox.com/asset/?id=259149256",
  646. ["Face"] = Enum.NormalId.Bottom,
  647. ["StudsPerTileU"] = 3,
  648. ["StudsPerTileV"] = 3,
  649. })
  650. o76 = Create("ParticleEmitter",{
  651. ["Parent"] = mas,
  652. ["Transparency"] = NumberSequence.new(1,0.80000001192093,0.66874998807907,0.67499995231628,0.8125,1),
  653. ["Rotation"] = NumberRange.new(0,360),
  654. ["Size"] = NumberSequence.new(0,0.53763449192047,0.80645143985748,0.91397821903229),
  655. ["Color"] = ColorSequence.new(Color3.new(0.121569, 0.121569, 0.121569),Color3.new(0.121569, 0.121569, 0.121569)),
  656. ["Enabled"] = false,
  657. ["LightEmission"] = 0.20000000298023,
  658. ["Texture"] = "rbxassetid://287259619",
  659. ["Acceleration"] = Vector3.new(0, -5, 0),
  660. ["Lifetime"] = NumberRange.new(0.80000001192093,1.2000000476837),
  661. ["Rate"] = 50,
  662. ["RotSpeed"] = NumberRange.new(-200,200),
  663. ["Speed"] = NumberRange.new(0,0),
  664. ["VelocitySpread"] = 40,
  665. })
  666. o78 = Create("Texture",{
  667. ["Parent"] = mas,
  668. ["Transparency"] = 0.5,
  669. ["Texture"] = "http://www.roblox.com/asset/?id=259149256",
  670. ["Face"] = Enum.NormalId.Top,
  671. ["StudsPerTileU"] = 3,
  672. ["StudsPerTileV"] = 3,
  673. })
  674. o79 = Create("Texture",{
  675. ["Parent"] = mas,
  676. ["Transparency"] = 0.5,
  677. ["Texture"] = "http://www.roblox.com/asset/?id=259149256",
  678. ["StudsPerTileU"] = 3,
  679. ["StudsPerTileV"] = 3,
  680. })
  681. o80 = Create("Texture",{
  682. ["Parent"] = mas,
  683. ["Transparency"] = 0.5,
  684. ["Texture"] = "http://www.roblox.com/asset/?id=259149256",
  685. ["Face"] = Enum.NormalId.Back,
  686. ["StudsPerTileU"] = 3,
  687. ["StudsPerTileV"] = 3,
  688. })
  689. o81 = Create("Texture",{
  690. ["Parent"] = mas,
  691. ["Transparency"] = 0.5,
  692. ["Texture"] = "http://www.roblox.com/asset/?id=259149256",
  693. ["Face"] = Enum.NormalId.Bottom,
  694. ["StudsPerTileU"] = 3,
  695. ["StudsPerTileV"] = 3,
  696. })
  697. o82 = Create("ParticleEmitter",{
  698. ["Parent"] = mas,
  699. ["Transparency"] = NumberSequence.new(1,0.80000001192093,0.66874998807907,0.67499995231628,0.8125,1),
  700. ["Rotation"] = NumberRange.new(0,360),
  701. ["Size"] = NumberSequence.new(0,0.53763449192047,0.80645143985748,0.91397821903229),
  702. ["Color"] = ColorSequence.new(Color3.new(0.121569, 0.121569, 0.121569),Color3.new(0.121569, 0.121569, 0.121569)),
  703. ["Enabled"] = false,
  704. ["LightEmission"] = 0.20000000298023,
  705. ["Texture"] = "rbxassetid://287259619",
  706. ["Acceleration"] = Vector3.new(0, -5, 0),
  707. ["Lifetime"] = NumberRange.new(0.80000001192093,1.2000000476837),
  708. ["Rate"] = 50,
  709. ["RotSpeed"] = NumberRange.new(-200,200),
  710. ["Speed"] = NumberRange.new(0,0),
  711. ["VelocitySpread"] = 40,
  712. })
  713. o84 = Create("Texture",{
  714. ["Parent"] = mas,
  715. ["Transparency"] = 0.5,
  716. ["Texture"] = "http://www.roblox.com/asset/?id=259149256",
  717. ["Face"] = Enum.NormalId.Top,
  718. ["StudsPerTileU"] = 3,
  719. ["StudsPerTileV"] = 3,
  720. })
  721. o85 = Create("Texture",{
  722. ["Parent"] = mas,
  723. ["Transparency"] = 0.5,
  724. ["Texture"] = "http://www.roblox.com/asset/?id=259149256",
  725. ["StudsPerTileU"] = 3,
  726. ["StudsPerTileV"] = 3,
  727. })
  728. o86 = Create("Texture",{
  729. ["Parent"] = mas,
  730. ["Transparency"] = 0.5,
  731. ["Texture"] = "http://www.roblox.com/asset/?id=259149256",
  732. ["Face"] = Enum.NormalId.Back,
  733. ["StudsPerTileU"] = 3,
  734. ["StudsPerTileV"] = 3,
  735. })
  736. o87 = Create("Texture",{
  737. ["Parent"] = mas,
  738. ["Transparency"] = 0.5,
  739. ["Texture"] = "http://www.roblox.com/asset/?id=259149256",
  740. ["Face"] = Enum.NormalId.Bottom,
  741. ["StudsPerTileU"] = 3,
  742. ["StudsPerTileV"] = 3,
  743. })
  744. o88 = Create("ParticleEmitter",{
  745. ["Parent"] = mas,
  746. ["Transparency"] = NumberSequence.new(1,0.80000001192093,0.66874998807907,0.67499995231628,0.8125,1),
  747. ["Rotation"] = NumberRange.new(0,360),
  748. ["Size"] = NumberSequence.new(0,0.53763449192047,0.80645143985748,0.91397821903229),
  749. ["Color"] = ColorSequence.new(Color3.new(0.121569, 0.121569, 0.121569),Color3.new(0.121569, 0.121569, 0.121569)),
  750. ["Enabled"] = false,
  751. ["LightEmission"] = 0.20000000298023,
  752. ["Texture"] = "rbxassetid://287259619",
  753. ["Acceleration"] = Vector3.new(0, -5, 0),
  754. ["Lifetime"] = NumberRange.new(0.80000001192093,1.2000000476837),
  755. ["Rate"] = 50,
  756. ["RotSpeed"] = NumberRange.new(-200,200),
  757. ["Speed"] = NumberRange.new(0,0),
  758. ["VelocitySpread"] = 40,
  759. })
  760. mas.Parent = workspace
  761. mas:MakeJoints()
  762. local mas1 = mas:GetChildren()
  763. for i=1,#mas1 do
  764. mas1[i].Parent = script
  765. ypcall(function() mas1[i]:MakeJoints() end)
  766. end
  767. mas:Destroy()
  768. for i=1,#cors do
  769. coroutine.resume(cors[i])
  770. end
Advertisement
Add Comment
Please, Sign In to add comment