View difference between Paste ID: LRmursm3 and bEY10Cz4
SHOW: | | - or go back to the newest paste.
1-
1+
--https://github.com/Mokiros/roblox-FE-compatibility
2-
print("wait 1 second")
2+
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
3
local Player,Mouse,mouse,UserInputService,ContextActionService = owner
4
local RealPlayer = Player
5
do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end print("wait 1 second")
6
wait(1)
7
_G.mantisReload = function()
8
    
9
local plr = game:service'Players'.LocalPlayer
10
local pg = plr:WaitForChild("PlayerGui")
11
local mouse = plr:GetMouse()
12
local char = plr.Character
13
local root = char:WaitForChild'HumanoidRootPart'
14
local head = char:WaitForChild'Head'
15
local tor = char:WaitForChild'Torso'
16
local la,ra = char["Left Arm"],char["Right Arm"]
17
local ll,rl = char["Left Leg"],char["Right Leg"]
18
tor.CFrame = tor.CFrame + Vector3.new(0,5,0)
19
 
20
local hum = char.Humanoid
21
local step = game:GetService("RunService").RenderStepped
22
 
23
pcall(function() workspace["vmodel"..plr.Name]:Destroy() end)
24
pcall(function() pg.bgui:Destroy() end)
25
if not script:IsA("ModuleScript") then
26
    pcall(function() script.Parent.vehicularScript:Destroy() end)
27
    script.Name = "vehicularScript"
28
end
29
 
30
local sg = Instance.new("ScreenGui",pg)
31
sg.Name = "bgui"
32
local p = Instance.new("ImageLabel",sg)
33
p.Size = UDim2.new(0,6,0,6)
34
p.Position = UDim2.new(.5,-3,.5,-3)
35
p.BackgroundColor3 = Color3.new(1,1,1)
36
p.BackgroundTransparency = .6
37
local p2 = p:Clone()
38
p2.Parent = sg
39
p2.Rotation = 45
40
local m = Instance.new("Model",workspace)
41
m.Name = "vmodel"..plr.Name
42
Instance.new("Humanoid",m).Name = "Shadow"
43
local hval = Instance.new("NumberValue",m)
44
hval.Value = 100
45
hval.Name = "hp"
46
 
47
function weld(a,b,c,d)
48
    local w = Instance.new("Motor6D",a)
49
    w.Part0,w.Part1,w.C0,w.C1 = a,b,c or CFrame.new(),d or CFrame.new()
50
    return w
51
end
52
 
53
do
54
    local function QuaternionFromCFrame(cf) 
55
            local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() 
56
            local trace = m00 + m11 + m22 
57
            if trace > 0 then 
58
                    local s = math.sqrt(1 + trace) 
59
                    local recip = 0.5/s 
60
                    return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5 
61
            else 
62
                    local i = 0 
63
                    if m11 > m00 then
64
                            i = 1 
65
                    end 
66
                    if m22 > (i == 0 and m00 or m11) then 
67
                            i = 2 
68
                    end 
69
                    if i == 0 then 
70
                            local s = math.sqrt(m00-m11-m22+1) 
71
                            local recip = 0.5/s 
72
                            return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip 
73
                    elseif i == 1 then 
74
                            local s = math.sqrt(m11-m22-m00+1) 
75
                            local recip = 0.5/s 
76
                            return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip 
77
                    elseif i == 2 then 
78
                            local s = math.sqrt(m22-m00-m11+1) 
79
                            local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip 
80
                    end 
81
            end 
82
        end   
83
        local function QuaternionToCFrame(px, py, pz, x, y, z, w) 
84
                local xs, ys, zs = x + x, y + y, z + z 
85
                local wx, wy, wz = w*xs, w*ys, w*zs 
86
                local xx = x*xs 
87
                local xy = x*ys 
88
                local xz = x*zs 
89
                local yy = y*ys 
90
                local yz = y*zs 
91
                local zz = z*zs 
92
                return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy)) 
93
                end   
94
        local function QuaternionSlerp(a, b, t) 
95
            local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4] 
96
            local startInterp, finishInterp; 
97
            if cosTheta >= 0.0001 then 
98
                    if (1 - cosTheta) > 0.0001 then 
99
                            local theta = math.acos(cosTheta) 
100
                            local invSinTheta = 1/math.sin(theta) 
101
                            startInterp = math.sin((1-t)*theta)*invSinTheta 
102
                            finishInterp = math.sin(t*theta)*invSinTheta  
103
                    else 
104
                            startInterp = 1-t 
105
                            finishInterp = t 
106
                    end 
107
            else 
108
                    if (1+cosTheta) > 0.0001 then 
109
                            local theta = math.acos(-cosTheta) 
110
                            local invSinTheta = 1/math.sin(theta) 
111
                            startInterp = math.sin((t-1)*theta)*invSinTheta 
112
                            finishInterp = math.sin(t*theta)*invSinTheta 
113
                    else 
114
                            startInterp = t-1 
115
                            finishInterp = t 
116
                    end 
117
            end 
118
            return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp 
119
    end  
120
    function clerp(a,b,t) 
121
            local qa = {QuaternionFromCFrame(a)}
122
            local qb = {QuaternionFromCFrame(b)} 
123
            local ax, ay, az = a.x, a.y, a.z 
124
            local bx, by, bz = b.x, b.y, b.z  
125
            local _t = 1-t 
126
            return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t)) 
127
    end 
128
end
129
 
130
function lerp(a,b,t)
131
    return a+(b-a)*t
132
end
133
 
134
local cancollide = true
135
local par = m
136
function Part(Part0,C0,C1,Size,Color,Ref,Trans,Mesh,Material)
137
    local p = Instance.new("Part",par)
138
    p.FormFactor = "Custom"
139
    p.TopSurface,p.BottomSurface,p.BackSurface,p.FrontSurface,p.RightSurface,p.LeftSurface = 10,10,10,10,10,10
140
    p.Size = Size or Vector3.new()
141
    p.Material = "SmoothPlastic"
142
    p.CanCollide = cancollide
143
    p.Locked = true
144
    if p.Size ~= Size or Mesh then
145
        local bm = Mesh or Instance.new("BlockMesh")
146
        bm.Parent = p
147
        bm.Scale = Size/p.Size*bm.Scale
148
        bm.Parent = p
149
    end
150
    p.BrickColor = Color or BrickColor.new(1001)
151
    p.Reflectance = Ref or 0
152
    p.Transparency = Trans or 0
153
    p.Material = Material or p.Material
154
    local w;
155
    if Part0 then
156
        w = weld(Part0,p,C0,C1)
157
    end
158
    return p,w
159
end
160
 
161
function Mesh(type,scale,arg1,arg2,arg3,arg4,arg5)
162
    local m = Instance.new(type)
163
    m.Scale = scale or Vector3.new(1,1,1)
164
    if type == "SpecialMesh" then
165
        m.MeshType = arg1
166
        if arg1=="FileMesh" then
167
            m.MeshId = arg2 or m.MeshId
168
            m.TextureId = arg3 or m.TextureId
169
            m.Offset = arg4 or m.Offset
170
            m.VertexColor = arg5 or m.VertexColor
171
        else
172
            m.VertexColor = arg3 or m.VertexColor
173
            m.Offset = arg2 or m.Offset
174
        end
175
    else
176
        m.Offset = arg1 or m.Offset
177
        m.VertexColor = arg2 or m.VertexColor
178
    end
179
    return m
180
end
181
 
182
local b = BrickColor.new
183
local cols = {b(21),b(23),b(141),b(104),b(106),b(24),b(9),b(5)}
184
function gcol(plr)
185
    if teamColorsEnabled and pcall(function() assert(plr.AccountAge ~= nil) end) and not plr.Neutral then
186
        return plr.TeamColor.Color
187
    else
188
        local v=0;
189
        local n=tostring(plr);
190
        local a=#n;
191
        for i in n:gmatch(".") do
192
            v = v + ((a+(#n%2==1 and -1 or 0))%4 > 1 and -1 or 1)*i:byte()
193
            a = a - 1
194
        end
195
        return cols[(v%8)+1].Color
196
    end
197
end
198
 
199
 
200
local body = BrickColor.new("Sand green")
201
local body2 = BrickColor.new("Institutional white")
202
local body3 = BrickColor.new("Sand green")
203
local bodyref = .2
204
local body2ref = .2
205
local body3ref = .5
206
 
207
local pipe = BrickColor.new("Dark stone grey")
208
local pipe2 = body2--BrickColor.new("Institutional white")
209
local pipe3 = body--BrickColor.new("Really black")
210
local piperef = .25
211
local pipe2ref = .2
212
local pipe3ref = .25
213
 
214
hum.Sit = true
215
 
216
 
217
local fc = Instance.new("Model",m)
218
par = fc
219
local tr = Part(tor,CFrame.new(),CFrame.new(),Vector3.new(),BrickColor.new(),0,1)
220
tr.Name = "Torso"
221
Part(tr,CFrame.new(),CFrame.new(),Vector3.new(),BrickColor.new(),0,1).Name = "Head"
222
Part(ra,CFrame.new(),CFrame.new(),Vector3.new(),ra.BrickColor,0,0).Name = "Right Arm"
223
Part(la,CFrame.new(),CFrame.new(),Vector3.new(),la.BrickColor,0,0).Name = "Left Arm"
224
Part(rl,CFrame.new(),CFrame.new(),Vector3.new(),rl.BrickColor,0,0).Name = "Right Leg"
225
Part(ll,CFrame.new(),CFrame.new(),Vector3.new(),ll.BrickColor,0,0).Name = "Left Leg"
226
local hm = Instance.new("Humanoid",fc)
227
hm.MaxHealth = math.huge
228
hm.PlatformStand = true
229
for i,v in pairs(char:GetChildren()) do
230
    if v:IsA("Clothing") or v:IsA("CharacterMesh") then
231
        v:Clone().Parent = fc
232
        if v:IsA("Shirt") then
233
            pcall(game.Destroy,tr:FindFirstChild("Mesh"))
234
            pcall(game.Destroy,fc["Right Arm"]:FindFirstChild("Mesh"))
235
            pcall(game.Destroy,fc["Left Arm"]:FindFirstChild("Mesh"))
236
        elseif v:IsA("Pants") then
237
            pcall(game.Destroy,tr:FindFirstChild("Mesh"))
238
            pcall(game.Destroy,fc["Right Leg"]:FindFirstChild("Mesh"))
239
            pcall(game.Destroy,fc["Left Leg"]:FindFirstChild("Mesh"))
240
        end
241
    end
242
end
243
local h = Instance.new("Hat",fc)
244
par = h
245
Part(tr,CFrame.new(),CFrame.new(),Vector3.new(),BrickColor.new(),0,1).Name = "Handle"
246
par = m
247
 
248
local main,mainweld = Part(tor,CFrame.new(0,-2.25,0)*CFrame.Angles(0,0,0),CFrame.new(0,0,0),Vector3.new(3,1,2),body,bodyref,0)
249
Part(main,CFrame.new(0,.5,-.4),CFrame.new(),Vector3.new(2.3,.2,1.3),body2,0,0)
250
local p = Part(main,CFrame.new(0,-.5,1)*CFrame.Angles(-1.4,0,0)*CFrame.new(0,.5,1.25),CFrame.new(),Vector3.new(2.3,.75,2.5),body,bodyref)
251
Part(p,CFrame.new(0,.375,0),CFrame.new(),Vector3.new(2.2,.2,1.4),body2,0,0)
252
p = Part(p,CFrame.new(0,-.375,1.25)*CFrame.Angles(-.15,0,0)*CFrame.new(0,.375,.8),CFrame.new(),Vector3.new(2.3,.75,1.6),body,bodyref)
253
p.CanCollide = false
254
Part(p,CFrame.new(0,.375,0),CFrame.new(),Vector3.new(2.2,.2,1.2),body2,0,0).CanCollide = false
255
local back = Part(main,CFrame.new(0,1.4,1)*CFrame.Angles(.15,math.pi,0),CFrame.new(),Vector3.new(2,2,3),body,bodyref,0,Mesh("SpecialMesh",Vector3.new(3,3.8,6.5),"FileMesh","rbxassetid://9944765"))
256
Part(main,CFrame.new(0,-.5,1.75)*CFrame.Angles(-1.1,0,0)*CFrame.new(0,.5,1.25),CFrame.new(),Vector3.new(1.75,1.5,2.25),body,bodyref)
257
Part(main,CFrame.new(0,0,1.25),CFrame.new(),Vector3.new(1.75,1.1,1.5),body,bodyref)
258
local p = Part(main,CFrame.new(0,.5,-1)*CFrame.Angles(-.2,0,0)*CFrame.new(0,-.375,-.5),CFrame.new(),Vector3.new(2.75,.75,1),body,bodyref)
259
Part(p,CFrame.new(0,.375,.05),CFrame.new(),Vector3.new(2.3,.2,.95),body2,0,0)
260
Part(p,CFrame.new(0,.8,-.45),CFrame.new(),Vector3.new(2.3,1,.3),body2,0,0)
261
Part(p,CFrame.new(0,1.5,-.4)*CFrame.Angles(.2,0,0),CFrame.new(),Vector3.new(2.3,.5,.3),body2,0,0)
262
local p = Part(main,CFrame.new(0,2.1,-2.9)*CFrame.Angles(.9,0,0),CFrame.new(),Vector3.new(1.5,2.5,1),body,bodyref,0)
263
local p = Part(p,CFrame.new(0,1.25,.5)*CFrame.Angles(-.9,0,0)*CFrame.new(0,.5,-.7),CFrame.new(),Vector3.new(1.501,1,1.4),body,bodyref,0)
264
local h = Part(p,CFrame.new(.4,-.2,.7)*CFrame.Angles(0,1.425,0)*CFrame.new(.175,0,.9),CFrame.new(),Vector3.new(.35,.35,1.8),body,bodyref,0)
265
Part(h,CFrame.new(0,0,.225),CFrame.new(),Vector3.new(.4,.4,1.3),body2,body2ref,0)
266
Part(h,CFrame.new(0,0,.9),CFrame.new(),Vector3.new(.45,.45,.1),body3,body3ref,0)
267
Part(h,CFrame.new(0,0,-.45),CFrame.new(),Vector3.new(.425,.425,.1),body3,body3ref,0)
268
Part(h,CFrame.new(0,0,.75),CFrame.new(),Vector3.new(.415,.415,.025),body3,body3ref,0)
269
Part(h,CFrame.new(0,0,.6),CFrame.new(),Vector3.new(.415,.415,.025),body3,body3ref,0)
270
Part(h,CFrame.new(0,0,.45),CFrame.new(),Vector3.new(.415,.415,.025),body3,body3ref,0)
271
Part(h,CFrame.new(0,0,.3),CFrame.new(),Vector3.new(.415,.415,.025),body3,body3ref,0)
272
Part(h,CFrame.new(0,0,.15),CFrame.new(),Vector3.new(.415,.415,.025),body3,body3ref,0)
273
Part(h,CFrame.new(0,0,0),CFrame.new(),Vector3.new(.415,.415,.025),body3,body3ref,0)
274
Part(h,CFrame.new(0,0,-.15),CFrame.new(),Vector3.new(.415,.415,.025),body3,body3ref,0)
275
Part(h,CFrame.new(0,0,-.3),CFrame.new(),Vector3.new(.415,.415,.025),body3,body3ref,0)
276
local h = Part(p,CFrame.new(-.4,-.2,.7)*CFrame.Angles(0,-1.425,0)*CFrame.new(-.175,0,.9),CFrame.new(),Vector3.new(.35,.35,1.8),body,bodyref,0)
277
Part(h,CFrame.new(0,0,.225),CFrame.new(),Vector3.new(.4,.4,1.3),body2,body2ref,0)
278
Part(h,CFrame.new(0,0,.9),CFrame.new(),Vector3.new(.45,.45,.1),body3,body3ref,0)
279
Part(h,CFrame.new(0,0,-.45),CFrame.new(),Vector3.new(.425,.425,.1),body3,body3ref,0)
280
Part(h,CFrame.new(0,0,.75),CFrame.new(),Vector3.new(.415,.415,.025),body3,body3ref,0)
281
Part(h,CFrame.new(0,0,.6),CFrame.new(),Vector3.new(.415,.415,.025),body3,body3ref,0)
282
Part(h,CFrame.new(0,0,.45),CFrame.new(),Vector3.new(.415,.415,.025),body3,body3ref,0)
283
Part(h,CFrame.new(0,0,.3),CFrame.new(),Vector3.new(.415,.415,.025),body3,body3ref,0)
284
Part(h,CFrame.new(0,0,.15),CFrame.new(),Vector3.new(.415,.415,.025),body3,body3ref,0)
285
Part(h,CFrame.new(0,0,0),CFrame.new(),Vector3.new(.415,.415,.025),body3,body3ref,0)
286
Part(h,CFrame.new(0,0,-.15),CFrame.new(),Vector3.new(.415,.415,.025),body3,body3ref,0)
287
Part(h,CFrame.new(0,0,-.3),CFrame.new(),Vector3.new(.415,.415,.025),body3,body3ref,0)
288
 
289
local e = Part(main,CFrame.new(0,1,-4.6)*CFrame.Angles(-.2,-math.pi/2,0)*CFrame.new(0,-.2,0),CFrame.new(),Vector3.new(5,5,5),body,bodyref,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
290
p = Part(e,CFrame.new(-2.25,2.25,0)*CFrame.Angles(0,-math.pi/2,0)*CFrame.Angles(-.05,0,0),CFrame.new(),Vector3.new(2,2,3),body,bodyref,0,Mesh("SpecialMesh",Vector3.new(2,1.75,9.5),"FileMesh","rbxassetid://9944765"))
291
p = Part(p,CFrame.new(0,-.2,.4)*CFrame.Angles(0,0,0)*CFrame.Angles(-.175,0,0),CFrame.new(),Vector3.new(1,1,1),body2,body2ref,0,Mesh("SpecialMesh",Vector3.new(2.3,2.3,2),"FileMesh","rbxassetid://9944765"))
292
 
293
p = Part(e,CFrame.new(2,.25,2)*CFrame.Angles(1.35,math.pi/2,0)*CFrame.Angles(0,0,0),CFrame.new(),Vector3.new(2,2,3),body,bodyref,0,Mesh("SpecialMesh",Vector3.new(2.5,2.5,9.5),"FileMesh","rbxassetid://9944765"))
294
p = Part(p,CFrame.new(0,.2,-4.55)*CFrame.Angles(0,math.pi,-.1),CFrame.new(),Vector3.new(1,1,1),body,bodyref,0,Mesh("SpecialMesh",Vector3.new(1.6,1.1,9),"FileMesh","rbxassetid://9944765"))
295
 
296
p = Part(e,CFrame.new(2,.25,-2)*CFrame.Angles(-1.35,math.pi/2,0)*CFrame.Angles(0,0,0),CFrame.new(),Vector3.new(2,2,3),body,bodyref,0,Mesh("SpecialMesh",Vector3.new(2.5,2.5,9.5),"FileMesh","rbxassetid://9944765"))
297
p = Part(p,CFrame.new(0,.2,-4.55)*CFrame.Angles(0,math.pi,-.1),CFrame.new(),Vector3.new(1,1,1),body,bodyref,0,Mesh("SpecialMesh",Vector3.new(1.6,1.1,9),"FileMesh","rbxassetid://9944765"))
298
 
299
 
300
 
301
local e2 = Part(e,CFrame.new(-2.5,0,0)*CFrame.Angles(0,math.pi/2,0),CFrame.new(),Vector3.new(5,5,1),body,bodyref,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Sphere"))
302
local et = Part(e2,CFrame.new(0,.05,-.6)*CFrame.Angles(-math.pi/2+.05,0,0),CFrame.new(),Vector3.new(5,5,1),body,bodyref,0,Mesh("SpecialMesh",Vector3.new(3.45,5,3.45),"FileMesh","rbxassetid://16659502"))
303
local g1 = Part(et,CFrame.new(0,-.5,0)*CFrame.Angles(math.pi/2,0,0),CFrame.new(),Vector3.new(2.5,2.5,2.5),body2,body2ref,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Sphere"))
304
local g2 = Part(g1,CFrame.new(0,0,-1)*CFrame.Angles(.15,math.pi/2,0),CFrame.new(),Vector3.new(.75,.6,.6),body2,body2ref,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
305
local t1 = Part(g2,CFrame.new(.9,.05,0)*CFrame.Angles(0,0,0),CFrame.new(),Vector3.new(1,.4,.4),body3,body3ref,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
306
local t1s = Instance.new("Sound",t1)
307
t1s.SoundId = "rbxassetid://78498351"
308
t1s.Volume = 0.5
309
t1s.Pitch = 1.5
310
 
311
Part(t1,CFrame.Angles(.75,0,0)*CFrame.new(.3,.2,0)*CFrame.Angles(0,0,math.pi/2),CFrame.new(),Vector3.new(.025,.15,.15),BrickColor.new(1003),0,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
312
Part(t1,CFrame.Angles(.75,0,0)*CFrame.new(0,.2,0)*CFrame.Angles(0,0,math.pi/2),CFrame.new(),Vector3.new(.025,.15,.15),BrickColor.new(1003),0,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
313
Part(t1,CFrame.Angles(.75,0,0)*CFrame.new(-.3,.2,0)*CFrame.Angles(0,0,math.pi/2),CFrame.new(),Vector3.new(.025,.15,.15),BrickColor.new(1003),0,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
314
Part(t1,CFrame.Angles(-.75,0,0)*CFrame.new(.3,.2,0)*CFrame.Angles(0,0,math.pi/2),CFrame.new(),Vector3.new(.025,.15,.15),BrickColor.new(1003),0,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
315
Part(t1,CFrame.Angles(-.75,0,0)*CFrame.new(0,.2,0)*CFrame.Angles(0,0,math.pi/2),CFrame.new(),Vector3.new(.025,.15,.15),BrickColor.new(1003),0,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
316
Part(t1,CFrame.Angles(-.75,0,0)*CFrame.new(-.3,.2,0)*CFrame.Angles(0,0,math.pi/2),CFrame.new(),Vector3.new(.025,.15,.15),BrickColor.new(1003),0,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
317
Part(t1,CFrame.new(.5,0,0),CFrame.new(),Vector3.new(.01,.225,.225),BrickColor.new(1003),0,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
318
 
319
local b = Part(main,CFrame.new(0,-.65,-2.9),CFrame.new(),Vector3.new(2.8,2,7.9),body,bodyref,0)
320
local b2 = Part(b,CFrame.new(0,-.5,-2.5),CFrame.new(),Vector3.new(7,1,2),body,bodyref,0)
321
 
322
local w = Part(b2,CFrame.new(-3.5,0,0),CFrame.new(),Vector3.new(1.2,1.05,2),body,bodyref,0)
323
local w = Part(w,CFrame.new(.6,0,-1)*CFrame.Angles(0,.5,0)*CFrame.new(-.6,0,-1),CFrame.new(),Vector3.new(1.2,1.049,2),body,bodyref,0)
324
Part(w,CFrame.new(.6,0,0),CFrame.new(),Vector3.new(.5,1.1,2.07),body2,body2ref,0)
325
local w = Part(w,CFrame.new(.6,0,-1)*CFrame.Angles(0,.5,0)*CFrame.new(-.6,0,-.95),CFrame.new(),Vector3.new(1.2,1.05,1.9),body,bodyref,0)
326
Part(w,CFrame.new(.6,0,0),CFrame.new(),Vector3.new(.5,1.095,2.05),body2,body2ref,0)
327
local w = Part(w,CFrame.new(.6,0,-.95)*CFrame.Angles(0,.57,0)*CFrame.new(-.65,0,-1.2),CFrame.new(),Vector3.new(1.3,1.049,2.4),body,bodyref,0)
328
Part(w,CFrame.new(.65,0,.8),CFrame.new(),Vector3.new(.5,1.1,.95),body2,body2ref,0)
329
local w = Part(w,CFrame.new(-.6,0,-1.2)*CFrame.Angles(0,-1.57,0)*CFrame.new(.8,0,-1.25),CFrame.new(),Vector3.new(1.6,1.05,2.5),body,bodyref,0)
330
local w = Part(w,CFrame.new(-.8,0,-1.25)*CFrame.Angles(0,-.4,0)*CFrame.new(.7,0,1.25),CFrame.new(),Vector3.new(1.4,1.049,2.5),body,bodyref,0)
331
local w = Part(w,CFrame.new(.7,0,1.25)*CFrame.Angles(0,-.45,0)*CFrame.new(-.7,0,1),CFrame.new(),Vector3.new(1.4,1.05,2),body,bodyref,0)
332
local w = Part(w,CFrame.new(-.7,0,1)*CFrame.Angles(0,.6,0)*CFrame.new(.7,0,1),CFrame.new(),Vector3.new(1.4,1.049,2),body,bodyref,0)
333
local w = Part(w,CFrame.new(-.7,0,1)*CFrame.Angles(0,.55,0)*CFrame.new(.7,0,1),CFrame.new(),Vector3.new(1.4,1.05,2),body,bodyref,0)
334
local w = Part(w,CFrame.new(-.7,0,1)*CFrame.Angles(0,.5,0)*CFrame.new(.7,0,1),CFrame.new(),Vector3.new(1.4,1.049,2),body,bodyref,0)
335
local w = Part(w,CFrame.new(-.7,0,1)*CFrame.Angles(0,.45,0)*CFrame.new(.6,0,.5),CFrame.new(),Vector3.new(1.5,1.05,1),body,bodyref,0)
336
local w = Part(w,CFrame.new(-.75,0,.5)*CFrame.Angles(0,.325,0)*CFrame.new(.5,0,1.3),CFrame.new(),Vector3.new(1.6,1.049,2.6),body,bodyref,0)
337
local w = Part(w,CFrame.new(-.2,0,1.3)*CFrame.Angles(0,.65,0)*CFrame.new(.5,0,.8),CFrame.new(),Vector3.new(1,1.05,1.6),body,bodyref,0)
338
local w = Part(w,CFrame.new(-.5,0,.8)*CFrame.Angles(0,.45,0)*CFrame.new(.5,0,1),CFrame.new(),Vector3.new(1,1.05,2),body,bodyref,0)
339
 
340
 
341
cancollide = false
342
Part(b2,CFrame.new(-3.5-3,.125,0)*CFrame.Angles(-math.pi/2,0,0),CFrame.new(),Vector3.new(3,3,1),body2,body2ref,0,Mesh("SpecialMesh",Vector3.new(5,5,6),"FileMesh","rbxassetid://3270017"),"DiamondPlate")
343
Part(b2,CFrame.new(-3.5-3,-.125,0)*CFrame.Angles(-math.pi/2,0,0),CFrame.new(),Vector3.new(3,3,1),body2,body2ref,0,Mesh("SpecialMesh",Vector3.new(5,5,6),"FileMesh","rbxassetid://3270017"))
344
cancollide = true
345
 
346
local propl,proplw = Part(b2,CFrame.new(-6.5,0,0),CFrame.new(),Vector3.new(.4,.75,.4),body2,body2ref,0,Mesh("CylinderMesh",Vector3.new(1,1,1)),"DiamondPlate")
347
Part(propl,CFrame.new(0,.35,0),CFrame.new(),Vector3.new(.6,.25,.6),body3,body3ref,0,Mesh("CylinderMesh",Vector3.new(1,1,1)),"DiamondPlate")
348
Part(propl,CFrame.new(0,-.35,0),CFrame.new(),Vector3.new(.5,.15,.5),body3,body3ref,0,Mesh("CylinderMesh",Vector3.new(1,1,1)),"DiamondPlate")
349
Part(propl,CFrame.Angles(0,0*math.pi*2/3,0)*CFrame.new(0,0,.3),CFrame.new(),Vector3.new(.15,.65,.3),body3,body3ref,0,nil,"DiamondPlate")
350
Part(propl,CFrame.Angles(0,1*math.pi*2/3,0)*CFrame.new(0,0,.3),CFrame.new(),Vector3.new(.15,.65,.3),body3,body3ref,0,nil,"DiamondPlate")
351
Part(propl,CFrame.Angles(0,2*math.pi*2/3,0)*CFrame.new(0,0,.3),CFrame.new(),Vector3.new(.15,.65,.3),body3,body3ref,0,nil,"DiamondPlate")
352
propl.Name = "SoundPlayer1"
353
local ps2 = Instance.new("Sound",propl)
354
ps2.SoundId = "rbxassetid://134145308"
355
ps2.Pitch = 2
356
ps2.Volume = 1
357
ps2.Looped = true
358
ps2:Play()
359
 
360
 
361
local p = Part(propl,CFrame.Angles(0,0*math.pi*2/3,0)*CFrame.new(0,0,.35+.8)*CFrame.Angles(0,0,-1.3),CFrame.new(),Vector3.new(.05,.5,1.7),body2,body2ref,0,nil,"Plastic")
362
Part(p,CFrame.Angles(0,0,1.3)*CFrame.new(-.125,0,.85),CFrame.new(),Vector3.new(.7,.25,.05),body2,body2ref,0,nil,"Plastic")
363
local p = Part(propl,CFrame.Angles(0,1*math.pi*2/3,0)*CFrame.new(0,0,.35+.8)*CFrame.Angles(0,0,-1.3),CFrame.new(),Vector3.new(.05,.5,1.7),body2,body2ref,0,nil,"Plastic")
364
Part(p,CFrame.Angles(0,0,1.3)*CFrame.new(-.125,0,.85),CFrame.new(),Vector3.new(.7,.25,.05),body2,body2ref,0,nil,"Plastic")
365
local p = Part(propl,CFrame.Angles(0,2*math.pi*2/3,0)*CFrame.new(0,0,.35+.8)*CFrame.Angles(0,0,-1.3),CFrame.new(),Vector3.new(.05,.5,1.7),body2,body2ref,0,nil,"Plastic")
366
Part(p,CFrame.Angles(0,0,1.3)*CFrame.new(-.125,0,.85),CFrame.new(),Vector3.new(.7,.25,.05),body2,body2ref,0,nil,"Plastic")
367
 
368
 
369
local w = Part(b2,CFrame.new(3.5,0,0),CFrame.new(),Vector3.new(1.2,1.05,2),body,bodyref,0)
370
local w = Part(w,CFrame.new(-.6,0,-1)*CFrame.Angles(0,-.5,0)*CFrame.new(.6,0,-1),CFrame.new(),Vector3.new(1.2,1.049,2),body,bodyref,0)
371
Part(w,CFrame.new(-.6,0,0),CFrame.new(),Vector3.new(.5,1.1,2.07),body2,body2ref,0)
372
local w = Part(w,CFrame.new(-.6,0,-1)*CFrame.Angles(0,-.5,0)*CFrame.new(.6,0,-.95),CFrame.new(),Vector3.new(1.2,1.05,1.9),body,bodyref,0)
373
Part(w,CFrame.new(-.6,0,0),CFrame.new(),Vector3.new(.5,1.095,2.05),body2,body2ref,0)
374
local w = Part(w,CFrame.new(-.6,0,-.95)*CFrame.Angles(0,-.57,0)*CFrame.new(.65,0,-1.2),CFrame.new(),Vector3.new(1.3,1.049,2.4),body,bodyref,0)
375
Part(w,CFrame.new(-.65,0,.8),CFrame.new(),Vector3.new(.5,1.1,.95),body2,body2ref,0)
376
local w = Part(w,CFrame.new(.6,0,-1.2)*CFrame.Angles(0,1.57,0)*CFrame.new(-.8,0,-1.25),CFrame.new(),Vector3.new(1.6,1.05,2.5),body,bodyref,0)
377
local w = Part(w,CFrame.new(.8,0,-1.25)*CFrame.Angles(0,.4,0)*CFrame.new(-.7,0,1.25),CFrame.new(),Vector3.new(1.4,1.049,2.5),body,bodyref,0)
378
local w = Part(w,CFrame.new(-.7,0,1.25)*CFrame.Angles(0,.45,0)*CFrame.new(.7,0,1),CFrame.new(),Vector3.new(1.4,1.05,2),body,bodyref,0)
379
local w = Part(w,CFrame.new(.7,0,1)*CFrame.Angles(0,-.6,0)*CFrame.new(-.7,0,1),CFrame.new(),Vector3.new(1.4,1.049,2),body,bodyref,0)
380
local w = Part(w,CFrame.new(.7,0,1)*CFrame.Angles(0,-.55,0)*CFrame.new(-.7,0,1),CFrame.new(),Vector3.new(1.4,1.05,2),body,bodyref,0)
381
local w = Part(w,CFrame.new(.7,0,1)*CFrame.Angles(0,-.5,0)*CFrame.new(-.7,0,1),CFrame.new(),Vector3.new(1.4,1.049,2),body,bodyref,0)
382
local w = Part(w,CFrame.new(.7,0,1)*CFrame.Angles(0,-.45,0)*CFrame.new(-.6,0,.5),CFrame.new(),Vector3.new(1.5,1.05,1),body,bodyref,0)
383
local w = Part(w,CFrame.new(.75,0,.5)*CFrame.Angles(0,-.325,0)*CFrame.new(-.5,0,1.3),CFrame.new(),Vector3.new(1.6,1.049,2.6),body,bodyref,0)
384
local w = Part(w,CFrame.new(.2,0,1.3)*CFrame.Angles(0,-.65,0)*CFrame.new(-.5,0,.8),CFrame.new(),Vector3.new(1,1.05,1.6),body,bodyref,0)
385
local w = Part(w,CFrame.new(.5,0,.8)*CFrame.Angles(0,-.45,0)*CFrame.new(-.5,0,1),CFrame.new(),Vector3.new(1,1.05,2),body,bodyref,0)
386
 
387
 
388
cancollide = false
389
Part(b2,CFrame.new(3.5+3,.125,0)*CFrame.Angles(-math.pi/2,0,0),CFrame.new(),Vector3.new(3,3,1),body2,body2ref,0,Mesh("SpecialMesh",Vector3.new(5,5,6),"FileMesh","rbxassetid://3270017"),"DiamondPlate")
390
Part(b2,CFrame.new(3.5+3,-.125,0)*CFrame.Angles(-math.pi/2,0,0),CFrame.new(),Vector3.new(3,3,1),body2,body2ref,0,Mesh("SpecialMesh",Vector3.new(5,5,6),"FileMesh","rbxassetid://3270017"))
391
cancollide = true
392
 
393
local propr,proprw = Part(b2,CFrame.new(6.5,0,0),CFrame.new(),Vector3.new(.4,.75,.4),body2,body2ref,0,Mesh("CylinderMesh",Vector3.new(1,1,1)),"DiamondPlate")
394
Part(propr,CFrame.new(0,.35,0),CFrame.new(),Vector3.new(.6,.25,.6),body3,body3ref,0,Mesh("CylinderMesh",Vector3.new(1,1,1)),"DiamondPlate")
395
Part(propr,CFrame.new(0,-.35,0),CFrame.new(),Vector3.new(.5,.15,.5),body3,body3ref,0,Mesh("CylinderMesh",Vector3.new(1,1,1)),"DiamondPlate")
396
Part(propr,CFrame.Angles(0,0*math.pi*2/3,0)*CFrame.new(0,0,.3),CFrame.new(),Vector3.new(.15,.65,.3),body3,body3ref,0,nil,"DiamondPlate")
397
Part(propr,CFrame.Angles(0,1*math.pi*2/3,0)*CFrame.new(0,0,.3),CFrame.new(),Vector3.new(.15,.65,.3),body3,body3ref,0,nil,"DiamondPlate")
398
Part(propr,CFrame.Angles(0,2*math.pi*2/3,0)*CFrame.new(0,0,.3),CFrame.new(),Vector3.new(.15,.65,.3),body3,body3ref,0,nil,"DiamondPlate")
399
propr.Name = "SoundPlayer2"
400
local ps = Instance.new("Sound",propr)
401
ps.SoundId = "rbxassetid://134145308"
402
ps.Pitch = 2
403
ps.Volume = 1
404
ps.Looped = true
405
ps:Play()
406
 
407
local p = Part(propr,CFrame.Angles(0,0*math.pi*2/3,0)*CFrame.new(0,0,.35+.8)*CFrame.Angles(0,0,1.3),CFrame.new(),Vector3.new(.05,.5,1.7),body2,body2ref,0,nil,"Plastic")
408
Part(p,CFrame.Angles(0,0,-1.3)*CFrame.new(.125,0,.85),CFrame.new(),Vector3.new(.7,.25,.05),body2,body2ref,0,nil,"Plastic")
409
local p = Part(propr,CFrame.Angles(0,1*math.pi*2/3,0)*CFrame.new(0,0,.35+.8)*CFrame.Angles(0,0,1.3),CFrame.new(),Vector3.new(.05,.5,1.7),body2,body2ref,0,nil,"Plastic")
410
Part(p,CFrame.Angles(0,0,-1.3)*CFrame.new(.125,0,.85),CFrame.new(),Vector3.new(.7,.25,.05),body2,body2ref,0,nil,"Plastic")
411
local p = Part(propr,CFrame.Angles(0,2*math.pi*2/3,0)*CFrame.new(0,0,.35+.8)*CFrame.Angles(0,0,1.3),CFrame.new(),Vector3.new(.05,.5,1.7),body2,body2ref,0,nil,"Plastic")
412
Part(p,CFrame.Angles(0,0,-1.3)*CFrame.new(.125,0,.85),CFrame.new(),Vector3.new(.7,.25,.05),body2,body2ref,0,nil,"Plastic")
413
 
414
 
415
 
416
local p1 = Part(main,CFrame.new(-1.85,.35,-1.1)*CFrame.Angles(0,math.pi/2,0),CFrame.new(),Vector3.new(1.25,.7,.7),pipe,piperef,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
417
Part(p1,CFrame.new(.5,0,.025),CFrame.new(),Vector3.new(1.5,1,1),pipe2,pipe2ref,0,Mesh("SpecialMesh",Vector3.new(.7,.85,.85),"Cylinder"),"DiamondPlate")
418
Part(p1,CFrame.new(-.625,0,0),CFrame.new(),Vector3.new(.7,.7,.7),pipe,piperef,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Sphere"))
419
local p1 = Part(p1,CFrame.new(-.625,0,0)*CFrame.Angles(0,0,-1)*CFrame.new(-.95,0,0),CFrame.new(),Vector3.new(1.9,.7,.7),pipe,piperef,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
420
Part(p1,CFrame.new(-.95,0,0),CFrame.new(),Vector3.new(.7,.7,.7),pipe,piperef,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Sphere"))
421
local p1 = Part(p1,CFrame.new(-.95,0,0)*CFrame.Angles(0,0,1)*CFrame.new(-1.25,0,0),CFrame.new(),Vector3.new(2.5,.7,.7),pipe,piperef,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
422
local p = Part(p1,CFrame.new(-.3,0,.01),CFrame.new(),Vector3.new(1.5,1,1),pipe2,pipe2ref,0,Mesh("SpecialMesh",Vector3.new(1,.8,.8),"Cylinder"),"DiamondPlate")
423
Part(p,CFrame.new(.6,0,0),CFrame.new(),Vector3.new(.15,.9,.9),pipe3,pipe3ref,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
424
Part(p,CFrame.new(-.6,0,0),CFrame.new(),Vector3.new(.15,.9,.9),pipe3,pipe3ref,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
425
Part(p,CFrame.new(0,0,.65),CFrame.new(),Vector3.new(1.3,.3,.5),pipe3,pipe3ref,0)
426
Part(p1,CFrame.new(-1.25,0,0),CFrame.new(),Vector3.new(.15,.65,.65),pipe3,pipe3ref,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
427
local p = Part(p1,CFrame.new(-1.35,0,0)*CFrame.Angles(math.pi/2,0,math.pi/2),CFrame.new(),Vector3.new(1,1,1),pipe3,pipe3ref,0,Mesh("SpecialMesh",Vector3.new(.5,2,.5),"FileMesh","rbxassetid://16659502"))
428
local firel = Instance.new("Fire",p)
429
local lightl = Instance.new("PointLight",p)
430
 
431
local p1 = Part(main,CFrame.new(1.85,.35,-1.1)*CFrame.Angles(0,math.pi/2,0),CFrame.new(),Vector3.new(1.25,.7,.7),pipe,piperef,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
432
Part(p1,CFrame.new(.5,0,-.025),CFrame.new(),Vector3.new(1.5,1,1),pipe2,pipe2ref,0,Mesh("SpecialMesh",Vector3.new(.7,.85,.85),"Cylinder"),"DiamondPlate")
433
Part(p1,CFrame.new(-.625,0,0),CFrame.new(),Vector3.new(.7,.7,.7),pipe,piperef,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Sphere"))
434
local p1 = Part(p1,CFrame.new(-.625,0,0)*CFrame.Angles(0,0,-1)*CFrame.new(-.95,0,0),CFrame.new(),Vector3.new(1.9,.7,.7),pipe,piperef,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
435
Part(p1,CFrame.new(-.95,0,0),CFrame.new(),Vector3.new(.7,.7,.7),pipe,piperef,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Sphere"))
436
local p1 = Part(p1,CFrame.new(-.95,0,0)*CFrame.Angles(0,0,1)*CFrame.new(-1.25,0,0),CFrame.new(),Vector3.new(2.5,.7,.7),pipe,piperef,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
437
local p = Part(p1,CFrame.new(-.3,0,-.01),CFrame.new(),Vector3.new(1.5,1,1),pipe2,pipe2ref,0,Mesh("SpecialMesh",Vector3.new(1,.8,.8),"Cylinder"),"DiamondPlate")
438
Part(p,CFrame.new(.6,0,0),CFrame.new(),Vector3.new(.15,.9,.9),pipe3,pipe3ref,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
439
Part(p,CFrame.new(-.6,0,0),CFrame.new(),Vector3.new(.15,.9,.9),pipe3,pipe3ref,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
440
Part(p,CFrame.new(0,0,-.65),CFrame.new(),Vector3.new(1.3,.3,.5),pipe3,pipe3ref,0)
441
Part(p1,CFrame.new(-1.25,0,0),CFrame.new(),Vector3.new(.15,.65,.65),pipe3,pipe3ref,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
442
local p = Part(p1,CFrame.new(-1.35,0,0)*CFrame.Angles(math.pi/2,0,math.pi/2),CFrame.new(),Vector3.new(1,1,1),pipe3,pipe3ref,0,Mesh("SpecialMesh",Vector3.new(.5,2,.5),"FileMesh","rbxassetid://16659502"))
443
local firer = Instance.new("Fire",p)
444
local lightr = Instance.new("PointLight",p)
445
 
446
cancollide = false
447
local s = Part(main,CFrame.new(1.05,3,-2.7)*CFrame.Angles(-.5,0,0)*CFrame.new(0,0,.75),CFrame.new(),Vector3.new(.3,.3,1.5),body,bodyref,0)
448
local s = Part(s,CFrame.new(0,.15,.75)*CFrame.Angles(.55,0,0)*CFrame.new(0,-.15,1.5),CFrame.new(),Vector3.new(.299,.3,3),body,bodyref,0)
449
local s = Part(s,CFrame.new(0,.15,1.5)*CFrame.Angles(1.05,0,0)*CFrame.new(0,-.15,1),CFrame.new(),Vector3.new(.3,.3,2),body,bodyref,0)
450
Part(s,CFrame.new(0,0,.75),CFrame.new(),Vector3.new(.4,.4,.4),pipe3,pipe3ref,0)
451
 
452
local s = Part(main,CFrame.new(-1.05,3,-2.7)*CFrame.Angles(-.5,0,0)*CFrame.new(0,0,.75),CFrame.new(),Vector3.new(.3,.3,1.5),body,bodyref,0)
453
local s = Part(s,CFrame.new(0,.15,.75)*CFrame.Angles(.55,0,0)*CFrame.new(0,-.15,1.5),CFrame.new(),Vector3.new(.299,.3,3),body,bodyref,0)
454
local s = Part(s,CFrame.new(0,.15,1.5)*CFrame.Angles(1.05,0,0)*CFrame.new(0,-.15,1),CFrame.new(),Vector3.new(.3,.3,2),body,bodyref,0)
455
Part(s,CFrame.new(0,0,.75),CFrame.new(),Vector3.new(.4,.4,.4),pipe3,pipe3ref,0)
456
cancollide = true
457
 
458
local hp = Instance.new("Part",m)
459
hp.Anchored = true
460
hp.TopSurface,hp.BottomSurface =0,0
461
hp.BrickColor = BrickColor.new("Dark red")
462
hp.FormFactor = "Custom"
463
hp.CanCollide = false
464
hp.Size = Vector3.new(8,1.5,.5)
465
 
466
local hptop = hp:Clone()
467
hptop.Parent = m
468
hptop.BrickColor = BrickColor.new("Dark green")
469
 
470
firer.Size = .01
471
firer.Heat = 1000
472
firel.Size = .01
473
firel.Heat = 1000
474
 
475
local hm = Instance.new("Sound",sg)
476
hm.SoundId = "rbxassetid://131864673"
477
hm.Pitch = .8
478
 
479
--[[coroutine.wrap(function()
480
    wait(.2)
481
    while wait(.6) do
482
        ps.Pitch = -ps.Pitch
483
        ps2.Pitch = -ps2.Pitch
484
    end
485
end)()]]
486
 
487
local bvel = Instance.new("BodyVelocity",main)
488
bvel.maxForce = Vector3.new()
489
bvel.velocity = Vector3.new()
490
bvel.P = 5000
491
 
492
local bgyro = Instance.new("BodyGyro",main)
493
bgyro.maxTorque = Vector3.new()
494
bgyro.cframe = main.CFrame
495
bgyro.D = 800
496
 
497
do
498
    local vecs = {}
499
    for i,v in pairs(Enum.NormalId:GetEnumItems()) do
500
        table.insert(vecs,Vector3.FromNormalId(v))
501
    end
502
    function getSide(h,r)
503
        
504
        local ob = h.CFrame:pointToObjectSpace(r)
505
        if h:IsA("Part") and h.Shape == Enum.PartType.Ball then
506
            return (r-h.Position).unit
507
        elseif h:IsA("Part") and h.Shape == Enum.PartType.Cylinder then
508
            if isClose(math.abs(ob.y),h.Size.Y/2) then -- top
509
                return h.CFrame:vectorToWorldSpace((ob*Vector3.new(0,1,0)).unit)
510
            else
511
                return h.CFrame:vectorToWorldSpace(CFrame.new(Vector3.new(),ob*Vector3.new(1,0,1)).lookVector)
512
            end
513
        elseif h:IsA("WedgePart") then
514
            vecs = {Vector3.new(0,-1,0),Vector3.new(1,0,0),Vector3.new(-1,0,0),Vector3.new(0,0,1)}
515
        end
516
        for i,v in pairs(vecs) do
517
            if (ob*v/(h.Size/2)*v):isClose(v) then
518
                return h.CFrame:vectorToWorldSpace(v)
519
            end
520
        end
521
        if h:IsA("WedgePart") then
522
            return h.CFrame:vectorToWorldSpace(Vector3.new(0,h.Size.Z,h.Size.Y).unit)
523
        end
524
    end
525
end
526
 
527
local function Raycast(ray,ign)
528
    local ign = ign or {m,char}
529
    local h,p = workspace:FindPartOnRayWithIgnoreList(ray,ign)
530
    if h and not h.CanCollide then
531
        table.insert(ign,h)
532
        return Raycast(ray,ign)
533
    else
534
        return h,p
535
    end
536
end
537
 
538
local cam = workspace.CurrentCamera
539
local vehicleOn = true
540
local lastVehicleOn = false
541
local acc = 0
542
local maxSpeed = 180
543
local spd = 0
544
local jump = false
545
 
546
local kd = {}
547
local function isDown(k)
548
    return kd[k:byte()] and 1 or 0
549
end
550
mouse.KeyDown:connect(function(k)
551
    kd[k:byte()] = true
552
    if k == "f" then
553
        vehicleOn = not vehicleOn
554
    elseif k == "r" then
555
    --    hval.Value = 0
556
    end
557
end)
558
mouse.KeyUp:connect(function(k)
559
    kd[k:byte()] = false
560
end)
561
 
562
mouse.Button1Down:connect(function()
563
    b1d = true
564
end)
565
mouse.Button1Up:connect(function()
566
    b1d = false
567
end)
568
mouse.Button2Down:connect(function()
569
    b2d = true
570
end)
571
mouse.Button2Up:connect(function()
572
    b2d = false
573
end)
574
 
575
 
576
hum.Changed:connect(function()
577
    if hum.Jump then
578
        jump = true
579
        hum.Jump = false
580
        hum.Sit = true
581
    end
582
end)
583
 
584
local fire = {}
585
 
586
mouse.TargetFilter = m
587
 
588
local t,delta = tick(),0
589
local smokers = {}
590
 
591
local guntimer = 0
592
local scon;
593
local lastjump = 0
594
scon = step:connect(function()
595
 
596
    local now = tick()
597
    delta,t = now-t,now
598
 
599
    if hval.Value <= 0 then
600
        game:service'Debris':AddItem(m,5)
601
        coroutine.wrap(function()
602
            bvel:Destroy()
603
            local parts = {}
604
            local function a(b)
605
                for i,v in pairs(b:GetChildren()) do
606
                    if v:IsA("BasePart") then
607
                        table.insert(parts,v)
608
                    end
609
                    a(v)
610
                end
611
            end
612
            a(m)
613
            bvel:Destroy()
614
            bgyro:Destroy()
615
            local aTouched = false
616
            for i,v in pairs(parts) do
617
                v.Touched:connect(function()
618
                    if aTouched then return end
619
                    aTouched = true
620
                    local exp = Instance.new("Explosion",workspace)
621
                    exp.Position = v.Position
622
                    exp.BlastRadius = 0
623
                    exp.BlastPressure = .5
624
                    m:BreakJoints()
625
                    char:BreakJoints()
626
                    for i,x in pairs(m:GetChildren()) do
627
                        if x:IsA("BasePart") and v ~= x then
628
                            local diff = (x.Position-v.Position)
629
                            x.Velocity = x.Velocity + diff.unit * diff.magnitude/0.25/v:GetMass()
630
                        end
631
                    end
632
                    script.Disabled = true
633
                end)
634
            end
635
            wait(5)
636
            script.Disabled = true
637
        end)()
638
        scon:disconnect()
639
        return
640
    else
641
        hp.Transparency = hval.Value == 100 and math.min(1,hp.Transparency+.05) or math.max(0,hp.Transparency-.05)
642
        hptop.Transparency = hp.Transparency
643
        hp.CFrame = CFrame.new(head.Position+Vector3.new(0,9,0))*CFrame.Angles(0,(tick()/2)%(math.pi*2),0)
644
        hptop.Size = Vector3.new(hval.Value/100*(hp.Size.X+.05),hp.Size.Y+.1,hp.Size.Z+.1)
645
        hptop.CFrame = hp.CFrame * CFrame.new(-hp.Size.X/2-.025+hptop.Size.X/2,0,0)
646
    end
647
 
648
    if b1d and vehicleOn then
649
        guntimer = guntimer + delta
650
        if guntimer > .1 then
651
            t1s:Play()
652
            t1s.Pitch = 1.5 + (math.random()-.5)*.1
653
            guntimer = guntimer - .1
654
            local b = Instance.new("Part",m)
655
            b.Anchored = true
656
            b.FormFactor = "Custom"
657
            b.TopSurface,b.BottomSurface = 0,0
658
            b.CanCollide = false
659
            b.BrickColor = BrickColor.new("Bright yellow")
660
            b.Size = Vector3.new(.2,.2,.8)
661
            local sm = Instance.new("SpecialMesh",b)
662
            sm.MeshId = "rbxassetid://2697549"
663
            sm.Scale = Vector3.new(.5,.5,.25)
664
            local orig = t1.CFrame*CFrame.new(.5,0,0)*CFrame.Angles(0,-math.pi/2,0)
665
            local vel = (mouse.Hit.p-orig.p).unit*250 + main.Velocity*delta
666
            b.CFrame = orig
667
            coroutine.wrap(function()
668
                local t = tick()
669
                while true do
670
                    step:wait()
671
                    local n = tick()
672
                    local d,t = n-t,n
673
                    local ocf = b.CFrame
674
                    local h,r = Raycast(Ray.new(ocf.p,vel*d),{char,m})
675
                    if h then
676
                        b:Destroy()
677
                        local hit = false
678
                        local hp = h.Parent:FindFirstChild("hp") or h.Parent.Parent:FindFirstChild("hp")
679
                        if hp and hp:IsA("NumberValue") then
680
                            hp.Value = hp.Value - 3
681
                            hit = "rbxassetid://142082170"
682
                        end
683
                        local hp = h.Parent:FindFirstChild("Humanoid") or h.Parent.Parent:FindFirstChild("Humanoid")
684
                        if hp and hp:IsA("Humanoid") then
685
                            hp.Health = hp.Health - 50
686
                            hit = "rbxassetid://133758570"
687
                        end
688
                        if hit then
689
                            hm:Play()
690
                            local sp = Instance.new("Part",m)
691
                            sp.FormFactor = "Custom"
692
                            sp.Size = Vector3.new()
693
                            sp.Transparency = 1
694
                            sp.Anchored = true
695
                            sp.CanCollide = false
696
                            sp.CFrame = CFrame.new(r)
697
                            local s = Instance.new("Sound",sp)
698
                            s.SoundId = hit
699
                            s.Volume = 1
700
                            s.Pitch = 1.1+math.random()*.2
701
                            wait()
702
                            s:Play()
703
                            game:service'Debris':AddItem(sp,5)
704
                        end
705
                        break
706
                    end
707
                    b.CFrame = CFrame.new(ocf.p+vel*d,ocf.p+vel*d*2)
708
                    sm.Scale = Vector3.new(.5-vel.magnitude*d/100,.5-vel.magnitude*d/100,vel.magnitude*d/3)
709
                    vel = vel - Vector3.new(0,4*d,0)
710
                    if ocf.Y < -100 then
711
                        b:Destroy()
712
                        break
713
                    end
714
                end
715
            end)()
716
        end
717
    else
718
        guntimer = 0
719
    end
720
 
721
    local mcfr = main.CFrame
722
    local mpos = mcfr.p
723
 
724
    local raydir = Vector3.new(0,-100,0)--mcfr:vectorToWorldSpace(Vector3.new(0,-100,0))
725
 
726
    local dhit,dray = Raycast(Ray.new(mpos,raydir),{char,m})
727
    local diff = dray-mpos
728
 
729
    local rays = {
730
        tip = Ray.new((mcfr*CFrame.new(0,0,-11.5)).p,raydir),
731
        Ray.new((mcfr*CFrame.new(7,0,-11)).p,raydir),
732
        Ray.new((mcfr*CFrame.new(-7,0,-11)).p,raydir),
733
        Ray.new((mcfr*CFrame.new(1,0,-10.5)).p,raydir),
734
        Ray.new((mcfr*CFrame.new(-1,0,-10.5)).p,raydir),
735
        Ray.new((mcfr*CFrame.new(2.5,0,-6)).p,raydir),
736
        Ray.new((mcfr*CFrame.new(-2.5,0,-6)).p,raydir),
737
        rtip = Ray.new((mcfr*CFrame.new(10.5,0,-3)).p,raydir),
738
        ltip = Ray.new((mcfr*CFrame.new(-10.5,0,-3)).p,raydir),
739
        rprop = Ray.new((mcfr*CFrame.new(6.5,0,-3)).p,raydir),
740
        lprop = Ray.new((mcfr*CFrame.new(-6.5,0,-3)).p,raydir),
741
        Ray.new((mcfr*CFrame.new(2.5,0,-3)).p,raydir),
742
        Ray.new((mcfr*CFrame.new(-2.5,0,-3)).p,raydir),
743
        Ray.new((mcfr*CFrame.new(6.5,0,-1)).p,raydir),
744
        Ray.new((mcfr*CFrame.new(-6.5,0,-1)).p,raydir),
745
        Ray.new((mcfr*CFrame.new(2.5,0,4)).p,raydir),
746
        Ray.new((mcfr*CFrame.new(-2.5,0,4)).p,raydir),
747
        Ray.new((mcfr*CFrame.new(2.5,0,2)).p,raydir),
748
        Ray.new((mcfr*CFrame.new(-2.5,0,2)).p,raydir),
749
    }
750
    for i,v in pairs(rays) do
751
        local h,r = Raycast(v,{char,m})
752
        local df = r-v.Origin
753
        if df.Y > diff.Y then
754
            diff = df
755
        end
756
        rays[i] = {r=r,d=df,h=h}
757
    end
758
    
759
    local moving = false
760
    local movdir = Vector3.new()
761
    local hoverHeight = 7 + math.sin(now)/2
762
    local vel = Vector3.new(0,(hoverHeight+diff.Y)*3,0)
763
    if isDown'w'+isDown's'+isDown'd'+isDown'a' > 0 then
764
        moving = true
765
        movdir = Vector3.new(isDown'd'-isDown'a',0,isDown's'-isDown'w')
766
        if movdir.magnitude < .001 then
767
            moving = false
768
        else
769
            movdir = movdir.unit
770
        end
771
    end
772
    bgyro.maxTorque = Vector3.new(1,1,1)*1e5
773
 
774
    if vehicleOn then
775
        if not lastVehicleOn or not lastDown then
776
            lastDown = tick()
777
        end
778
        if not lastVehicleOn then
779
            local ray = rays.rprop
780
            for a,ray in pairs({rays.rprop,rays.lprop}) do
781
                if ray.h and -ray.d.Y < 5 then
782
                    local x = a==1 and 1 or -1
783
                    local am = 0
784
                    for i=math.pi/4*x,x*(-math.pi-math.pi/4),x*-math.pi/8 do
785
                        local p = Instance.new("Part",m)
786
                        p.Anchored = true
787
                        p.Transparency = 1
788
                        p.CanCollide = false
789
                        p.FormFactor = "Custom"
790
                        p.Size = Vector3.new()
791
                        local smoke = Instance.new("Smoke",p)
792
                        smoke.Color = Color3.new(.5,.5,.5)--Color3.new(lerp(.5,ray.h.Color.r,.8),lerp(.5,ray.h.Color.g,.8),lerp(.5,ray.h.Color.b,.8))
793
                        smoke.Size = .1
794
                        smoke.Opacity = .04
795
                        smoke.RiseVelocity = 10
796
                        p.CFrame = CFrame.new(ray.r,ray.r+mcfr.lookVector*Vector3.new(1,0,1))*CFrame.Angles(math.pi/2,0,i+.2*x)*CFrame.new(0,2.5,0)
797
                        local add = am/13
798
                        if add > .5 then
799
                            add = 1-add
800
                        end 
801
                        am = am + 1
802
                        game.Debris:AddItem(p,.75+add*14)
803
                    end
804
                end
805
            end
806
        end
807
        local ovel = main.CFrame:vectorToObjectSpace(main.Velocity)
808
        
809
        local xrot = math.max(-1,math.min(1,ovel.Z/maxSpeed*2))*.25
810
        local zrot = math.max(-1,math.min(1,-ovel.X/maxSpeed*2))*.25
811
        local xadd,zadd = 0,0
812
        if rays.tip.h and dhit and (-rays.tip.d.Y < hoverHeight+10 or -diff.Y < hoverHeight+10) then
813
            local ydiff = rays.tip.r.Y-dray.Y
814
            --print(ydiff)
815
            xadd = math.max(-.75,math.min(.75,math.asin(ydiff/11.5)))
816
            xrot = xrot*math.cos(xadd) + xadd
817
            --print("x",movdir,xadd)
818
            movdir = CFrame.Angles(xadd,0,0)*movdir
819
            --print("x2",movdir)
820
        end
821
 
822
        if rays.lprop.h and rays.rprop.h and rays.lprop.h == rays.rprop.h and (-rays.lprop.d.Y < hoverHeight+10 or -rays.rprop.d.Y < hoverHeight+10) then
823
            local xdiff = rays.rprop.r.Y-rays.lprop.r.Y
824
            zadd = math.max(-.75,math.min(.75,math.asin(xdiff/22)))
825
            zrot = zrot*math.cos(zadd) + zadd
826
            --print("z",movdir,zadd)
827
            movdir = CFrame.Angles(0,0,zadd)*movdir
828
            --print("z2",movdir)
829
        end
830
        --[[
831
        if movdir.magnitude > .001 then
832
            local p = Instance.new("Part",m)
833
            p.Anchored = true
834
            p.FormFactor = "Custom"
835
            p.CanCollide = false
836
            p.FrontSurface = "Hinge"
837
            p.Size = Vector3.new(1,1,3)
838
            p.CFrame = CFrame.new(head.Position+Vector3.new(0,5,0),head.Position+Vector3.new(0,5,0)+CFrame.new(cam.CoordinateFrame.p,cam.CoordinateFrame.p+cam.CoordinateFrame.lookVector*Vector3.new(1,0,1)):vectorToWorldSpace(movdir))
839
            game.Debris:AddItem(p,.1)
840
        end
841
        ]]
842
        local windup = math.min(1,(tick()-lastDown))
843
 
844
        if windup < .25 then
845
            moving = false
846
        elseif windup < 1 then
847
            bgyro.maxTorque = Vector3.new(1,1,1)*50000
848
        end
849
        local ldir = windup >= .25 and cam.CoordinateFrame.lookVector*Vector3.new(1,0,1) or main.CFrame.lookVector*Vector3.new(1,0,1)
850
        bgyro.cframe = CFrame.new(main.CFrame.p,main.CFrame.p+ldir)*CFrame.Angles(xrot,0,zrot)
851
        proplw.C1 = proplw.C1 * CFrame.Angles(0,windup*-(.8+main.Velocity.magnitude/maxSpeed*.75)*(moving and 1.5 or 1)+math.random()*.05,0)
852
        proprw.C1 = proprw.C1 * CFrame.Angles(0,windup*(.8+main.Velocity.magnitude/maxSpeed*.75)*(moving and 1.5 or 1)+math.random()*.05,0)
853
 
854
        local odir = main.CFrame:vectorToObjectSpace(bgyro.cframe.lookVector)
855
        firer.Enabled = ovel.Z < -1 or odir.X < -.1
856
        firel.Enabled = ovel.Z < -1 or odir.X > .1
857
        bvel.maxForce = Vector3.new(70000,-diff.Y < hoverHeight+1+math.max(0,-main.Velocity.Y*delta*40) and 400000 or 40000,70000)
858
 
859
        windup = windup + main.Velocity.magnitude/maxSpeed*.35*(moving and 1.5 or 1)
860
        ps.Volume = windup*.07
861
        ps2.Volume = ps.Volume
862
        ps.Pitch = ps.Pitch
863
        ps2.Pitch = ps2.Pitch
864
    else
865
        if lastVehicleOn or not lastUp then
866
            lastUp = tick()
867
        end
868
        firel.Enabled,firer.Enabled = false,false
869
        bvel.maxForce = Vector3.new(40000,-diff.Y > 1 and 1e5 or 0,40000)
870
        vel = Vector3.new(0,-100-((tick()-lastUp)*9.81*10)^2,0)
871
        bgyro.cframe = clerp(bgyro.cframe,CFrame.new(mpos,mpos+mcfr.lookVector*Vector3.new(1,0,1)),.2)
872
 
873
        local windup = 1-math.min(1,(tick()-lastUp)/5)
874
        vel = Vector3.new(0,(1-windup)*-25,0)
875
        proplw.C1 = proplw.C1 * CFrame.Angles(0,-.8*windup,0)
876
        proprw.C1 = proprw.C1 * CFrame.Angles(0,.8*windup,0)
877
        ps.Volume = windup*.07
878
        ps2.Volume = ps.Volume
879
        ps.Pitch = ps.Pitch
880
        ps2.Pitch = ps2.Pitch
881
 
882
        moving = false
883
 
884
        if tick()-lastUp > 2 then
885
            hval.Value = math.min(100,hval.Value + .1)
886
        end
887
    end  
888
 
889
    if moving then
890
        local od = movdir
891
        movdir = CFrame.new(cam.CoordinateFrame.p,cam.CoordinateFrame.p+cam.CoordinateFrame.lookVector*Vector3.new(1,0,1)):vectorToWorldSpace(movdir*Vector3.new(1,.25,1))
892
        
893
        if movdir.magnitude < 0.001 or tostring(movdir):lower():find("nan") then
894
            moving = false
895
            --print(od)
896
        else
897
            movdir = movdir.unit
898
            acc = acc + delta*70
899
            spd = math.min(maxSpeed,spd + acc)
900
            vel = vel + movdir*spd
901
        end
902
    end
903
    if not moving then
904
        spd = 0
905
        acc = 0
906
    end
907
 
908
    bvel.velocity = vel
909
    if jump  then
910
        if vehicleOn and -diff.Y < hoverHeight + 1 and tick()-lastjump > 2 then
911
            tor.Velocity = tor.Velocity + Vector3.new(0,110,0)
912
            lastjump = tick()
913
        end
914
        jump = false
915
    end
916
    lightr.Range = 5+math.sin(tick()*50)
917
    lightl.Range = 5+math.cos(tick()*50)
918
 
919
    lightr.Color = firer.Color
920
    lightl.Color = firel.Color
921
 
922
    lightr.Enabled = firer.Enabled
923
    lightl.Enabled = firel.Enabled
924
    lastVehicleOn = vehicleOn
925
end)
926
 
927
char.AncestryChanged:connect(function()
928
    m:Destroy()
929
    scon:disconnect()
930
end)
931
 
932
end
933
return _G.mantisReload()