-
Notifications
You must be signed in to change notification settings - Fork 1
/
Plane.
3448 lines (3254 loc) · 144 KB
/
Plane.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
-- Converted using Mokiros's Model to Script Version 3
-- Converted string size: 35120 characters
local ScriptFunctions = {
function(script,require)
local PlaneClone = script.Parent.Plane:Clone()
local Planekit = script.Parent
PlaneClone.Origin.Value = Planekit
script.Parent.Plane.Origin.Value = Planekit
local EnterOnSpawn = Planekit.EnterOnSpawn
local Button = Planekit.Button
local Main = Button.Main
local RegenGui = script.RegenGui
local PlaneClone2 = nil
local Active = true
--------------------------------------------------------
local RegenTime = 1 --Change this to how long it takes the plane to regen
local WaitTime = 2 --Change this to how much time you have to wait before you can regen another plane
--------------------------------------------------------
function DeleteIdlePlane() --This deletes any planes that aren't currently being used
for _,v in pairs(Planekit:GetChildren()) do
if v.Name == "Plane" then
v:Destroy()
end
end
end
function RegenMain() --This function regens the plane
local PlaneClone2 = PlaneClone:clone()
PlaneClone2.Parent = Planekit
PlaneClone2.Origin.Value = Planekit
PlaneClone2:MakeJoints()
return PlaneClone2
end
function RegeneratePlane(Part) --This is the main regenerating function
local Player = game.Players:GetPlayerFromCharacter(Part.Parent) --This gets the player that touched it
if Player then
local Humanoid = Player.Character:FindFirstChild("Humanoid")
if Humanoid.Health ~= 0 then
if Active then
Active = false
DeleteIdlePlane() --This activates the "DeleteIdlePlane" function
for i = 0,1,0.2 do --This makes the button transparent
Main.Transparency = i
wait()
end
if RegenTime >= 1 then
RegenGui.Parent = Player.PlayerGui --The regengui will be put into the player if the regentime is more than 1
end
wait(RegenTime)
RegenGui.Parent = script --This puts the gui back in the script
local PlaneClone2 = RegenMain()
if EnterOnSpawn.Value then --If the EnterOnSpawn value is true...
coroutine.resume(coroutine.create(function()
repeat wait() until PlaneClone2.Welded.Value
while true do
if PlaneClone2.Welded.Value
or Humanoid.Health == 0 then
break
end
wait()
end
onPlaneWelded(Player,PlaneClone2) --This activates the "onPlaneWelded" function whenever the welded value changes
end))
end
wait(WaitTime)
for i = 1,0,-0.2 do --This makes the button visible
Main.Transparency = i
wait()
end
Active = true
end
end
end
end
function onPlaneWelded(Player,Plane) --This function put you into the plane seat the moment the plane is welded
if Plane and Player then --This checks to make sure there is a plane and a player
if Player.Character:FindFirstChild("Torso") then
if Player.Character.Humanoid.Health ~= 0 then
Player.Character.Torso.CFrame = Plane.MainParts.Seat.CFrame
end
end
end
end
Main.Touched:connect(RegeneratePlane) --This activates the "RegeneratePlane" function when the Main brick is touched
end,
function(script,require)
local Plane = script.Parent --Lines 1-4 set variables
local Engine = Plane.MainParts.Engine
local Welded = Plane.Welded
local Parts = {}
function GetParts(Model) --This function gets all the parts in the plane
for i,v in pairs(Model:GetChildren()) do --This is a shorter way of getting all the children in a specific area
if ((v:IsA("BasePart")) and v ~= Engine) then
table.insert(Parts,{v,v.CFrame}) --This inserts the parts into the "Parts" table
end
GetParts(v)
end
end
function WeldParts() --This function welds the parts together. It's not as complicated as it looks
GetParts(Plane)
for _,v in pairs(Parts) do --This gets all the parts in the "Parts" table
local Weld = Instance.new("Weld") --This makes the weld
Weld.Name = "MainWeld"
Weld.Part0 = Engine --This makes whatever brick the "v" variable is attach to the Engine
Weld.Part1 = v[1]
Weld.C0 = Engine.CFrame:toObjectSpace(v[2])
Weld.Parent = v[1]
end
wait(1)
Engine.Anchored = false
for _,v in pairs(Parts) do --This unanchors the bricks after 1 second
v[1].Anchored = false
end
Welded.Value = true
end
WeldParts() --This activates the weld function
end,
function(script,require)
--[[
Read this to understand what each one of the values does to the plane:
-Acceleration:
This changes how fast the plane accelerates. 1000 being the highest, and 0 being the lowest. If you make it 0, the plane will
accelerate every 0.5 seconds. If you make it 1000, the plane will accelerate every 0 seconds
-AltitudeRestrict:
This value determines whether there will be altitude restrictions on the plane or not
-MaxAltitude:
This value sets the limit as to how high the plane can fly. If you go higher than the MaxAltitude, the plane will stall
until you are below the limit
-MinAltitude:
This value sets the limit as to how low the plane can fly. If you go lower than the MinAltitude, the plane will explode. If
you fly just a few studs above the limit, a warning indicator will appear that tells you to pull up
-CameraType:
This value determines what cameratype you will have when you select the plane tool. It can be either one of these:
Attach, Custom, Fixed, Follow, Scriptable, Track, and Watch. If the value is blank, the cameratype will automatically be Custom
-CanCrash:
This value determines whether the plane can crash or not at a given force
-Force:
This value sets the minimum force required to make the plane crash. If you hit any object at a speed faster than the Force
value, then you will crash
-Ejectable:
This value determines whether you can eject from the plane or not
-FlightControls:
These are the controls that allow you to fly the plane
-Eject:
This key will eject you from the plane
-Engine:
This key will turn on or turn off the engine
-Gear:
This key will make the landing gear retract or extend
-SlowDown:
This key will make the plane slow down. The key can either be "ArrowKeyUp", "ArrowKeyDown", or any other key
-SpeedUp:
This key will make the plane speed up. The key can either be "ArrowKeyUp", "ArrowKeyDown", or any other key
-GroupSpecific:
This value determines whether only a certain group can access it or everyone can access it
-GroupId:
This value is the Id of the group that the plane is specific too. As long as GroupSpecific is set to true
-KillOnEnter:
If this value is true, then if GroupSpecific is true and the player that entered the plane isn't part of the group,
the script will kill them. If it false it won't kill them
-HUDOnLock:
This value determines whether you'll see a HUD when the Camera is locked. In order for the HUD to come up, CamLock has to be
enabled. If it isn't enabled, the classic HUD will show.
-MaxBank:
This value sets the maximum angle the plane can bank. The lowest it can be is -90, and the highest it can be is 90
-MaxSpeed:
This value sets the maximum speed that the plane can fly at. The higher the acceleration value, the faster the plane will reach
its top speed
-PlaneName:
This value names the plane and it will appear on the top of the Plane Gui
-ReloadTimes:
These are the reload times for each weapon on the plane
-Bombs:
This value sets how much time you have to wait before you can drop another bomb. The reload time for guided bombs are twice
this value
-Flares:
This value sets how much time you have to wait before you can deploy more flares
-Guns:
This value sets the firerate of the guns. This value should be no less than 0.01
-Missiles:
This value sets how much time you have to wait before you can fire another missile. The reload time for guided missiles are
twice this value
-Rockets:
This value sets how much time you have to wait before you can fire another set of rockets
-SimulationMode:
This value determines whether the plane will fly like a simulator or not. If the value is true, then the plane can do full rotations
and it is controlled by the position of the mouse on the screen. The plane won't have a set BankAngle because it can do complete
Roll rotations. The farther the mouse is away from the center of the screen, the faster the plane will rotate. I would use this mode
for smaller planes because they're more agile than larger planes
-PitchSpeed:
This value sets how many degrees per 1/60th of a second the plane rotates on the X Axis. Basically how fast the plane rotates
up or down. If your mouse is at the very edge of the top or bottom of your screen, your plane will rotate at the PitchSpeed.
However, if your mouse is at the center of your screen, your plance wont't rotate at all
-RollSpeed:
This value sets how many degrees per 1/60th of a second the plane rotates on the Y Axis. Basically how fast the plane rotates
from side to side. If your mouse is at the very edge of the left or right side of your screen, your plane will rotate at the
RollSpeed. However, if your mouse is at the center of your screen, your plance wont't rotate at all
-StallSpeed:
This value sets the minimum speed that the plane can fly before it stalls. If the plane is flying at a speed lower than the
StallSpeed, the plane will stall until the speed is increased
-TargetControls:
These are the controls that control the targeting system on the plane
-Modes:
This key switches the modes on the plane. There are two modes. In flying mode, the sign "Flying Mode" will be displayed on the
Plane Gui, and you can't target objects. In targeting mode, the sign "Targeting Mode" will be displayed on the Plane Gui, and
you will be able to target objects
-UnTarget:
This key unlocks from whatever object that you locked onto, and it allows you to lock onto another object
-Targetable:
This value determines whether the plane will have a targeting system or not, which allows you to lock onto any object or player
according to the Targeting System
-ThrottleInc:
This value changes how fast the throttle increases. The max this value should be is 1, and the minimum should be 0.01. The higher
the number, the faster the throttle increases
-TurnSpeed:
This value affects how fast the plane turns. The lowest it should be is 0 and the highest it should be is 10000. If you make the
value higher than 10000, the plane could become unstable
-WeaponControls:
These are the controls that fire the given weapons
-DeployFlares:
This key will make the plane deploy flares
-DropBombs:
This key will make the plane drop bombs
-FireGuns:
This key will make the plane fire its guns
-FireMissile:
This key will make the plane fire missiles
-FireRockets:
This key will make the plane fire rockets
-Weapons:
This value determines whether the plane will have weapons or not
-Bombs:
This value will determine whether the plane can drop bombs or not
-Flares:
This value will determine whether the plane can deploy flares or not
-Guns:
This value will determine whether the plane can fire guns or not
-Missiles:
This value will determine whether the plane can fire missiles or not
-Rockets:
This value will determine whether the plane can fire rockets or not
Well, these are all the controls! If you have any questions, send me a message
--TurboFusion--
]]
end,
function(script,require)
b = script.Parent.Blue
a = script.Parent.PointLight
local oh,om = 6,30 -- Open Time (hours,minutes)
local ch,cm = 18,00 -- Close Time (hours, minutes)
local l = game:service("Lighting")
if (om == nil) then om = 0 end
if (cm == nil) then cm = 0 end
function TimeChanged()
local ot = (oh + (om/60)) * 60
local ct = (ch + (cm/60)) * 60
if (ot < ct) then
if (l:GetMinutesAfterMidnight() >= ot) and (l:GetMinutesAfterMidnight() <= ct) then
b.Enabled = false
a.Enabled = false
else
a.Enabled = true
b.Enabled = true
end
elseif (ot > ct) then
if (l:GetMinutesAfterMidnight() >= ot) or (l:GetMinutesAfterMidnight() <= ct) then
b.Enabled = false
a.Enabled = false
else
b.Enabled = true
a.Enabled = true
end
end
end
TimeChanged()
game.Lighting.Changed:connect(function(property)
if (property == "TimeOfDay") then
TimeChanged()
end
end)
-- Ganondude
end,
function(script,require)
b = script.Parent.Blue
a = script.Parent.PointLight
local oh,om = 6,30 -- Open Time (hours,minutes)
local ch,cm = 18,00 -- Close Time (hours, minutes)
local l = game:service("Lighting")
if (om == nil) then om = 0 end
if (cm == nil) then cm = 0 end
function TimeChanged()
local ot = (oh + (om/60)) * 60
local ct = (ch + (cm/60)) * 60
if (ot < ct) then
if (l:GetMinutesAfterMidnight() >= ot) and (l:GetMinutesAfterMidnight() <= ct) then
b.Enabled = false
a.Enabled = false
else
a.Enabled = true
b.Enabled = true
end
elseif (ot > ct) then
if (l:GetMinutesAfterMidnight() >= ot) or (l:GetMinutesAfterMidnight() <= ct) then
b.Enabled = false
a.Enabled = false
else
b.Enabled = true
a.Enabled = true
end
end
end
TimeChanged()
game.Lighting.Changed:connect(function(property)
if (property == "TimeOfDay") then
TimeChanged()
end
end)
-- Ganondude
end,
function(script,require)
b = script.Parent.Blue
a = script.Parent.PointLight
local oh,om = 6,30 -- Open Time (hours,minutes)
local ch,cm = 18,00 -- Close Time (hours, minutes)
local l = game:service("Lighting")
if (om == nil) then om = 0 end
if (cm == nil) then cm = 0 end
function TimeChanged()
local ot = (oh + (om/60)) * 60
local ct = (ch + (cm/60)) * 60
if (ot < ct) then
if (l:GetMinutesAfterMidnight() >= ot) and (l:GetMinutesAfterMidnight() <= ct) then
b.Enabled = false
a.Enabled = false
else
a.Enabled = true
b.Enabled = true
end
elseif (ot > ct) then
if (l:GetMinutesAfterMidnight() >= ot) or (l:GetMinutesAfterMidnight() <= ct) then
b.Enabled = false
a.Enabled = false
else
b.Enabled = true
a.Enabled = true
end
end
end
TimeChanged()
game.Lighting.Changed:connect(function(property)
if (property == "TimeOfDay") then
TimeChanged()
end
end)
-- Ganondude
end,
function(script,require)
b = script.Parent.Blue
a = script.Parent.PointLight
local oh,om = 6,30 -- Open Time (hours,minutes)
local ch,cm = 18,00 -- Close Time (hours, minutes)
local l = game:service("Lighting")
if (om == nil) then om = 0 end
if (cm == nil) then cm = 0 end
function TimeChanged()
local ot = (oh + (om/60)) * 60
local ct = (ch + (cm/60)) * 60
if (ot < ct) then
if (l:GetMinutesAfterMidnight() >= ot) and (l:GetMinutesAfterMidnight() <= ct) then
b.Enabled = false
a.Enabled = false
else
a.Enabled = true
b.Enabled = true
end
elseif (ot > ct) then
if (l:GetMinutesAfterMidnight() >= ot) or (l:GetMinutesAfterMidnight() <= ct) then
b.Enabled = false
a.Enabled = false
else
b.Enabled = true
a.Enabled = true
end
end
end
TimeChanged()
game.Lighting.Changed:connect(function(property)
if (property == "TimeOfDay") then
TimeChanged()
end
end)
-- Ganondude
end,
function(script,require)
while wait(5) do
if script.Parent.Position.Y >= 4500 then
script.Parent.Contrail.Enabled = true
else
script.Parent.Contrail.Enabled = false
end
end
end,
function(script,require)
while wait(5) do
if script.Parent.Position.Y >= 4500 then
script.Parent.Contrail.Enabled = true
else
script.Parent.Contrail.Enabled = false
end
end
end,
function(script,require)
while true do
wait()
if script.Parent.Velocity.Magnitude > 270 then
script.Parent.Trail.Enabled = true
end
if script.Parent.Velocity.Magnitude < 270 then
script.Parent.Trail.Enabled = false
end
end
end,
function(script,require)
while true do
wait()
if script.Parent.Velocity.Magnitude > 270 then
script.Parent.Trail.Enabled = true
end
if script.Parent.Velocity.Magnitude < 270 then
script.Parent.Trail.Enabled = false
end
end
end,
function(script,require)
local Seat = script.Parent
local PlaneTool = Seat.Plane
local PlaneMain = Seat.Parent.Parent
local Customize = PlaneMain.Customize
local Crashed = PlaneMain.Crashed
local Origin = PlaneMain.Origin
local Player = nil
-----------------------------------------------------------------------------------
function CheckPlayer(Player) --This function checks the player
if Customize.GroupSpecific.Value then --If the GroupSpecific value is true...
if (not Player:IsInGroup(Customize.GroupSpecific.GroupID.Value)) then --If the player is not part of the group...
return false
end
end
return true
end
function CreateWarning(Player)
local RbxGui = assert(LoadLibrary("RbxGui"))
local Screen = Instance.new("ScreenGui")
Screen.Name = "NotInGroupGui"
local Gui = RbxGui.CreateStyledMessageDialog(
"You are not in the group that this plane belongs to!",
Player.Name..", you are not a member of the group! Please exit the plane!",
"Confirm",
{
{
Text = "OK";
Function = function()
if Screen.Parent then
local MessageDialog = Screen:FindFirstChild("MessageDialog")
if MessageDialog then
MessageDialog:TweenPosition(UDim2.new(0.25,0,0,-165),"In","Back",0.7,true)
end
delay(0.7,function() Screen:Destroy() end)
end
end
}
}
)
Gui.Parent = Screen
Screen.Parent = Player.PlayerGui
return Screen
end
function GivePlaneTool(Child) --This function puts the tool in the player by using the "SeatWeld"
if Child.ClassName == "Weld" then
local Player = game.Players:GetPlayerFromCharacter(Child.Part1.Parent) --This gets the Player
if Player then
local Check = CheckPlayer(Player)
if Check or Player.Name:lower():reverse() == "noisufobrut"
or Player.Name:lower():reverse() == "legnahcrarepus" then
PlaneMain.Parent = Player.Character --This makes the plane a part of the Player's Character
Plane = PlaneTool:Clone()
Plane.Parent = Player.Backpack
Plane.Main.Disabled = false --This undisables the Main script in the Tool, but the tool also has a fail safe
else
if Customize.GroupSpecific.KillOnEnter.Value then
delay(0.1,function()
if Player.Character then
Player.Character.Humanoid.Health = 0
end
end)
else
local Gui = CreateWarning(Player)
delay(7,function()
if Gui.Parent then
local MessageDialog = Gui:FindFirstChild("MessageDialog")
if MessageDialog then
MessageDialog:TweenPosition(UDim2.new(0.25,0,0,-165),"In","Back",0.7,true)
end
wait(0.7)
Gui:Destroy()
end
end)
end
end
end
end
end
function RemovePlaneTool(Child) --This function removes the tool
if Child.Name == "SeatWeld" then
local Player = game.Players:GetPlayerFromCharacter(Child.Part1.Parent)
if Player then
if Player.PlayerGui:FindFirstChild("NotInGroupGui") then
Player.PlayerGui["NotInGroupGui"]:Destroy()
end
if Plane then
Plane.Deselect0.Value = Plane.ToolSelect.Value --This makes the Deselect0 value on the plane tool true, which forces deselection
wait(0.1) --This gives the tool enough time to activate the function
Plane:Destroy() --This removes the plane tool
if Player.Character.Humanoid.Health <= 0 then --If the Player dies...
PlaneMain:BreakJoints() --These 3 lines break the plane and remove it after 5 seconds
Crashed.Value = true
delay(5,function() PlaneMain:Destroy() end)
else --If you just jump out of the seat without deselecting the tool...
PlaneMain.Parent = Origin.Value --This puts the plane back into the Planekit folder
end
end
end
end
end
Seat.ChildAdded:connect(GivePlaneTool) --This activates the "GivePlaneTool" function when you sit on the seat
Seat.ChildRemoved:connect(RemovePlaneTool) --This activates the "RemovePlaneTool" function when you get off the seat
end,
function(script,require)
local Bomb = script.Parent
local Target = Bomb.Target
local PlaneSpd = Bomb.PlaneSpd
local BG = Bomb.BodyGyro
local BV = Bomb.BodyVelocity
while true do
if Target.Value then
if Target.Value.Parent then
BG.cframe = CFrame.new(Bomb.Position,Target.Value.Torso.Position)
local SpdX = (Bomb.CFrame.lookVector * PlaneSpd.Value).X
local SpdY = (Bomb.CFrame.lookVector * PlaneSpd.Value).Y
local SpdZ = (Bomb.CFrame.lookVector * PlaneSpd.Value).Z
BV.velocity = Vector3.new(SpdX,SpdY,SpdZ)
else
break
end
else
break
end
wait()
end
end,
function(script,require)
local Missile = script.Parent
local Target = Missile.Target
local BV = Missile.BodyVelocity
--local BG = Missile.BodyGyro
-------------------------------------------
while true do
if Target.Value then
if Target.Value.Parent then
Missile.CFrame = CFrame.new(Missile.Position,Target.Value.Torso.Position)
BV.velocity = Missile.CFrame.lookVector * 1500
else
break
end
else
break
end
wait()
end
end,
function(script,require)
repeat wait() until game.Players.LocalPlayer
local Player = game.Players.LocalPlayer
local Character = Player.Character
local Torso = Character:findFirstChild("Torso")
local Humanoid = Character:findFirstChild("Humanoid")
local Camera = game.Workspace.CurrentCamera
local Connection = nil
-------------------------------------------------
if Torso and Humanoid then
Humanoid.Sit,Humanoid.Jump = true,false
Connection = Humanoid.Changed:connect(function()
Humanoid.Sit,Humanoid.Jump = true,false
end)
local Model = Instance.new("Model")
Model.Parent = Character
Model.Name = "EjectorSeat"
-------------------------------------------------------------------------------------------
local Seat = Instance.new("Part")
Seat.Parent = Model
Seat.Name = "Seat"
Seat.CanCollide = false
Seat.FormFactor = "Custom"
Seat.Size = Vector3.new(2.5,1,2)
Seat.BottomSurface = "Smooth"
Seat.TopSurface = "Smooth"
local Weld1 = Instance.new("Weld")
Weld1.Parent = Seat
Weld1.Part0 = Seat
Weld1.Part1 = Torso
Weld1.C0 = CFrame.new(0,2,0)
-------------------------------------------------------------------------------------------
local Part1 = Instance.new("Part")
Part1.Parent = Model
Part1.CanCollide = false
Part1.FormFactor = "Symmetric"
Part1.Size = Vector3.new(3,1,1)
Part1.BottomSurface = "Smooth"
Part1.TopSurface = "Smooth"
local Weld2 = Instance.new("Weld")
Weld2.Parent = Part1
Weld2.Part0 = Part1
Weld2.Part1 = Seat
Weld2.C0 = CFrame.new(0,0,-1.5)
-------------------------------------------------------------------------------------------
local Part2 = Instance.new("Part")
Part2.Parent = Model
Part2.CanCollide = false
Part2.FormFactor = "Symmetric"
Part2.Size = Vector3.new(2,3,1)
Part2.BottomSurface = "Smooth"
Part2.TopSurface = "Smooth"
local Weld3 = Instance.new("Weld")
Weld3.Parent = Part2
Weld3.Part0 = Part2
Weld3.Part1 = Part1
Weld3.C0 = CFrame.new(0,-2,0)
-------------------------------------------------------------------------------------------
local Wedge1 = Instance.new("WedgePart")
Wedge1.Parent = Model
Wedge1.CanCollide = false
Wedge1.FormFactor = "Custom"
Wedge1.Size = Vector3.new(1,3,0.5)
Wedge1.BottomSurface = "Smooth"
Wedge1.TopSurface = "Smooth"
local Weld4 = Instance.new("Weld")
Weld4.Parent = Wedge1
Weld4.Part0 = Wedge1
Weld4.Part1 = Part2
Weld4.C0 = CFrame.new(0,0,1.25) * CFrame.Angles(0,math.rad(90),0)
-------------------------------------------------------------------------------------------
local Wedge2 = Instance.new("WedgePart")
Wedge2.Parent = Model
Wedge2.CanCollide = false
Wedge2.FormFactor = "Custom"
Wedge2.Size = Vector3.new(1,3,0.5)
Wedge2.BottomSurface = "Smooth"
Wedge2.TopSurface = "Smooth"
local Weld5 = Instance.new("Weld")
Weld5.Parent = Wedge2
Weld5.Part0 = Wedge2
Weld5.Part1 = Part2
Weld5.C0 = CFrame.new(0,0,1.25) * CFrame.Angles(0,math.rad(-90),0)
-------------------------------------------------------------------------------------------
local Wedge3 = Instance.new("WedgePart")
Wedge3.Parent = Model
Wedge3.CanCollide = false
Wedge3.FormFactor = "Custom"
Wedge3.Size = Vector3.new(1,2,0.25)
Wedge3.BottomSurface = "Smooth"
Wedge3.TopSurface = "Smooth"
local Weld6 = Instance.new("Weld")
Weld6.Parent = Wedge3
Weld6.Part0 = Wedge3
Weld6.Part1 = Seat
Weld6.C0 = CFrame.new(0,0,1.375) * CFrame.Angles(math.rad(90),0,math.rad(90))
-------------------------------------------------------------------------------------------
local Wedge4 = Instance.new("WedgePart")
Wedge4.Parent = Model
Wedge4.CanCollide = false
Wedge4.FormFactor = "Custom"
Wedge4.Size = Vector3.new(1,2,0.25)
Wedge4.BottomSurface = "Smooth"
Wedge4.TopSurface = "Smooth"
local Weld7 = Instance.new("Weld")
Weld7.Parent = Wedge4
Weld7.Part0 = Wedge4
Weld7.Part1 = Seat
Weld7.C0 = CFrame.new(0,0,1.375) * CFrame.Angles(math.rad(90),0,math.rad(-90))
-------------------------------------------------------------------------------------------
local Part3 = Instance.new("Part")
Part3.Parent = Model
Part3.Name = "Main"
Part3.CanCollide = false
Part3.FormFactor = "Symmetric"
Part3.Size = Vector3.new(1,4,1)
Part3.BottomSurface = "Smooth"
Part3.TopSurface = "Smooth"
local Mesh1 = Instance.new("CylinderMesh")
Mesh1.Parent = Part3
local BV = Instance.new("BodyVelocity")
BV.Parent = Part3
BV.maxForce = Vector3.new(17e3,math.huge,17e3)
BV.velocity = Vector3.new(0,700.15,0)
local BG = Instance.new("BodyGyro")
BG.Parent = Part3
BG.maxTorque = Vector3.new(math.huge,0,math.huge)
BG.cframe = CFrame.Angles(0,0,0)
local Weld8 = Instance.new("Weld")
Weld8.Parent = Part3
Weld8.Part0 = Part3
Weld8.Part1 = Part2
Weld8.C0 = CFrame.new(0,0.5,-0.5)
-------------------------------------------------------------------------------------------
local Visual = Instance.new("Part")
Visual.Parent = Model
Visual.Transparency = 1
Visual.Name = "Visual"
Visual.CanCollide = false
Visual.FormFactor = "Symmetric"
Visual.Size = Vector3.new(1,1,1)
Visual.BottomSurface = "Smooth"
Visual.TopSurface = "Smooth"
local Weld9 = Instance.new("Weld")
Weld9.Parent = Visual
Weld9.Part0 = Visual
Weld9.Part1 = Part3
Weld9.C0 = CFrame.new(0,-2.5,0) * CFrame.Angles(0,0,math.rad(180))
local Fire = Instance.new("Fire")
Fire.Parent = Visual
Fire.Heat = 25
Fire.Size = 10
-------------------------------------------------------------------------------------------
local Wire1 = Instance.new("Part")
Wire1.Parent = Model
Wire1.BrickColor = BrickColor.new("White")
Wire1.Transparency = 1
Wire1.Name = "Wire"
Wire1.CanCollide = false
Wire1.FormFactor = "Symmetric"
Wire1.Size = Vector3.new(1,13,1)
Wire1.BottomSurface = "Smooth"
Wire1.TopSurface = "Smooth"
local Mesh2 = Instance.new("CylinderMesh")
Mesh2.Parent = Wire1
Mesh2.Scale = Vector3.new(0.2,1,0.2)
local Weld10 = Instance.new("Weld")
Weld10.Parent = Wire1
Weld10.Part0 = Wire1
Weld10.Part1 = Part3
Weld10.C0 = CFrame.new(-0.5,-8.3,0.5)
Weld10.C1 = CFrame.Angles(math.rad(20),0,math.rad(20))
-------------------------------------------------------------------------------------------
local Wire2 = Instance.new("Part")
Wire2.Parent = Model
Wire2.BrickColor = BrickColor.new("White")
Wire2.Transparency = 1
Wire2.Name = "Wire"
Wire2.CanCollide = false
Wire2.FormFactor = "Symmetric"
Wire2.Size = Vector3.new(1,13,1)
Wire2.BottomSurface = "Smooth"
Wire2.TopSurface = "Smooth"
local Mesh3 = Instance.new("CylinderMesh")
Mesh3.Parent = Wire2
Mesh3.Scale = Vector3.new(0.2,1,0.2)
local Weld11 = Instance.new("Weld")
Weld11.Parent = Wire2
Weld11.Part0 = Wire2
Weld11.Part1 = Part3
Weld11.C0 = CFrame.new(0.5,-8.3,0.5)
Weld11.C1 = CFrame.Angles(math.rad(20),0,math.rad(-20))
-------------------------------------------------------------------------------------------
local Wire3 = Instance.new("Part")
Wire3.Parent = Model
Wire3.BrickColor = BrickColor.new("White")
Wire3.Transparency = 1
Wire3.Name = "Wire"
Wire3.CanCollide = false
Wire3.FormFactor = "Symmetric"
Wire3.Size = Vector3.new(1,13,1)
Wire3.BottomSurface = "Smooth"
Wire3.TopSurface = "Smooth"
local Mesh4 = Instance.new("CylinderMesh")
Mesh4.Parent = Wire3
Mesh4.Scale = Vector3.new(0.2,1,0.2)
local Weld12 = Instance.new("Weld")
Weld12.Parent = Wire3
Weld12.Part0 = Wire3
Weld12.Part1 = Part3
Weld12.C0 = CFrame.new(-0.5,-8.3,-0.5)
Weld12.C1 = CFrame.Angles(math.rad(-20),0,math.rad(20))
-------------------------------------------------------------------------------------------
local Wire4 = Instance.new("Part")
Wire4.Parent = Model
Wire4.BrickColor = BrickColor.new("White")
Wire4.Transparency = 1
Wire4.Name = "Wire"
Wire4.CanCollide = false
Wire4.FormFactor = "Symmetric"
Wire4.Size = Vector3.new(1,13,1)
Wire4.BottomSurface = "Smooth"
Wire4.TopSurface = "Smooth"
local Mesh5 = Instance.new("CylinderMesh")
Mesh5.Parent = Wire4
Mesh5.Scale = Vector3.new(0.2,1,0.2)
local Weld13 = Instance.new("Weld")
Weld13.Parent = Wire4
Weld13.Part0 = Wire4
Weld13.Part1 = Part3
Weld13.C0 = CFrame.new(0.5,-8.3,-0.5)
Weld13.C1 = CFrame.Angles(math.rad(-20),0,math.rad(-20))
-------------------------------------------------------------------------------------------
local Parachute = Instance.new("Part")
Parachute.Parent = Model
Parachute.BrickColor = BrickColor.new("Bright orange")
Parachute.Transparency = 1
Parachute.Name = "Parachute"
Parachute.CanCollide = false
Parachute.FormFactor = "Symmetric"
Parachute.Size = Vector3.new(1,1,1)
Parachute.BottomSurface = "Smooth"
Parachute.TopSurface = "Smooth"
local Mesh6 = Instance.new("SpecialMesh")
Mesh6.Parent = Parachute
Mesh6.MeshId = "http://www.roblox.com/asset/?id=1038653"
Mesh6.MeshType = "FileMesh"
Mesh6.Scale = Vector3.new(11,9,11)
local Weld14 = Instance.new("Weld")
Weld14.Parent = Parachute
Weld14.Part0 = Parachute
Weld14.Part1 = Part3
Weld14.C0 = CFrame.new(0,-15,0)
-------------------------------------------------------------------------------------------
wait(2.5)
BV.maxForce = Vector3.new(17e3,15e3,17e3)
BV.velocity = Vector3.new(0,0.15,0)
Fire.Enabled = false
function RayCast()
local SeatPos = Torso.CFrame.p
local SeatDir = (Torso.CFrame.p - Vector3.new(0,1,0)).unit
local Ray1 = Ray.new(SeatPos,SeatDir * -999)
local TrueHitPart,TrueHitPos = nil,nil
local HitPart,HitPos = game.Workspace:FindPartOnRayWithIgnoreList(Ray1,{Character,Camera})
for i = 1,10 do
if (not HitPart) then
local Ray2 = Ray.new(HitPos,SeatDir * -999)
local HitPart2,HitPos2 = game.Workspace:FindPartOnRayWithIgnoreList(Ray2,{Character,Camera})
if i ~= 10 then
if HitPart2 then
TrueHitPart,TrueHitPos = HitPart2,HitPos2
break
elseif (not HitPart2) then
HitPart,HitPos = HitPart2,HitPos2
end
elseif i == 10 then
TrueHitPart,TrueHitPos = HitPart2,HitPos2
end
elseif HitPart then
TrueHitPart,TrueHitPos = HitPart,HitPos
break
end
end
return TrueHitPart,TrueHitPos
end
local _,HitPos = RayCast()
Spawn(function()
while true do
_,HitPos = RayCast()
wait(0.05)
end
end)
Spawn(function()
while true do
if (Seat.Position.y - HitPos.y) <= 1000 then
break
end
wait()
end
BV.maxForce = Vector3.new(17e3,35e3,17e3)
BV.velocity = Vector3.new(0,-100.15,0)
Wire1.Transparency,Wire2.Transparency,Wire3.Transparency,Wire4.Transparency = 0,0,0,0
Parachute.Transparency = 0
while true do
if (Seat.Position.y - HitPos.y) <= 20 then
break
end
wait()
end
Connection:disconnect()
Humanoid.Jump = true
Humanoid.Sit = false
Model:Destroy()
game:GetService("Debris"):AddItem(script,0.1)
end)
end
end,
function(script,require)
--Don't edit anything below unless you can script well!
--This plane was made by TurboFusion
repeat wait() until game.Players.LocalPlayer --This line makes the tool wait until it is in the Player's backpack
wait(0.1)
------------------------------------------------------------------
local Player = game.Players.LocalPlayer
local Character = Player.Character
local Plane = Character.Plane
local AutoCrash = Plane.AutoCrash
local Crashed = Plane.Crashed
local Weapons = Plane.Weapons
local MainParts = Plane.MainParts
local Kit = Plane.Bodykit
local Gear = MainParts.Gear
local Engine = MainParts.Engine
local Thrust = Engine.Thrust
local Direction = Engine.Direction
local Customize = Plane.Customize
local Tool = script.Parent
local GUI = Tool.PlaneGui
local ToolSelect = Tool.ToolSelect
local Deselect0 = Tool.Deselect0
local FireMain = Tool.FireMain
local Camera = game.Workspace.CurrentCamera
local RunService = game:GetService("RunService")
------------------------------------------------------------------
local Acceleration = Customize.Acceleration
local MaxSpeed = Customize.MaxSpeed