Advertisement
memberhero

Local Time machine Car

Nov 19th, 2017
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 28.96 KB | None | 0 0
  1. ID = '161067287'
  2. Looped = true
  3.  
  4. Music=Instance.new("Sound" ,workspace)
  5. Music.Name = "Music"
  6. if Looped == true then
  7. Music.Looped = true
  8. Music.Volume = 1
  9. end
  10. Music.SoundId = "http://www.roblox.com/asset/?id=161067287"
  11. Music:Play()
  12.  
  13. local modelname="DeLoreanTimeMachine"
  14. pcall(function() workspace.Base.CFrame=CFrame.new(0,-2,0) end)
  15. print(modelname.."_LOADED")
  16. local plr=game:GetService("Players").LocalPlayer
  17. local char=plr.Character
  18. local T=char.Torso
  19. local c=function(f) coroutine.resume(coroutine.create(f)) end
  20. local pc=pcall
  21. pc(function() workspace:findFirstChild(modelname):remove() end)
  22. local mouse=nil
  23. local pi=math.pi
  24. local rd=math.rad
  25. local sn=math.sin
  26. local cs=math.cos
  27. local rn=math.random
  28. local ti=table.insert
  29. local tr=table.remove
  30. local inf=math.huge
  31. local cn=CFrame.new
  32. local vc=Vector3.new
  33. local ca=CFrame.Angles
  34. local delorean=Instance.new("Model", workspace) delorean.Name=modelname
  35. local screengui=Instance.new("ScreenGui") screengui.Name=modelname
  36. part=function(par, a, c, s, col, t, cf, ms)
  37. local p=Instance.new("Part", par) pcall(function() p.TopSurface="Smooth" p.BottomSurface="Smooth" p.formFactor="Custom" p.Anchored=a p.CanCollide=c p.Size=s p.BrickColor=BrickColor.new(col) p.Transparency=t p.CFrame=cf or cn() end)
  38. local m=Instance.new("BlockMesh", p) pcall(function() m.Scale=ms or Vector3.new(1, 1, 1) end)
  39. return p
  40. end
  41. cylinder=function(par, a, c, s, col, t, cf, ms)
  42. local p=Instance.new("Part", par) pcall(function() p.TopSurface="Smooth" p.BottomSurface="Smooth" p.formFactor="Custom" p.Anchored=a p.CanCollide=c p.Size=s p.BrickColor=BrickColor.new(col) p.Transparency=t p.CFrame=cf or cn() end)
  43. local m=Instance.new("CylinderMesh", p) pcall(function() m.Scale=ms or Vector3.new(1, 1, 1) end)
  44. return p
  45. end
  46. wedge=function(par, a, c, s, col, t, cf, ms)
  47. local p=Instance.new("Part", par) pcall(function() p.TopSurface="Smooth" p.BottomSurface="Smooth" p.formFactor="Custom" p.Anchored=a p.CanCollide=c p.Size=s p.BrickColor=BrickColor.new(col) p.Transparency=t p.CFrame=cf or cn() end)
  48. local m=Instance.new("SpecialMesh", p) pcall(function() m.Scale=ms or Vector3.new(1, 1, 1) m.MeshType="Wedge" end)
  49. return p
  50. end
  51. gui=function(ins, par, bc, bg, tc, fs, text, t, s, pos)
  52. local g=Instance.new(ins, par) g.BorderColor=BrickColor.new(bc) g.BackgroundColor=BrickColor.new(bg) g.TextColor=BrickColor.new(tc) g.FontSize=fs g.Font="ArialBold" g.Text=text g.BackgroundTransparency=t g.Size=s g.Position=pos
  53. return g
  54. end
  55. weld=function(par, p1, cf)
  56. local w=Instance.new("Weld", par) pcall(function() w.Part0=w.Parent or par w.Part1=p1 w.C1=cf or cn() end)
  57. return w
  58. end
  59. mesh=function(ins, par, s, t, id, tid, of)
  60. pcall(function() for i, v in pairs(par:children()) do if v:isA("BlockMesh") or v:isA("CylinderMesh") or v:isA("SpecialMesh") then v:remove() end end end)
  61. local m=Instance.new(ins, par) pcall(function() m.Scale=s or Vector3.new(1, 1, 1) m.Offset=of or Vector3.new() m.MeshId=id or "" m.TextureId=tid or "" m.MeshType=t end)
  62. return m
  63. end
  64. sound=function(parent, id, pitch, volume)
  65. local s=Instance.new("Sound", parent) pcall(function() s.SoundId=id s.Volume=volume or 1 s.Pitch=pitch or 1 end)
  66. return s
  67. end
  68. function stick(from, to)
  69. local stickW=weld(from, to, to.CFrame:inverse()*from.CFrame)
  70. stickW.C0=from.CFrame:inverse()*from.CFrame
  71. return stickW
  72. end
  73. bp=Instance.new("BodyPosition") bp.D=200 bp.maxForce=vc(inf,inf,inf)
  74. base=part(delorean, false, true, vc(5, .5, 14), "Really Really red", 0, cn(0, 200, 0))
  75. wait()
  76. bp.Parent=base
  77. bp.position=(T.CFrame+T.CFrame.lookVector*20).p
  78. base.Name="BASE"
  79. bc=part(delorean, false, true, vc(7, .5, 6), "Really Really red")
  80. bcw=weld(bc, base, cn())
  81. bf=part(delorean, false, true, vc(7, .5, 2), "Really Really red")
  82. bfw=weld(bf, base, cn(0, 0, -7))
  83. local bb=part(delorean, false, true, vc(7, .5, 2), "Really Really red")
  84. local bbw=weld(bb, base, cn(0, 0, 7))
  85. local bf2=part(delorean, false, true, vc(6.8, 1, 1.5), "Really Really red")
  86. local bf2w=weld(bf2, bf, cn(0, .5, 0))
  87. local bc2=part(delorean, false, true, vc(5, 1, 5), "Really Really red")
  88. local bc2w=weld(bc2, base, cn(0, .75, -4.5))
  89. local bf3=part(delorean, false, true, vc(7, .5, 3), "Really Really red")
  90. local bf3w=weld(bf3, bf2, cn(0, .5, -.5))
  91. local enginesmoke=cylinder(delorean, false, true, vc(.5, 2, .5), "Really red")
  92. local enginesmokew=weld(enginesmoke, bb, cn(2, 0, .75)*ca(-rd(90), 0, 0))
  93. local enginesmoke=cylinder(delorean, false, true, vc(.5, 2, .5), "Really red")
  94. local enginesmokew=weld(enginesmoke, bb, cn(-2, 0, .75)*ca(-rd(90), 0, 0))
  95. local bf4=part(delorean, false, true, vc(7, .7, 3.5), "Really red")
  96. local bf4w=weld(bf4, bf3, cn(0, .6, .75))
  97. local bf5=part(delorean, false, true, vc(6, .7, 3), "Really red")
  98. local bf5w=weld(bf5, bf4, cn(0, 0, 3))
  99. local mprt=part(delorean, false, true, vc(7, 1, .5), "Really red", 0, cn(), vc(1, .1, 1))
  100. local mprtw=weld(mprt, bf4, cn(0, -.3, -2))
  101. local mprt=part(delorean, false, true, vc(7, 1, .35), "Really red", 0, cn(), vc(1, .1, 1))
  102. local mprtw=weld(mprt, bf4, cn(0, .3, -1.9))
  103. local mprt=part(delorean, false, true, vc(.2, .65, .5), "Really red", 0, cn(), vc(1, 1, 1))
  104. local mprtw=weld(mprt, bf4, cn(3.4, -.03, -1.9)*ca(rd(15), 0, 0))
  105. local mprt=part(delorean, false, true, vc(.2, .65, .5), "Really red", 0, cn(), vc(1, 1, 1))
  106. local mprtw=weld(mprt, bf4, cn(-3.4, -.03, -1.9)*ca(rd(15), 0, 0))
  107. local dmc=part(delorean, false, true, vc(2, .65, .5), "Really Really red", 0, cn(), vc(1, 1, 1))
  108. local dmcw=weld(dmc, bf4, cn(0, -.03, -1.9)*ca(rd(15), 0, 0))
  109. decal=Instance.new("Decal", dmc)
  110. decal.Texture="http://www.roblox.com/asset/?id=28924870"
  111. decal.Face="Front"
  112. local prt=part(delorean, false, true, vc(.5, 2, 1), "Really Really red")
  113. local prtw=weld(prt, bc, cn(3.25, 1.25, -2.5)*ca(0, 0, 0))
  114. local w=wedge(delorean, false, false, vc(.5, 1, .5), "Really Really red")
  115. local w2=weld(w, prt, cn(0, -.5, .75)*ca(0,pi,0))
  116. local prt=part(delorean, false, true, vc(.5, 2, 1), "Really Really red")
  117. local prtw=weld(prt, bc, cn(3.25, 1.25, -3)*ca(rd(-45), 0, 0))
  118. local prt=part(delorean, false, true, vc(.5, 2, 1), "Really Really red")
  119. local prtw=weld(prt, bc, cn(-3.25, 1.25, -2.5)*ca(0, 0, 0))
  120. local w=wedge(delorean, false, false, vc(.5, 1, .5), "Really Really red")
  121. local w2=weld(w, prt, cn(0, -.5, .75)*ca(0,pi,0))
  122. local prt=part(delorean, false, true, vc(.5, 2, 1), "Really Really red")
  123. local prtw=weld(prt, bc, cn(-3.25, 1.25, -3)*ca(rd(-45), 0, 0))
  124. local prt=part(delorean, false, true, vc(.5, 2, 1), "Really Really red")
  125. local prtw=weld(prt, bc, cn(3.25, 1.25, 2.5)*ca(0, 0, 0))
  126. local prt2=part(delorean, false, true, vc(.5, 2.2, 1.5), "Really Really red")
  127. local prt2w=weld(prt2, prt, cn(-.25, 1.85, .25)*ca(0, 0, rd(10)))
  128. local w=wedge(delorean, false, false, vc(.5, 2, 1), "Really Really red")
  129. local w2=weld(w, prt, cn(0, 0, -1))
  130. local prt=part(delorean, false, true, vc(.5, 2, 1), "Really Really red")
  131. local prtw=weld(prt, bc, cn(3.25, 1.25, 3)*ca(rd(45), 0, 0))
  132. local prt=part(delorean, false, true, vc(.5, 2, 1), "Really Really red")
  133. local prtw=weld(prt, bc, cn(-3.25, 1.25, 2.5)*ca(0, 0, 0))
  134. local prt2=part(delorean, false, true, vc(.5, 2.2, 1.5), "Really Really red")
  135. local prt2w=weld(prt2, prt, cn(.25, 1.85, .25)*ca(0, 0, rd(-10)))
  136. local w=wedge(delorean, false, false, vc(.5, 2, 1), "Really Really red")
  137. local w2=weld(w, prt, cn(0, 0, -1))
  138. local prt=part(delorean, false, true, vc(.5, 2, 1), "Really Really red")
  139. local prtw=weld(prt, bc, cn(-3.25, 1.25, 3)*ca(rd(45), 0, 0))
  140. local main=part(delorean, false, true, vc(6, .5, 1.5), "Really Really red")
  141. local mainw=weld(main, base, cn(0, 4, 2.75))
  142. local stand=part(delorean, false, true, vc(.5, .5, 5.5), "Really Really red")
  143. local standw=weld(stand, base, cn(3,3,5.5)*ca(rd(22),rd(5),0))
  144. local stand=part(delorean, false, true, vc(.5, .5, 5.5), "Really Really red")
  145. local standw=weld(stand, base, cn(-3,3,5.5)*ca(rd(22),rd(-5),0))
  146. local backprt=part(delorean, false, true, vc(6, 2, .5), "Really red")
  147. local backprt=weld(backprt, base, cn(0, 3, 2))
  148. local window=part(delorean, false, true, vc(5, 2.5, .25), "Really red", .5)
  149. local windoww=weld(window, base, cn(0, 3, -1.25)*ca(rd(45), 0, 0))
  150. local border=part(delorean, false, false, vc(5, .5, .5), "Really Really red")
  151. local borderw=weld(border, window, cn(0, 1.5, 0))
  152. local border=part(delorean, false, false, vc(.5, 3, .5), "Really Really red")
  153. local borderw=weld(border, window, cn(2.5, 0, 0)*ca(0, 0, rd(10)))
  154. local border=part(delorean, false, false, vc(.5, 3, .5), "Really Really red")
  155. local borderw=weld(border, window, cn(-2.5, 0, 0)*ca(0, 0, rd(-10)))
  156. local prt=weld()
  157. local mainjoint=part(delorean, false, true, vc(2, .5, 2), "Really Really red")
  158. local mainjointw=weld(mainjoint, base, cn(0, 4, 1))
  159. local seat=part(delorean, false, false, vc(2, .5, 2), "Really red")
  160. local seatw=weld(seat, base, cn(1.5, .25, 1))
  161. local backseat=part(delorean, false, false, vc(2, 2, .5), "Really red")
  162. local backseatw=weld(backseat, seat, cn(0, 1, 1)*ca(rd(10), 0, 0))
  163. local headseat=part(delorean, false, false, vc(1.5, 1.25, .5), "Really red")
  164. local headseatw=weld(headseat, seat, cn(0, 2.5, 1.15))
  165. local seat=part(delorean, false, false, vc(2, .5, 2), "Really red")
  166. local seatw=weld(seat, base, cn(-1.5, .25, 1))
  167. local backseat=part(delorean, false, false, vc(2, 2, .5), "Really red")
  168. local backseatw=weld(backseat, seat, cn(0, 1, 1)*ca(rd(10), 0, 0))
  169. local headseat=part(delorean, false, false, vc(1.5, 1.25, .5), "Really red")
  170. local headseatw=weld(headseat, seat, cn(0, 2.5, 1.15))
  171. local line=part(delorean, false, false, vc(1, 1, 14), "Really red")
  172. local linew=weld(line, base, cn(0, .5, 0))
  173. local back=part(delorean, false, true, vc(5, 1.5, 6), "Really Really red")
  174. local backw=weld(back, base, cn(0, 1, 5))
  175. local bb33s=part(delorean, false, true, vc(7, 1.5, 2), "Really Really red")
  176. local bb33sw=weld(bb33s, base, cn(0, 1, 7))
  177. local bbs=part(delorean, false, true, vc(7, .5, 1), "Really Really red")
  178. local bbsw=weld(bbs, base, cn(0, .25, 8.25)*ca(-rd(35), 0, 0))
  179. local bbs=part(delorean, false, true, vc(7, 1.5, .5), "Really Really red")
  180. local bbsw=weld(bbs, base, cn(0, 1, 8.25))
  181. local bb3s=part(delorean, false, true, vc(7, .5, .5), "Really red")
  182. local bb3sw=weld(bb3s, bb33s, cn(0, 1, 1.25))
  183. local bb3s=part(delorean, false, true, vc(7, .5, 6), "Really Really red")
  184. local bb3sw=weld(bb3s, bb33s, cn(0, 1, -2))
  185. decal=Instance.new("Decal", bb3s)
  186. decal.Texture="http://www.roblox.com/asset/?id=27893351"
  187. decal.Face="Top"
  188. rocket=wedge(delorean, false, true, vc(2,2,4), "Really red")
  189. rocketw=weld(rocket, bb3s, cn(2,1,1.5))
  190. r2=wedge(delorean, false, true, vc(2,1,2), "Really Really red")
  191. r2w=weld(r2,rocket,cn(0,0,2.5)*ca(pi/2,pi,0))
  192. rocket=wedge(delorean, false, true, vc(2,2,4), "Really red")
  193. rocketw=weld(rocket, bb3s, cn(-2,1,1.5))
  194. r2=wedge(delorean, false, true, vc(2,1,2), "Really Really red")
  195. r2w=weld(r2,rocket,cn(0,0,2.5)*ca(pi/2,pi,0))
  196. pp=part(delorean, false, true, vc(2,1,5), "Really red")
  197. ppw=weld(pp,bb3s,cn(0,.5,0))
  198. reactor=part(delorean, false, true, vc(2,1.5,2), "Really red")
  199. reactorw=weld(reactor,pp,cn(0,-.25,1.5))
  200. reactorm=mesh("SpecialMesh", reactor, vc(.4,.1,.4), "FileMesh", "http://www.roblox.com/Asset/?id=10207677")
  201. cyl=cylinder(delorean,false,true,vc(.8,1.5,.8),"White")
  202. cylw=weld(cyl,reactor,cn(0,1.5,0))
  203. decal=Instance.new("Decal", cyl)
  204. decal.Texture="http://www.roblox.com/asset/?id=37389443"
  205. decal.Face="Front"
  206. decal=Instance.new("Decal", cyl)
  207. decal.Texture="http://www.roblox.com/asset/?id=37389443"
  208. decal.Face="Back"
  209. decal=Instance.new("Decal", cyl)
  210. decal.Texture="http://www.roblox.com/asset/?id=37389443"
  211. decal.Face="Right"
  212. decal=Instance.new("Decal", cyl)
  213. decal.Texture="http://www.roblox.com/asset/?id=37389319"
  214. decal.Face="Left"
  215. cyl2=cylinder(delorean,false,true,vc(.5,.5,.5),"Really Really red")
  216. cyl2w=weld(cyl2,cyl,cn(0,.75,0))
  217. but=part(delorean,false,true,vc(.4,.3,1),"Bright red")
  218. butw=weld(but,cyl,cn(0,-.5,.5))
  219. local wed=wedge(delorean, false, true, vc(7, .5, 3), "Really Really red")
  220. local wedw=weld(wed, bf2, cn(0, 0, -.5)*ca(0, 0, pi))
  221. local trunk=wedge(delorean, false, true, vc(7, .5, 6.35), "Really Really red")
  222. local trunkw=weld(trunk, bf4, cn(0, .6, 1.5))
  223. --TIRE
  224. local prts=6
  225. local rad=1.6
  226. local tfr=cylinder(delorean, false, true, vc(2.5, 1, 2.5), "Really red")
  227. local tfrw=weld(tfr, base, cn(3,.25,-4.5)*ca(0,0,pi/2))
  228. local met=cylinder(delorean, false, true, vc(1.5, 1.1, 1.5), "Really Really red")
  229. local metw=weld(met, tfr, cn())
  230. for i=0,pi,pi/prts do
  231. local p=part(delorean, false, false, vc(1.1,1.1,.5), "Really Really red")
  232. p.CFrame=tfr.CFrame*cn(rad*sn(i), 0, rad*cs(i))
  233. p.CFrame=CFrame.new(p.CFrame.p, tfr.CFrame.p)
  234. stick(p, base)
  235. end
  236. local tfl=cylinder(delorean, false, true, vc(2.5, 1, 2.5), "Really red")
  237. local tflw=weld(tfl, base, cn(-3,.25,-4.5)*ca(0,0,pi/2))
  238. local met=cylinder(delorean, false, true, vc(1.5, 1.1, 1.5), "Really Really red")
  239. local metw=weld(met, tfl, cn())
  240. for i=0,pi,pi/prts do
  241. local p=part(delorean, false, false, vc(1.1,1.1,.5), "Really Really red")
  242. p.CFrame=tfl.CFrame*cn(rad*sn(i), 0, rad*cs(i))
  243. p.CFrame=CFrame.new(p.CFrame.p, tfl.CFrame.p)
  244. stick(p, base)
  245. end
  246. local tbr=cylinder(delorean, false, true, vc(2.5, 1, 2.5), "Really red")
  247. local tbrw=weld(tbr, base, cn(3,.25,4.5)*ca(0,0,pi/2))
  248. local met=cylinder(delorean, false, true, vc(1.5, 1.1, 1.5), "Really Really red")
  249. local metw=weld(met, tbr, cn())
  250. for i=0,pi,pi/prts do
  251. local p=part(delorean, false, false, vc(1.1,1.1,.5), "Really Really red")
  252. p.CFrame=tbr.CFrame*cn(rad*sn(i), 0, rad*cs(i))
  253. p.CFrame=CFrame.new(p.CFrame.p, tbr.CFrame.p)
  254. stick(p, base)
  255. end
  256. local tbl=cylinder(delorean, false, true, vc(2.5, 1, 2.5), "Really red")
  257. local tblw=weld(tbl, base, cn(-3,.25,4.5)*ca(0,0,pi/2))
  258. local met=cylinder(delorean, false, true, vc(1.5, 1.1, 1.5), "Really Really red")
  259. local metw=weld(met, tbl, cn())
  260. for i=0,pi,pi/prts do
  261. local p=part(delorean, false, false, vc(1.1,1.1,.5), "Really Really red")
  262. p.CFrame=tbl.CFrame*cn(rad*sn(i), 0, rad*cs(i))
  263. p.CFrame=CFrame.new(p.CFrame.p, tbl.CFrame.p)
  264. stick(p, base)
  265. end
  266. atfr=function(cf)
  267. tfrw.C1=cn(3,.25,-4.5)*ca(0,0,pi/2)*cf
  268. end
  269. atfl=function(cf)
  270. tflw.C1=cn(-3,.25,-4.5)*ca(0,0,pi/2)*cf
  271. end
  272. atbr=function(cf)
  273. tblw.C1=cn(3,.25,4.5)*ca(0,0,pi/2)*cf
  274. end
  275. atbl=function(cf)
  276. tblw.C1=cn(-3,.25,4.5)*ca(0,0,pi/2)*cf
  277. end
  278. local trunkw=weld(trunk, bf4, cn(0, .6, 1.25))
  279. --SEATS
  280. --DOOR
  281. local DoorRight=Instance.new("Model", delorean)
  282. local djr=part(DoorRight, false, false, vc(1, 1, 1), "Really Really red", 1)
  283. local djrw=weld(djr, mainjoint, cn(1,0,0)*ca(0,0,0))
  284. local dp=part(DoorRight, false, true, vc(2, .5, 2), "Really Really red")
  285. local dpw=weld(dp, djr, cn(1, 0, 0))
  286. local dp2=part(DoorRight, false, true, vc(.5, .5, 3.25), "Really Really red")
  287. local dp2w=weld(dp2, dp, cn(1, -1, -2)*ca(rd(-45),rd(-10),0))
  288. local dp3=part(DoorRight, false, true, vc(.5, 2.2, .5), "Really Really red")
  289. local dp3w=weld(dp3, dp, cn(1, -.85, .75)*ca(0, 0, rd(15)))
  290. local dw=wedge(DoorRight, false, true, vc(.5, 2, 1), "Really Really red")
  291. local dww=weld(dw, dp, cn(1.25, -2.75, .5)*ca(pi,0,0))
  292. local dw=wedge(DoorRight, false, true, vc(.5,1,.5), "Really Really red")
  293. local dww=weld(dw, dp, cn(1.25, -3.25, -2.75)*ca(pi, pi, 0))
  294. local dp4=part(DoorRight, false, true, vc(.5,1,.5), "Really Really red")
  295. local dp4w=weld(dp4, dp, cn(1.25, -2.25, -2.75))
  296. local dp5=part(DoorRight, false, true, vc(.5,2,2.5), "Really Really red")
  297. local dp5w=weld(dp5, dp, cn(1.25, -2.75, -1.25))
  298. local dwindow=wedge(DoorRight, false, true, vc(.25, 2, 2), "Really Really red", .5)
  299. local dwindoww=weld(dwindow, dp, cn(1, -1, -1.75)*ca(0, 0, rd(15)))
  300. local dwindow=part(DoorRight, false, true, vc(.25, 2, 1.5), "Really Really red", .5)
  301. local dwindoww=weld(dwindow, dp, cn(1, -1, 0)*ca(0, 0, rd(15)))
  302. local glass=part(DoorRight, false, true, vc(1, .5, .2), "Really Really red")
  303. local glassw=weld(glass, dp, cn(1.5, -1.5, -2)*ca(0, rd(-35), 0))
  304. local actr=false
  305. local debr=false
  306. function clickr()
  307. if actr==false then
  308. if debr==false then
  309. debr=true
  310. for i=0, 1, .1 do
  311. djrw.C1=cn(1,0,0)*ca(0,0,rd(90)*i)
  312. wait()
  313. end
  314. debr=false
  315. actr=true
  316. end
  317. elseif actr==true then
  318. if debr==false then
  319. debr=true
  320. for i=1, 0, -.1 do
  321. djrw.C1=cn(1,0,0)*ca(0,0,rd(90)*i)
  322. wait()
  323. end
  324. debr=false
  325. actr=false
  326. end
  327. end
  328. end
  329. for i, v in pairs(DoorRight:children()) do
  330. local cdetector=Instance.new("ClickDetector", v)
  331. cdetector.MouseClick:connect(clickr)
  332. end
  333. local DoorLeft=Instance.new("Model", delorean)
  334. local djl=part(DoorLeft, false, false, vc(1, 1, 1), "Really Really red", 1)
  335. local djlw=weld(djl, mainjoint, cn(-1,0,0))
  336. local dp=part(DoorLeft, false, true, vc(2, .5, 2), "Really Really red")
  337. local dpw=weld(dp, djl, cn(-1, 0, 0))
  338. local dp2=part(DoorLeft, false, true, vc(.5, .5, 3.25), "Really Really red")
  339. local dp2w=weld(dp2, dp, cn(-1, -1, -2)*ca(rd(-45),rd(10),0))
  340. local dp3=part(DoorLeft, false, true, vc(.5, 2.2, .5), "Really Really red")
  341. local dp3w=weld(dp3, dp, cn(-1, -.85, .75)*ca(0, 0, rd(-15)))
  342. local dw=wedge(DoorLeft, false, true, vc(.5, 2, 1), "Really Really red")
  343. local dww=weld(dw, dp, cn(-1.25, -2.75, .5)*ca(pi,0,0))
  344. local dw=wedge(DoorLeft, false, true, vc(.5,1,.5), "Really Really red")
  345. local dww=weld(dw, dp, cn(-1.25, -3.25, -2.75)*ca(pi, pi, 0))
  346. local dp4=part(DoorLeft, false, true, vc(.5,1,.5), "Really Really red")
  347. local dp4w=weld(dp4, dp, cn(-1.25, -2.25, -2.75))
  348. local dp5=part(DoorLeft, false, true, vc(.5,2,2.5), "Really Really red")
  349. local dp5w=weld(dp5, dp, cn(-1.25, -2.75, -1.25))
  350. local dwindow=wedge(DoorLeft, false, true, vc(.25, 2, 2), "Really Really red", .5)
  351. local dwindoww=weld(dwindow, dp, cn(-1, -1, -1.75)*ca(0, 0, rd(-15)))
  352. local dwindow=part(DoorLeft, false, true, vc(.25, 2, 1.5), "Really Really red", .5)
  353. local dwindoww=weld(dwindow, dp, cn(-1, -1, 0)*ca(0, 0, rd(-15)))
  354. local glass=part(DoorLeft, false, true, vc(1, .5, .2), "Really Really red")
  355. local glassw=weld(glass, dp, cn(-1.5, -1.5, -2)*ca(0, rd(35), 0))
  356. local actl=false
  357. local debl=false
  358. function clickl()
  359. if actl==false then
  360. if debl==false then
  361. debl=true
  362. for i=0, 1, .1 do
  363. djlw.C1=cn(-1,0,0)*ca(0,0,rd(-90)*i)
  364. wait()
  365. end
  366. debl=false
  367. actl=true
  368. end
  369. elseif actl==true then
  370. if debl==false then
  371. debl=true
  372. for i=1, 0, -.1 do
  373. djlw.C1=cn(-1,0,0)*ca(0,0,rd(-90)*i)
  374. wait()
  375. end
  376. debl=false
  377. actl=false
  378. end
  379. end
  380. end
  381. for i, v in pairs(DoorLeft:children()) do
  382. local cdetector=Instance.new("ClickDetector", v)
  383. cdetector.MouseClick:connect(clickl)
  384. end
  385. local bf=Instance.new("BodyForce")
  386. local bav=Instance.new("BodyAngularVelocity") bav.angularvelocity=vc(0,0,0) bav.maxTorque=vc(math.huge,math.huge,math.huge)
  387. local vs=Instance.new("VehicleSeat", delorean)
  388. vs.HeadsUpDisplay=false
  389. vs.CanCollide=false
  390. vs.Transparency=1
  391. vs.Size=Vector3.new(2, .5, 2)
  392. weld(vs, base, cn(-1.5, 0, 1))
  393. local ps=Instance.new("VehicleSeat", delorean)
  394. ps.HeadsUpDisplay=false
  395. ps.CanCollide=false
  396. ps.Size=Vector3.new(2, .5, 2)
  397. ps.Transparency=1
  398. weld(ps, base, cn(1.5, 0, 1))
  399. torsos={}
  400. ps.ChildAdded:connect(function(w)
  401. if w.Name=="SeatWeld" then
  402. torso=w.Part1
  403. if torso then
  404. for i, v2 in pairs(torso.Parent:children()) do
  405. if v2:isA("BasePart") then
  406. for i, v3 in pairs(v2:children()) do
  407. if v3:isA("CFrameValue") then
  408. v3:remove()
  409. end
  410. end
  411. end
  412. end
  413. end
  414. table.insert(torsos, torso)
  415. w.C1=w.C1*CFrame.new(0, 0, .5)
  416. end
  417. end)
  418. running=false
  419. vs.ChildAdded:connect(function(w)
  420. if w.Name=="SeatWeld" then
  421. torso=w.Part1
  422. w.C1=w.C1*CFrame.new(0, 0, .5)
  423. if torso then
  424. for i, v2 in pairs(torso.Parent:children()) do
  425. if v2:isA("BasePart") then
  426. for i, v3 in pairs(v2:children()) do
  427. if v3:isA("CFrameValue") then
  428. v3:remove()
  429. end
  430. end
  431. end
  432. end
  433. table.insert(torsos, torso)
  434. local player=game.Players:getPlayerFromCharacter(torso.Parent)
  435. screengui=Instance.new("ScreenGui", player.PlayerGui) screengui.Name=modelname
  436. speedometer=gui("TextLabel", screengui, "Really red", "Really red", "Really Really red", "Size48", "0", 1, UDim2.new(0, 100, 0, 100), UDim2.new(0, 50, .85, 0))
  437. hourlabel=gui("TextLabel", screengui, "Really red", "Really red", "Really Really red", "Size48", "HH", 1, UDim2.new(0, 100, 0, 50), UDim2.new(.7, 0, .8, 0))
  438. minutelabel=gui("TextLabel", hourlabel, "Really red", "Really red", "Really Really red", "Size48", "MM", 1, UDim2.new(1, 0, 1, 0), UDim2.new(1, 0, 0, 0))
  439. secondlabel=gui("TextLabel", minutelabel, "Really red", "Really red", "Really Really red", "Size48", "SS", 1, UDim2.new(1, 0, 1, 0), UDim2.new(1, 0, 0, 0))
  440. hourbox=gui("TextBox", hourlabel, "Really red", "Really red", "Really red", "Size48", "24", 1, UDim2.new(1, 0, 1, 0), UDim2.new(0, 0, 1, 0))
  441. minutebox=gui("TextBox", minutelabel, "Really red", "Really red", "Really red", "Size48", "00", 1, UDim2.new(1, 0, 1, 0), UDim2.new(0, 0, 1, 0))
  442. secondbox=gui("TextBox", secondlabel, "Really red", "Really red", "Really red", "Size48", "00", 1, UDim2.new(1, 0, 1, 0), UDim2.new(0, 0, 1, 0))
  443. running=true
  444. run()
  445. end
  446. end
  447. end)
  448. vs.ChildRemoved:connect(function(w)
  449. if w.Name=="SeatWeld" then
  450. torso=w.Part1
  451. if torso then
  452. for i, v in pairs(torsos) do
  453. if v==torso then
  454. table.remove(torsos,i)
  455. end
  456. end
  457. local player=game.Players:getPlayerFromCharacter(torso.Parent)
  458. player.PlayerGui[modelname]:remove()
  459. running=false
  460. end
  461. end
  462. end)
  463. ps.ChildRemoved:connect(function(w)
  464. if w.Name=="SeatWeld" then
  465. torso=w.Part1
  466. if torso then
  467. for i, v in pairs(torsos) do
  468. if v==torso then
  469. table.remove(torsos,i)
  470. end
  471. end
  472. end
  473. end
  474. end)
  475. c(function()wait(.5) bp:remove()end)
  476. function makelightning(from, to, thick, col)
  477. local magnitude=(from.p-to.p).magnitude
  478. local distance=(from.p+to.p)/2
  479. local pattern=part(workspace, true, false, vc(.2, .2, magnitude), "White", 1, cn(distance, from.p))
  480. local fromPosProx=from.p
  481. for i=1, 4 do
  482. local fromPosProx2=fromPosProx
  483. local random=vc(rn(-1, 1), rn(-1, 1), rn(-1, 1))
  484. local findSize=pattern.Size.z/3
  485. local findOffSet=pattern.CFrame.lookVector*-1
  486. local compute=i*findSize*findOffSet
  487. local newfromPos=from.p
  488. local newEndPos=cn(random+compute+newfromPos).p
  489. local magnitude=(fromPosProx2-newEndPos).magnitude
  490. local distance=(fromPosProx2+newEndPos)/2
  491. local lightning=part(workspace, true, false, vc(1, 1, 1), col or "Bright yellow", 0, cn(distance, fromPosProx2), vc(thick, thick, magnitude))
  492. fromPosProx=newEndPos
  493. game.Debris:addItem(lightning, .5)
  494. end
  495. pattern:remove()
  496. end
  497. function play(soundid, pitch, volume)
  498. local sound=sound(workspace, soundid, pitch, volume)
  499. sound:play()
  500. c(function() wait(5) sound:remove() end)
  501. end
  502. trm=Instance.new("Model", delorean)
  503. function trail(prt, cf, thick, col)
  504. local old=(prt.CFrame*(cf or cn())).p
  505. local trail=part(trm, true, false, vc(1, 1, 1), col or "White", 0, cn(old)*ca(rn(-360, 360),rn(-360, 360),rn(-360, 360)), vc(thick, thick, thick))
  506. c(function()
  507. for i=1, 0, -.001 do pc(function() trail.Mesh.Scale=trail.Mesh.Scale*vc(i, i, i) end) wait() end
  508. trail:remove()
  509. end)
  510. end
  511. Targets={}
  512. timedeb=false
  513. num=0
  514. maxnum=400
  515. origin=0
  516. function stick(from, to)
  517. local stickW=weld(from, to, to.CFrame:inverse()*from.CFrame)
  518. stickW.C0=from.CFrame:inverse()*from.CFrame
  519. return stickW
  520. end
  521. local bp=Instance.new("BodyPosition") bp.D=100 bp.maxForce=vc(inf,inf,inf)
  522. timedeb=false
  523. function run()
  524. num=0
  525. c(function()
  526. for i, v in pairs(workspace:children()) do
  527. if v:isA("Model") then
  528. for i, v2 in pairs(v:children()) do
  529. if v2:isA("BasePart") then
  530. for i, v3 in pairs(v2:children()) do
  531. if v3:isA("CFrameValue") then
  532. v3:remove()
  533. end
  534. end
  535. end
  536. end
  537. end
  538. end
  539. timedeb=true
  540. while true do
  541. --TimeContinium-----------------------------
  542. if num<=0 and timedeb==true then
  543. for i, v in pairs(workspace:children()) do
  544. if v:isA("BasePart") then
  545. if v.Anchored==false then
  546. table.insert(Targets, v)
  547. local Origin = Instance.new("CFrameValue")
  548. Origin.Parent = v
  549. Origin.Name = "Origin CFrame"
  550. Origin.Value = v.CFrame
  551. end
  552. end
  553. for i, t in pairs(torsos) do
  554. if v:isA("Model") and v~=t.Parent and v~=delorean then
  555. for i, v2 in pairs(v:children()) do
  556. if v2:isA("BasePart") then
  557. table.insert(Targets, v2)
  558. local Origin = Instance.new("CFrameValue")
  559. Origin.Parent = v2
  560. Origin.Name = "Origin CFrame"
  561. Origin.Value = v2.CFrame
  562. end
  563. end
  564. end
  565. end
  566. end
  567. ---------
  568. while num<maxnum and timedeb==true do ---print(num)
  569. for i, v in pairs(workspace:children()) do
  570. if v:isA("BasePart") and v:findFirstChild("Origin CFrame")==nil then
  571. if v.Anchored==false then
  572. table.insert(Targets, v)
  573. local Origin = Instance.new("CFrameValue")
  574. Origin.Parent = v
  575. Origin.Name = "Origin CFrame"
  576. Origin.Value = v.CFrame
  577. end
  578. end
  579. for i, t in pairs(torsos) do
  580. if v:isA("Model") and v~=t.Parent and v~=delorean then
  581. for i, v2 in pairs(v:children()) do
  582. if v2:isA("BasePart") and v2:findFirstChild("Origin CFrame")==nil then
  583. table.insert(Targets, v2)
  584. local Origin = Instance.new("CFrameValue")
  585. Origin.Parent = v2
  586. Origin.Name = "Origin CFrame"
  587. Origin.Value = v2.CFrame
  588. end
  589. end
  590. end
  591. end
  592. end
  593. for i, v in pairs(Targets) do
  594. local History = Instance.new("CFrameValue")
  595. History.Parent = v
  596. History.Name = num
  597. History.Value = v.CFrame
  598. end
  599. num = num + 1
  600. wait()
  601. end
  602. end
  603. wait()
  604. end
  605. end)
  606. while running do
  607. local speed=base.Velocity.magnitude
  608. speedometer.Text=math.floor(speed)
  609. if speed>65 and speed<88 then play("http://www.roblox.com/asset/?id=2800815", 1, .5)
  610. makelightning(base.CFrame*CFrame.new(0,0,10), base.CFrame*CFrame.new(rn(-10,10),rn(-10,10),rn(-2,10)), 1)
  611. trail(tbr,cn(-1.5, 0, -10),2.5,"Bright orange")
  612. trail(tbl,cn(-1.9, 0, -10),2.5,"Bright orange")
  613. end
  614. if speed>88 and speed<90 then play("http://roblox.com/asset/?id=10209481")
  615. local trm2=trm:clone() trm2.Parent=workspace
  616. origin=base.Position
  617. print(origin)
  618. game.Debris:addItem(trm2, 5)
  619. bp.position=vc(0,0,-99999)
  620. bp.Parent=base
  621. timedeb=false
  622. c(function()
  623. for i=0,1,.005 do
  624. game.Lighting.TimeOfDay=math.floor(hourbox.Text*i)..":"..math.floor(minutebox.Text*i)..":"..math.floor(secondbox.Text*i)
  625. wait()
  626. end
  627. end)
  628. while num > 0 do --print(num)
  629. wait()
  630. num = num - 1
  631. for i, v in pairs(Targets) do
  632. v.Anchored=true
  633. local History = v:findFirstChild(num)
  634. if History ~= nil then
  635. v.CFrame = History.Value
  636. History:remove()
  637. end
  638. end
  639. end
  640. for i, v in pairs(Targets) do
  641. local Origin = v:findFirstChild("Origin CFrame")
  642. if Origin ~= nil then
  643. v.CFrame = Origin.Value
  644. v:makeJoints()
  645. Origin:remove()
  646. end
  647. end
  648. for i, v in pairs(Targets) do
  649. v.Anchored=false
  650. end
  651. play("http://www.roblox.com/asset/?id=2101148", 1, 1)
  652. exp=Instance.new("Explosion", workspace)
  653. exp.BlastPressure=0
  654. exp.Position=origin
  655. Targets = {}
  656. timedeb=true
  657. bp.position=origin
  658. origin=0
  659. base.Velocity=vc(0,0,0)
  660. bf.force=base.CFrame.lookVector*0
  661. wait(1)
  662. bp:remove()
  663. end
  664. if vs.Steer==0 then bav.angularvelocity=vc(0,0,0) atfr(ca(0, 0, 0)) atfl(ca(0, 0, 0)) end
  665. if vs.Steer==1 then atfr(ca(rd(-25), 0, 0)) atfl(ca(rd(-25), 0, 0)) end
  666. if vs.Steer==-1 then atfr(ca(rd(25), 0, 0)) atfl(ca(rd(25), 0, 0)) end
  667. if vs.Throttle==1 then bav.Parent=base bf.Parent=base
  668. if vs.Steer==1 then bav.angularvelocity=vc(0,-2,0) end
  669. if vs.Steer==-1 then bav.angularvelocity=vc(0,2,0) end
  670. bf.force=base.CFrame.lookVector*40000
  671. end
  672. if vs.Throttle==0 then bav.Parent=base bf.Parent=base
  673. bf.force=base.CFrame.lookVector*0
  674. end
  675. if vs.Throttle==-1 then bav.Parent=base bf.Parent=base
  676. if vs.Steer==1 then bav.angularvelocity=vc(0,2,0) end
  677. if vs.Steer==-1 then bav.angularvelocity=vc(0,-2,0) end
  678. bf.force=base.CFrame.lookVector*-40000
  679. end
  680. wait()
  681. end
  682. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement