View difference between Paste ID: qtv3kC9k and 0QEHkVFt
SHOW: | | - or go back to the newest paste.
1
 ----- Made by DoogleFox, Full credit to him
2
script:ClearAllChildren()
3
for i, v in pairs(game.Players.LocalPlayer.Backpack:children()) do
4
if v.className == "HopperBin" and v.Name == "Plane" then
5
v:remove()
6
end
7
end
8
bin = Instance.new("HopperBin")
9
bin.Name = "Plane"
10
bin.Parent = game.Players.LocalPlayer.Backpack
11
local hop = Instance.new("HopperBin")
12
hop.Parent = nil
13
script.Parent = hop
14
local StreamlineColor = BrickColor.new("Bright red")
15
local bulletspeed = 7
16
local bombdropspeed = 3
17
local maxspeed = 1.8
18
local acceleration = 0.02
19
local character = game.Players.LocalPlayer.Character
20
local char = game.Players.LocalPlayer.Character
21
local Torsoz = game.Players.LocalPlayer.Character:findFirstChild("Torso")
22
local RA = game.Players.LocalPlayer.Character:findFirstChild("Right Arm")
23
local LA = game.Players.LocalPlayer.Character:findFirstChild("Left Arm")
24
local RL = game.Players.LocalPlayer.Character:findFirstChild("Right Leg")
25
local LL = game.Players.LocalPlayer.Character:findFirstChild("Left Leg")
26
local H = game.Players.LocalPlayer.Character:findFirstChild("Head")
27
local RS = Torsoz:findFirstChild("Right Shoulder")
28
local LS = Torsoz:findFirstChild("Left Shoulder")
29
local RH = Torsoz:findFirstChild("Right Hip")
30
local LH = Torsoz:findFirstChild("Left Hip")
31
local N = Torsoz:findFirstChild("Neck")
32
local Main
33
local Joint1
34
local PlaneActive = false
35
local Flying = false
36
local PlaneTab = {}
37
local EffectTab = {}
38
local RayTab = {}
39
local LastPart
40
local speed = 0.5
41
local MOUSE
42
local hu = Instance.new("Humanoid")
43
local speedup = false
44
local speeddown = false
45
local streamline = false
46
local Shooting = false
47
local CanDropBomb = true
48
local MinigunSound
49
local BombSound
50
local LockOnTarget
51
local P = Instance.new("Part")
52
P.Anchored = false
53
P.CanCollide = false
54
P.Name = "Part"
55
P.formFactor = "Custom"
56
P.Size = Vector3.new(0.5,0.5,0.5)
57
P.Locked = true
58
P.TopSurface = 0
59
P.BottomSurface = 0
60
local gui = Instance.new("ScreenGui")
61
gui.Name = "PlaneSpeedGui"
62
local f = Instance.new("Frame", gui)
63
f.Name = "Meter"
64
f.Position = UDim2.new(0.45,0,0.75,0)
65
f.Size = UDim2.new(0.1,0,0.05,0)
66
f.BackgroundColor = BrickColor.new("Really black")
67
f.BorderColor = BrickColor.new("Dark stone grey")
68
local n = Instance.new("TextLabel", f)
69
n.Name = "Meter"
70
n.Position = UDim2.new(0,0,0,0)
71
n.Size = UDim2.new(1,0,1,0)
72
n.BackgroundColor = BrickColor.new("Really black")
73
n.TextColor = BrickColor.new("White")
74
n.BorderColor = BrickColor.new("Dark stone grey")
75
n.BackgroundTransparency = 1
76
n.FontSize = 3
77
n.Text = "Speed: "..speed.."/"..maxspeed
78
n.ZIndex = 2
79
local ff = n:Clone()
80
ff.Parent = f
81
ff.BackgroundTransparency = 0
82
ff.Position = UDim2.new(-0.3,0,0,0)
83
ff.Size = UDim2.new(0.3,0,1,0)
84
ff.Text = "Q"
85
local ff = n:Clone()
86
ff.Parent = f
87
ff.BackgroundTransparency = 0
88
ff.Position = UDim2.new(1,0,0,0)
89
ff.Size = UDim2.new(0.3,0,1,0)
90
ff.Text = "E"
91
local ff = n:Clone()
92
ff.Parent = f
93
ff.BackgroundTransparency = 0
94
ff.Position = UDim2.new(-0.3,0,1,0)
95
ff.Size = UDim2.new(1.6,0,0.5,0)
96
ff.FontSize = 1
97
ff.Text = "F To Toggle Streamline"
98
local n2 = Instance.new("Frame", f)
99
n2.Name = "MeterBar"
100
n2.Position = UDim2.new(0,0,0,0)
101
n2.Size = UDim2.new(0,0,1,0)
102
n2.BackgroundColor3 = Color3.new(0,0,0)
103
n2.BorderColor = BrickColor.new("Dark stone grey")
104
n2.ZIndex = 1
105
local ff = n:Clone()
106
ff.Parent = f
107
ff.Position = UDim2.new(-0.3,0,1.5,0)
108
ff.Size = UDim2.new(1.6,0,0.5,0)
109
ff.FontSize = 1
110
ff.Text = "Plane Health: 0"
111
local n3 = Instance.new("Frame", f)
112
n3.Name = "MeterBar"
113
n3.Position = UDim2.new(-0.3,0,1.5,0)
114
n3.Size = UDim2.new(1,0,0.5,0)
115
n3.BackgroundColor3 = Color3.new(0,1,0)
116
n3.BorderColor = BrickColor.new("Dark stone grey")
117
n3.ZIndex = 1
118
function Build()
119
for i, v in pairs(char:children()) do
120
if v.className == "Model" and v.Name == "Plane" then
121
v:remove()
122
end
123
end
124
local mdl2 = Instance.new("Model", char)
125
mdl2.Name = "Plane"
126
local mdl = Instance.new("Model", mdl2)
127
mdl.Name = "RC Plane"
128
local h = P:Clone()
129
h.Name = "Torso"
130
h.Parent = mdl
131
h.Position = Torsoz.Position
132
h.Size = Vector3.new(1.9,1,1.9)
133
local mesh = Instance.new("SpecialMesh", h)
134
mesh.Name = "Mesh"
135
mesh.MeshId = "http://www.roblox.com/asset/?id=68752248"
136
mesh.TextureId = "http://www.roblox.com/asset/?id=77082085"
137
--- 77082085 black plane
138
--- 69308394 original
139
mesh.Scale = Vector3.new(9,9,9)
140
local w = Instance.new("Motor", h)
141
w.Part0 = Torsoz
142
w.Part1 = h
143
w.C0 = CFrame.new(0,0,0.1) * CFrame.Angles(math.pi/2,-math.pi/4,0)
144
Main = w
145
local h2 = P:Clone()
146
h2.Name = "Controller"
147
h2.Parent = mdl
148
h2.Position = Torsoz.Position
149
h2.Size = Vector3.new(0.5,0.5,0.5)
150
local mesh = Instance.new("SpecialMesh", h2)
151
mesh.Name = "Mesh"
152
mesh.MeshId = "http://www.roblox.com/asset/?id=31183234"
153
mesh.TextureId = "http://www.roblox.com/asset/?id=31183303"
154
mesh.Scale = Vector3.new(0.5,0.5,0.5)
155
local w = Instance.new("Motor", h2)
156
w.Part0 = RL
157
w.Part1 = h2
158
w.C0 = CFrame.new(0.5,0.8,0) * CFrame.Angles(0,-math.pi/2,0)
159
Main2 = w
160
end
161
Build()
162
function Launch(mouse)
163
MOUSE = mouse
164
PlaneActive = true
165
local p = P:Clone()
166
p.Parent = Torsoz
167
p.Transparency = 1
168
local w = Instance.new("Motor", p)
169
w.Part0 = p
170
w.Part1 = RA
171
w.C0 = CFrame.new(0,-0.5,0)
172
RS.Part0 = nil
173
Joint1 = Instance.new("Motor", p)
174
Joint1.Part0 = Torsoz
175
Joint1.Part1 = p
176
Joint1.C0 = CFrame.new(1.5,0.5,0)
177
local jointz = Joint1
178
for i = 1, 14 do
179
jointz.C0 = jointz.C0 * CFrame.Angles(math.pi*1.2/14,0,0)
180
wait()
181
end
182
wait() wait()
183
Main.Part0 = RA
184
Main.C0 = CFrame.new(0,-0.8,-0.2) * CFrame.Angles(0,math.pi,math.pi) * CFrame.Angles(-math.pi*0.2,0,0)
185
wait() wait()
186
for i = 1, 3 do
187
Main.C0 = Main.C0 * CFrame.Angles(math.pi/1.8/7,0,0) + Vector3.new(0,0.2/3,0)
188
jointz.C0 = jointz.C0 * CFrame.Angles(-math.pi/1.8/7,0,0)
189
wait()
190
end
191
for i = 1, 2 do
192
Main.C0 = Main.C0 * CFrame.Angles(math.pi/1.8/7,0,0) + Vector3.new(0,0,0)
193
jointz.C0 = jointz.C0 * CFrame.Angles(-math.pi/1.8/7,0,0)
194
wait()
195
end
196
for i = 1, 2 do
197
Main.C0 = Main.C0 * CFrame.Angles(math.pi/1.8/7,0,0) + Vector3.new(0,-0.5/2,0)
198
jointz.C0 = jointz.C0 * CFrame.Angles(-math.pi/1.8/7,0,0)
199
wait()
200
end
201
Main.Part0 = nil
202
speed = 0.4
203
Main.Parent.Anchored = true
204
local h = P:Clone()
205
h.Size = Vector3.new(4,2.4,3.25)
206
h.Parent = Main.Parent.Parent
207
h.Transparency = 0.99
208
h.Name = "Head"
209
h.CFrame = Main.Parent.CFrame
210
MinigunSound = Instance.new("Sound", h)
211
MinigunSound.Pitch = 1.75
212
MinigunSound.Volume = 0.3
213
MinigunSound.SoundId = "http://www.roblox.com/asset/?id=2691586"
214
BombSound = Instance.new("Sound", h)
215
BombSound.Pitch = 0.875
216
BombSound.Volume = 0.5
217
BombSound.SoundId = "http://www.roblox.com/asset/?id=2233908"
218
-- old sound: http://www.roblox.com/asset/?id=2233908
219
-- new sound: http://www.roblox.com/asset/?id=81116747
220
local mesh = Instance.new("BlockMesh", h)
221
mesh.Scale = Vector3.new(0.03,0.03,0.03)
222
local w = Instance.new("Snap", h)
223
w.Part0 = Main.Parent
224
w.Part1 = h
225
hu = Instance.new("Humanoid", Main.Parent.Parent)
226
hu.MaxHealth = 100
227
wait()
228
hu.Health = 100
229
local h2 = P:Clone()
230
h2.Anchored = true
231
h2.BrickColor = BrickColor.new("Really black")
232
h2.Parent = Main.Parent.Parent
233
h2.Name = "Minigun1"
234
h2.CFrame = Main.Parent.CFrame
235
local mesh = Instance.new("SpecialMesh", h2)
236
mesh.Scale = Vector3.new(0.3,0.3,0.3)
237
mesh.MeshId = "http://www.roblox.com/asset/?id=2806162"
238
local h3 = P:Clone()
239
h3.Anchored = true
240
h3.BrickColor = BrickColor.new("Really black")
241
h3.Parent = Main.Parent.Parent
242
h3.Name = "Minigun2"
243
h3.CFrame = Main.Parent.CFrame
244
local mesh = Instance.new("SpecialMesh", h3)
245
mesh.Scale = Vector3.new(0.3,0.3,0.3)
246
mesh.MeshId = "http://www.roblox.com/asset/?id=2806162"
247
local h4 = P:Clone()
248
h4.Anchored = true
249
h4.BrickColor = BrickColor.new("Black")
250
h4.Parent = Main.Parent.Parent
251
h4.Name = "Missile1"
252
h4.CFrame = Main.Parent.CFrame
253
local mesh = Instance.new("SpecialMesh", h4)
254
mesh.Scale = Vector3.new(0.35,0.55,0.55)
255
mesh.MeshId = "http://www.roblox.com/asset/?id=1030777"
256
mesh.TextureId = "http://www.roblox.com/asset/?id=1030776"
257
mesh.VertexColor = Vector3.new(0.45,0.45,0.45)
258
local h5 = P:Clone()
259
h5.Anchored = true
260
h5.BrickColor = BrickColor.new("Black")
261
h5.Parent = Main.Parent.Parent
262
h5.Name = "Missile2"
263
h5.CFrame = Main.Parent.CFrame
264
local mesh = Instance.new("SpecialMesh", h5)
265
mesh.Scale = Vector3.new(0.35,0.55,0.55)
266
mesh.MeshId = "http://www.roblox.com/asset/?id=1030777"
267
mesh.TextureId = "http://www.roblox.com/asset/?id=1030776"
268
mesh.VertexColor = Vector3.new(0.45,0.45,0.45)
269
local mdlz = Instance.new("Model", Main.Parent.Parent)
270
mdlz.Name = "RC Plane"
271
local h6 = P:Clone()
272
h6.Shape = "Ball"
273
h6.Size = Vector3.new(17,17,17)
274
h6.Parent = mdlz
275
h6.Anchored = true
276
h6.Transparency = 0.99
277
h6.Name = "LockOnDetector"
278
h6.CFrame = Main.Parent.CFrame
279
local mesh = Instance.new("SpecialMesh", h6)
280
mesh.MeshType = "Sphere"
281
mesh.Scale = Vector3.new(0.03,0.03,0.03)
282
for i = 1, 11 do
283
Main.Parent.CFrame = Main.Parent.CFrame + Main.Parent.CFrame.lookVector*speed
284
h.CFrame = Main.Parent.CFrame * CFrame.new(0,0.65,-0.5)
285
h2.CFrame = Main.Parent.CFrame * CFrame.new(0.75,0.85,-0.85)
286
h3.CFrame = Main.Parent.CFrame * CFrame.new(-0.75,0.85,-0.85)
287
h4.CFrame = Main.Parent.CFrame * CFrame.new(1.6,0.65,-1.2) * CFrame.Angles(0,-math.pi/2,0)
288
h5.CFrame = Main.Parent.CFrame * CFrame.new(-1.6,0.65,-1.2) * CFrame.Angles(0,-math.pi/2,0)
289
h6.CFrame = Main.Parent.CFrame * CFrame.new(0,0.65,-0.5)
290
jointz.C0 = jointz.C0 * CFrame.Angles(-math.pi/1.5/11,0,0)
291
wait()
292
end
293
Main2.Part0 = RA
294
Main2.C0 = CFrame.new(0,-1,-0.8) * CFrame.Angles(math.pi/2,0,math.pi)
295
for i = 1, 8 do
296
Main.Parent.CFrame = Main.Parent.CFrame + Main.Parent.CFrame.lookVector*speed
297
h.CFrame = Main.Parent.CFrame * CFrame.new(0,0.65,-0.5)
298
h2.CFrame = Main.Parent.CFrame * CFrame.new(0.75,0.85,-0.85)
299
h3.CFrame = Main.Parent.CFrame * CFrame.new(-0.75,0.85,-0.85)
300
h4.CFrame = Main.Parent.CFrame * CFrame.new(1.6,0.65,-1.2) * CFrame.Angles(0,-math.pi/2,0)
301
h5.CFrame = Main.Parent.CFrame * CFrame.new(-1.6,0.65,-1.2) * CFrame.Angles(0,-math.pi/2,0)
302
h6.CFrame = Main.Parent.CFrame * CFrame.new(0,0.65,-0.5)
303
jointz.C0 = jointz.C0 * CFrame.Angles(math.pi/2.2/8,0,0)
304
Main2.C0 = Main2.C0 * CFrame.new(0.8/8,0,0)
305
wait()
306
end
307
PlaneTab[1] = Main.Parent
308
PlaneTab[2] = h
309
PlaneTab[3] = h2
310
PlaneTab[4] = h3
311
PlaneTab[5] = h4
312
PlaneTab[6] = h5
313
PlaneTab[7] = h6
314
Flying = true
315
workspace.CurrentCamera.CameraSubject = hu
316
char.Humanoid.WalkSpeed = 0
317
gui.Parent = game.Players.LocalPlayer:findFirstChild("PlayerGui")
318
end
319
function Cancel()
320
LastPart = nil
321
Joint1.Parent:Destroy()
322
gui.Parent = nil
323
workspace.CurrentCamera.CameraSubject = char.Humanoid
324
char.Humanoid.WalkSpeed = 16
325
RS.Part0 = Torsoz
326
PlaneActive = false
327
Flying = false
328
Shooting = false
329
for ii, vv in pairs(PlaneTab) do
330
if vv.Parent.Name == "Plane" then
331
vv:remove()
332
PlaneTab[ii] = nil
333
end
334
end
335
end
336
function onButton1Down(mouse)
337
if Flying == true then
338
Shooting = true
339
end
340
if PlaneActive == false then
341
Launch(mouse)
342
end
343
end
344
function onButton1Up()
345
Shooting = false
346
end
347
function BombDrop()
348
if CanDropBomb == true then
349
CanDropBomb = false
350
local B = P:Clone()
351
B.Parent = Main.Parent
352
B.Name = "Bomb"
353
B.Anchored = true
354
B.CFrame = CFrame.new(Main.Parent.Position, Vector3.new(MOUSE.Hit.x,Main.Parent.Position.y,MOUSE.Hit.z)) * CFrame.Angles(-math.pi/2.3,0,0)
355
game:service("Debris"):AddItem(B, 4)
356
local mesh = Instance.new("SpecialMesh", B)
357
mesh.MeshId = "http://www.roblox.com/asset/?id=74333739"
358
mesh.TextureId = "http://www.roblox.com/asset/?id=74320150"
359
table.insert(RayTab, B)
360
Spawn(function() wait(0.5) CanDropBomb = true end)
361
end
362
end
363
function onKeyDown(key, mouse)
364
if key == "e" then
365
speedup = true
366
elseif key == "q" then
367
speeddown = true
368
elseif key == "f" then
369
if streamline == true then
370
streamline = false
371
else
372
streamline = true
373
end
374
elseif key == "r" then
375
if Flying == true then
376
BombDrop()
377
end
378
end
379
end
380
function onKeyUp(key)
381
if key == "e" then
382
speedup = false
383
elseif key == "q" then
384
speeddown = false
385
end
386
end
387
bin.Selected:connect(function(mouse)
388
mouse.Icon = "rbxasset://textures\\GunCursor.png"
389
--mouse.Icon = "rbxasset://textures\\advancedMove.png"
390
mouse.Button1Down:connect(function() onButton1Down(mouse) end)
391
mouse.Button1Up:connect(function() onButton1Up() end)
392
mouse.KeyDown:connect(function(key) onKeyDown(key, mouse) end)
393
mouse.KeyUp:connect(function(key) onKeyUp(key) end)
394
end)
395
bin.Deselected:connect(function()
396
pcall(function() Cancel() Build() end)
397
end)
398
function Splosion(Pos, ScalE, PartZ, LoopZ, dmg)
399
ScalE = ScalE or 1
400
PartZ = PartZ or 6
401
LoopZ = LoopZ or 1
402
dmg = dmg or 0
403
for _ = 1, LoopZ do
404
local tab = {}
405
for i = 1, PartZ do
406
local E = P:Clone()
407
E.Parent = Torsoz
408
E.Anchored = true
409
E.Transparency = 0.3
410
E.CFrame = CFrame.new(Pos) * CFrame.Angles(math.random(-360, 360)/360,math.random(-360, 360)/360,math.random(-360, 360)/360)
411
local nam = math.random(1,3)
412
local colz = {"Bright yellow", "Bright orange", "Bright red"}
413
E.BrickColor = BrickColor.new(colz[nam])
414
local mesh = Instance.new("SpecialMesh", E)
415
mesh.Scale = Vector3.new(1,1,1)
416
mesh.MeshType = "Sphere"
417
table.insert(tab, E)
418
end
419
local R3 = Region3.new(Pos-(Vector3.new(3,3,3)*ScalE), Pos+(Vector3.new(3,3,3)*ScalE))
420
local R3F = workspace:FindPartsInRegion3(R3, char, 40)
421
local Humanz = {}
422
for i, v in pairs(R3F) do
423
local HAS = false
424
if v.Parent:findFirstChild("Humanoid") ~= nil then
425
for I, V in pairs(Humanz) do
426
if v.Parent:findFirstChild("Humanoid") == V then
427
HAS = true
428
end
429
end
430
if HAS == false then
431
table.insert(Humanz, v.Parent:findFirstChild("Humanoid"))
432
end
433
end
434
end
435
for i, v in pairs(Humanz) do
436
v.Health = v.Health - dmg
437
end
438
for _ = 1, 7 do
439
for i, v in pairs(tab) do
440
v.Transparency = v.Transparency + 0.7/7
441
v.Mesh.Scale = v.Mesh.Scale + (Vector3.new(7/7, 14/7,4/7))*ScalE
442
end
443
wait()
444
end
445
for i, v in pairs(tab) do
446
v:Destroy()
447
tab[i] = nil
448
end
449
end
450
end
451
local iii = 0
452
local sidez = true
453
while true do
454
iii = iii + 1
455
for i, v in pairs(PlaneTab) do
456
if v ~= nil then
457
if v.Parent ~= nil then
458
if v.Parent.Name == "RC Plane" then
459
local posi = v.CFrame
460
if v.Name == "Torso" then
461
v.CFrame = CFrame.new(v.CFrame.p, MOUSE.Hit.p) + CFrame.new(v.CFrame.p, MOUSE.Hit.p).lookVector*speed
462
elseif v.Name == "Head" then
463
v.CFrame = Main.Parent.CFrame * CFrame.new(0,0.65,-0.5)
464
elseif v.Name == "LockOnDetector" then
465
v.CFrame = Main.Parent.CFrame * CFrame.new(0,0.65,-0.5)
466
elseif v.Name == "Minigun1" then
467
v.CFrame = Main.Parent.CFrame * CFrame.new(0.75,0.85,-0.85)
468
elseif v.Name == "Minigun2" then
469
v.CFrame = Main.Parent.CFrame * CFrame.new(-0.75,0.85,-0.85)
470
elseif v.Name == "Missile1" then
471
v.CFrame  = Main.Parent.CFrame * CFrame.new(1.6,0.65,-1.2) * CFrame.Angles(0,-math.pi/2,0)
472
elseif v.Name == "Missile2" then
473
v.CFrame = Main.Parent.CFrame * CFrame.new(-1.6,0.65,-1.2) * CFrame.Angles(0,-math.pi/2,0)
474
end
475
local pos = v.CFrame * CFrame.new(0,0.4,0) - v.CFrame.lookVector*1.2
476
local pos2 = (pos.lookVector*speed) + (pos.lookVector*1.2)
477
local ray = Ray.new(pos.p, (pos.lookVector*speed))
478
local hitz, enz = workspace:findPartOnRay(ray, char)
479
if hitz ~= nil and hitz.CanCollide == true and hitz.Name ~= "MiniBullit" then
480
Spawn(function() Splosion(enz, 1.5*speed, 6, 3, 4) end)
481
v:remove()
482
PlaneTab[i] = nil
483
pcall(function() Cancel() Build() end)
484
end
485
if hu.Health == 0 then
486
Spawn(function() Splosion(enz, 3, 7, 5, 2.5) end)
487
v:remove()
488
PlaneTab[i] = nil
489
pcall(function() Cancel() Build() end)
490
end
491
if v.Name == "Torso" and streamline == true then
492
local e = P:Clone()
493
e.Parent = Main.Parent
494
e.Anchored = true
495
e.Transparency = 0.3
496
e.BrickColor = StreamlineColor
497
local posit = posi * CFrame.new(0,0.8,0)
498
e.CFrame = posit * CFrame.Angles(math.pi/2,0,0)
499
local mesh = Instance.new("BlockMesh", e)
500
mesh.Name = "Mesh"
501
mesh.Scale = Vector3.new(0.4,speed*2,0.4)
502
table.insert(EffectTab, e)
503
end
504
end
505
end
506
end
507
end
508
for i, v in pairs(EffectTab) do
509
if v ~= nil and v.Parent ~= nil then
510
v.Transparency = v.Transparency + 0.036
511
v.Mesh.Scale = v.Mesh.Scale + Vector3.new(0.225*speed,0,0.225*speed)
512
if v.Transparency > 0.94 then
513
v:Destroy()
514
EffectTab[i] = nil
515
end
516
end
517
end
518
if iii%4 == 0 then
519
if Shooting == true then
520
for III = 1, 2 do
521
for i, v in pairs(PlaneTab) do
522
if v.Name == "Minigun1" or v.Name == "Minigun2" then
523
if sidez == true or sidez == false then
524
local R = P:Clone()
525
R.Name = "MiniBullit"
526
game:service("Debris"):AddItem(R, 3)
527
R.BrickColor = BrickColor.new("New Yeller")
528
R.Anchored = true
529
local mesh = Instance.new("CylinderMesh", R)
530
mesh.Scale = Vector3.new(0.15,bulletspeed,0.1)
531
if sidez == true then
532
if v.Name == "Minigun1" then
533
MinigunSound:Play()
534
R.CFrame = v.CFrame * CFrame.Angles(-math.pi/2,0,0)
535
table.insert(RayTab, R)
536
R.Parent = Main.Parent  
537
end
538
sidez = "1"
539
break
540
elseif sidez == false then
541
if v.Name == "Minigun2" then
542
MinigunSound:Play()
543
R.CFrame = v.CFrame * CFrame.Angles(-math.pi/2,0,0)
544
table.insert(RayTab, R)
545
R.Parent = Main.Parent  
546
sidez = "2"
547
break
548
end
549
end
550
end
551
end
552
end
553
end
554
end
555
end
556
if sidez == "1" then
557
sidez = false
558
elseif sidez == "2" then
559
sidez = true
560
end
561
for ii, v in pairs(RayTab) do
562
if v.Name == "MiniBullit" then
563
local pozi = v.CFrame * CFrame.Angles(math.pi/2,0,0)
564
local ray = Ray.new(v.CFrame.p, pozi.lookVector*(bulletspeed+speed))
565
local hitz, enz = workspace:findPartOnRay(ray, char)
566
if hitz ~= nil then
567
v:remove()
568
RayTab[ii] = nil
569
if hitz.Parent:findFirstChild("Humanoid") ~= nil then
570
hitz.Parent:findFirstChild("Humanoid").Health = hitz.Parent:findFirstChild("Humanoid").Health - 10
571
elseif hitz.Name == "Handle" and hitz.Parent.Parent:findFirstChild("Humanoid") then
572
hitz.Parent.Parent:findFirstChild("Humanoid").Health = hitz.Parent.Parent:findFirstChild("Humanoid").Health - 10
573
end
574
end
575
v.CFrame = v.CFrame * CFrame.new(0,(bulletspeed+speed),0)
576
elseif v.Name == "Bomb" then
577
local pozi = v.CFrame
578
local ray = Ray.new(pozi.p, (pozi * CFrame.new(0,0,1)).lookVector*(bombdropspeed))
579
local hitz, enz = workspace:findPartOnRay(ray, char)
580
if hitz ~= nil then
581
BombSound:Play()
582
Spawn(function() Splosion(enz, 3,7,3, 8) end)
583
v:remove()
584
RayTab[ii] = nil
585
end
586
v.CFrame = v.CFrame * CFrame.new(0,0,-bombdropspeed)
587
end
588
if v.Parent ~= Main.Parent then
589
RayTab[ii] = nil
590
end
591
end
592
if speedup == true then
593
speed = speed + acceleration
594
if speed > maxspeed then
595
speed = maxspeed
596
end
597
end
598
if speeddown == true then
599
speed = speed - acceleration
600
if speed < 0.2 then
601
speed = 0.2
602
end
603
end
604
n.Text = "Speed: "..speed.."/"..maxspeed
605
n2.Size = UDim2.new(speed/maxspeed,0,1,0)
606
local colurz = 0.55/maxspeed*speed
607
n2.BackgroundColor3 = Color3.new(colurz,0.55-colurz,0)
608
n3.Size = UDim2.new((hu.Health/hu.MaxHealth)*1.6,0,0.5,0)
609
local colurz = 0.6/hu.MaxHealth*hu.Health
610
n3.BackgroundColor3 = Color3.new(0.6-colurz,colurz,0)
611
ff.Text = "Plane Health: " .. hu.Health .. "/" .. hu.MaxHealth
612
wait(0.025)
613
end