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