Advertisement
Darkelx

Untitled

Feb 22nd, 2019
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  2. --https://github.com/Mokiros/roblox-FE-compatibility
  3. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  4. local Player,game,owner = owner,game
  5. local RealPlayer = Player
  6. do
  7. print("FE Compatibility code V2 by Mokiros")
  8. local RealPlayer = RealPlayer
  9. script.Parent = RealPlayer.Character
  10.  
  11. --Fake event to make stuff like Mouse.KeyDown work
  12. local Disconnect_Function = function(this)
  13. this[1].Functions[this[2]] = nil
  14. end
  15. local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
  16. local FakeEvent_Metatable = {__index={
  17. Connect = function(this,f)
  18. local i = tostring(math.random(0,10000))
  19. while this.Functions[i] do
  20. i = tostring(math.random(0,10000))
  21. end
  22. this.Functions[i] = f
  23. return setmetatable({this,i},Disconnect_Metatable)
  24. end
  25. }}
  26. FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
  27. local function fakeEvent()
  28. return setmetatable({Functions={}},FakeEvent_Metatable)
  29. end
  30.  
  31. --Creating fake input objects with fake variables
  32. local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  33. FakeMouse.keyUp = FakeMouse.KeyUp
  34. FakeMouse.keyDown = FakeMouse.KeyDown
  35. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  36. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  37. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  38. end}
  39. --Merged 2 functions into one by checking amount of arguments
  40. CAS.UnbindAction = CAS.BindAction
  41.  
  42. --This function will trigger the events that have been :Connect()'ed
  43. local function TriggerEvent(self,ev,...)
  44. for _,f in pairs(self[ev].Functions) do
  45. f(...)
  46. end
  47. end
  48. FakeMouse.TriggerEvent = TriggerEvent
  49. UIS.TriggerEvent = TriggerEvent
  50.  
  51. --Client communication
  52. local Event = Instance.new("RemoteEvent")
  53. Event.Name = "UserInput_Event"
  54. Event.OnServerEvent:Connect(function(plr,io)
  55. if plr~=RealPlayer then return end
  56. FakeMouse.Target = io.Target
  57. FakeMouse.Hit = io.Hit
  58. if not io.isMouse then
  59. local b = io.UserInputState == Enum.UserInputState.Begin
  60. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  61. return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
  62. end
  63. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  64. return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
  65. end
  66. for _,t in pairs(CAS.Actions) do
  67. for _,k in pairs(t.Keys) do
  68. if k==io.KeyCode then
  69. t.Function(t.Name,io.UserInputState,io)
  70. end
  71. end
  72. end
  73. FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  74. UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
  75. end
  76. end)
  77. Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
  78. local Mouse = owner:GetMouse()
  79. local UIS = game:GetService("UserInputService")
  80. local input = function(io,RobloxHandled)
  81. if RobloxHandled then return end
  82. --Since InputObject is a client-side instance, we create and pass table instead
  83. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  84. end
  85. UIS.InputBegan:Connect(input)
  86. UIS.InputEnded:Connect(input)
  87. local h,t
  88. --Give the server mouse data every second frame, but only if the values changed
  89. --If player is not moving their mouse, client won't fire events
  90. local HB = game:GetService("RunService").Heartbeat
  91. while true do
  92. if h~=Mouse.Hit or t~=Mouse.Target then
  93. h,t=Mouse.Hit,Mouse.Target
  94. Event:FireServer({isMouse=true,Target=t,Hit=h})
  95. end
  96. --Wait 2 frames
  97. for i=1,2 do
  98. HB:Wait()
  99. end
  100. end]==],script)
  101.  
  102. ----Sandboxed game object that allows the usage of client-side methods and services
  103. --Real game object
  104. local RealGame = game
  105.  
  106. --Metatable for fake service
  107. local FakeService_Metatable = {
  108. __index = function(self,k)
  109. local s = rawget(self,"_RealService")
  110. if s then
  111. return typeof(s[k])=="function"
  112. and function(_,...)return s[k](s,...)end or s[k]
  113. end
  114. end,
  115. __newindex = function(self,k,v)
  116. local s = rawget(self,"_RealService")
  117. if s then s[k]=v end
  118. end
  119. }
  120. local function FakeService(t,RealService)
  121. t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
  122. return setmetatable(t,FakeService_Metatable)
  123. end
  124.  
  125. --Fake game object
  126. local FakeGame = {
  127. GetService = function(self,s)
  128. return rawget(self,s) or RealGame:GetService(s)
  129. end,
  130. Players = FakeService({
  131. LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
  132. },"Players"),
  133. UserInputService = FakeService(UIS,"UserInputService"),
  134. ContextActionService = FakeService(CAS,"ContextActionService"),
  135. RunService = FakeService({
  136. _btrs = {},
  137. RenderStepped = RealGame:GetService("RunService").Heartbeat,
  138. BindToRenderStep = function(self,name,_,fun)
  139. self._btrs[name] = self.Heartbeat:Connect(fun)
  140. end,
  141. UnbindFromRenderStep = function(self,name)
  142. self._btrs[name]:Disconnect()
  143. end,
  144. },"RunService")
  145. }
  146. rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
  147. FakeGame.service = FakeGame.GetService
  148. FakeService(FakeGame,game)
  149. --Changing owner to fake player object to support owner:GetMouse()
  150. game,owner = FakeGame,FakeGame.Players.LocalPlayer
  151. end
  152.  
  153. local modelname="DeLoreanTimeMachine"
  154. pcall(function() workspace.Base.CFrame=CFrame.new(0,-2,0) end)
  155. print(modelname.."_LOADED")
  156. local plr=game:service("Players")["LocalPlayer"]
  157. local char=plr.Character
  158. local T=char.Torso
  159. local c=function(f) coroutine.resume(coroutine.create(f)) end
  160. local pc=pcall
  161. pc(function() workspace:findFirstChild(modelname):remove() end)
  162. local mouse=nil
  163. local pi=math.pi
  164. local rd=math.rad
  165. local sn=math.sin
  166. local cs=math.cos
  167. local rn=math.random
  168. local ti=table.insert
  169. local tr=table.remove
  170. local inf=math.huge
  171. local cn=CFrame.new
  172. local vc=Vector3.new
  173. local ca=CFrame.Angles
  174. local delorean=Instance.new("Model", workspace) delorean.Name=modelname
  175. local screengui=Instance.new("ScreenGui") screengui.Name=modelname
  176. part=function(par, a, c, s, col, t, cf, ms)
  177. 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)
  178. local m=Instance.new("BlockMesh", p) pcall(function() m.Scale=ms or Vector3.new(1, 1, 1) end)
  179. return p
  180. end
  181. cylinder=function(par, a, c, s, col, t, cf, ms)
  182. 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)
  183. local m=Instance.new("CylinderMesh", p) pcall(function() m.Scale=ms or Vector3.new(1, 1, 1) end)
  184. return p
  185. end
  186. wedge=function(par, a, c, s, col, t, cf, ms)
  187. 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)
  188. local m=Instance.new("SpecialMesh", p) pcall(function() m.Scale=ms or Vector3.new(1, 1, 1) m.MeshType="Wedge" end)
  189. return p
  190. end
  191. gui=function(ins, par, bc, bg, tc, fs, text, t, s, pos)
  192. 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
  193. return g
  194. end
  195. weld=function(par, p1, cf)
  196. local w=Instance.new("Weld", par) pcall(function() w.Part0=w.Parent or par w.Part1=p1 w.C1=cf or cn() end)
  197. return w
  198. end
  199. mesh=function(ins, par, s, t, id, tid, of)
  200. 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)
  201. 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)
  202. return m
  203. end
  204. sound=function(parent, id, pitch, volume)
  205. local s=Instance.new("Sound", parent) pcall(function() s.SoundId=id s.Volume=volume or 1 s.Pitch=pitch or 1 end)
  206. return s
  207. end
  208.  
  209. function stick(from, to)
  210. local stickW=weld(from, to, to.CFrame:inverse()*from.CFrame)
  211. stickW.C0=from.CFrame:inverse()*from.CFrame
  212. return stickW
  213. end
  214. bp=Instance.new("BodyPosition") bp.D=200 bp.maxForce=vc(inf,inf,inf)
  215. base=part(delorean, false, true, vc(5, .5, 14), "Really black", 0, cn(0, 200, 0))
  216. wait()
  217. bp.Parent=base
  218. bp.position=(T.CFrame+T.CFrame.lookVector*20).p
  219. base.Name="BASE"
  220. bc=part(delorean, false, true, vc(7, .5, 6), "Really black")
  221. bcw=weld(bc, base, cn())
  222. bf=part(delorean, false, true, vc(7, .5, 2), "Really black")
  223. bfw=weld(bf, base, cn(0, 0, -7))
  224. local bb=part(delorean, false, true, vc(7, .5, 2), "Really black")
  225. local bbw=weld(bb, base, cn(0, 0, 7))
  226. local bf2=part(delorean, false, true, vc(6.8, 1, 1.5), "Really black")
  227. local bf2w=weld(bf2, bf, cn(0, .5, 0))
  228. local bc2=part(delorean, false, true, vc(5, 1, 5), "Really black")
  229. local bc2w=weld(bc2, base, cn(0, .75, -4.5))
  230. local bf3=part(delorean, false, true, vc(7, .5, 3), "Really black")
  231. local bf3w=weld(bf3, bf2, cn(0, .5, -.5))
  232. local enginesmoke=cylinder(delorean, false, true, vc(.5, 2, .5), "Hot pink")
  233. local enginesmokew=weld(enginesmoke, bb, cn(2, 0, .75)*ca(-rd(90), 0, 0))
  234. local enginesmoke=cylinder(delorean, false, true, vc(.5, 2, .5), "Hot pink")
  235. local enginesmokew=weld(enginesmoke, bb, cn(-2, 0, .75)*ca(-rd(90), 0, 0))
  236.  
  237. local bf4=part(delorean, false, true, vc(7, .7, 3.5), "Really black")
  238. local bf4w=weld(bf4, bf3, cn(0, .6, .75))
  239. local bf5=part(delorean, false, true, vc(6, .7, 3), "Really black")
  240. local bf5w=weld(bf5, bf4, cn(0, 0, 3))
  241.  
  242. local mprt=part(delorean, false, true, vc(7, 1, .5), "Really black", 0, cn(), vc(1, .1, 1))
  243. local mprtw=weld(mprt, bf4, cn(0, -.3, -2))
  244. local mprt=part(delorean, false, true, vc(7, 1, .35), "Really black", 0, cn(), vc(1, .1, 1))
  245. local mprtw=weld(mprt, bf4, cn(0, .3, -1.9))
  246. local mprt=part(delorean, false, true, vc(.2, .65, .5), "Really black", 0, cn(), vc(1, 1, 1))
  247. local mprtw=weld(mprt, bf4, cn(3.4, -.03, -1.9)*ca(rd(15), 0, 0))
  248. local mprt=part(delorean, false, true, vc(.2, .65, .5), "Really black", 0, cn(), vc(1, 1, 1))
  249. local mprtw=weld(mprt, bf4, cn(-3.4, -.03, -1.9)*ca(rd(15), 0, 0))
  250. local dmc=part(delorean, false, true, vc(2, .65, .5), "Really black", 0, cn(), vc(1, 1, 1))
  251. local dmcw=weld(dmc, bf4, cn(0, -.03, -1.9)*ca(rd(15), 0, 0))
  252. decal=Instance.new("Decal", dmc)
  253. decal.Texture="http://www.roblox.com/asset/?id=28924870"
  254. decal.Face="Front"
  255. local prt=part(delorean, false, true, vc(.5, 2, 1), "Really black")
  256. local prtw=weld(prt, bc, cn(3.25, 1.25, -2.5)*ca(0, 0, 0))
  257. local w=wedge(delorean, false, false, vc(.5, 1, .5), "Really black")
  258. local w2=weld(w, prt, cn(0, -.5, .75)*ca(0,pi,0))
  259. local prt=part(delorean, false, true, vc(.5, 2, 1), "Really black")
  260. local prtw=weld(prt, bc, cn(3.25, 1.25, -3)*ca(rd(-45), 0, 0))
  261.  
  262. local prt=part(delorean, false, true, vc(.5, 2, 1), "Really black")
  263. local prtw=weld(prt, bc, cn(-3.25, 1.25, -2.5)*ca(0, 0, 0))
  264. local w=wedge(delorean, false, false, vc(.5, 1, .5), "Really black")
  265. local w2=weld(w, prt, cn(0, -.5, .75)*ca(0,pi,0))
  266. local prt=part(delorean, false, true, vc(.5, 2, 1), "Really black")
  267. local prtw=weld(prt, bc, cn(-3.25, 1.25, -3)*ca(rd(-45), 0, 0))
  268.  
  269. local prt=part(delorean, false, true, vc(.5, 2, 1), "Really black")
  270. local prtw=weld(prt, bc, cn(3.25, 1.25, 2.5)*ca(0, 0, 0))
  271. local prt2=part(delorean, false, true, vc(.5, 2.2, 1.5), "Really black")
  272. local prt2w=weld(prt2, prt, cn(-.25, 1.85, .25)*ca(0, 0, rd(10)))
  273. local w=wedge(delorean, false, false, vc(.5, 2, 1), "Really black")
  274. local w2=weld(w, prt, cn(0, 0, -1))
  275. local prt=part(delorean, false, true, vc(.5, 2, 1), "Really black")
  276. local prtw=weld(prt, bc, cn(3.25, 1.25, 3)*ca(rd(45), 0, 0))
  277.  
  278. local prt=part(delorean, false, true, vc(.5, 2, 1), "Really black")
  279. local prtw=weld(prt, bc, cn(-3.25, 1.25, 2.5)*ca(0, 0, 0))
  280. local prt2=part(delorean, false, true, vc(.5, 2.2, 1.5), "Really black")
  281. local prt2w=weld(prt2, prt, cn(.25, 1.85, .25)*ca(0, 0, rd(-10)))
  282. local w=wedge(delorean, false, false, vc(.5, 2, 1), "Really black")
  283. local w2=weld(w, prt, cn(0, 0, -1))
  284. local prt=part(delorean, false, true, vc(.5, 2, 1), "Really black")
  285. local prtw=weld(prt, bc, cn(-3.25, 1.25, 3)*ca(rd(45), 0, 0))
  286. local main=part(delorean, false, true, vc(6, .5, 1.5), "Really black")
  287. local mainw=weld(main, base, cn(0, 4, 2.75))
  288. local stand=part(delorean, false, true, vc(.5, .5, 5.5), "Really black")
  289. local standw=weld(stand, base, cn(3,3,5.5)*ca(rd(22),rd(5),0))
  290. local stand=part(delorean, false, true, vc(.5, .5, 5.5), "Really black")
  291. local standw=weld(stand, base, cn(-3,3,5.5)*ca(rd(22),rd(-5),0))
  292. local backprt=part(delorean, false, true, vc(6, 2, .5), "Hot pink")
  293. local backprt=weld(backprt, base, cn(0, 3, 2))
  294.  
  295. local window=part(delorean, false, true, vc(5, 2.5, .25), "Hot pink", .5)
  296. local windoww=weld(window, base, cn(0, 3, -1.25)*ca(rd(45), 0, 0))
  297. local border=part(delorean, false, false, vc(5, .5, .5), "Really black")
  298. local borderw=weld(border, window, cn(0, 1.5, 0))
  299. local border=part(delorean, false, false, vc(.5, 3, .5), "Really black")
  300. local borderw=weld(border, window, cn(2.5, 0, 0)*ca(0, 0, rd(10)))
  301. local border=part(delorean, false, false, vc(.5, 3, .5), "Really black")
  302. local borderw=weld(border, window, cn(-2.5, 0, 0)*ca(0, 0, rd(-10)))
  303. local prt=weld()
  304. local mainjoint=part(delorean, false, true, vc(2, .5, 2), "Really black")
  305. local mainjointw=weld(mainjoint, base, cn(0, 4, 1))
  306.  
  307. local seat=part(delorean, false, false, vc(2, .5, 2), "Hot pink")
  308. local seatw=weld(seat, base, cn(1.5, .25, 1))
  309. local backseat=part(delorean, false, false, vc(2, 2, .5), "Hot pink")
  310. local backseatw=weld(backseat, seat, cn(0, 1, 1)*ca(rd(10), 0, 0))
  311. local headseat=part(delorean, false, false, vc(1.5, 1.25, .5), "Hot pink")
  312. local headseatw=weld(headseat, seat, cn(0, 2.5, 1.15))
  313. local seat=part(delorean, false, false, vc(2, .5, 2), "Hot pink")
  314. local seatw=weld(seat, base, cn(-1.5, .25, 1))
  315. local backseat=part(delorean, false, false, vc(2, 2, .5), "Hot pink")
  316. local backseatw=weld(backseat, seat, cn(0, 1, 1)*ca(rd(10), 0, 0))
  317. local headseat=part(delorean, false, false, vc(1.5, 1.25, .5), "Hot pink")
  318. local headseatw=weld(headseat, seat, cn(0, 2.5, 1.15))
  319. local line=part(delorean, false, false, vc(1, 1, 14), "Hot pink")
  320. local linew=weld(line, base, cn(0, .5, 0))
  321.  
  322. local back=part(delorean, false, true, vc(5, 1.5, 6), "Really black")
  323. local backw=weld(back, base, cn(0, 1, 5))
  324. local bb33s=part(delorean, false, true, vc(7, 1.5, 2), "Really black")
  325. local bb33sw=weld(bb33s, base, cn(0, 1, 7))
  326. local bbs=part(delorean, false, true, vc(7, .5, 1), "Really black")
  327. local bbsw=weld(bbs, base, cn(0, .25, 8.25)*ca(-rd(35), 0, 0))
  328. local bbs=part(delorean, false, true, vc(7, 1.5, .5), "Really black")
  329. local bbsw=weld(bbs, base, cn(0, 1, 8.25))
  330. local bb3s=part(delorean, false, true, vc(7, .5, .5), "Really black")
  331. local bb3sw=weld(bb3s, bb33s, cn(0, 1, 1.25))
  332. local bb3s=part(delorean, false, true, vc(7, .5, 6), "Really black")
  333. local bb3sw=weld(bb3s, bb33s, cn(0, 1, -2))
  334. decal=Instance.new("Decal", bb3s)
  335. decal.Texture="http://www.roblox.com/asset/?id=27893351"
  336. decal.Face="Top"
  337. rocket=wedge(delorean, false, true, vc(2,2,4), "Hot pink")
  338. rocketw=weld(rocket, bb3s, cn(2,1,1.5))
  339. r2=wedge(delorean, false, true, vc(2,1,2), "Really black")
  340. r2w=weld(r2,rocket,cn(0,0,2.5)*ca(pi/2,pi,0))
  341. rocket=wedge(delorean, false, true, vc(2,2,4), "Hot pink")
  342. rocketw=weld(rocket, bb3s, cn(-2,1,1.5))
  343. r2=wedge(delorean, false, true, vc(2,1,2), "Really black")
  344. r2w=weld(r2,rocket,cn(0,0,2.5)*ca(pi/2,pi,0))
  345. pp=part(delorean, false, true, vc(2,1,5), "Hot pink")
  346. ppw=weld(pp,bb3s,cn(0,.5,0))
  347. reactor=part(delorean, false, true, vc(2,1.5,2), "Hot pink")
  348. reactorw=weld(reactor,pp,cn(0,-.25,1.5))
  349. reactorm=mesh("SpecialMesh", reactor, vc(.4,.1,.4), "FileMesh", "http://www.roblox.com/Asset/?id=10207677")
  350. cyl=cylinder(delorean,false,true,vc(.8,1.5,.8),"Hot pink")
  351. cylw=weld(cyl,reactor,cn(0,1.5,0))
  352. decal=Instance.new("Decal", cyl)
  353. decal.Texture="http://www.roblox.com/asset/?id=37389443"
  354. decal.Face="Front"
  355. decal=Instance.new("Decal", cyl)
  356. decal.Texture="http://www.roblox.com/asset/?id=37389443"
  357. decal.Face="Back"
  358. decal=Instance.new("Decal", cyl)
  359. decal.Texture="http://www.roblox.com/asset/?id=37389443"
  360. decal.Face="Right"
  361. decal=Instance.new("Decal", cyl)
  362. decal.Texture="http://www.roblox.com/asset/?id=37389319"
  363. decal.Face="Left"
  364.  
  365. cyl2=cylinder(delorean,false,true,vc(.5,.5,.5),"Really black")
  366. cyl2w=weld(cyl2,cyl,cn(0,.75,0))
  367. but=part(delorean,false,true,vc(.4,.3,1),"Bright red")
  368. butw=weld(but,cyl,cn(0,-.5,.5))
  369.  
  370. local wed=wedge(delorean, false, true, vc(7, .5, 3), "Really black")
  371. local wedw=weld(wed, bf2, cn(0, 0, -.5)*ca(0, 0, pi))
  372. local trunk=wedge(delorean, false, true, vc(7, .5, 6.35), "Really black")
  373. local trunkw=weld(trunk, bf4, cn(0, .6, 1.5))
  374.  
  375. --TIRE
  376. local prts=6
  377. local rad=1.6
  378. local tfr=cylinder(delorean, false, true, vc(2.5, 1, 2.5), "Really black")
  379. local tfrw=weld(tfr, base, cn(3,.25,-4.5)*ca(0,0,pi/2))
  380. local met=cylinder(delorean, false, true, vc(1.5, 1.1, 1.5), "Hot pink")
  381. local metw=weld(met, tfr, cn())
  382. for i=0,pi,pi/prts do
  383. local p=part(delorean, false, false, vc(1.1,1.1,.5), "Hot pink")
  384. p.CFrame=tfr.CFrame*cn(rad*sn(i), 0, rad*cs(i))
  385. p.CFrame=CFrame.new(p.CFrame.p, tfr.CFrame.p)
  386. stick(p, base)
  387. end
  388.  
  389. local tfl=cylinder(delorean, false, true, vc(2.5, 1, 2.5), "Really black")
  390. local tflw=weld(tfl, base, cn(-3,.25,-4.5)*ca(0,0,pi/2))
  391. local met=cylinder(delorean, false, true, vc(1.5, 1.1, 1.5), "Hot pink")
  392. local metw=weld(met, tfl, cn())
  393. for i=0,pi,pi/prts do
  394. local p=part(delorean, false, false, vc(1.1,1.1,.5), "Hot pink")
  395. p.CFrame=tfl.CFrame*cn(rad*sn(i), 0, rad*cs(i))
  396. p.CFrame=CFrame.new(p.CFrame.p, tfl.CFrame.p)
  397. stick(p, base)
  398. end
  399.  
  400. local tbr=cylinder(delorean, false, true, vc(2.5, 1, 2.5), "Really black")
  401. local tbrw=weld(tbr, base, cn(3,.25,4.5)*ca(0,0,pi/2))
  402. local met=cylinder(delorean, false, true, vc(1.5, 1.1, 1.5), "Hot pink")
  403. local metw=weld(met, tbr, cn())
  404. for i=0,pi,pi/prts do
  405. local p=part(delorean, false, false, vc(1.1,1.1,.5), "Hot pink")
  406. p.CFrame=tbr.CFrame*cn(rad*sn(i), 0, rad*cs(i))
  407. p.CFrame=CFrame.new(p.CFrame.p, tbr.CFrame.p)
  408. stick(p, base)
  409. end
  410.  
  411. local tbl=cylinder(delorean, false, true, vc(2.5, 1, 2.5), "Really black")
  412. local tblw=weld(tbl, base, cn(-3,.25,4.5)*ca(0,0,pi/2))
  413. local met=cylinder(delorean, false, true, vc(1.5, 1.1, 1.5), "Hot pink")
  414. local metw=weld(met, tbl, cn())
  415. for i=0,pi,pi/prts do
  416. local p=part(delorean, false, false, vc(1.1,1.1,.5), "Hot pink")
  417. p.CFrame=tbl.CFrame*cn(rad*sn(i), 0, rad*cs(i))
  418. p.CFrame=CFrame.new(p.CFrame.p, tbl.CFrame.p)
  419. stick(p, base)
  420. end
  421. atfr=function(cf)
  422. tfrw.C1=cn(3,.25,-4.5)*ca(0,0,pi/2)*cf
  423. end
  424. atfl=function(cf)
  425. tflw.C1=cn(-3,.25,-4.5)*ca(0,0,pi/2)*cf
  426. end
  427. atbr=function(cf)
  428. tblw.C1=cn(3,.25,4.5)*ca(0,0,pi/2)*cf
  429. end
  430. atbl=function(cf)
  431. tblw.C1=cn(-3,.25,4.5)*ca(0,0,pi/2)*cf
  432. end
  433. local trunkw=weld(trunk, bf4, cn(0, .6, 1.25))
  434. --SEATS
  435. --DOOR
  436. local DoorRight=Instance.new("Model", delorean)
  437. local djr=part(DoorRight, false, false, vc(1, 1, 1), "Really black", 1)
  438. local djrw=weld(djr, mainjoint, cn(1,0,0)*ca(0,0,0))
  439. local dp=part(DoorRight, false, true, vc(2, .5, 2), "Really black")
  440. local dpw=weld(dp, djr, cn(1, 0, 0))
  441. local dp2=part(DoorRight, false, true, vc(.5, .5, 3.25), "Really black")
  442. local dp2w=weld(dp2, dp, cn(1, -1, -2)*ca(rd(-45),rd(-10),0))
  443. local dp3=part(DoorRight, false, true, vc(.5, 2.2, .5), "Really black")
  444. local dp3w=weld(dp3, dp, cn(1, -.85, .75)*ca(0, 0, rd(15)))
  445. local dw=wedge(DoorRight, false, true, vc(.5, 2, 1), "Really black")
  446. local dww=weld(dw, dp, cn(1.25, -2.75, .5)*ca(pi,0,0))
  447. local dw=wedge(DoorRight, false, true, vc(.5,1,.5), "Really black")
  448. local dww=weld(dw, dp, cn(1.25, -3.25, -2.75)*ca(pi, pi, 0))
  449. local dp4=part(DoorRight, false, true, vc(.5,1,.5), "Really black")
  450. local dp4w=weld(dp4, dp, cn(1.25, -2.25, -2.75))
  451. local dp5=part(DoorRight, false, true, vc(.5,2,2.5), "Really black")
  452. local dp5w=weld(dp5, dp, cn(1.25, -2.75, -1.25))
  453. local dwindow=wedge(DoorRight, false, true, vc(.25, 2, 2), "Really black", .5)
  454. local dwindoww=weld(dwindow, dp, cn(1, -1, -1.75)*ca(0, 0, rd(15)))
  455. local dwindow=part(DoorRight, false, true, vc(.25, 2, 1.5), "Really black", .5)
  456. local dwindoww=weld(dwindow, dp, cn(1, -1, 0)*ca(0, 0, rd(15)))
  457. local glass=part(DoorRight, false, true, vc(1, .5, .2), "Hot pink")
  458. local glassw=weld(glass, dp, cn(1.5, -1.5, -2)*ca(0, rd(-35), 0))
  459.  
  460. local actr=false
  461. local debr=false
  462. function clickr()
  463. if actr==false then
  464. if debr==false then
  465. debr=true
  466. for i=0, 1, .1 do
  467. djrw.C1=cn(1,0,0)*ca(0,0,rd(90)*i)
  468. wait()
  469. end
  470. debr=false
  471. actr=true
  472. end
  473. elseif actr==true then
  474. if debr==false then
  475. debr=true
  476. for i=1, 0, -.1 do
  477. djrw.C1=cn(1,0,0)*ca(0,0,rd(90)*i)
  478. wait()
  479. end
  480. debr=false
  481. actr=false
  482. end
  483. end
  484. end
  485.  
  486. for i, v in pairs(DoorRight:children()) do
  487. local cdetector=Instance.new("ClickDetector", v)
  488. cdetector.MouseClick:connect(clickr)
  489. end
  490.  
  491. local DoorLeft=Instance.new("Model", delorean)
  492. local djl=part(DoorLeft, false, false, vc(1, 1, 1), "Really black", 1)
  493. local djlw=weld(djl, mainjoint, cn(-1,0,0))
  494. local dp=part(DoorLeft, false, true, vc(2, .5, 2), "Really black")
  495. local dpw=weld(dp, djl, cn(-1, 0, 0))
  496. local dp2=part(DoorLeft, false, true, vc(.5, .5, 3.25), "Really black")
  497. local dp2w=weld(dp2, dp, cn(-1, -1, -2)*ca(rd(-45),rd(10),0))
  498. local dp3=part(DoorLeft, false, true, vc(.5, 2.2, .5), "Really black")
  499. local dp3w=weld(dp3, dp, cn(-1, -.85, .75)*ca(0, 0, rd(-15)))
  500. local dw=wedge(DoorLeft, false, true, vc(.5, 2, 1), "Really black")
  501. local dww=weld(dw, dp, cn(-1.25, -2.75, .5)*ca(pi,0,0))
  502. local dw=wedge(DoorLeft, false, true, vc(.5,1,.5), "Really black")
  503. local dww=weld(dw, dp, cn(-1.25, -3.25, -2.75)*ca(pi, pi, 0))
  504. local dp4=part(DoorLeft, false, true, vc(.5,1,.5), "Really black")
  505. local dp4w=weld(dp4, dp, cn(-1.25, -2.25, -2.75))
  506. local dp5=part(DoorLeft, false, true, vc(.5,2,2.5), "Really black")
  507. local dp5w=weld(dp5, dp, cn(-1.25, -2.75, -1.25))
  508. local dwindow=wedge(DoorLeft, false, true, vc(.25, 2, 2), "Really black", .5)
  509. local dwindoww=weld(dwindow, dp, cn(-1, -1, -1.75)*ca(0, 0, rd(-15)))
  510. local dwindow=part(DoorLeft, false, true, vc(.25, 2, 1.5), "Really black", .5)
  511. local dwindoww=weld(dwindow, dp, cn(-1, -1, 0)*ca(0, 0, rd(-15)))
  512. local glass=part(DoorLeft, false, true, vc(1, .5, .2), "Hot pink")
  513. local glassw=weld(glass, dp, cn(-1.5, -1.5, -2)*ca(0, rd(35), 0))
  514.  
  515. local actl=false
  516. local debl=false
  517. function clickl()
  518. if actl==false then
  519. if debl==false then
  520. debl=true
  521. for i=0, 1, .1 do
  522. djlw.C1=cn(-1,0,0)*ca(0,0,rd(-90)*i)
  523. wait()
  524. end
  525. debl=false
  526. actl=true
  527. end
  528. elseif actl==true then
  529. if debl==false then
  530. debl=true
  531. for i=1, 0, -.1 do
  532. djlw.C1=cn(-1,0,0)*ca(0,0,rd(-90)*i)
  533. wait()
  534. end
  535. debl=false
  536. actl=false
  537. end
  538. end
  539. end
  540.  
  541. for i, v in pairs(DoorLeft:children()) do
  542. local cdetector=Instance.new("ClickDetector", v)
  543. cdetector.MouseClick:connect(clickl)
  544. end
  545.  
  546. local bf=Instance.new("BodyForce")
  547. local bav=Instance.new("BodyAngularVelocity") bav.angularvelocity=vc(0,0,0) bav.maxTorque=vc(math.huge,math.huge,math.huge)
  548. local vs=Instance.new("VehicleSeat", delorean)
  549. vs.HeadsUpDisplay=false
  550. vs.CanCollide=false
  551. vs.Transparency=1
  552. vs.Size=Vector3.new(2, .5, 2)
  553. weld(vs, base, cn(-1.5, 0, 1))
  554. local ps=Instance.new("VehicleSeat", delorean)
  555. ps.HeadsUpDisplay=false
  556. ps.CanCollide=false
  557. ps.Size=Vector3.new(2, .5, 2)
  558. ps.Transparency=1
  559. weld(ps, base, cn(1.5, 0, 1))
  560. torsos={}
  561. ps.ChildAdded:connect(function(w)
  562. if w.Name=="SeatWeld" then
  563. torso=w.Part1
  564. if torso then
  565. for i, v2 in pairs(torso.Parent:children()) do
  566. if v2:isA("BasePart") then
  567. for i, v3 in pairs(v2:children()) do
  568. if v3:isA("CFrameValue") then
  569. v3:remove()
  570. end
  571. end
  572. end
  573. end
  574. end
  575. table.insert(torsos, torso)
  576. w.C1=w.C1*CFrame.new(0, 0, .5)
  577. end
  578. end)
  579. running=false
  580. vs.ChildAdded:connect(function(w)
  581. if w.Name=="SeatWeld" then
  582. torso=w.Part1
  583. w.C1=w.C1*CFrame.new(0, 0, .5)
  584. if torso then
  585. for i, v2 in pairs(torso.Parent:children()) do
  586. if v2:isA("BasePart") then
  587. for i, v3 in pairs(v2:children()) do
  588. if v3:isA("CFrameValue") then
  589. v3:remove()
  590. end
  591. end
  592. end
  593. end
  594. table.insert(torsos, torso)
  595. local player=game.Players:getPlayerFromCharacter(torso.Parent)
  596. screengui=Instance.new("ScreenGui", player.PlayerGui) screengui.Name=modelname
  597. speedometer=gui("TextLabel", screengui, "Black", "Black", "Really black", "Size48", "0", 1, UDim2.new(0, 100, 0, 100), UDim2.new(0, 50, .85, 0))
  598. hourlabel=gui("TextLabel", screengui, "Black", "Black", "Really black", "Size48", "HH", 1, UDim2.new(0, 100, 0, 50), UDim2.new(.7, 0, .8, 0))
  599. minutelabel=gui("TextLabel", hourlabel, "Black", "Black", "Really black", "Size48", "MM", 1, UDim2.new(1, 0, 1, 0), UDim2.new(1, 0, 0, 0))
  600. secondlabel=gui("TextLabel", minutelabel, "Black", "Black", "Really black", "Size48", "SS", 1, UDim2.new(1, 0, 1, 0), UDim2.new(1, 0, 0, 0))
  601. hourbox=gui("TextBox", hourlabel, "Black", "Black", "Really red", "Size48", "24", 1, UDim2.new(1, 0, 1, 0), UDim2.new(0, 0, 1, 0))
  602. minutebox=gui("TextBox", minutelabel, "Black", "Black", "Really red", "Size48", "00", 1, UDim2.new(1, 0, 1, 0), UDim2.new(0, 0, 1, 0))
  603. secondbox=gui("TextBox", secondlabel, "Black", "Black", "Really red", "Size48", "00", 1, UDim2.new(1, 0, 1, 0), UDim2.new(0, 0, 1, 0))
  604. running=true
  605. run()
  606. end
  607. end
  608. end)
  609. vs.ChildRemoved:connect(function(w)
  610. if w.Name=="SeatWeld" then
  611. torso=w.Part1
  612. if torso then
  613. for i, v in pairs(torsos) do
  614. if v==torso then
  615. table.remove(torsos,i)
  616. end
  617. end
  618. local player=game.Players:getPlayerFromCharacter(torso.Parent)
  619. player.PlayerGui[modelname]:remove()
  620. running=false
  621. end
  622. end
  623. end)
  624. ps.ChildRemoved:connect(function(w)
  625. if w.Name=="SeatWeld" then
  626. torso=w.Part1
  627. if torso then
  628. for i, v in pairs(torsos) do
  629. if v==torso then
  630. table.remove(torsos,i)
  631. end
  632. end
  633. end
  634. end
  635. end)
  636. c(function()wait(.5) bp:remove()end)
  637. function makelightning(from, to, thick, col)
  638. local magnitude=(from.p-to.p).magnitude
  639. local distance=(from.p+to.p)/2
  640. local pattern=part(workspace, true, false, vc(.2, .2, magnitude), "Hot pink", 1, cn(distance, from.p))
  641. local fromPosProx=from.p
  642. for i=1, 4 do
  643. local fromPosProx2=fromPosProx
  644. local random=vc(rn(-1, 1), rn(-1, 1), rn(-1, 1))
  645. local findSize=pattern.Size.z/3
  646. local findOffSet=pattern.CFrame.lookVector*-1
  647. local compute=i*findSize*findOffSet
  648. local newfromPos=from.p
  649. local newEndPos=cn(random+compute+newfromPos).p
  650. local magnitude=(fromPosProx2-newEndPos).magnitude
  651. local distance=(fromPosProx2+newEndPos)/2
  652. local lightning=part(workspace, true, false, vc(1, 1, 1), col or "Bright yellow", 0, cn(distance, fromPosProx2), vc(thick, thick, magnitude))
  653. fromPosProx=newEndPos
  654. game.Debris:addItem(lightning, .5)
  655. end
  656. pattern:remove()
  657. end
  658. function play(soundid, pitch, volume)
  659. local sound=sound(workspace, soundid, pitch, volume)
  660. sound:play()
  661. c(function() wait(5) sound:remove() end)
  662. end
  663.  
  664.  
  665. trm=Instance.new("Model", delorean)
  666. function trail(prt, cf, thick, col)
  667. local old=(prt.CFrame*(cf or cn())).p
  668. local trail=part(trm, true, false, vc(1, 1, 1), col or "Hot pink", 0, cn(old)*ca(rn(-360, 360),rn(-360, 360),rn(-360, 360)), vc(thick, thick, thick))
  669. c(function()
  670. for i=1, 0, -.001 do pc(function() trail.Mesh.Scale=trail.Mesh.Scale*vc(i, i, i) end) wait() end
  671. trail:remove()
  672. end)
  673. end
  674.  
  675. Targets={}
  676. timedeb=false
  677. num=0
  678. maxnum=400
  679. origin=0
  680. function stick(from, to)
  681. local stickW=weld(from, to, to.CFrame:inverse()*from.CFrame)
  682. stickW.C0=from.CFrame:inverse()*from.CFrame
  683. return stickW
  684. end
  685. local bp=Instance.new("BodyPosition") bp.D=100 bp.maxForce=vc(inf,inf,inf)
  686. timedeb=false
  687.  
  688. function run()
  689. num=0
  690. c(function()
  691. for i, v in pairs(workspace:children()) do
  692. if v:isA("Model") then
  693. for i, v2 in pairs(v:children()) do
  694. if v2:isA("BasePart") then
  695. for i, v3 in pairs(v2:children()) do
  696. if v3:isA("CFrameValue") then
  697. v3:remove()
  698. end
  699. end
  700. end
  701. end
  702. end
  703. end
  704. timedeb=true
  705. while true do
  706. --TimeContinium-----------------------------
  707. if num<=0 and timedeb==true then
  708. for i, v in pairs(workspace:children()) do
  709. if v:isA("BasePart") then
  710. if v.Anchored==false then
  711. table.insert(Targets, v)
  712. local Origin = Instance.new("CFrameValue")
  713. Origin.Parent = v
  714. Origin.Name = "Origin CFrame"
  715. Origin.Value = v.CFrame
  716. end
  717. end
  718. for i, t in pairs(torsos) do
  719. if v:isA("Model") and v~=t.Parent and v~=delorean then
  720. for i, v2 in pairs(v:children()) do
  721. if v2:isA("BasePart") then
  722. table.insert(Targets, v2)
  723. local Origin = Instance.new("CFrameValue")
  724. Origin.Parent = v2
  725. Origin.Name = "Origin CFrame"
  726. Origin.Value = v2.CFrame
  727. end
  728. end
  729. end
  730. end
  731. end
  732. ---------
  733. while num<maxnum and timedeb==true do ---print(num)
  734. for i, v in pairs(workspace:children()) do
  735. if v:isA("BasePart") and v:findFirstChild("Origin CFrame")==nil then
  736. if v.Anchored==false then
  737. table.insert(Targets, v)
  738. local Origin = Instance.new("CFrameValue")
  739. Origin.Parent = v
  740. Origin.Name = "Origin CFrame"
  741. Origin.Value = v.CFrame
  742. end
  743. end
  744. for i, t in pairs(torsos) do
  745. if v:isA("Model") and v~=t.Parent and v~=delorean then
  746. for i, v2 in pairs(v:children()) do
  747. if v2:isA("BasePart") and v2:findFirstChild("Origin CFrame")==nil then
  748. table.insert(Targets, v2)
  749. local Origin = Instance.new("CFrameValue")
  750. Origin.Parent = v2
  751. Origin.Name = "Origin CFrame"
  752. Origin.Value = v2.CFrame
  753. end
  754. end
  755. end
  756. end
  757. end
  758. for i, v in pairs(Targets) do
  759. local History = Instance.new("CFrameValue")
  760. History.Parent = v
  761. History.Name = num
  762. History.Value = v.CFrame
  763. end
  764. num = num + 30
  765. wait()
  766. end
  767. end
  768. wait()
  769. end
  770. end)
  771. while running do
  772. local speed=base.Velocity.magnitude
  773. speedometer.Text=math.floor(speed)
  774. if speed>65 and speed<80 then play("http://www.roblox.com/asset/?id=2800815", 1, .5)
  775. makelightning(base.CFrame*CFrame.new(0,0,10), base.CFrame*CFrame.new(rn(-10,10),rn(-10,10),rn(-2,10)), 1)
  776. trail(tbr,cn(-1.5, 0, -10),2.5,"Bright orange")
  777. trail(tbl,cn(-1.9, 0, -10),2.5,"Bright orange")
  778. end
  779. if speed>80 and speed<88 then play("http://roblox.com/asset/?id=10209481")
  780. local trm2=trm:clone() trm2.Parent=workspace
  781. origin=base.Position
  782. print(origin)
  783. game.Debris:addItem(trm2, 5)
  784. bp.position=vc(0,0,-99999)
  785. bp.Parent=base
  786. timedeb=false
  787. c(function()
  788. for i=0,1,.005 do
  789. game.Lighting.TimeOfDay=math.floor(hourbox.Text*i)..":"..math.floor(minutebox.Text*i)..":"..math.floor(secondbox.Text*i)
  790. wait()
  791. end
  792. end)
  793. while num > 0 do --print(num)
  794. wait()
  795. num = num - 1
  796. for i, v in pairs(Targets) do
  797. v.Anchored=true
  798. local History = v:findFirstChild(num)
  799. if History ~= nil then
  800. v.CFrame = History.Value
  801. History:remove()
  802. end
  803. end
  804. end
  805. for i, v in pairs(Targets) do
  806. local Origin = v:findFirstChild("Origin CFrame")
  807. if Origin ~= nil then
  808. v.CFrame = Origin.Value
  809. v:makeJoints()
  810. Origin:remove()
  811. end
  812. end
  813. for i, v in pairs(Targets) do
  814. v.Anchored=false
  815. end
  816. play("http://www.roblox.com/asset/?id=2101148", 1, 1)
  817. exp=Instance.new("Explosion", workspace)
  818. exp.BlastPressure=0
  819. exp.Position=origin
  820. Targets = {}
  821. timedeb=true
  822. bp.position=origin
  823. origin=0
  824. base.Velocity=vc(0,0,0)
  825. bf.force=base.CFrame.lookVector*0
  826. wait(1)
  827. bp:remove()
  828. end
  829. if vs.Steer==0 then bav.angularvelocity=vc(0,0,0) atfr(ca(0, 0, 0)) atfl(ca(0, 0, 0)) end
  830. if vs.Steer==1 then atfr(ca(rd(-25), 0, 0)) atfl(ca(rd(-25), 0, 0)) end
  831. if vs.Steer==-1 then atfr(ca(rd(25), 0, 0)) atfl(ca(rd(25), 0, 0)) end
  832. if vs.Throttle==1 then bav.Parent=base bf.Parent=base
  833. if vs.Steer==1 then bav.angularvelocity=vc(0,-2,0) end
  834. if vs.Steer==-1 then bav.angularvelocity=vc(0,2,0) end
  835. bf.force=base.CFrame.lookVector*40000
  836. end
  837. if vs.Throttle==0 then bav.Parent=base bf.Parent=base
  838. bf.force=base.CFrame.lookVector*0
  839. end
  840. if vs.Throttle==-1 then bav.Parent=base bf.Parent=base
  841. if vs.Steer==1 then bav.angularvelocity=vc(0,2,0) end
  842. if vs.Steer==-1 then bav.angularvelocity=vc(0,-2,0) end
  843. bf.force=base.CFrame.lookVector*-40000
  844. end
  845. wait()
  846. end
  847. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement