Advertisement
lafur

Untitled

May 19th, 2020
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 85.61 KB | None | 0 0
  1. -- Converted using Mokiros's Model to Script plugin
  2. -- Converted string size: 20181
  3. local genv={}
  4. local Scripts = {
  5. function() --------
  6. -- Gateship Script
  7. -- version 9
  8. --------
  9. -- by Ganondude
  10. --------
  11. -- Released: December 31, 2013
  12. -- Last Updated: December 31, 2013
  13. --------
  14.  
  15.  
  16. -- For advanced users: Documentation on the public properties and functions can be found at the bottom of this script.
  17.  
  18.  
  19. --------
  20. -- General Settings:
  21.  
  22. local speedMax = 200 -- The ship's maximum speed.
  23.  
  24. local acceleration = 5 -- Factor affecting the ship's rate of acceleration.
  25. local maneuverability = 5 -- Factor affecting the rate at which the ship can turn.
  26.  
  27. local speedEnergy = speedMax*0.75 -- The speed at which additional energy is consumed.
  28. local speedDrivePod = speedMax*0.5 -- The speed at which the drive pods are automatically extended.
  29.  
  30. local energyMax = 1000 -- The ship's maximum energy.
  31. local energyRegen = 10 -- The amount of energy restored per second.
  32.  
  33. local cloakDrain = 6 -- The amount of energy lost per second while cloaked.
  34. local shieldDrain = 14 -- The amount of energy lost per second while shielded.
  35. local speedDrain = 0.25 -- The amount of energy lost per second for every unit of speed above speedEnergy.
  36.  
  37. local minCloakEnergy = 100 -- Minimum amount of energy required to engage the cloak.
  38. local minShieldEnergy = 150 -- Minimum amount of energy required to engage the shield.
  39.  
  40. --------
  41. -- Weapon Settings:
  42.  
  43. local weaponDamage = 25 -- The damage done by a single shot to another ship.
  44. local weaponCooldown = 1.5 -- The time required between shots.
  45.  
  46. local shieldDamage = 16 -- The amount of energy drained when weapons impact a shield as a factor of weaponDamage. (shieldDamage*weaponDamage = energy drained)
  47. local teamDamage = 0.5 -- The amount of damage done to team mates' ships as a factor of weaponDamage.
  48.  
  49. local explosionPressure = 10 -- The pressure of a shot's explosion.
  50. local explosionRadius = 8 -- The radius of a shot's explosion.
  51.  
  52. local canCauseCraters = false -- If true, explosions caused by ship's weapons can create craters in terrain.
  53. local firingAngle = math.pi/8 -- The maximum angle between the front of the ship and the mouse when firing weapons.
  54.  
  55.  
  56. --------
  57. -- DHD Settings:
  58.  
  59. local dhdEnabled = true -- If true, the ship will be able to remotely dial a Stargate.
  60.  
  61. local dhdRange = 200 -- The maximum range of the ship's DHD.
  62. local dhdDialMode = 2 -- The Stargate dial mode used by the ship's DHD.
  63.  
  64.  
  65. --------
  66. -- Aesthetic Settings:
  67.  
  68. local shieldColour = "Bright blue" -- The colour of the ship's shield.
  69. local shieldTransparency = 0.8 -- The transparency of the ship's shield.
  70.  
  71. local weaponsColour = "Cool yellow" -- The colour of the ship's weapon fire.
  72.  
  73. local useTeamColourForHull = false -- If true, the ship's hull will be recoloured to match the pilot's team colour.
  74. local useTeamColourForThrusters = true -- If true, the ship's engines will be recoloured to match pilot's team colour.
  75. local useTeamColourForShield = false -- If true, the ship's shield will be recoloured to match the pilot's team colour.
  76. local useTeamColourForWeapons = true -- If true, the ship's weapons will be recoloured to match the pilot's team colour.
  77.  
  78.  
  79. --------
  80. -- Advanced Settings:
  81.  
  82. local lifespan = 600 -- The amount of time (in seconds) that will pass before an unoccupied ship will remove itself.
  83. local despawnRange = 100 -- The minimum distance required between the ship and any player before it will remove itself.
  84.  
  85. local seatNames = {"PilotSeat","CopilotSeat","CockpitSeat","PassengerSeat"} -- The names of the seats, in order of control privileges.
  86.  
  87. local leftPodNames = {"LJoint1","LJoint2","LPart1","LPart2","LThruster"} -- The names of parts in the left drive pod.
  88. local rightPodNames = {"RJoint1","RJoint2","RPart1","RPart2","RThruster"} -- The names of parts in the right drive pod.
  89.  
  90. local leftWeaponNames = {"LJoint3","LPart3","LDrone"} -- The names of parts in the left weapon pod.
  91. local rightWeaponNames ={"RJoint3","RPart3","RDrone"} -- The names of parts in the right weapon pod.
  92.  
  93. local guiName = "GateshipGui" -- The name of the control GUI (a child of this script) to be given to passengers.
  94.  
  95.  
  96. ----
  97. --------
  98. -- Do not alter anything below this point.
  99. --------
  100. ----
  101.  
  102.  
  103. local ALL
  104.  
  105. local isCloaked = false
  106. local isShielded = false
  107.  
  108. local isMidOpen = false
  109. local isRearOpen = false
  110. local isPodsOpen = true
  111. local isWeaponsOpen = true
  112.  
  113. local isCloakDisabled = false
  114. local isShieldDisabled = false
  115. local isWeaponsDisabled = false
  116.  
  117. local isForwardLightOn = false
  118.  
  119. local isCloaking = false
  120. local isShielding = false
  121.  
  122. local isMidMoving = false
  123. local isRearMoving = false
  124. local isPodsMoving = false
  125. local isWeaponsMoving = false
  126.  
  127. local isFiring = false
  128.  
  129. local isUpdating = false
  130.  
  131. local hasBeenActive = false
  132.  
  133. --
  134.  
  135. local energy = energyMax
  136. local energyChange = 0
  137.  
  138. local fireSide = -1
  139.  
  140. local initialRearDoorAngle = 0
  141.  
  142. local tSinceLastActive = 0
  143.  
  144. local passengersCloaked = {}
  145. --setmetatable(passengersCloaked, {__mode = "k"})
  146.  
  147. local passengersShielded = {}
  148. --setmetatable(passengersShielded, {__mode = "k"})
  149.  
  150. local originalHullColour
  151. local originalThrusterColour
  152.  
  153. local deathconn
  154.  
  155. --
  156.  
  157. local this = {
  158. -- Properties:
  159. Model,
  160. MainPart,
  161.  
  162. VehicleHealth,
  163. TeamColor,
  164. Neutral,
  165.  
  166. EngineActive,
  167. CloakActive,
  168. ShieldActive,
  169.  
  170. MidOpen,
  171. RearOpen,
  172. PodsOpen,
  173. WeaponsOpen,
  174.  
  175. ForwardLightOn,
  176.  
  177. DHD,
  178. Energy,
  179. Fire,
  180.  
  181. Speed,
  182. Acceleration,
  183. Maneuverability,
  184. MaxSpeed,
  185.  
  186. -- Methods:
  187. IsActive = function() return isActive() end,
  188. GetPassengers = function() return getPassengers() end,
  189. HasPassengers = function() return (#getPassengers() > 0) end,
  190.  
  191. IsPassenger = function(self,value) return isPassenger(value) end,
  192.  
  193. GetPilot = function() return getPilot() end,
  194. GetCopilot = function() return getCopilot() end,
  195.  
  196. DisableCloak = function(self,value)
  197. if (isCloakDisabled) then return end
  198. isCloakDisabled = true
  199.  
  200. if (value) then
  201. wait(value)
  202. isCloakDisabled = false
  203. end
  204. end,
  205. DisableShield = function(self,value)
  206. if (isShieldDisabled) then return end
  207. isShieldDisabled = true
  208.  
  209. if (value) then
  210. wait(value)
  211. isShieldDisabled = false
  212. end
  213. end,
  214. DisableWeapons = function(self,value)
  215. if (isWeaponsDisabled) then return end
  216. isWeaponsDisabled = true
  217.  
  218. if (value) then
  219. wait(value)
  220. isWeaponsDisabled = false
  221. end
  222. end,
  223.  
  224. EnableCloak = function() isCloakDisabled = false end,
  225. EnableShield = function() isShieldDisabled = false end,
  226. EnableWeapons = function() isWeaponsDisabled = false end,
  227.  
  228. Repair = function(self,value) self.VehicleHealth.Value = self.VehicleHealth.Value + math.abs(value) end,
  229. TakeDamage = function(self,value1,value2) takeDamage(value1,value2) end,
  230. }
  231.  
  232. --------
  233. -- Status Functions:
  234.  
  235. function isActive()
  236. return this.EngineActive.Value
  237. end
  238.  
  239. function isPassenger(character)
  240. if (not character) then return end
  241. local t = getPassengers()
  242.  
  243. for i = 1,#t do
  244. if (character == t[i]) then return true end
  245. end
  246.  
  247. return false
  248. end
  249.  
  250. --------
  251. -- Get Functions:
  252.  
  253. function getCenter()
  254. return this.MainPart.CFrame*CFrame.new(0,5,0)
  255. end
  256.  
  257. function getPilot()
  258. return getSittingIn(this.Model:FindFirstChild(seatNames[1]))
  259. end
  260.  
  261. function getCoPilot()
  262. return getSittingIn(this.Model:FindFirstChild(seatNames[2]))
  263. end
  264.  
  265. function getPassengers()
  266. local list = {}
  267.  
  268. for k,v in pairs(game.Players:GetPlayers()) do
  269. local character = v.Character
  270. if (character) and (character.Humanoid.Health > 0) and (contains(character:FindFirstChild("Torso"))) then
  271. table.insert(list,character)
  272. end
  273. end
  274.  
  275. return list
  276. end
  277.  
  278. function getSittingIn(seat)
  279. if (not seat) then return end
  280.  
  281. local seatWeld = seat:findFirstChild("SeatWeld")
  282.  
  283. if (seatWeld) and (seatWeld.Part1) then
  284. local torso = seatWeld.Part1
  285. local character = torso.Parent
  286.  
  287. local h = character:findFirstChild("Humanoid")
  288. if (h) and (h.Health > 0) then
  289. return character
  290. end
  291. end
  292.  
  293. return nil
  294. end
  295.  
  296. --------
  297. -- Find Functions:
  298.  
  299. function findPartsInModel(nameList)
  300. local list = {}
  301.  
  302. if (not nameList) or (#nameList == 0) then return list end
  303.  
  304. for k,v in pairs(this.Model:GetChildren()) do
  305. if (v:IsA("BasePart")) then
  306. for i = 1,#nameList do
  307. if (string.find(string.lower(v.Name),string.lower(nameList[i]))) then
  308. table.insert(list,v)
  309. end
  310. end
  311. end
  312. end
  313.  
  314. return list
  315. end
  316.  
  317. --------
  318. -- Part Spawning Functions:
  319.  
  320. function spawnShield()
  321. local cf = getCenter()
  322. local z = this.MainPart.Size.Z
  323.  
  324. local p = Instance.new("Part",this.Model)
  325. p.Name = "Shield"
  326. p.Anchored = false
  327. p.Archivable = false
  328. p.CanCollide = false
  329. --p.Locked = true
  330. p.BottomSurface = 0 -- Smooth
  331. p.TopSurface = 0 -- Smooth
  332. p.FormFactor = 0 -- Symmetric
  333. p.Size = Vector3.new(1,1,1)
  334. p.BrickColor = BrickColor.new(shieldColour)
  335. p.Material = 256 -- Plastic
  336. p.Reflectance = 0
  337. p.Transparency = shieldTransparency
  338.  
  339. p.CFrame = cf*CFrame.new(0,-0.8,4)
  340.  
  341. local m = Instance.new("SpecialMesh",p)
  342. m.MeshType = 3 -- Sphere
  343. m.Scale = Vector3.new(z*1.15,z*0.65,z*1.6)
  344.  
  345. weld(this.MainPart,p)
  346.  
  347. if (useTeamColourForShield) then
  348. local player = game.Players:GetPlayerFromCharacter(getPilot())
  349. if (player) and (not player.Neutral) then
  350. p.BrickColor = player.TeamColor
  351. end
  352. end
  353.  
  354. return p
  355. end
  356.  
  357. function spawnWeaponShot()
  358. local cf = getCenter()
  359.  
  360. local p = Instance.new("Part",game.Workspace)
  361. p.Name = "Drone"
  362. p.Anchored = false
  363. p.Archivable = true
  364. p.CanCollide = true
  365. --p.Locked = true
  366. p.BottomSurface = 0 -- Smooth
  367. p.TopSurface = 0 -- Smooth
  368. p.FormFactor = 3 -- Custom
  369. p.Size = Vector3.new(1.25,1.25,2.5)
  370. p.BrickColor = BrickColor.new(weaponsColour)
  371. p.Material = 256 -- Plastic
  372. p.Reflectance = 0.2
  373. p.Transparency = 0
  374.  
  375. local m = Instance.new("SpecialMesh",p)
  376. m.MeshType = 3 -- Sphere
  377. m.Scale = Vector3.new(1,1,1)
  378.  
  379. if (useTeamColourForWeapons) then
  380. local player = game.Players:GetPlayerFromCharacter(getPilot())
  381. if (player) and (not player.Neutral) then
  382. p.BrickColor = player.TeamColor
  383. end
  384. end
  385.  
  386. local l = Instance.new("PointLight",p)
  387. l.Brightness = 1
  388. l.Color = p.BrickColor.Color
  389. l.Range = 6
  390.  
  391. return p
  392. end
  393.  
  394. --------
  395. -- Animation Functions:
  396.  
  397. function animMidDoor(open)
  398. if (isMidDoorMoving) or (open == isMidOpen) then
  399. this.MidOpen.Value = not isMidOpen
  400. return
  401. end
  402. isMidDoorMoving = true
  403.  
  404. local engine = this.MainPart
  405. local leftDoor = this.Model:FindFirstChild("MidDoorLeft")
  406. local rightDoor = this.Model:FindFirstChild("MidDoorRight")
  407.  
  408. local wl,wr
  409.  
  410. local n = (open) and 1 or -1
  411.  
  412. for i = 1,25 do
  413. wl = wl or getJointConnecting(leftDoor,engine)
  414. if (wl) then
  415. local cf = leftDoor.CFrame*CFrame.new(-0.1*n,0,0)
  416. wl.C0 = cf:inverse()*CFrame.new(cf.p)
  417. wl.C1 = engine.CFrame:inverse()*CFrame.new(cf.p)
  418. end
  419.  
  420. wr = wr or getJointConnecting(rightDoor,engine)
  421. if (wr) then
  422. local cf = rightDoor.CFrame*CFrame.new(0.1*n,0,0)
  423. wr.C0 = cf:inverse()*CFrame.new(cf.p)
  424. wr.C1 = engine.CFrame:inverse()*CFrame.new(cf.p)
  425. end
  426.  
  427. wait(0.02)
  428. end
  429.  
  430. isMidOpen = open
  431.  
  432. isMidDoorMoving = false
  433. end
  434.  
  435. function animRearDoor(open)
  436. if (isRearDoorMoving) or ((this.ShieldActive.Value) and (open)) then
  437. this.RearOpen.Value = not isRearOpen
  438. return
  439. end
  440. isRearDoorMoving = true
  441.  
  442. local engine = this.MainPart
  443. local rearDoor = this.Model:FindFirstChild("RearDoor")
  444.  
  445. local w
  446.  
  447. repeat
  448. local n = (open) and 1 or -1
  449.  
  450. local rotPoint = engine.CFrame*CFrame.new(0,0,engine.Size.Z/2 - 0.651) --0.538
  451. local angle = getAngleBetween(engine.CFrame.lookVector,rearDoor.CFrame.lookVector*-1)
  452.  
  453. w = w or getJointConnecting(rearDoor,engine)
  454. if (w) then
  455. local cf = (rotPoint*CFrame.Angles(math.rad(n),0,0)):toWorldSpace(rotPoint:toObjectSpace(rearDoor.CFrame))
  456. w.C0 = cf:inverse()*CFrame.new(cf.p)
  457. w.C1 = engine.CFrame:inverse()*CFrame.new(cf.p)
  458. end
  459.  
  460. wait()
  461. until ((open) and (angle >= math.pi - 0.02)) or ((not open) and (angle <= initialRearDoorAngle + 0.02))
  462.  
  463. isRearOpen = open
  464.  
  465. isRearDoorMoving = false
  466. end
  467.  
  468. function animDrivePods(open)
  469. if (isPodsMoving) or (open == isPodsOpen) then return end
  470. isPodsMoving = true
  471.  
  472. local engine = this.MainPart
  473. local leftDrive = findPartsInModel(leftPodNames)
  474. local rightDrive = findPartsInModel(rightPodNames)
  475.  
  476. local n = (isPodsOpen) and -1 or 1
  477. local c = (isPodsOpen) and 18 or 1
  478.  
  479. local jl0 = this.Model:FindFirstChild("LJoint1")
  480. local jl1 = this.Model:FindFirstChild("LJoint2")
  481. local jr0 = this.Model:FindFirstChild("RJoint1")
  482. local jr1 = this.Model:FindFirstChild("RJoint2")
  483.  
  484. local wl0,wl1,wr0,wr1
  485.  
  486. for i = 1,18 do
  487. local hor1 = (c < 15) and (engine.CFrame*CFrame.Angles(0,math.pi/2,0)).lookVector*0.5*-n or Vector3.new(0,0,0) -- move horizontally
  488. local hor2 = (c < 17) and (engine.CFrame*CFrame.Angles(0,math.pi/2,0)).lookVector*0.5*-n or Vector3.new(0,0,0) -- move horizontally
  489. local ver = (c > 12) and (engine.CFrame*CFrame.Angles(math.pi/2,0,0)).lookVector*0.5*n or Vector3.new(0,0,0) -- move vertically
  490.  
  491. if (jl0) and (jl1) then
  492. wl0 = wl0 or getJointConnecting(jl0,engine)
  493. if (wl0) then
  494. local cf = jl0.CFrame - hor1
  495. wl0.C0 = cf:inverse()*CFrame.new(cf.p)
  496. wl0.C1 = engine.CFrame:inverse()*CFrame.new(cf.p)
  497. end
  498.  
  499. wl1 = wl1 or getJointConnecting(jl1,engine)
  500. if (wl1) then
  501. local cf = jl1.CFrame - hor2 + ver
  502. wl1.C0 = cf:inverse()*CFrame.new(cf.p)
  503. wl1.C1 = engine.CFrame:inverse()*CFrame.new(cf.p)
  504. end
  505. end
  506.  
  507. if (jr0) and (jr1) then
  508. wr0 = wr0 or getJointConnecting(jr0,engine)
  509. if (wr0) then
  510. local cf = jr0.CFrame + hor1
  511. wr0.C0 = cf:inverse()*CFrame.new(cf.p)
  512. wr0.C1 = engine.CFrame:inverse()*CFrame.new(cf.p)
  513. end
  514.  
  515. wr1 = wr1 or getJointConnecting(jr1,engine)
  516. if (wr1) then
  517. local cf = jr1.CFrame + hor2 + ver
  518. wr1.C0 = cf:inverse()*CFrame.new(cf.p)
  519. wr1.C1 = engine.CFrame:inverse()*CFrame.new(cf.p)
  520. end
  521. end
  522.  
  523. if (c == 8) then
  524. for k,v in pairs(leftDrive) do
  525. if (v:IsA("BasePart")) and (v.Name:find("2") or v.Name:find("Thruster")) then
  526. v.Transparency = (n > 0) and engine.Transparency or 1
  527. v.CanCollide = (n > 0)
  528. end
  529. end
  530.  
  531. for k,v in pairs(rightDrive) do
  532. if (v:IsA("BasePart")) and (v.Name:find("2") or v.Name:find("Thruster")) then
  533. v.Transparency = (n > 0) and engine.Transparency or 1
  534. v.CanCollide = (n > 0)
  535. end
  536. end
  537. end
  538.  
  539. c = c + n
  540.  
  541. wait(0.1)
  542. end
  543.  
  544. isPodsOpen = open
  545.  
  546. isPodsMoving = false
  547. end
  548.  
  549. function animWeaponPods(open)
  550. if (isWeaponsMoving) or (open == isWeaponsOpen) then return end
  551. isWeaponsMoving = true
  552.  
  553. local engine = this.MainPart
  554. local leftWeapons = findPartsInModel(leftWeaponNames)
  555. local rightWeapons = findPartsInModel(rightWeaponNames)
  556.  
  557. local n = (isWeaponsOpen) and -1 or 1
  558. local c = (isWeaponsOpen) and 6 or 1
  559.  
  560. local jl = this.Model:FindFirstChild("LJoint3")
  561. local jr = this.Model:FindFirstChild("RJoint3")
  562.  
  563. local wl,wr
  564.  
  565. for i = 1,6 do
  566. local hor = (c < 15) and (engine.CFrame*CFrame.Angles(0,math.pi/2,0)).lookVector*0.5*-n or Vector3.new(0,0,0) -- move horizontally
  567.  
  568. if (jl) then
  569. wl = wl or getJointConnecting(jl,engine)
  570. if (wl) then
  571. local cf = jl.CFrame - hor
  572. wl.C0 = cf:inverse()*CFrame.new(cf.p)
  573. wl.C1 = engine.CFrame:inverse()*CFrame.new(cf.p)
  574. end
  575. end
  576.  
  577. if (jr) then
  578. wr = wr or getJointConnecting(jr,engine)
  579. if (wr) then
  580. local cf = jr.CFrame + hor
  581. wr.C0 = cf:inverse()*CFrame.new(cf.p)
  582. wr.C1 = engine.CFrame:inverse()*CFrame.new(cf.p)
  583. end
  584. end
  585.  
  586. if (c == 3) then
  587. for k,v in pairs(leftWeapons) do
  588. if (v:IsA("BasePart")) and (v.Name:find("Drone")) then
  589. v.Transparency = (n > 0) and engine.Transparency or 1
  590. v.CanCollide = (n > 0)
  591. end
  592. end
  593.  
  594. for k,v in pairs(rightWeapons) do
  595. if (v:IsA("BasePart")) and (v.Name:find("Drone")) then
  596. v.Transparency = (n > 0) and engine.Transparency or 1
  597. v.CanCollide = (n > 0)
  598. end
  599. end
  600. end
  601.  
  602. c = c + n
  603.  
  604. wait(0.1)
  605. end
  606.  
  607. isWeaponsOpen = open
  608.  
  609. isWeaponsMoving = false
  610. end
  611.  
  612. --------
  613. -- Changed Event Functions:
  614.  
  615. function onActiveChanged()
  616. local bg = this.MainPart:FindFirstChild("BodyGyro")
  617. local bp = this.MainPart:FindFirstChild("BodyPosition")
  618. local bv = this.MainPart:FindFirstChild("BodyVelocity")
  619.  
  620. if (this.EngineActive.Value) then
  621. hasBeenActive = true
  622.  
  623. bg.cframe = this.MainPart.CFrame
  624.  
  625. bg.maxTorque = Vector3.new(4e4,4e4,4e4)
  626. bv.maxForce = Vector3.new(4e8,4e8,4e8)
  627.  
  628. bp.position = this.MainPart.Position + Vector3.new(0,2,0)
  629.  
  630. this.RearOpen.Value = false
  631. this.Speed.Value = acceleration*2
  632. else
  633. bg.maxTorque = Vector3.new(0,0,0)
  634. bv.maxForce = Vector3.new(0,0,0)
  635.  
  636. bp.maxForce = Vector3.new(0,0,0)
  637.  
  638. while (isCloaking) do wait() end
  639. this.CloakActive.Value = false
  640.  
  641. while (isShielding) do wait() end
  642. this.ShieldActive.Value = false
  643.  
  644. this.MidOpen.Value = true
  645. this.RearOpen.Value = true
  646. this.PodsOpen.Value = false
  647. this.Speed.Value = 0
  648. end
  649.  
  650. update()
  651. end
  652.  
  653. function onHealthChanged()
  654. local h = this.VehicleHealth.Value
  655.  
  656. if (h <= 0) then
  657. local tag = this.Model:FindFirstChild("creator")
  658. if (tag) then
  659. for k,v in pairs(getPassengers()) do
  660. local cTag = tag:Clone()
  661. cTag.Parent = v.Humanoid
  662.  
  663. game.Debris:AddItem(cTag,2)
  664. end
  665. end
  666.  
  667. destroy()
  668.  
  669. local ex = Instance.new("Explosion")
  670. ex.BlastPressure = math.random(3e5,5e5)
  671. ex.BlastRadius = math.random(10,25)
  672. ex.Position = (getCenter()*CFrame.new(math.random(-4,4),0,math.random(-8,4))).p
  673. ex.Parent = game.Workspace
  674.  
  675. game.Debris:AddItem(ex,2)
  676. end
  677. end
  678.  
  679. function onCloakChanged()
  680. cloak(this.CloakActive.Value)
  681.  
  682. update()
  683. end
  684.  
  685. function onShieldChanged()
  686. shield(this.ShieldActive.Value)
  687.  
  688. update()
  689. end
  690.  
  691. function onPodsOpenChanged()
  692. local open = this.PodsOpen.Value
  693. local absSpeed = math.abs(this.Speed.Value)
  694.  
  695. if (isPodsMoving) or (open == isPodsOpen) or (open and (not isActive())) then
  696. this.PodsOpen.Value = not isPodsOpen
  697. return
  698. end
  699.  
  700. while (isWeaponsMoving) do wait() end
  701.  
  702. if (open) then
  703. animDrivePods(open)
  704. this.WeaponsOpen.Value = open
  705. else
  706. if (this.Speed.Value > speedDrivePod) then
  707. local f = function()
  708. for i = this.Speed.Value,speedDrivePod,-acceleration do
  709. this.Speed.Value = i
  710. wait()
  711. end
  712. this.Speed.Value = speedDrivePod
  713. end
  714. Spawn(f)
  715. end
  716.  
  717. this.WeaponsOpen.Value = open
  718. animDrivePods(open)
  719. end
  720. end
  721.  
  722. function onWeaponsOpenChanged()
  723. local open = this.WeaponsOpen.Value
  724.  
  725. if (isWeaponsMoving) or (open == isWeaponsOpen) or (open and (not isActive())) or (open and (isPodsOpen == isPodsMoving)) or (isWeaponsDisabled) then
  726. this.WeaponsOpen.Value = isWeaponsOpen
  727. else
  728. animWeaponPods(open)
  729. end
  730. end
  731.  
  732. function onForwardLightChanged()
  733. isForwardLightOn = this.ForwardLightOn.Value
  734.  
  735. if (this.Model:FindFirstChild("ForwardLightPart")) then
  736. this.Model.ForwardLightPart.SpotLight.Enabled = isForwardLightOn
  737. end
  738. end
  739.  
  740. function onDHDChanged()
  741. if (this.DHD.Value == "") or (_G.all_Stargates == nil) then return end
  742.  
  743. local sg = _G.all_Stargates[1]:FindByProximity(this.MainPart.Position,dhdRange)
  744.  
  745. if (sg) and (not sg:IsActive()) and (string.find(this.DHD.Value,sg:GetActivationChar())) then
  746. sg.DialMode.Value = dhdDialMode
  747. sg.Destination.Value = this.DHD.Value
  748.  
  749. sg.Destination.Changed:wait()
  750.  
  751. this.DHD.Value = ""
  752. elseif (not sg) or (sg:IsActive()) then
  753. wait()
  754. this.DHD.Value = ""
  755. end
  756. end
  757.  
  758. function onSpeedChanged()
  759. if (isActive()) then
  760. this.Speed.Value = (this.Speed.Value < speedMax/-2) and speedMax/-2 or ((this.Speed.Value > speedMax) and speedMax or this.Speed.Value) -- -speedMax/2 <= this.Speed.Value <= speedMax
  761.  
  762. if (this.Speed.Value == 0) then
  763. this.MainPart.BodyPosition.maxForce = Vector3.new(8e8,8e8,8e8)
  764. this.MainPart.BodyPosition.position = this.MainPart.Position
  765. else
  766. this.MainPart.BodyPosition.maxForce = Vector3.new(0,0,0)
  767. end
  768.  
  769. if (not isPodsOpen) and (math.abs(this.Speed.Value) > speedDrivePod) then
  770. this.PodsOpen.Value = true
  771. end
  772. else
  773. this.Speed.Value = 0
  774. end
  775.  
  776. update()
  777. end
  778.  
  779. --------
  780. -- ChildAdded/Removed Event Functions:
  781.  
  782. function onAddedToSeat(seat,child)
  783. if (not child:IsA("Weld")) or (this.VehicleHealth.Value <= 0) then return end
  784.  
  785. local torso = child.Part1
  786. local character = torso.Parent
  787.  
  788. if (torso) and (character) then
  789. local player = game.Players:GetPlayerFromCharacter(character)
  790. if (player) then
  791. local gui = script:FindFirstChild(guiName):Clone()
  792. gui.Parent = player.PlayerGui
  793.  
  794. local mVal = Instance.new("ObjectValue",gui)
  795. mVal.Name = "Model"
  796. mVal.Value = this.Model
  797.  
  798. local cVal = Instance.new("IntValue",gui)
  799. cVal.Name = "ControlLevel"
  800. for k,v in pairs(seatNames) do
  801. if (v == seat.Name) then
  802. cVal.Value = k
  803. break
  804. end
  805. end
  806.  
  807. if (seat.Name == seatNames[1]) then
  808. this.TeamColor.Value = player.TeamColor
  809. this.Neutral.Value = player.Neutral
  810.  
  811. if (not player.Neutral) then
  812. for k,v in pairs(this.Model:GetChildren()) do
  813. if (v:IsA("BasePart")) then
  814. if (useTeamColourForHull) and (v.BrickColor == originalHullColour) then
  815. v.BrickColor = player.TeamColor
  816. end
  817. if (useTeamColourForThrusters) and (v.Name:find("Thruster") or v.Name:find("Joint2")) then
  818. v.BrickColor = player.TeamColor
  819. end
  820. if (useTeamColourForWeapons) and (v.Name:find("Drone")) then
  821. v.BrickColor = player.TeamColor
  822. end
  823. end
  824. end
  825. end
  826.  
  827. deathconn = player.CharacterRemoving:connect(function()
  828. wait()
  829. if (#getPassengers() == 0) then
  830. this.EngineActive.Value = false
  831. else
  832. for i = 1,math.abs(this.Speed.Value),acceleration do
  833. this.Speed.Value = this.Speed.Value - i*(this.Speed.Value > 0 and 1 or -1)
  834. wait(0.1)
  835. end
  836. this.Speed.Value = 0
  837. end
  838. end)
  839. end
  840. end
  841. end
  842. end
  843.  
  844. function onRemovedFromSeat(seat,child)
  845. if (not child:IsA("Weld")) then return end
  846.  
  847. local torso = child.Part1
  848. local character = torso.Parent
  849.  
  850. if (torso) and (character) then
  851. local player = game.Players:GetPlayerFromCharacter(character)
  852. if (player) then
  853. local gui = player.PlayerGui:FindFirstChild(guiName)
  854. if (gui) then
  855. gui.RemoveGui.Value = true
  856. game.Debris:AddItem(gui,1)
  857. end
  858.  
  859. if (seat.Name == seatNames[1]) then
  860. if (character) and (character.Humanoid.Health <= 0) then
  861. player.CharacterRemoving:wait()
  862. wait()
  863. end
  864.  
  865. this.Neutral.Value = true
  866.  
  867. if (not player.Neutral) then
  868. for k,v in pairs(this.Model:GetChildren()) do
  869. if (v:IsA("BasePart")) then
  870. if (useTeamColourForHull) and (v.BrickColor == player.TeamColor) then
  871. v.BrickColor = originalHullColour
  872. end
  873. if (useTeamColourForThrusters) and (v.Name:find("Thruster") or v.Name:find("Joint2")) then
  874. v.BrickColor = originalThrusterColour
  875. end
  876. if (useTeamColourForWeapons) and (v.Name:find("Drone")) then
  877. v.BrickColor = BrickColor.new(weaponsColour)
  878. end
  879. end
  880. end
  881. end
  882.  
  883. if (deathconn) then
  884. deathconn:disconnect()
  885. end
  886. end
  887. end
  888. end
  889. end
  890.  
  891. function onAddedToFire(child)
  892. if (not isFiring) then
  893. isFiring = true
  894.  
  895. local v = child.Value
  896.  
  897. local v0 = this.MainPart.CFrame.lookVector
  898. local v1 = (v - this.MainPart.Position).unit
  899.  
  900. local a = math.acos(v1:Dot(v0))
  901.  
  902. if (a <= firingAngle) then -- inside of cone
  903. fire(v)
  904. wait(weaponCooldown)
  905. elseif (v == Vector3.new(0,0,0)) then
  906. fire()
  907. wait(weaponCooldown)
  908. end
  909.  
  910. isFiring = false
  911. end
  912.  
  913. wait()
  914. child:Destroy()
  915. end
  916.  
  917. --------
  918. -- Touched Event Functions:
  919.  
  920. function onWeaponShotTouched(shot,hit)
  921. if (not shot) or (not hit) or (not hit.Parent) or (not hit.CanCollide) or (hit:IsDescendantOf(this.Model)) then return end
  922.  
  923. local player = game.Players:GetPlayerFromCharacter(getPilot())
  924.  
  925. local teamColor = hit.Parent:FindFirstChild("TeamColor")
  926. local neutral = (teamColor) and teamColor:FindFirstChild("Neutral")
  927.  
  928. local isNeutral = (neutral and neutral.Value) or this.Neutral.Value
  929. local isSameTeam = (not isNeutral) and (teamColor and teamColor.Value == this.TeamColor.Value)
  930.  
  931. local dmg = weaponDamage*(isSameTeam and teamDamage or 1)
  932. local bp = explosionPressure
  933.  
  934. local obj = getFromModel(hit.Parent)
  935. if (obj) then
  936. obj:TakeDamage(dmg,player)
  937. bp = 0
  938. elseif (not obj) and (hit.Parent:FindFirstChild("VehicleHealth")) then
  939. hit.Parent.VehicleHealth.Value = hit.Parent.VehicleHealth.Value - (hit.Parent:FindFirstChild("VehicleShield") and 0 or dmg)
  940. bp = 0
  941. end
  942.  
  943. local ex = Instance.new("Explosion")
  944. ex.BlastPressure = bp
  945. ex.BlastRadius = explosionRadius
  946. ex.ExplosionType = (canCauseCraters) and 1 or 0
  947. ex.Position = shot.Position
  948.  
  949. if (bp > 0) then
  950. ex.Hit:connect(function(hit)
  951. if (hit.Parent) and (hit.Parent:FindFirstChild("Humanoid")) and (player) then
  952. local tag = Instance.new("ObjectValue",hit.Parent.Humanoid)
  953. tag.Name = "creator"
  954. tag.Value = player
  955.  
  956. game.Debris:AddItem(tag,2)
  957. end
  958. end)
  959. end
  960.  
  961. ex.Parent = game.Workspace
  962. game.Debris:AddItem(ex,2)
  963.  
  964. shot:Destroy()
  965. end
  966.  
  967. --------
  968. -- Special Functions:
  969.  
  970. function contains(part)
  971. if (part == nil) or (not part:IsA("BasePart")) or (part:IsDescendantOf(this.Model)) then return false end
  972.  
  973. local c = getCenter()*CFrame.new(0,0,3)
  974.  
  975. local h = this.MainPart.Size.Z + 6
  976. local r = 7 -- known value (radius of ship hull)
  977. local up = c.lookVector
  978.  
  979. if ((part.Position - c.p).magnitude > math.min(h,r*2)) then return false end
  980.  
  981. for i = -1,1,2 do
  982. local a = up*i
  983. local b = part.Position - (c.p - a*h/2)
  984. local dot = a:Dot(b)
  985. if (dot > h) or (dot < 0) then return false end
  986. end
  987.  
  988. return (Ray.new(c.p - up*h/2, up):Distance(part.Position) <= r)
  989. end
  990.  
  991. function takeDamage(amount,creator)
  992. amount = math.abs(amount) or 0
  993. local vHealth = this.VehicleHealth
  994. local h0 = vHealth.Value
  995. local h1 = vHealth.Value
  996.  
  997. if (isShielded) then
  998. energyChange = energyChange - amount*shieldDamage
  999.  
  1000. local f = function()
  1001. local shield = this.Model:FindFirstChild("Shield")
  1002.  
  1003. for i = 0,shieldTransparency,0.1 do
  1004. if (not shield.Parent) then break end
  1005. shield.Transparency = i
  1006. wait(0.1)
  1007. end
  1008. end
  1009. Spawn(f)
  1010. else
  1011. h1 = h0 - amount
  1012. end
  1013.  
  1014. if (h0 > 0) and (h1 <= 0) and (creator) then
  1015. local tag = Instance.new("ObjectValue",this.Model)
  1016. tag.Name = "creator"
  1017. tag.Value = creator
  1018.  
  1019. game.Debris:AddItem(tag,2)
  1020. end
  1021.  
  1022. vHealth.Value = h1
  1023. end
  1024.  
  1025. function cloak(on)
  1026. if (this.ShieldActive.Value) or (on and energy < minCloakEnergy) then this.CloakActive.Value = false return end
  1027. if (isCloaking) then this.CloakActive.Value = not isCloaked return end
  1028. if (isCloaked == on) then return end
  1029.  
  1030. isCloaking = true
  1031.  
  1032. if (on) then
  1033. if (not isActive()) then this.CloakActive.Value = false return end
  1034.  
  1035. for k,v in pairs(getPassengers()) do
  1036. recursiveTransparency(v,1)
  1037.  
  1038. if (v:FindFirstChild("Head")) then
  1039. v.Head.face.Transparency = 1
  1040. end
  1041.  
  1042. if (v:FindFirstChild("Torso")) then
  1043. v.Torso.roblox.Transparency = 1
  1044. end
  1045.  
  1046. passengersCloaked[v] = true
  1047. end
  1048.  
  1049. for i = 1,10 do
  1050. recursiveTransparency(this.Model,i/10)
  1051. wait(0.1)
  1052. end
  1053. else
  1054. for i = 9,0,-1 do
  1055. recursiveTransparency(this.Model,i/10)
  1056. wait(0.1)
  1057. end
  1058.  
  1059. for k,v in pairs(this.Model:GetChildren()) do
  1060. if (v.Name == "Window") then
  1061. v.Transparency = 0.6
  1062. elseif (v.Name == "Shield") then
  1063. v.Transparency = shieldTransparency
  1064. else
  1065. if (not isPodsOpen) and (not isPodsMoving) then
  1066. for i = 1,#leftPodNames do
  1067. if (v.Name == leftPodNames[i]) and (v.Name:find("2") or v.Name:find("Thruster")) then
  1068. v.Transparency = 1
  1069. break
  1070. end
  1071. end
  1072.  
  1073. for i = 1,#rightPodNames do
  1074. if (v.Name == rightPodNames[i]) and (v.Name:find("2") or v.Name:find("Thruster")) then
  1075. v.Transparency = 1
  1076. break
  1077. end
  1078. end
  1079. end
  1080.  
  1081. if (not isWeaponsOpen) and (not isWeaponsMoving) and (v.Name:find("Drone")) then
  1082. v.Transparency = 1
  1083. end
  1084. end
  1085. end
  1086.  
  1087. for k,v in pairs(getPassengers()) do
  1088. recursiveTransparency(v,0)
  1089.  
  1090. if (v:FindFirstChild("Head")) then
  1091. v.Head.face.Transparency = 0
  1092. end
  1093.  
  1094. if (v:FindFirstChild("Torso")) then
  1095. v.Torso.roblox.Transparency = 0
  1096. end
  1097.  
  1098. passengersCloaked[v] = false
  1099. end
  1100. end
  1101.  
  1102. isCloaked = on
  1103.  
  1104. isCloaking = false
  1105. end
  1106.  
  1107. function shield(on)
  1108. if (this.CloakActive.Value) or (on and energy < minShieldEnergy) then this.ShieldActive.Value = false return end
  1109. if (isShielding) then this.ShieldActive.Value = not isShielded return end
  1110. if (isShielded == on) then return end
  1111. isShielding = true
  1112.  
  1113. local shield = (on) and spawnShield() or this.Model:FindFirstChild("Shield")
  1114.  
  1115. if (on) then
  1116. local ff = Instance.new("ForceField",this.Model)
  1117. ff.Name = "VehicleShield"
  1118.  
  1119. for k,v in pairs(getPassengers()) do
  1120. ff:Clone().Parent = v
  1121.  
  1122. passengersShielded[v] = true
  1123. end
  1124. else
  1125. for k,v in pairs(passengersShielded) do
  1126. if (k:FindFirstChild("VehicleShield")) then
  1127. k.VehicleShield:Destroy()
  1128. end
  1129.  
  1130. passengersShielded[k] = false
  1131. end
  1132.  
  1133. local ff = this.Model:FindFirstChild("VehicleShield")
  1134. if (ff) then
  1135. ff:Destroy()
  1136. end
  1137.  
  1138. if (shield) then
  1139. shield:Destroy()
  1140. end
  1141. end
  1142.  
  1143. isShielded = on
  1144.  
  1145. isShielding = false
  1146. end
  1147.  
  1148. function fire(targetPos)
  1149. if (not isActive()) or (isCloaked) or (isShielded) or (not isWeaponsOpen) then return end
  1150.  
  1151. local engine = this.MainPart
  1152.  
  1153. local p = spawnWeaponShot()
  1154. local bv = Instance.new("BodyVelocity",p)
  1155.  
  1156. local pos = (engine.CFrame*CFrame.new(12*fireSide,3,-18)).p
  1157. local dir = (targetPos) and (targetPos - pos).unit or engine.CFrame.lookVector
  1158.  
  1159. p.BodyVelocity.velocity = engine.Velocity + dir*200
  1160. p.CFrame = CFrame.new(pos,pos + dir)
  1161.  
  1162. fireSide = fireSide*-1
  1163.  
  1164. game.Debris:AddItem(p,30)
  1165.  
  1166. p.Touched:connect(function(hit) onWeaponShotTouched(p,hit) end)
  1167. end
  1168.  
  1169. function useEnergy()
  1170. local en = energy
  1171. local regen = energyRegen/10
  1172.  
  1173. local speed = this.Speed.Value
  1174. local absSpeed = math.abs(speed)
  1175.  
  1176. en = en + energyChange
  1177. energyChange = 0
  1178.  
  1179. if (isCloaked) then
  1180. en = en - cloakDrain/10
  1181. end
  1182.  
  1183. if (isShielded) then
  1184. en = en - shieldDrain/10
  1185. end
  1186.  
  1187. if (absSpeed >= speedEnergy) then
  1188. en = en - (absSpeed - speedEnergy)*speedDrain/10
  1189. end
  1190.  
  1191. if (en <= 0) then
  1192. this.CloakActive.Value = false
  1193. this.ShieldActive.Value = false
  1194.  
  1195. if (absSpeed > speedEnergy) and (absSpeed > 0) then
  1196. this.Speed.Value = speedEnergy*(speed/absSpeed)
  1197. end
  1198.  
  1199. en = 0
  1200. end
  1201.  
  1202. en = ((en == energy) and math.min(en + regen,energyMax) or en) -- regen only if nothing else consuming energy
  1203.  
  1204. energy = en
  1205. end
  1206.  
  1207. function unanchorShip(model,mainPart)
  1208. if (model == nil) or (mainPart == nil) then return end
  1209.  
  1210. local jl0 = this.Model:FindFirstChild("LJoint1")
  1211. local jl1 = this.Model:FindFirstChild("LJoint2")
  1212. local jl2 = this.Model:FindFirstChild("LJoint3")
  1213. local jr0 = this.Model:FindFirstChild("RJoint1")
  1214. local jr1 = this.Model:FindFirstChild("RJoint2")
  1215. local jr2 = this.Model:FindFirstChild("RJoint3")
  1216.  
  1217. mainPart.Anchored = true
  1218.  
  1219. for k,v in pairs(model:GetChildren()) do
  1220. if (v:IsA("BasePart")) then
  1221. for i = 1,#leftPodNames do
  1222. if (v.Name:find(leftPodNames[i])) and (v ~= jl0) and (v ~= jl1) then
  1223. if (v.Name:find("1")) then
  1224. weld(v,jl0)
  1225. else
  1226. weld(v,jl1)
  1227. end
  1228.  
  1229. v.Anchored = false
  1230. end
  1231. end
  1232.  
  1233. for i = 1,#rightPodNames do
  1234. if (v.Name:find(rightPodNames[i])) and (v ~= jr0) and (v ~= jr1) then
  1235. if (v.Name:find("1")) then
  1236. weld(v,jr0)
  1237. else
  1238. weld(v,jr1)
  1239. end
  1240.  
  1241. v.Anchored = false
  1242. end
  1243. end
  1244.  
  1245. for i = 1,#leftWeaponNames do
  1246. if (v.Name:find(leftWeaponNames[i])) and (v ~= jl2) then
  1247. weld(v,jl2)
  1248.  
  1249. v.Anchored = false
  1250. end
  1251. end
  1252.  
  1253. for i = 1,#rightWeaponNames do
  1254. if (v.Name:find(rightWeaponNames[i])) and (v ~= jr2) then
  1255. weld(v,jr2)
  1256.  
  1257. v.Anchored = false
  1258. end
  1259. end
  1260.  
  1261. if (v.Anchored) and (v ~= mainPart) then
  1262. weld(v,mainPart)
  1263. v.Anchored = false
  1264. end
  1265. end
  1266. end
  1267.  
  1268. mainPart.Anchored = false
  1269. end
  1270.  
  1271. function destroy(t)
  1272. t = t or 1
  1273.  
  1274. this.EngineActive.Value = false
  1275.  
  1276. for k,v in pairs(game.JointsService:GetChildren()) do
  1277. if (v:IsA("Weld")) and ((v.Part0 and v.Part0:IsDescendantOf(this.Model)) or (v.Part1 and v.Part1:IsDescendantOf(this.Model))) then
  1278. v.Part0 = nil
  1279. v.Part1 = nil
  1280.  
  1281. game.Debris:AddItem(v,t + 1/30)
  1282. end
  1283. end
  1284.  
  1285. for k,v in pairs(this.MainPart:GetChildren()) do
  1286. v:Destroy()
  1287. end
  1288.  
  1289. this.Model:BreakJoints()
  1290.  
  1291. game.Debris:AddItem(this.Model,t)
  1292. end
  1293.  
  1294. function deteriorate()
  1295. if (not getPilot()) then
  1296. local isPlayerInRange = false
  1297.  
  1298. for k,v in pairs(game.Players:GetPlayers()) do
  1299. if (v.Character) and ((v.Character:GetModelCFrame().p - this.MainPart.Position).magnitude < despawnRange) then
  1300. isPlayerInRange = true
  1301. break
  1302. end
  1303. end
  1304.  
  1305. if (isPlayerInRange) then -- counter heads back to 0 if player(s) near ship
  1306. tSinceLastActive = (tSinceLastActive <= 0) and 0 or tSinceLastActive - 1
  1307. elseif (not isPlayerInRange) and (not isCloaked) and (not isShielded) then
  1308. tSinceLastActive = tSinceLastActive + 1
  1309. end
  1310.  
  1311. if (tSinceLastActive > lifespan*10) then -- function is run 10 times/second
  1312. destroy(0)
  1313. end
  1314. else
  1315. tSinceLastActive = 0 -- reset counter if pilot is present
  1316. end
  1317. end
  1318.  
  1319. function update()
  1320. if (isUpdating) then return end
  1321. isUpdating = true
  1322.  
  1323. local engine = this.MainPart
  1324.  
  1325. repeat
  1326. if (isActive()) then
  1327. engine.BodyVelocity.velocity = engine.CFrame.lookVector*math.min(this.Speed.Value,speedMax)
  1328. end
  1329.  
  1330. useEnergy()
  1331. this.Energy.Value = energy
  1332.  
  1333. if (isCloaked) then
  1334. local players = game.Players:GetPlayers()
  1335.  
  1336. for i = 1,#players do
  1337. local character = players[i].Character
  1338. if (character) then
  1339. if (isPassenger(character)) then -- if is passenger
  1340. if (not passengersCloaked[character]) then -- but is not cloaked
  1341. recursiveTransparency(character,1)
  1342.  
  1343. if (character:FindFirstChild("Head")) then
  1344. character.Head.face.Transparency = 1
  1345. end
  1346.  
  1347. if (character:FindFirstChild("Torso")) then
  1348. character.Torso.roblox.Transparency = 1
  1349. end
  1350.  
  1351. passengersCloaked[character] = true
  1352. end
  1353. else -- if is not passenger
  1354. if (passengersCloaked[character]) then -- but is cloaked
  1355. recursiveTransparency(character,0)
  1356.  
  1357. if (character:FindFirstChild("Head")) then
  1358. character.Head.face.Transparency = 0
  1359. end
  1360.  
  1361. if (character:FindFirstChild("Torso")) then
  1362. character.Torso.roblox.Transparency = 0
  1363. end
  1364.  
  1365. passengersCloaked[character] = false
  1366. end
  1367. end
  1368. end
  1369. end
  1370. end
  1371.  
  1372. if (isShielded) then
  1373. local players = game.Players:GetPlayers()
  1374.  
  1375. for i = 1,#players do
  1376. local character = players[i].Character
  1377. if (character) then
  1378. if (isPassenger(character)) then -- if is passenger
  1379. if (not passengersShielded[character]) then -- but is not shielded
  1380. local s = Instance.new("ForceField",character)
  1381. s.Name = "VehicleShield"
  1382.  
  1383. passengersShielded[character] = true
  1384. end
  1385. else -- if is not passenger
  1386. if (passengersShielded[character]) then -- but is shielded
  1387. local s = character:FindFirstChild("VehicleShield")
  1388. if (s) then
  1389. s:Destroy()
  1390. end
  1391.  
  1392. passengersShielded[character] = false
  1393. end
  1394. end
  1395. end
  1396. end
  1397. end
  1398.  
  1399. if (isCloakDisabled) then
  1400. this.CloakActive.Value = false
  1401. end
  1402.  
  1403. if (isShieldDisabled) then
  1404. this.ShieldActive.Value = false
  1405. end
  1406.  
  1407. if (isWeaponsDisabled) then
  1408. this.WeaponsOpen.Value = false
  1409. end
  1410.  
  1411. if (hasBeenActive) then -- don't deteriorate ship until it's been active at least once
  1412. deteriorate()
  1413. end
  1414.  
  1415. wait(0.1)
  1416. until (not isActive()) and (energy == energyMax)
  1417.  
  1418. isUpdating = false
  1419. end
  1420.  
  1421. --------
  1422. -- General Functions:
  1423.  
  1424. function getAngleBetween(a,b)
  1425. return math.acos(a:Dot(b)) -- in radians
  1426. end
  1427.  
  1428. function getJointConnecting(a,b,type)
  1429. if (a == nil) or (b == nil) then return end
  1430. type = type or "Weld"
  1431.  
  1432. for k,v in pairs(game.JointsService:GetChildren()) do
  1433. if (v:IsA(type)) and ((v.Part0 == a and v.Part1 == b) or (v.Part0 == b and v.Part1 == a)) then
  1434. return v
  1435. end
  1436. end
  1437. end
  1438.  
  1439. function recursiveAnchor(parent,anchored)
  1440. if (parent == nil) then return end
  1441. if (anchored == nil) then anchored = true end
  1442.  
  1443. for k,v in pairs(parent:GetChildren()) do
  1444. if (v:IsA("BasePart")) then
  1445. v.Anchored = anchored
  1446. end
  1447.  
  1448. if (#v:GetChildren() > 0) then
  1449. recursiveAnchor(v)
  1450. end
  1451. end
  1452. end
  1453.  
  1454. function recursiveTransparency(parent,trans)
  1455. if (parent == nil) then return end
  1456. trans = trans or 0
  1457.  
  1458. for k,v in pairs(parent:GetChildren()) do
  1459. if (v:IsA("BasePart")) then
  1460. v.Transparency = trans
  1461. elseif (v:IsA("Accoutrement")) or (v:IsA("Tool")) then
  1462. v.Handle.Transparency = trans
  1463. end
  1464.  
  1465. if (#v:GetChildren() > 0) then
  1466. recursiveTransparency(v,trans)
  1467. end
  1468. end
  1469. end
  1470.  
  1471. function weld(a,b)
  1472. local w = Instance.new("Weld")
  1473. w.Part0 = a
  1474. w.Part1 = b
  1475. w.C0 = a.CFrame:inverse()*CFrame.new(a.Position)
  1476. w.C1 = b.CFrame:inverse()*CFrame.new(a.Position)
  1477. w.Parent = game.JointsService
  1478. game.JointsService.ChildRemoved:connect(function(c)
  1479. if (c == w) then weld(a,b) end
  1480. end)
  1481. end
  1482.  
  1483. --------
  1484. -- Global Functions
  1485.  
  1486. function getFromModel(model)
  1487. for k,v in pairs(ALL) do
  1488. if (v.Model == model) then
  1489. return v
  1490. end
  1491. end
  1492. end
  1493.  
  1494. function findByPilot(character)
  1495. for k,v in pairs(ALL) do
  1496. if (v:GetPilot() == character) then
  1497. return v
  1498. end
  1499. end
  1500. end
  1501.  
  1502.  
  1503. --------
  1504. -- Main
  1505.  
  1506. if (_G.Gateship == nil) then
  1507. _G.Gateship = {
  1508. List = {},
  1509.  
  1510. GetFromModel = function(self,model) getFromModel(model) end,
  1511. FindByPilot = function(self,character) findByPilot(character) end,
  1512. }
  1513. end
  1514. ALL = _G.Gateship.List
  1515.  
  1516. --
  1517.  
  1518. local model = script.Parent
  1519.  
  1520. recursiveAnchor(model)
  1521. if (model) and (model:IsA("Model")) then
  1522. this.Model = model
  1523.  
  1524. this.MainPart = this.Model:FindFirstChild("Engine")
  1525. assert(this.MainPart,"Gateship engine not found.")
  1526.  
  1527. --
  1528.  
  1529. this.EngineActive = this.Model:FindFirstChild("EngineActive") or Instance.new("BoolValue",model)
  1530. this.EngineActive.Name = "EngineActive"
  1531. this.EngineActive.Changed:connect(onActiveChanged)
  1532.  
  1533. this.VehicleHealth = this.Model:FindFirstChild("VehicleHealth") or Instance.new("NumberValue",model)
  1534. this.VehicleHealth.Name = "VehicleHealth"
  1535. this.VehicleHealth.Value = (this.VehicleHealth.Value == 0) and 100 or this.VehicleHealth.Value
  1536. this.VehicleHealth.Changed:connect(onHealthChanged)
  1537.  
  1538. this.TeamColor = this.Model:FindFirstChild("TeamColor") or Instance.new("BrickColorValue",model)
  1539. this.TeamColor.Name = "TeamColor"
  1540. this.TeamColor.Value = BrickColor.new("Medium stone grey")
  1541.  
  1542. this.Neutral = this.TeamColor:FindFirstChild("Neutral") or Instance.new("BoolValue",this.TeamColor)
  1543. this.Neutral.Name = "Neutral"
  1544. this.Neutral.Value = true
  1545.  
  1546. this.CloakActive = this.Model:FindFirstChild("CloakActive") or Instance.new("BoolValue",model)
  1547. this.CloakActive.Name = "CloakActive"
  1548. this.CloakActive.Changed:connect(onCloakChanged)
  1549.  
  1550. this.ShieldActive = this.Model:FindFirstChild("ShieldActive") or Instance.new("BoolValue",model)
  1551. this.ShieldActive.Name = "ShieldActive"
  1552. this.ShieldActive.Changed:connect(onShieldChanged)
  1553.  
  1554. this.MidOpen = this.Model:FindFirstChild("MidOpen") or Instance.new("BoolValue",model)
  1555. this.MidOpen.Name = "MidOpen"
  1556. this.MidOpen.Changed:connect(function() animMidDoor(this.MidOpen.Value) end)
  1557.  
  1558. this.RearOpen = this.Model:FindFirstChild("RearOpen") or Instance.new("BoolValue",model)
  1559. this.RearOpen.Name = "RearOpen"
  1560. this.RearOpen.Changed:connect(function() animRearDoor(this.RearOpen.Value) end)
  1561.  
  1562. this.PodsOpen = this.Model:FindFirstChild("PodsOpen") or Instance.new("BoolValue",model)
  1563. this.PodsOpen.Name = "PodsOpen"
  1564. this.PodsOpen.Changed:connect(onPodsOpenChanged)
  1565.  
  1566. this.WeaponsOpen = this.Model:FindFirstChild("WeaponsOpen") or Instance.new("BoolValue",model)
  1567. this.WeaponsOpen.Name = "WeaponsOpen"
  1568. this.WeaponsOpen.Changed:connect(onWeaponsOpenChanged)
  1569.  
  1570. this.ForwardLightOn = this.Model:FindFirstChild("ForwardLightOn") or Instance.new("BoolValue",model)
  1571. this.ForwardLightOn.Name = "ForwardLightOn"
  1572. this.ForwardLightOn.Changed:connect(onForwardLightChanged)
  1573.  
  1574. this.DHD = this.Model:FindFirstChild("DHD") or Instance.new("StringValue",model)
  1575. this.DHD.Name = "DHD"
  1576. this.DHD.Changed:connect(onDHDChanged)
  1577.  
  1578. this.Energy = this.Model:FindFirstChild("Energy") or Instance.new("IntValue",model)
  1579. this.Energy.Name = "Energy"
  1580. --this.Energy.Changed:connect(update)
  1581.  
  1582. this.Fire = this.Model:FindFirstChild("Fire") or Instance.new("IntValue",model)
  1583. this.Fire.Name = "Fire"
  1584. this.Fire.ChildAdded:connect(onAddedToFire)
  1585.  
  1586. this.Speed = this.Model:FindFirstChild("Speed") or Instance.new("IntValue",model)
  1587. this.Speed.Name = "Speed"
  1588. this.Speed.Changed:connect(onSpeedChanged)
  1589.  
  1590. this.MaxSpeed = this.Speed:FindFirstChild("MaxSpeed") or Instance.new("IntValue",this.Speed)
  1591. this.MaxSpeed.Name = "MaxSpeed"
  1592. this.MaxSpeed.Value = speedMax
  1593.  
  1594. this.Acceleration = this.Speed:FindFirstChild("Acceleration") or Instance.new("NumberValue",this.Speed)
  1595. this.Acceleration.Name = "Acceleration"
  1596. this.Acceleration.Value = acceleration
  1597.  
  1598. this.Maneuverability = this.Speed:FindFirstChild("Maneuverability") or Instance.new("NumberValue",this.Speed)
  1599. this.Maneuverability.Name = "Maneuverability"
  1600. this.Maneuverability.Value = maneuverability
  1601.  
  1602. --
  1603.  
  1604. local bg = this.MainPart:FindFirstChild("BodyGyro") or Instance.new("BodyGyro",this.MainPart)
  1605. bg.maxTorque = Vector3.new(0,0,0)
  1606.  
  1607. local bp = this.MainPart:FindFirstChild("BodyPosition") or Instance.new("BodyPosition",this.MainPart)
  1608. bp.P = 4e4
  1609. bp.maxForce = Vector3.new(0,0,0)
  1610.  
  1611. local bv = this.MainPart:FindFirstChild("BodyVelocity") or Instance.new("BodyVelocity",this.MainPart)
  1612. bv.maxForce = Vector3.new(0,0,0)
  1613.  
  1614. local midButton = this.Model:FindFirstChild("MidButton")
  1615. if (midButton) then
  1616. local cd = midButton:FindFirstChild("ClickDetector") or Instance.new("ClickDetector",midButton)
  1617. cd.MaxActivationDistance = 8
  1618. cd.MouseClick:connect(function() this.MidOpen.Value = not this.MidOpen.Value end)
  1619. end
  1620.  
  1621. local rearButton = this.Model:FindFirstChild("RearButton")
  1622. if (rearButton) then
  1623. local cd = rearButton:FindFirstChild("ClickDetector") or Instance.new("ClickDetector",rearButton)
  1624. cd.MaxActivationDistance = 8
  1625. cd.MouseClick:connect(function() this.RearOpen.Value = not this.RearOpen.Value end)
  1626. end
  1627.  
  1628. if (this.Model:FindFirstChild("ForwardLightPart")) then
  1629. local light = this.Model.ForwardLightPart:FindFirstChild("SpotLight") or Instance.new("SpotLight",this.Model.ForwardLightPart)
  1630. light.Enabled = false
  1631. end
  1632.  
  1633. initialRearDoorAngle = math.rad(105) --getAngleBetween(this.MainPart.CFrame.lookVector,this.Model:FindFirstChild("RearDoor").CFrame.lookVector*-1)
  1634.  
  1635. originalHullColour = this.MainPart.BrickColor
  1636.  
  1637. for k,v in pairs(this.Model:GetChildren()) do
  1638. if (v:IsA("Seat")) or (v:IsA("VehicleSeat")) then
  1639. v.ChildAdded:connect(function(c) onAddedToSeat(v,c) end)
  1640. v.ChildRemoved:connect(function(c) onRemovedFromSeat(v,c) end)
  1641. end
  1642.  
  1643. if (v.Name:find("Thruster")) then
  1644. originalThrusterColour = v.BrickColor
  1645. end
  1646. end
  1647.  
  1648. --
  1649.  
  1650. table.insert(ALL,this)
  1651.  
  1652. wait(2)
  1653.  
  1654. unanchorShip(this.Model,this.MainPart)
  1655. Spawn(update)
  1656.  
  1657. wait()
  1658.  
  1659. Spawn(function() animMidDoor(true) end)
  1660. Spawn(function() animRearDoor(true) end)
  1661. Spawn(function() animDrivePods(false) end)
  1662. Spawn(function() animWeaponPods(false) end)
  1663.  
  1664. wait()
  1665.  
  1666. this.EngineActive.Value = false
  1667. this.MidOpen.Value = true
  1668. this.RearOpen.Value = true
  1669. this.PodsOpen.Value = false
  1670. this.WeaponsOpen.Value = false
  1671.  
  1672. this.DHD.Value = (dhdEnabled) and "" or "~"
  1673.  
  1674. game.Workspace.DescendantRemoving:connect(function(d)
  1675. if (d == this.Model) then
  1676. for k,v in pairs(ALL) do
  1677. if (v == this) then
  1678. table.remove(ALL,k)
  1679. break
  1680. end
  1681. end
  1682. elseif (d == this.MainPart) then
  1683. destroy(10)
  1684. elseif (game.Players:GetPlayerFromCharacter(d)) then
  1685. passengersCloaked[d] = nil
  1686. passengersShielded[d] = nil
  1687. end
  1688. end)
  1689. end
  1690.  
  1691.  
  1692. --[[
  1693. --------
  1694. -- Documentation
  1695.  
  1696. Global Table:
  1697. _G.Gateship.List -- table of all gateships in the Workspace
  1698.  
  1699. Global Functions:
  1700. _G.Gateship:GetFromModel(model) -- returns the Gateship object given its model
  1701. _G.Gateship:FindByPilot(character) -- returns the Gateship object given its pilot
  1702.  
  1703. --------
  1704. Data is indexed with a dot operator (.)
  1705. Ex. Gateship.Model
  1706. ----
  1707. public data
  1708.  
  1709. Model type: Model -- the Gateship's model
  1710. MainPart type: BasePart -- the Gateship's main part (the engine)
  1711.  
  1712. VehicleHealth type: NumberValue -- the object containing the Gateship's health value
  1713. TeamColor type: BrickColorValue -- the object containing the Gateship's TeamColor value
  1714. Neutral type: BoolValue -- the object containing the Gateship's Neutral value (child of TeamColor)
  1715.  
  1716. EngineActive type: BoolValue -- the object containing the Gateship's Active value
  1717. CloakActive type: BoolValue -- the object containing the Gateship's CloakActive value
  1718. ShieldActive type: BoolValue -- the object containing the Gateship's ShieldActive value
  1719.  
  1720. MidOpen type: BoolValue -- the object containing the Gateship's MidOpen value
  1721. RearOpen type: BoolValue -- the object containing the Gateship's RearOpen value
  1722. PodsOpen type: BoolValue -- the object containing the Gateship's PodsOpen value
  1723. WeaponsOpen type: BoolValue -- the object containing the Gateship's WeaponsOpen value
  1724.  
  1725. ForwardLightsOn type: BoolValue -- the object containing the Gateship's ForwardLightsOn value
  1726.  
  1727. DHD type: StringValue -- the object containing the destination value for dialing a DHD
  1728. Energy type: IntValue -- the object containing the Gateship's Energy value
  1729. Fire type: IntValue -- an object used in the process of firing weapons
  1730.  
  1731. Speed type: IntValue -- the object containing the Gateship's Speed value
  1732. Acceleration type: IntValue -- the object containing the Gateship's Acceleration value
  1733. Maneuverability type: IntValue -- the object containing the Gateship's Maneuverability value
  1734. MaxSpeed type: IntValue -- the object containing the Gateship's MaxSpeed value
  1735.  
  1736. --------
  1737. Methods are called with a colon operator (:)
  1738. Ex. Gateship:IsActive()
  1739. ----
  1740. public methods
  1741.  
  1742. IsActive() returns: boolean -- true if the Gateship is active
  1743. GetPassengers() returns: table -- table of all current player characters inside the Gateship
  1744. HasPassengers() returns: boolean -- true if there is at least on passenger inside the Gateship
  1745.  
  1746. IsPassenger(character) returns: boolean -- true if "character" is a passenger of the Gateship
  1747.  
  1748. GetPilot() returns: Model -- the character currently sitting in the pilot seat
  1749. GetCopilot() returns: Model -- the character currently sitting in the copilot seat
  1750.  
  1751. DisableCloak([time]) returns: nil -- disables cloak; optional time argument allows cloak to automatically enable after time elapses (time is in seconds)
  1752. DisableShield([time]) returns: nil -- disables shield; optional time argument allows shield to automatically enable after time elapses (time is in seconds)
  1753. DisableWeapons([time]) returns: nil -- disables weapons; optional time argument allows weapons to automatically enable after time elapses (time is in seconds)
  1754.  
  1755. EnableCloak() returns: nil -- enables cloak
  1756. EnableShield() returns: nil -- enables shield
  1757. EnableWeapons() returns: nil -- enables weapons
  1758.  
  1759. Repair(amount) returns: nil -- increases Gateship's health by "amount"
  1760. TakeDamage(Amount) returns: nil -- decreases Gateship's health by "amount" (takes shield into account)
  1761.  
  1762. --------
  1763. ]]--
  1764.  
  1765. -- Ganondude end;
  1766. function() -- Gateship Mouse Monitor
  1767. -- Ganondude
  1768.  
  1769. wait(1)
  1770.  
  1771. local player = game.Players.LocalPlayer
  1772. local mouse = player:GetMouse()
  1773.  
  1774. local gui = script.Parent
  1775. local model = gui.Model.Value
  1776. local controlLevel = gui.ControlLevel.Value
  1777.  
  1778. local engine = model.Engine
  1779. local bodyGyr = engine.BodyGyro
  1780. local bodyPos = engine.BodyPosition
  1781.  
  1782. local vehicleHealth = model.VehicleHealth
  1783.  
  1784. local engineActive = model.EngineActive
  1785. local cloakActive = model.CloakActive
  1786. local shieldActive = model.ShieldActive
  1787.  
  1788. local midOpen = model.MidOpen
  1789. local rearOpen = model.RearOpen
  1790. local podsOpen = model.PodsOpen
  1791. local weaponsOpen = model.WeaponsOpen
  1792.  
  1793. local forwardLightOn = model.ForwardLightOn
  1794.  
  1795. local fire = model.Fire
  1796. local speed = model.Speed
  1797.  
  1798. local maxSpeed = speed.MaxSpeed.Value
  1799. local acceleration = speed.Acceleration.Value
  1800. local maneuverability = speed.Maneuverability.Value
  1801.  
  1802. --
  1803.  
  1804. local isButton1Down = false
  1805. local isButton2Down = false
  1806.  
  1807. local isKeyDown = {}
  1808. local isShiftDown = false
  1809.  
  1810. --
  1811.  
  1812. function onButton1Down()
  1813. if (isButton1Down) or (controlLevel > 1) then return end
  1814. isButton1Down = true
  1815.  
  1816. local camera = game.Workspace.CurrentCamera
  1817.  
  1818. while (isButton1Down) do
  1819. if (engineActive.Value) then
  1820. local dir = (mouse.Hit.p - camera.CoordinateFrame.p).unit
  1821. local pos = engine.Position
  1822.  
  1823. engine.BodyGyro.maxTorque = Vector3.new(8e3,8e3,0)
  1824. engine.BodyGyro.cframe = CFrame.new(pos,pos + dir)
  1825.  
  1826. wait(0.1)
  1827. end
  1828.  
  1829. wait()
  1830. end
  1831. end
  1832.  
  1833. function onButton1Up()
  1834. isButton1Down = false
  1835. end
  1836.  
  1837. function onKeyDown(key)
  1838. if (not key) or (isKeyDown[key]) or (controlLevel == 0) then return end
  1839. print(key,isShiftDown)
  1840. if (key:byte() == 32) then -- space
  1841. --onDeselected()
  1842. return
  1843. elseif (key:byte() == 48) then -- left shift
  1844. isShiftDown = true
  1845. return
  1846. end
  1847.  
  1848. key = string.lower(key)
  1849. isKeyDown[key] = true
  1850.  
  1851. -- Door Controls:
  1852. if (key == "m") and (controlLevel < 4) then -- open/close mid door
  1853. midOpen.Value = not midOpen.Value
  1854. elseif (key == "n") and (controlLevel ~= 3) then -- open/close rear door
  1855. rearOpen.Value = not rearOpen.Value
  1856. end
  1857.  
  1858. if (controlLevel > 2) then return end
  1859.  
  1860. -- Light Controls:
  1861. if (key == "h") then
  1862. forwardLightOn.Value = not forwardLightOn.Value
  1863. end
  1864.  
  1865. if (controlLevel > 1) then return end
  1866.  
  1867. -- start/stop engine:
  1868. if (key == "y") then -- start engine
  1869. engineActive.Value = true
  1870. elseif (key == "x") then
  1871. engineActive.Value = false
  1872.  
  1873. if (isShiftDown) then
  1874. vehicleHealth.Value = 0
  1875. end
  1876. end
  1877.  
  1878. if (not engineActive.Value) then return end
  1879.  
  1880. -- Flight Controls:
  1881. if (key == "s") then
  1882. if (isShiftDown) then -- maneouvre backwards
  1883. while (isKeyDown[key]) do
  1884. local dir = Vector3.new(0,0,1)
  1885.  
  1886. bodyPos.position = engine.CFrame*dir
  1887. wait()
  1888. end
  1889. else -- pitch down
  1890. while (engineActive.Value) and (isKeyDown[key]) do
  1891. local rot = Vector3.new(1,0,0)*maneuverability*wait()
  1892.  
  1893. bodyGyr.maxTorque = Vector3.new(9e3,9e3,9e3)
  1894. bodyGyr.cframe = engine.CFrame*CFrame.Angles(rot.X,rot.Y,rot.Z)
  1895. end
  1896. end
  1897. elseif (key == "w") then
  1898. if (isShiftDown) then -- maneouvre forwards
  1899. while (isKeyDown[key]) do
  1900. local dir = Vector3.new(0,0,-1)
  1901.  
  1902. bodyPos.position = engine.CFrame*dir
  1903. wait()
  1904. end
  1905. else -- pitch up
  1906. while (engineActive.Value) and (isKeyDown[key]) do
  1907. local rot = Vector3.new(-1,0,0)*maneuverability*wait()
  1908.  
  1909. bodyGyr.maxTorque = Vector3.new(9e3,9e3,9e3)
  1910. bodyGyr.cframe = engine.CFrame*CFrame.Angles(rot.X,rot.Y,rot.Z)
  1911. end
  1912. end
  1913. elseif (key == "a") then
  1914. if (isShiftDown) then -- maneouvre left
  1915. while (isKeyDown[key]) do
  1916. local dir = Vector3.new(-1,0,0)
  1917.  
  1918. bodyPos.position = engine.CFrame*dir
  1919. wait()
  1920. end
  1921. else -- yaw left
  1922. while (engineActive.Value) and (isKeyDown[key]) do
  1923. local rot = Vector3.new(0,1,0)*maneuverability*wait()
  1924.  
  1925. bodyGyr.maxTorque = Vector3.new(9e3,9e3,9e3)
  1926. bodyGyr.cframe = engine.CFrame*CFrame.Angles(rot.X,rot.Y,rot.Z)
  1927. end
  1928. end
  1929. elseif (key == "d") then
  1930. if (isShiftDown) then -- maneouvre right
  1931. while (isKeyDown[key]) do
  1932. local dir = Vector3.new(1,0,0)
  1933.  
  1934. bodyPos.position = engine.CFrame*dir
  1935. wait()
  1936. end
  1937. else -- yaw right
  1938. while (engineActive.Value) and (isKeyDown[key]) do
  1939. local rot = Vector3.new(0,-1,0)*maneuverability*wait()
  1940.  
  1941. bodyGyr.maxTorque = Vector3.new(9e3,9e3,9e3)
  1942. bodyGyr.cframe = engine.CFrame*CFrame.Angles(rot.X,rot.Y,rot.Z)
  1943. end
  1944. end
  1945. elseif (key == "q") then
  1946. if (isShiftDown) then -- maneouvre down
  1947. while (isKeyDown[key]) do
  1948. local dir = Vector3.new(0,-1,0)
  1949.  
  1950. bodyPos.position = engine.CFrame*dir
  1951. wait()
  1952. end
  1953. else -- roll left
  1954. while (engineActive.Value) and (isKeyDown[key]) do
  1955. local rot = Vector3.new(0,0,1)*maneuverability*wait()
  1956.  
  1957. bodyGyr.maxTorque = Vector3.new(9e3,9e3,9e3)
  1958. bodyGyr.cframe = engine.CFrame*CFrame.Angles(rot.X,rot.Y,rot.Z)
  1959. end
  1960. end
  1961. elseif (key == "e") then
  1962. if (isShiftDown) then -- maneouvre up
  1963. while (isKeyDown[key]) do
  1964. local dir = Vector3.new(0,1,0)
  1965.  
  1966. bodyPos.position = engine.CFrame*dir
  1967. wait()
  1968. end
  1969. else -- roll right
  1970. while (engineActive.Value) and (isKeyDown[key]) do
  1971. local rot = Vector3.new(0,0,-1)*maneuverability*wait()
  1972.  
  1973. bodyGyr.maxTorque = Vector3.new(9e3,9e3,9e3)
  1974. bodyGyr.cframe = engine.CFrame*CFrame.Angles(rot.X,rot.Y,rot.Z)
  1975. end
  1976. end
  1977. end
  1978.  
  1979. -- Level off:
  1980. if (key == "r") then -- level off
  1981. local cf = engine.CFrame
  1982.  
  1983. local bk = cf.lookVector*-1
  1984. local up = Vector3.new(0,1,0)
  1985. local rt = bk:Cross(up)
  1986.  
  1987. bodyGyr.cframe = CFrame.new(cf.p.X,cf.p.Y,cf.p.Z, rt.X,up.X,bk.X, rt.Y,up.Y,bk.Y, rt.Z,up.Z,bk.Z)
  1988. end
  1989.  
  1990. -- Fire:
  1991. if (key == "f") then
  1992. local val = Instance.new("Vector3Value")
  1993. val.Value = (isShiftDown) and Vector3.new(0,0,0) or mouse.Hit.p
  1994. val.Parent = fire
  1995. end
  1996.  
  1997. -- Speed Controls:
  1998. if (key == "t") then -- speed up
  1999. local a = acceleration
  2000. repeat
  2001. speed.Value = speed.Value + a*wait(0.1)
  2002. a = a + acceleration/10
  2003. until (not isKeyDown[key])
  2004. elseif (key == "g") then -- slow down
  2005. if (isShiftDown) then
  2006. local d = (speed.Value > 0) and -1 or 1
  2007. for i = speed.Value,0,acceleration*d do
  2008. speed.Value = speed.Value + acceleration*d
  2009. wait()
  2010. end
  2011. speed.Value = 0
  2012. else
  2013. local a = acceleration
  2014. repeat
  2015. speed.Value = speed.Value - a*wait(0.1)
  2016. a = a + acceleration/10
  2017. until (not isKeyDown[key])
  2018. end
  2019. end
  2020.  
  2021. -- Cloak Toggle:
  2022. if (key == "c") then -- toggle cloak
  2023. cloakActive.Value = not cloakActive.Value
  2024. end
  2025.  
  2026. -- Shield Toggle:
  2027. if (key == "v") then -- toggle shield
  2028. shieldActive.Value = not shieldActive.Value
  2029. end
  2030.  
  2031. -- Drive Pod Controls:
  2032. if (key == "b") then
  2033. if (isShiftDown) then
  2034. weaponsOpen.Value = not weaponsOpen.Value
  2035. else
  2036. podsOpen.Value = not podsOpen.Value
  2037. end
  2038. end
  2039. end
  2040.  
  2041. function onKeyUp(key)
  2042. if (not key) then return end
  2043.  
  2044. if (string.byte(key) == 48) then
  2045. isShiftDown = false
  2046. return
  2047. end
  2048.  
  2049. key = string.lower(key)
  2050. isKeyDown[key] = false
  2051. end
  2052.  
  2053. ----
  2054.  
  2055. mouse.Button1Down:connect(onButton1Down)
  2056. mouse.Button1Up:connect(onButton1Up)
  2057.  
  2058. mouse.KeyDown:connect(onKeyDown)
  2059. mouse.KeyUp:connect(onKeyUp)
  2060.  
  2061. -- Ganondude end;
  2062. function() -- Gateship GUI Controller
  2063. -- Ganondude
  2064.  
  2065. local maxDHDInputLength = 7
  2066.  
  2067. local dhdButtonColour = {[true] = "Light orange", [false] = "Br. yellowish orange"}
  2068.  
  2069. --------
  2070.  
  2071. wait(1)
  2072.  
  2073. local player = game.Players.LocalPlayer
  2074.  
  2075. local gui = script.Parent
  2076. local main = gui.Main
  2077. local tabs = gui.Tabs
  2078.  
  2079. local removeGui = gui.RemoveGui
  2080.  
  2081. local model = gui.Model.Value
  2082. local controlLevel = gui.ControlLevel.Value
  2083.  
  2084. local energy = main.Energy
  2085. local speed = main.Speed
  2086. local status = main.Status
  2087.  
  2088. local controls = tabs.Controls
  2089. local dhd = tabs.DHD
  2090.  
  2091. local btn1 = tabs.Button1
  2092. local btn2 = tabs.Button2
  2093. local btnOpen = tabs.OpenButton
  2094.  
  2095. local mCloakActive = model.CloakActive
  2096. local mDHD = model.DHD
  2097. local mEnergy = model.Energy
  2098. local mEngineActive = model.EngineActive
  2099. local mMidOpen = model.MidOpen
  2100. local mRearOpen = model.RearOpen
  2101. local mPodsOpen = model.PodsOpen
  2102. local mShieldActive = model.ShieldActive
  2103. local mSpeed = model.Speed
  2104. local mVHealth = model.VehicleHealth
  2105. local mWeaponsOpen = model.WeaponsOpen
  2106.  
  2107. local hasBeenPressed = {} -- for DHD
  2108. local totalPressed = 0 -- for DHD
  2109.  
  2110. local isTabsOpen = true
  2111.  
  2112. --
  2113.  
  2114. function scaleMeter(meter,percentFull)
  2115. percentFull = (percentFull > 100) and 100 or percentFull
  2116. local fill = meter.Fill
  2117. local x = percentFull/100
  2118.  
  2119. fill.Size = UDim2.new(percentFull/100,fill.Size.X.Offset,fill.Size.Y.Scale,fill.Size.Y.Offset)
  2120. end
  2121.  
  2122. function showTab1()
  2123. controls.Visible = true
  2124. dhd.Visible = false
  2125. end
  2126.  
  2127. function showTab2()
  2128. controls.Visible = false
  2129. dhd.Visible = true
  2130. end
  2131.  
  2132. function statusCloak()
  2133. wait()
  2134. --[[
  2135. for k,v in pairs(status:GetChildren()) do
  2136. v.BackgroundTransparency = (mCloakActive.Value) and 0.6 or 0
  2137. end
  2138. ]]
  2139.  
  2140. status.Fuselage.BackgroundTransparency = (mCloakActive.Value) and 0.6 or 0
  2141. status.Window.BackgroundTransparency = (mCloakActive.Value) and 0.6 or 0
  2142.  
  2143. statusDrivePods()
  2144. statusWeaponPods()
  2145. end
  2146.  
  2147. function statusShield()
  2148. wait()
  2149.  
  2150. status.BackgroundColor3 = (mShieldActive.Value) and Color3.new(0,0.2,1) or Color3.new(0,0,0)
  2151. end
  2152.  
  2153. function statusDrivePods()
  2154. wait()
  2155.  
  2156. for k,v in pairs(status:GetChildren()) do
  2157. local n = v.Name:lower()
  2158. if (n:find("joint")) or (n:find("thruster")) or (n:find("wing")) then
  2159. v.BackgroundTransparency = (mPodsOpen.Value) and (mCloakActive.Value and 0.6 or 0) or 1
  2160. end
  2161. end
  2162. end
  2163.  
  2164. function statusWeaponPods()
  2165. wait()
  2166.  
  2167. for k,v in pairs(status:GetChildren()) do
  2168. local n = v.Name:lower()
  2169. if (n:find("weapon")) then
  2170. v.BackgroundTransparency = (mWeaponsOpen.Value) and (mCloakActive.Value and 0.6 or 0) or 1
  2171. end
  2172. end
  2173. end
  2174.  
  2175. function updateDHD()
  2176. if (mDHD.Value == "") then
  2177. for k,v in pairs(dhd.DHDPanel:GetChildren()) do
  2178. v.BackgroundColor = BrickColor.new(dhdButtonColour[false])
  2179. end
  2180. else
  2181. for w in (mDHD.Value:gmatch("%w+")) do
  2182. local btn = dhd.DHDPanel:FindFirstChild(w)
  2183. if (btn) then
  2184. btn.BackgroundColor = BrickColor.new(dhdButtonColour[true])
  2185. end
  2186. end
  2187.  
  2188. if (mDHD.Value:match("@")) then
  2189. local btn = dhd.DHDPanel:FindFirstChild("Enter")
  2190. if (btn) then
  2191. btn.BackgroundColor = BrickColor.new(dhdButtonColour[true])
  2192. end
  2193. end
  2194. end
  2195. end
  2196.  
  2197. function updateEnergy()
  2198. local percent = math.abs(mEnergy.Value)/10
  2199.  
  2200. energy.Label1.Text = string.format("%2.0f",percent).."%"
  2201. scaleMeter(energy.Meter,percent)
  2202. end
  2203.  
  2204. function updateHealth()
  2205. local health = mVHealth.Value
  2206. local p = health/100
  2207.  
  2208. for k,v in pairs(status:GetChildren()) do
  2209. local n = v.Name:lower()
  2210. if (not n:find("window")) and (not n:find("thruster")) and (not n:find("joint")) then
  2211. v.BackgroundColor3 = Color3.new((255 - 255*p)/255,(255*p)/255,0)
  2212. end
  2213. end
  2214. end
  2215.  
  2216. function updateSpeed()
  2217. local s = mSpeed.Value
  2218.  
  2219. local percent = (mEngineActive.Value) and math.abs(s)/2 or 0
  2220. percent = (percent > 100) and 100 or percent
  2221.  
  2222. local p = percent*((s == 0) and 1 or s/math.abs(s))
  2223.  
  2224. speed.Label1.Text = string.format("%2.0f",p).."%"
  2225. scaleMeter(speed.Meter,percent)
  2226. end
  2227.  
  2228. ----
  2229.  
  2230. if (controlLevel < 4) and (controlLevel ~= 0) then -- visible to all in cockpit
  2231. main.Visible = true
  2232. if (controlLevel < 3) then -- visible to pilot and copilot
  2233. tabs.Visible = true
  2234. end
  2235. end
  2236.  
  2237. removeGui.Value = false
  2238.  
  2239. btn1.MouseButton1Click:connect(showTab1)
  2240. btn2.MouseButton1Click:connect(showTab2)
  2241.  
  2242. mDHD.Changed:connect(updateDHD)
  2243. mEnergy.Changed:connect(updateEnergy)
  2244. mSpeed.Changed:connect(updateSpeed)
  2245. mVHealth.Changed:connect(updateHealth)
  2246.  
  2247. mCloakActive.Changed:connect(statusCloak)
  2248. mShieldActive.Changed:connect(statusShield)
  2249. mPodsOpen.Changed:connect(statusDrivePods)
  2250. mWeaponsOpen.Changed:connect(statusWeaponPods)
  2251.  
  2252. removeGui.Changed:connect(function() wait(0.1) gui:Destroy() end)
  2253.  
  2254. player.Character.Humanoid.Died:connect(function() removeGui.Value = true end)
  2255. player.Character.Humanoid.Jumping:connect(function() removeGui.Value = true end)
  2256.  
  2257. for k,v in pairs(dhd.DHDPanel:GetChildren()) do
  2258. local f = function()
  2259. local s = v.Name
  2260.  
  2261. if (v.Name == "Enter") then
  2262. s = "@"
  2263. end
  2264.  
  2265. if (totalPressed >= maxDHDInputLength) and (s ~= "@") then return end
  2266.  
  2267. if (not hasBeenPressed[s]) then
  2268. mDHD.Value = mDHD.Value..","..s
  2269.  
  2270. hasBeenPressed[s] = true
  2271. totalPressed = totalPressed + 1
  2272. end
  2273.  
  2274. if (s == "@") then
  2275. for k,v in pairs(hasBeenPressed) do
  2276. hasBeenPressed[k] = false
  2277. end
  2278.  
  2279. totalPressed = 0
  2280. end
  2281. end
  2282.  
  2283. v.MouseButton1Click:connect(f)
  2284. end
  2285.  
  2286. statusCloak()
  2287. statusShield()
  2288.  
  2289. updateEnergy()
  2290. updateHealth()
  2291. updateSpeed()
  2292.  
  2293. while (gui.Parent) do
  2294. btnOpen.MouseButton1Click:wait()
  2295.  
  2296. local dir = (isTabsOpen) and 1 or -1
  2297.  
  2298. local x = tabs.Position.X.Offset + tabs.Size.X.Offset*dir
  2299. local pos = UDim2.new(tabs.Position.X.Scale,x,tabs.Position.Y.Scale,tabs.Position.Y.Offset)
  2300.  
  2301. tabs:TweenPosition(pos,"Out","Quad",2,false)
  2302. wait(2)
  2303.  
  2304. isTabsOpen = not isTabsOpen
  2305. btnOpen.Text = (isTabsOpen) and ">" or "<"
  2306. end
  2307.  
  2308. -- Ganondude end;
  2309. function() -- Gateship Camera Script
  2310. -- Ganondude
  2311.  
  2312. wait(1)
  2313.  
  2314. local player = game.Players.LocalPlayer
  2315.  
  2316. local gui = script.Parent
  2317.  
  2318. local removeGui = gui.RemoveGui
  2319.  
  2320. local model = gui.Model.Value
  2321.  
  2322. local engine = model.Engine
  2323. local cameraPart = model:FindFirstChild("CameraPart") or engine
  2324.  
  2325. --
  2326.  
  2327. local camera = game.Workspace.CurrentCamera
  2328. camera.CameraType = 4 -- Follow
  2329. camera.CameraSubject = cameraPart
  2330. camera.CoordinateFrame = engine.CFrame*CFrame.new(0,12,engine.Size.Z*1.5)
  2331.  
  2332. removeGui.Changed:wait()
  2333.  
  2334. camera.CameraType = 5 -- Custom
  2335. camera.CameraSubject = player.Character.Humanoid
  2336.  
  2337. -- Ganondude end;}local ActualScripts = {}
  2338. function s(var)
  2339. local func = table.remove(Scripts,1)
  2340. setfenv(func,setmetatable({script=var,require=fake_require or require,global=genv},{
  2341. __index = getfenv(func),
  2342. }))
  2343. table.insert(ActualScripts,coroutine.wrap(func))
  2344. end
  2345. Decode = function(str,t,props,classes,values,ICList,Model,CurPar,LastIns,split,RemoveAndSplit,InstanceList)
  2346. local tonum,table_remove,inst,parnt,comma,table_foreach = tonumber,table.remove,Instance.new,"Parent",",",
  2347. function(t,f)
  2348. for a,b in pairs(t) do
  2349. f(a,b)
  2350. end
  2351. end
  2352. local Types = {
  2353. Color3 = Color3.new,
  2354. Vector3 = Vector3.new,
  2355. Vector2 = Vector2.new,
  2356. UDim = UDim.new,
  2357. UDim2 = UDim2.new,
  2358. CFrame = CFrame.new,
  2359. Rect = Rect.new,
  2360. NumberRange = NumberRange.new,
  2361. BrickColor = BrickColor.new,
  2362. PhysicalProperties = PhysicalProperties.new,
  2363. NumberSequence = function(...)
  2364. local a = {...}
  2365. local t = {}
  2366. repeat
  2367. t[#t+1] = NumberSequenceKeypoint.new(table_remove(a,1),table_remove(a,1),table_remove(a,1))
  2368. until #a==0
  2369. return NumberSequence.new(t)
  2370. end,
  2371. ColorSequence = function(...)
  2372. local a = {...}
  2373. local t = {}
  2374. repeat
  2375. t[#t+1] = ColorSequenceKeypoint.new(table_remove(a,1),Color3.new(table_remove(a,1),table_remove(a,1),table_remove(a,1)))
  2376. until #a==0
  2377. return ColorSequence.new(t)
  2378. end,
  2379. number = tonumber,
  2380. boolean = function(a)
  2381. return a=="1"
  2382. end
  2383. }
  2384. split = function(str,sep)
  2385. if not str then return end
  2386. local fields = {}
  2387. local ConcatNext = false
  2388. str:gsub(("([^%s]+)"):format(sep),function(c)
  2389. if ConcatNext == true then
  2390. fields[#fields] = fields[#fields]..sep..c
  2391. ConcatNext = false
  2392. else
  2393. fields[#fields+1] = c
  2394. end
  2395. if c:sub(#c)=="\\" then
  2396. c = fields[#fields]
  2397. fields[#fields] = c:sub(1,#c-1)
  2398. ConcatNext = true
  2399. end
  2400. end)
  2401. return fields
  2402. end
  2403. RemoveAndSplit = function(t)
  2404. return split(table_remove(t,1),comma)
  2405. end
  2406. t = split(str,";")
  2407. props = RemoveAndSplit(t)
  2408. classes = RemoveAndSplit(t)
  2409. values = split(table_remove(t,1),'|')
  2410. ICList = RemoveAndSplit(t)
  2411. InstanceList = {}
  2412. Model = inst"Model"
  2413. CurPar = Model
  2414. table_foreach(t,function(ct,c)
  2415. if c=="n" or c=="p" then
  2416. CurPar = c=="n" and LastIns or CurPar[parnt]
  2417. else
  2418. ct = split(c,"|")
  2419. local class = classes[tonum(table_remove(ct,1))]
  2420. if class=="UnionOperation" then
  2421. LastIns = {UsePartColor="1"}
  2422. else
  2423. LastIns = inst(class)
  2424. if LastIns:IsA"Script" then
  2425. s(LastIns)
  2426. elseif LastIns:IsA("ModuleScript") then
  2427. ms(LastIns)
  2428. end
  2429. end
  2430.  
  2431. local function SetProperty(LastIns,p,str,s)
  2432. s = Types[typeof(LastIns[p])]
  2433. if p=="CustomPhysicalProperties" then
  2434. s = PhysicalProperties.new
  2435. end
  2436. if s then
  2437. LastIns[p] = s(unpack(split(str,comma)))
  2438. else
  2439. LastIns[p] = str
  2440. end
  2441. end
  2442.  
  2443. local UnionData
  2444. table_foreach(ct,function(s,p,a,str)
  2445. a = p:find":"
  2446. p,str = props[tonum(p:sub(1,a-1))],values[tonum(p:sub(a+1))]
  2447. if p=="UnionData" then
  2448. UnionData = split(str," ")
  2449. return
  2450. end
  2451. if class=="UnionOperation" then
  2452. LastIns[p] = str
  2453. return
  2454. end
  2455. SetProperty(LastIns,p,str)
  2456. end)
  2457.  
  2458. if UnionData then
  2459. local LI_Data = LastIns
  2460. LastIns = DecodeUnion(UnionData)
  2461. table_foreach(LI_Data,function(p,str)
  2462. SetProperty(LastIns,p,str)
  2463. end)
  2464. end
  2465. table.insert(InstanceList,LastIns)
  2466. LastIns[parnt] = CurPar
  2467. end
  2468. end)
  2469. table_remove(ICList,1)
  2470. table_foreach(ICList,function(a,b)
  2471. b = split(b,">")
  2472. InstanceList[tonum(b[1])][props[tonum(b[2])]] = InstanceList[tonum(b[3])]
  2473. end)
  2474.  
  2475. return Model:GetChildren()
  2476. end
  2477.  
  2478. local Objects = Decode('Name,Anchored,Color,Position,Orientation,Size,BackSurface,BottomSurface,FrontSurface,LeftSurface,RightSurface,TopSurface,MeshType,CanCollide,C0,C1,Part0,Part1,Transparency,Angle,Range,Enabled,Backgrou'
  2479. ..'ndColor3,BackgroundTransparency,BorderColor3,BorderSizePixel,Text,TextColor3,TextSize,TextWrapped,TextScaled,ZIndex,ClipsDescendants,Visible;Part,Model,WedgePart,SpecialMesh,Seat,Weld,SpotLight,Script'
  2480. ..',ScreenGui,LocalScript,BoolValue,Frame,TextLabel,TextButton;Part|Gateship|1|1,0.6901,0|-66.9223,6.798,-2.048|-16.99,-90,90|2.0421,31.5999,1|10|-64.6953,9.66,13.181|0,90,15|1,3,3|-65.8953,5.301,2.378|0'
  2481. ..'.7999,6.5999,12|MidDoorLeft|0.6666,0.3333,0|-60.6953,5.148,-5.383|10,0,0|3,8.6,0.6|LThruster|-72.4503,7.141,7.378|0,0,-20|2.4,3.2,10|LJoint3|-67.2453,0.501,-3.748|3,0.6,2|LJoint2|-73.5673,5.153,7.378|'
  2482. ..'0,0,-50|0.6,1.9,6|LPart2|0.4588,0,0|-72.9673,7.329,12.478|0.8999,2.7999,0.2|-71.9333,6.953,12.478|LDrone|-69.4953,4.901,-3.748|1.25,1.25,2.5|3|-69.1953,3.201,-3.748|-68.3953,1.701,-3.748|LPart3|-70.39'
  2483. ..'53,4.987,-3.748|0,-90,90|1.98,2.9999,0.6|-70.1133,3.117,-3.748|16.9899,-90,90|2.042,2.9999,0.6|-66.1233,8.487,-0.698|-33.35,-90,90|2.0999,30.9,1|-64.8523,9.936,0.552|-48.75,-90,90|2.1497,30.3999,1|-63'
  2484. ..'.1953,11.048,1.052|-63.14,-90,90|2.1878,30.4,1|-61.2663,11.747,1.652|-76.77,-90,90|2.2118,30.2,1|-67.1953,4.987,-12.898|1.98,15.2999,1|-66.9223,3.175,-13.748|2.0421,17,1|-66.0133,1.319,-14.498|33.3499'
  2485. ..',-90,90|2.5,18.5,1|-67.3953,4.987,-0.898|1.98,2.6999,0.6|LPart1|-74.3953,4.987,6.852|1.98,12.7999,0.6|-74.1133,3.117,5.252|2.0421,15,0.6|-66.1453,5.892,12.172|15,0,0|1.1,4.7999,1|-64.3953,4.541,11.809'
  2486. ..'|2.4,7.6,1|-66.1453,6.034,-5.226|-64.4953,7.601,2.378|1.9999,0.3999,12|0|-63.8953,4.657,-5.47|3.4,7.6,1|-66.1453,2.44,-5.86|0,90,-170|1,2.5,1.1|RearButton|-64.0953,5.372,11.411|1,1,0.2|-64.2953,9.975,'
  2487. ..'-4.532|0,90,10|1,3.2,4.1999|-65.1953,8.072,-14.844|45,0,0|2.2,1,1|-65.8953,5.951,-16.965|1.5999,5,1|-63.9953,8.779,-14.137|3.7999,1,1|-63.6953,3.829,-19.087|6,1,1|-65.7623,1.484,3.102|2.5,16.7,0.4|-66'
  2488. ..'.6353,3.263,3.352|2.0421,17.2,0.4|-66.8953,4.987,3.602|1.98,17.7,0.4|-64.0953,1.501,2.378|2.7999,1,12|PassengerSeat|-63.6953,2.201,6.378|0,-90,0|2,0.4,2|0|2|-63.6953,2.201,2.378|-63.6953,2.201,-1.622|'
  2489. ..'CockpitSeat|-63.6953,1.501,-8.622|2,1,2|-69.1803,1.209,-3.748|2.5,3,0.6|MidButton|-63.0953,5.372,-5.959|PilotSeat|-62.6953,1.501,-13.622|RearDoor|-59.1953,5.506,12.068|-75,0,0|8,1,9.6|-59.1953,11.101,'
  2490. ..'0.878|5.7999,0.8,24.9999|Engine|-59.1953,0.501,-5.622|13.095,1,34|-256,10,256,-1,0,0,0,0,1,0,1,0|-196.8048,-0.5011,261.6214,-1,0,0,-0.0001,-0.0001,0.9999,-0.0001,0.9999,0|-59.1953,11.987,2.152|-89.89,'
  2491. ..'-126.2601,126.26|2.22,30.2,1|-59.1953,10.771,13.479|8,1.2999,1|-59.1953,11.591,13.699|5.2,0.3999,1|-59.1953,10.319,-4.471|6,1.8999,1|-59.1953,3.401,-17.822|0,-180,0|14.8,0.4,1.6|-59.1953,2.101,-15.222'
  2492. ..'|89.8899,0,0|3.75,4.8,2.2|1|-59.1953,9.451,-13.465|12.2999,0.9,1|-59.1953,10.016,-12.899|11.1999,0.7,1|-59.1953,10.511,-12.404|9.8999,0.7,1|-59.1953,10.936,-11.98|8.4999,0.5,1|-59.1953,11.254,-11.662|'
  2493. ..'7.2999,0.4,1|RPart1|-43.9953,4.987,6.852|0,90,-90|-59.1953,2.801,-16.622|14.5999,0.7999,2|-59.1953,2.101,-18.422|14.1999,2.2,1.6|Window|0.3999|-59.1953,6.304,-16.612|11.7999,8,0.8|CameraPart|-59.1953,'
  2494. ..'3.501,-17.122|3.2,0.5999,3|-59.1953,2.769,-20.147|15,2,1|-59.1953,1.708,-21.208|14.1999,1,1|ForwardLightPart|-59.1953,1.001,-21.915|-45,0,0|13,1,1|0.9215,0.9607,1|135|60|-73.1803,1.209,5.002|2.5,14.49'
  2495. ..'99,0.6|MidDoorRight|-57.6953,5.148,-5.383|-66.1453,2.367,11.227|0,90,-165|-67.7433,0.501,4.878|0,-123.6901,90|0.8,6,4|LJoint1|-66.7453,0.501,4.878|1.9999,0.8,7.1999|-71.2953,0.501,5.878|2.9999,0.8,2|-'
  2496. ..'57.1243,11.747,1.652|-76.77,90,-90|CopilotSeat|-55.6953,1.501,-13.622|-55.1953,11.048,1.052|-63.14,90,-90|-54.3953,8.779,-14.137|-54.6953,1.501,-8.622|0,90,0|-54.6953,3.829,-19.087|-53.6953,9.66,13.18'
  2497. ..'1|0,-90,-15|1,2.9999,3|-53.9953,4.54,11.81|2.4,7.5999,1|-54.6953,2.201,6.378|-54.2953,1.501,2.378|-54.6953,2.201,2.378|-53.8953,7.601,2.378|-54.6953,2.201,-1.622|-53.5383,9.936,0.552|-48.75,90,-90|-52'
  2498. ..'.4953,5.301,2.378|-54.4953,4.656,-5.469|3.4,7.5999,1|-54.0953,9.975,-4.532|0,-90,-10|1,3.1999,4.2|-52.6283,1.484,3.102|33.3499,90,-90|-52.2673,8.487,-0.698|-33.35,90,-90|-52.2453,6.035,-5.226|-52.2453'
  2499. ..',2.44,-5.86|0,-90,170|1,2.4999,1.0999|-53.1953,8.072,-14.844|-52.3773,1.319,-14.498|-52.4953,5.951,-16.965|-51.4683,3.175,-13.748|16.9899,90,-90|-51.1953,4.987,-12.898|1.98,15.3,1|-51.7553,3.263,3.352'
  2500. ..'|-51.4683,6.798,-2.048|-16.99,90,-90|RJoint3|-51.1453,0.501,-3.748|3,0.5999,2|-52.2453,5.893,12.172|-52.2453,2.367,11.227|0,-90,165|RJoint1|-51.6453,0.501,4.878|-51.4953,4.987,3.602|-50.9953,4.987,-0.'
  2501. ..'898|1.98,2.6999,0.5999|RDrone|-49.9953,1.701,-3.748|-50.6453,0.501,4.878|0,123.69,-90|RPart3|-49.2103,1.209,-3.748|-49.1953,3.201,-3.748|-48.8953,4.901,-3.748|-48.2773,3.117,-3.748|2.0421,2.9999,0.6|-'
  2502. ..'47.9953,4.987,-3.748|1.98,3,0.6|-47.0953,0.501,5.878|RThruster|-45.9403,7.141,7.378|0,0,20|-45.2103,1.209,5.002|RPart2|-46.4573,6.953,12.478|RJoint2|-44.8233,5.153,7.378|0,0,50|-44.2773,3.117,5.252|-4'
  2503. ..'5.4233,7.329,12.478|GateshipScript|GateshipGui|LocalMouse|RemoveGui|LocalGui|Main|0.5,-175,0,55|0,350,0,100|0,0,0|Energy|0.4,0,0.5,0|0.6|Label0|0.1,0,0.1,0|0.4499,0,0.3499,0|1,1,1|10|Label1|0.55,0,0.1'
  2504. ..',0|0.3499,0,0.3499,0|100%|Meter|0.1,0,0.55,0|0.8,0,0.3499,0|Fill|1,0,1,0|0,1,0|Speed|0.6,0,0,0|1,1,0|Status|0.4,0,0,0|0.2,0,1,0|2|Fuselage|0.3,0,0.1,0|0.4,0,0.8,0|3|LJoint|0.2,0,0.6499,0|0.1,0,0.15,0|'
  2505. ..'0.498,0.498,0.498|LWing|0.125,0,0.5249,0|0.075,0,0.3499,0|RJoint|0.6999,0,0.6499,0|RWing|0.8,0,0.5249,0|0.1599,0,0.625,0|0.0799,0,0.2249,0|0.7599,0,0.625,0|0.375,0,0.18,0|0.25,0,0.0799,0|0.3019,0.3019'
  2506. ..',0.3019|LWeapons|0.2199,0,0.4099,0|0.075,0,0.1,0|RWeapons|0.7099,0,0.4099,0|Tabs|1,-200,0.5,-100|0,200,0,250|Button1|0,5,0,0|0.5,-10,0.1,0|Controls|12|Button2|0.5,5,0,0|DHD|OpenButton|0,-15,0.1,0|0,15'
  2507. ..',0.8999,-1|>|14|0,0,0.1,0|1,0,0.8999,0|ControlsList|0,5,0,10|1,-10,1,-15|Label1A|0.5,0,0.07,0|Take Off|Label2A|0,0,0.07,0|Land|Label3A|0,0,0.14,0|Fly|Label4A|0,0,0.2099,0|Maneuver|Label5A|0,0,0.28,0|L'
  2508. ..'evel Off|Label6A|0,0,0.3499,0|Speed Up|Label7A|0,0,0.4199,0|Slow Down|Label8A|0,0,0.49,0|Hover|Label9A|0,0,0.56,0|Fire|Label10A|0,0,0.6299,0|Cloak|Label11A|0,0,0.6999,0|Shield|Label12A|0,0,0.7699,0|Dr'
  2509. ..'ivepods|Label13A|0,0,0.8399,0|Rear Door|Label14A|0,0,0.91,0|Mid Door|Label1B|0.5,0,0,0|Y|Label11B|0.5,0,0.6999,0|V|Label12B|0.5,0,0.7699,0|B|Label13B|0.5,0,0.8399,0|N|Label14B|0.5,0,0.91,0|M|Label2B|X'
  2510. ..'|Label3B|0.5,0,0.14,0|W,S,A,D,Q,E|Label4B|0.5,0,0.2099,0|Shift + W,S,A,D,Q,E|Label5B|0.5,0,0.28,0|R|Label6B|0.5,0,0.3499,0|T|Label7B|0.5,0,0.4199,0|G|Label8B|0.5,0,0.49,0|Shift + G|Label9B|0.5,0,0.56,'
  2511. ..'0|F|Label10B|0.5,0,0.6299,0|C|Connector|0.5,-10,0,10|DHDPanel|32|0.25,0,0.6499,0|0.8862,0.6078,0.2509|0.15,0,0.05,0|0.25,0,0.05,0|0.3499,0,0.05,0|33|0.3499,0,0.6499,0|4|0.55,0,0.05,0|5|0.6499,0,0.05,0'
  2512. ..'|6|0.75,0,0.05,0|36|0.6499,0,0.6499,0|7|0.05,0,0.2,0|8|0.15,0,0.2,0|9|0.25,0,0.2,0|0.3499,0,0.2,0|11|0.4499,0,0.2,0|0.55,0,0.2,0|13|0.6499,0,0.2,0|0.75,0,0.2,0|15|0.85,0,0.2,0|16|0.05,0,0.3499,0|17|0.'
  2513. ..'15,0,0.3499,0|18|0.25,0,0.3499,0|19|20|21|0.55,0,0.3499,0|22|0.6499,0,0.3499,0|23|0.75,0,0.3499,0|24|0.85,0,0.3499,0|35|0.55,0,0.6499,0|25|0.15,0,0.5,0|26|0.25,0,0.5,0|27|0.3499,0,0.5,0|28|0.4499,0,0.'
  2514. ..'5,0|29|0.55,0,0.5,0|30|0.6499,0,0.5,0|31|0.75,0,0.5,0|34|0.4499,0,0.6499,0|Enter|0.375,0,0.8249,0|0.25,0,0.125,0|LocalCamera;0,55>17,55>18>54;2|1:2;n;1|2:3|3:4|4:5|5:6|6:7|7:8|8:8|9:8|10:8|11:8|12:8|3'
  2515. ..':4|3:4;3|2:3|3:4|4:9|5:10|6:11|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|2:3|3:4|4:12|6:13|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|1:14|2:3|3:15|4:16|5:17|6:18|7:8|8:8|9:8|10:8|11:8|12:8|3:15|3:15;1|1:19|2:3|'
  2516. ..'3:15|4:20|5:21|6:22|7:8|8:8|9:8|10:8|11:8|12:8|3:15|3:15;1|1:23|2:3|3:4|4:24|6:25|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|1:26|2:3|3:4|4:27|5:28|6:29|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|1:30|2:3|3:31|4:'
  2517. ..'32|5:21|6:33|7:8|8:8|9:8|10:8|11:8|12:8|3:31|3:31;1|1:30|2:3|3:31|4:34|5:21|6:33|7:8|8:8|9:8|10:8|11:8|12:8|3:31|3:31;1|1:35|2:3|3:15|4:36|6:37|7:8|8:8|9:8|10:8|11:8|12:8|3:15|3:15;n;4|13:38;p;1|1:35|'
  2518. ..'2:3|3:15|4:39|6:37|7:8|8:8|9:8|10:8|11:8|12:8|3:15|3:15;n;4|13:38;p;1|1:35|2:3|3:15|4:40|6:37|7:8|8:8|9:8|10:8|11:8|12:8|3:15|3:15;n;4|13:38;p;1|1:41|2:3|3:4|4:42|5:43|6:44|7:8|8:8|9:8|10:8|11:8|12:8|'
  2519. ..'3:4|3:4;1|1:41|2:3|3:4|4:45|5:46|6:47|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|2:3|3:4|4:48|5:49|6:50|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|2:3|3:4|4:51|5:52|6:53|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|2:3|3'
  2520. ..':4|4:54|5:55|6:56|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|2:3|3:4|4:57|5:58|6:59|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|2:3|3:4|4:60|5:43|6:61|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|2:3|3:4|4:62|5:46|6:63|7:'
  2521. ..'8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|2:3|3:4|4:64|5:65|6:66|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|2:3|3:4|4:67|5:43|6:68|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|1:69|2:3|3:4|4:70|5:43|6:71|7:8|8:8|9:8|10:8|'
  2522. ..'11:8|12:8|3:4|3:4;1|1:69|2:3|3:4|4:72|5:46|6:73|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|2:3|3:4|4:74|5:75|6:76|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|2:3|3:4|4:77|5:75|6:78|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3'
  2523. ..':4;1|2:3|3:4|4:79|5:17|6:76|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|2:3|3:4|4:80|6:81|14:82|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|2:3|3:4|4:83|5:17|6:84|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;3|2:3|3:4|4:85|5'
  2524. ..':86|6:87|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|1:88|2:3|3:15|4:89|5:75|6:90|7:8|8:8|9:8|10:8|11:8|12:8|3:15|3:15;3|2:3|3:4|4:91|5:92|6:93|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|2:3|3:4|4:94|5:95|6:96|7:8'
  2525. ..'|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|2:3|3:4|4:97|5:95|6:98|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|2:3|3:4|4:99|5:95|6:100|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|2:3|3:4|4:101|5:95|6:102|7:8|8:8|9:8|10:8|11:'
  2526. ..'8|12:8|3:4|3:4;1|2:3|3:4|4:103|5:65|6:104|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|2:3|3:4|4:105|5:46|6:106|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|2:3|3:4|4:107|5:43|6:108|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4'
  2527. ..';1|2:3|3:4|4:109|6:110|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;5|1:111|2:3|3:15|4:112|5:113|6:114|8:115|12:116|3:15|3:15;5|1:111|2:3|3:15|4:117|5:113|6:114|8:115|12:116|3:15|3:15;5|1:111|2:3|3:15|4:118|5:1'
  2528. ..'13|6:114|8:115|12:116|3:15|3:15;5|1:119|2:3|3:15|4:120|5:113|6:121|8:115|12:116|3:15|3:15;1|1:41|2:3|3:4|4:122|5:65|6:123|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|1:124|2:3|3:15|4:125|5:17|6:90|7:8|8:8|9:'
  2529. ..'8|10:8|11:8|12:8|3:15|3:15;5|1:126|2:3|3:15|4:127|6:121|8:115|12:116|3:15|3:15;1|1:128|2:3|3:15|4:129|5:130|6:131|7:8|8:8|9:8|10:8|11:8|12:8|3:15|3:15;1|2:3|3:4|4:132|6:133|7:8|8:8|9:8|10:8|11:8|12:8|'
  2530. ..'3:4|3:4;1|1:134|2:3|3:4|4:135|6:136|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;n;6|15:137|16:138;p;1|2:3|3:4|4:139|5:140|6:141|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|2:3|3:4|4:142|5:75|6:143|7:8|8:8|9:8|10:8|11'
  2531. ..':8|12:8|3:4|3:4;1|2:3|3:4|4:144|5:75|6:145|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|2:3|3:4|4:146|5:17|6:147|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;3|2:3|3:4|4:148|5:149|6:150|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3'
  2532. ..':4;1|2:3|3:4|4:151|5:152|6:153|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;n;4|13:154;p;1|2:3|3:4|4:155|5:95|6:156|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|2:3|3:4|4:157|5:95|6:158|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3'
  2533. ..':4;1|2:3|3:4|4:159|5:95|6:160|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|2:3|3:4|4:161|5:95|6:162|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|2:3|3:4|4:163|5:95|6:164|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|1:165|2:3'
  2534. ..'|3:4|4:166|5:167|6:71|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|2:3|3:4|4:168|6:169|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|2:3|3:4|4:170|6:171|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|1:172|2:3|3:15|19:173|4:174'
  2535. ..'|5:95|6:175|7:8|8:8|9:8|10:8|11:8|12:8|3:15|3:15;1|1:176|2:3|3:4|4:177|6:178|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;n;4|13:154;p;1|2:3|3:4|4:179|5:95|6:180|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|2:3|3:4|4:1'
  2536. ..'81|5:95|6:182|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|1:183|2:3|3:4|4:184|5:185|6:186|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;n;7|3:187|20:188|21:189|22:82|3:187|3:187;p;1|1:69|2:3|3:4|4:190|5:65|6:191|7:8|8:'
  2537. ..'8|9:8|10:8|11:8|12:8|3:4|3:4;1|1:192|2:3|3:15|4:193|5:17|6:18|7:8|8:8|9:8|10:8|11:8|12:8|3:15|3:15;3|2:3|3:4|4:194|5:195|6:87|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;3|1:69|2:3|3:4|4:196|5:197|6:198|7:8|8:'
  2538. ..'8|9:8|10:8|11:8|12:8|3:4|3:4;1|1:199|2:3|3:4|4:200|6:201|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|1:69|2:3|3:4|4:202|6:203|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|2:3|3:4|4:204|5:205|6:59|7:8|8:8|9:8|10:8|11'
  2539. ..':8|12:8|3:4|3:4;5|1:206|2:3|3:15|4:207|6:121|8:115|12:116|3:15|3:15;1|2:3|3:4|4:208|5:209|6:56|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|2:3|3:4|4:210|5:95|6:100|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;5|1:119|'
  2540. ..'2:3|3:15|4:211|5:212|6:121|8:115|12:116|3:15|3:15;1|2:3|3:4|4:213|5:95|6:102|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;3|2:3|3:4|4:214|5:215|6:216|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|2:3|3:4|4:217|5:75|6:21'
  2541. ..'8|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;5|1:111|2:3|3:15|4:219|5:212|6:114|8:115|12:116|3:15|3:15;1|2:3|3:4|4:220|6:110|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;5|1:111|2:3|3:15|4:221|5:212|6:114|8:115|12:116|'
  2542. ..'3:15|3:15;1|2:3|3:4|4:222|6:81|14:82|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;5|1:111|2:3|3:15|4:223|5:212|6:114|8:115|12:116|3:15|3:15;1|2:3|3:4|4:224|5:225|6:53|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|2:3|3:'
  2543. ..'4|4:226|6:13|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|2:3|3:4|4:227|5:17|6:228|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;3|2:3|3:4|4:229|5:230|6:231|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|2:3|3:4|4:232|5:233|6:104'
  2544. ..'|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|2:3|3:4|4:234|5:235|6:50|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|2:3|3:4|4:236|5:17|6:76|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;3|2:3|3:4|4:237|5:238|6:239|7:8|8:8|9:8|1'
  2545. ..'0:8|11:8|12:8|3:4|3:4;1|2:3|3:4|4:240|5:95|6:96|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|2:3|3:4|4:241|5:233|6:66|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|2:3|3:4|4:242|5:95|6:98|7:8|8:8|9:8|10:8|11:8|12:8|3:'
  2546. ..'4|3:4;1|2:3|3:4|4:243|5:244|6:63|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|2:3|3:4|4:245|5:167|6:246|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|2:3|3:4|4:247|5:244|6:106|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|2:3|'
  2547. ..'3:4|4:248|5:249|6:7|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|1:250|2:3|3:4|4:251|6:252|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|2:3|3:4|4:253|5:75|6:76|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;3|2:3|3:4|4:254|5:255'
  2548. ..'|6:239|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|1:256|2:3|3:4|4:257|6:201|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|2:3|3:4|4:258|5:167|6:108|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|2:3|3:4|4:259|5:167|6:260|7:8|'
  2549. ..'8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|1:261|2:3|3:15|4:262|6:37|7:8|8:8|9:8|10:8|11:8|12:8|3:15|3:15;n;4|13:38;p;3|1:165|2:3|3:4|4:263|5:264|6:198|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|1:265|2:3|3:4|4:266|5'
  2550. ..':233|6:123|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|1:261|2:3|3:15|4:267|6:37|7:8|8:8|9:8|10:8|11:8|12:8|3:15|3:15;n;4|13:38;p;1|1:261|2:3|3:15|4:268|6:37|7:8|8:8|9:8|10:8|11:8|12:8|3:15|3:15;n;4|13:38;p;'
  2551. ..'1|1:265|2:3|3:4|4:269|5:244|6:270|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|1:265|2:3|3:4|4:271|5:167|6:272|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|1:165|2:3|3:4|4:273|6:203|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4'
  2552. ..';1|1:274|2:3|3:15|4:275|5:276|6:22|7:8|8:8|9:8|10:8|11:8|12:8|3:15|3:15;1|1:165|2:3|3:4|4:277|5:233|6:191|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|1:278|2:3|3:31|4:279|5:276|6:33|7:8|8:8|9:8|10:8|11:8|12:'
  2553. ..'8|3:31|3:31;1|1:280|2:3|3:4|4:281|5:282|6:29|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|1:165|2:3|3:4|4:283|5:244|6:73|7:8|8:8|9:8|10:8|11:8|12:8|3:4|3:4;1|1:278|2:3|3:31|4:284|5:276|6:33|7:8|8:8|9:8|10:8|1'
  2554. ..'1:8|12:8|3:31|3:31;8|1:285;n;9|1:286;n;10|1:287;11|1:288;10|1:289;12|1:290|4:291|6:292|23:293|24:3|25:293;n;12|1:294|6:295|23:293|24:296|25:293|26:82;n;13|1:297|4:298|6:299|23:293|24:296|25:293|26:82|'
  2555. ..'27:294|28:300|29:301|30:3;13|1:302|4:303|6:304|23:293|24:296|25:293|26:82|27:305|28:300|31:3|30:3;12|1:306|4:307|6:308|23:293|25:293|26:82;n;12|1:309|6:310|23:311|25:293|26:82;p;p;12|1:312|4:313|6:295'
  2556. ..'|23:293|24:296|25:293|26:82;n;13|1:302|4:303|6:304|23:293|24:296|25:293|26:82|27:82|28:300|31:3|30:3;13|1:297|4:298|6:299|23:293|24:296|25:293|26:82|27:312|28:300|29:301|30:3;12|1:306|4:307|6:308|23:2'
  2557. ..'93|25:293|26:82;n;12|1:309|6:310|23:314|25:293|26:82;p;p;12|1:315|4:316|6:317|23:300|24:296|25:293|26:82|32:318|33:3;n;12|1:319|4:320|6:321|23:311|25:293|32:322;12|1:323|4:324|6:325|23:326|25:293|32:3'
  2558. ..'18;12|1:327|4:328|6:329|23:311|25:293|32:318;12|1:330|4:331|6:325|23:326|25:293|32:318;12|1:332|4:333|6:329|23:311|25:293|32:318;12|1:19|4:334|6:335|23:326|25:293|32:318;12|1:274|4:336|6:335|23:326|25'
  2559. ..':293|32:318;12|1:172|4:337|6:338|23:339|25:293|32:322;12|1:340|4:341|6:342|23:311|25:293|32:318;12|1:343|4:344|6:342|23:311|25:293|32:318;p;p;12|1:345|4:346|6:347|23:293|24:296|25:293|26:82;n;14|1:348'
  2560. ..'|4:349|6:350|23:293|24:296|25:293|26:82|27:351|28:300|29:352|30:3;14|1:353|4:354|6:350|23:293|24:296|25:293|26:82|27:355|28:300|29:352|30:3;14|1:356|4:357|6:358|23:293|24:296|25:293|27:359|28:300|29:3'
  2561. ..'60|30:3;12|1:351|4:361|6:362|23:293|24:3|25:293|26:82;n;12|1:363|4:364|6:365|23:293|24:3|25:293|26:82;n;13|1:366|6:367|23:293|24:296|25:300|27:368|28:300|30:3;13|1:369|4:370|6:367|23:293|24:296|25:300'
  2562. ..'|27:371|28:300|30:3;13|1:372|4:373|6:367|23:293|24:296|25:300|27:374|28:300|30:3;13|1:375|4:376|6:367|23:293|24:296|25:300|27:377|28:300|30:3;13|1:378|4:379|6:367|23:293|24:296|25:300|27:380|28:300|30'
  2563. ..':3;13|1:381|4:382|6:367|23:293|24:296|25:300|27:383|28:300|30:3;13|1:384|4:385|6:367|23:293|24:296|25:300|27:386|28:300|30:3;13|1:387|4:388|6:367|23:293|24:296|25:300|27:389|28:300|30:3;13|1:390|4:391'
  2564. ..'|6:367|23:293|24:296|25:300|27:392|28:300|30:3;13|1:393|4:394|6:367|23:293|24:296|25:300|27:395|28:300|30:3;13|1:396|4:397|6:367|23:293|24:296|25:300|27:398|28:300|30:3;13|1:399|4:400|6:367|23:293|24:'
  2565. ..'296|25:300|27:401|28:300|30:3;13|1:402|4:403|6:367|23:293|24:296|25:300|27:404|28:300|30:3;13|1:405|4:406|6:367|23:293|24:296|25:300|27:407|28:300|30:3;13|1:408|4:409|6:367|23:293|24:296|25:300|27:410'
  2566. ..'|28:300|30:3;13|1:411|4:412|6:367|23:293|24:296|25:300|27:413|28:300|30:3;13|1:414|4:415|6:367|23:293|24:296|25:300|27:416|28:300|30:3;13|1:417|4:418|6:367|23:293|24:296|25:300|27:419|28:300|30:3;13|1'
  2567. ..':420|4:421|6:367|23:293|24:296|25:300|27:422|28:300|30:3;13|1:423|4:367|6:367|23:293|24:296|25:300|27:424|28:300|30:3;13|1:425|4:426|6:367|23:293|24:296|25:300|27:427|28:300|30:3;13|1:428|4:429|6:367|'
  2568. ..'23:293|24:296|25:300|27:430|28:300|30:3;13|1:431|4:432|6:367|23:293|24:296|25:300|27:433|28:300|30:3;13|1:434|4:435|6:367|23:293|24:296|25:300|27:436|28:300|30:3;13|1:437|4:438|6:367|23:293|24:296|25:'
  2569. ..'300|27:439|28:300|30:3;13|1:440|4:441|6:367|23:293|24:296|25:300|27:442|28:300|30:3;13|1:443|4:444|6:367|23:293|24:296|25:300|27:445|28:300|30:3;13|1:446|4:447|6:367|23:293|24:296|25:300|27:448|28:300'
  2570. ..'|30:3;p;12|1:449|4:349|6:450|23:293|24:296|25:293|26:82;p;12|1:355|4:361|6:362|23:293|24:3|25:293|26:82|34:82;n;12|1:451|4:364|6:365|23:293|24:296|25:293|26:82;n;14|1:452|4:453|6:325|23:454|25:300|27:'
  2571. ..'452;14|1:3|4:455|6:325|23:454|25:300|27:3;14|1:318|4:456|6:325|23:454|25:300|27:318;14|1:322|4:457|6:325|23:454|25:300|27:322;14|1:458|4:459|6:325|23:454|25:300|27:458;14|1:460|4:461|6:325|23:454|25:3'
  2572. ..'00|27:460;14|1:462|4:463|6:325|23:454|25:300|27:462;14|1:464|4:465|6:325|23:454|25:300|27:464;14|1:466|4:467|6:325|23:454|25:300|27:466;14|1:468|4:469|6:325|23:454|25:300|27:468;14|1:470|4:471|6:325|2'
  2573. ..'3:454|25:300|27:470;14|1:472|4:473|6:325|23:454|25:300|27:472;14|1:301|4:474|6:325|23:454|25:300|27:301;14|1:475|4:476|6:325|23:454|25:300|27:475;14|1:352|4:477|6:325|23:454|25:300|27:352;14|1:478|4:4'
  2574. ..'79|6:325|23:454|25:300|27:478;14|1:360|4:480|6:325|23:454|25:300|27:360;14|1:481|4:482|6:325|23:454|25:300|27:481;14|1:483|4:484|6:325|23:454|25:300|27:483;14|1:485|4:486|6:325|23:454|25:300|27:485;14'
  2575. ..'|1:487|4:488|6:325|23:454|25:300|27:487;14|1:489|4:304|6:325|23:454|25:300|27:489;14|1:490|4:299|6:325|23:454|25:300|27:490;14|1:491|4:492|6:325|23:454|25:300|27:491;14|1:493|4:494|6:325|23:454|25:300'
  2576. ..'|27:493;14|1:495|4:496|6:325|23:454|25:300|27:495;14|1:497|4:498|6:325|23:454|25:300|27:497;14|1:499|4:500|6:325|23:454|25:300|27:499;14|1:501|4:502|6:325|23:454|25:300|27:501;14|1:503|4:504|6:325|23:'
  2577. ..'454|25:300|27:503;14|1:505|4:506|6:325|23:454|25:300|27:505;14|1:507|4:508|6:325|23:454|25:300|27:507;14|1:509|4:510|6:325|23:454|25:300|27:509;14|1:511|4:512|6:325|23:454|25:300|27:511;14|1:513|4:514'
  2578. ..'|6:325|23:454|25:300|27:513;14|1:515|4:516|6:325|23:454|25:300|27:515;14|1:517|4:518|6:519|23:454|25:300|27:517;p;12|1:449|4:354|6:450|23:293|24:296|25:293|26:82;p;p;10|1:520;p;p;p;')
  2579. for _,Object in pairs(Objects) do
  2580. Object.Parent = script and script.Parent==workspace and script or workspace
  2581. end
  2582. for _,f in pairs(ActualScripts) do f() end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement