Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Isomorphic = false-- Indicates if only a few people can use the TARDIS.
- local Users = {"Derek1017, drwho91")-- Indicates who can fly the TARDIS (If isomorphic is true!)
- local RandomPosition = true
- local windy = true
- local main = script.Parent
- local timel = main.Time
- local placel = main.Place
- local full = main.Parent
- local e1 = full.Entry
- local base = e1.Base
- local time = main.Timing
- local phase = false
- local strength = main.Strength
- local fly = main.Flying
- local work = main.Working
- local parts = main.Parts
- local comp = parts.Console
- local cont = comp.Control
- local radiob = cont.Radio
- local timeg = cont.Time
- local place = cont.Place
- local pad = cont.NumberPad
- local mode = main.Mode
- local go = cont.Go
- local locked = main.Locked
- local Starter = main.Starter
- local lock = cont.Lock
- local Shield = cont.Shield
- local shield = main.Shield
- local vector = cont.Vector
- local vectorV = main.VectorV
- local cent = comp.CenterThing
- local seat = comp.FlightSeat
- local open = main.Open
- local fuse = main.Fused
- local TBase = main.TardisBase
- local telebounce = false
- local dead = false
- local decalParts = {}
- local Decals = {}
- local matParts = {}
- local Materials = {}
- local Spots = {}
- local TardisParts = {}
- local PlayerDB = {}
- local nav = "Spots"
- local pump
- cent.Hum:play()
- e1.Base.Hum:play()
- function GetTParts(obj)
- for i,p in pairs(obj:children()) do
- if (string.find(p.className,"Part")) or (string.find(p.className,"Seat")) or (string.find(p.className,"Platform")) then
- table.insert(TardisParts,p)
- end
- GetTParts(p)
- end
- end
- GetTParts(main)
- local EntryParts = {}
- local EntryColors = {}
- function GetEParts(obj)
- for i,p in pairs(obj:children()) do
- if (string.find(p.className,"Part")) or (string.find(p.className,"Seat")) or (string.find(p.className,"Platform")) then
- table.insert(EntryParts,p)
- table.insert(EntryColors,p.BrickColor)
- end
- GetEParts(p)
- end
- end
- GetEParts(e1)
- function Display()
- local status = "Navy blue"
- if (fly.Value) then
- status = "Brick yellow"
- end
- if (time.Value) then
- status = "Earth green"
- end
- if (fuse.Value) then
- status = "Sand red"
- end
- if (phase) then
- status = "Magenta"
- end
- if (dead) then
- status = "Black"
- end
- for i,p in pairs(TBase:children()) do if (p.Name == "StatusDisplay") then p.Part1.BrickColor = BrickColor.new(status) end end
- end
- local new = Instance.new("BodyPosition")
- new.position = TBase.Position
- new.maxForce = Vector3.new(math.huge,math.huge,math.huge)
- new.Parent = TBase
- local new = Instance.new("BodyGyro")
- new.cframe = TBase.CFrame
- new.maxTorque = Vector3.new(math.huge,math.huge,math.huge)
- new.Parent = TBase
- coroutine.resume(coroutine.create(function()
- for i = 1,math.huge do
- wait(0.1)
- Display()
- new.cframe = full.Entry.Base.CFrame
- end
- end))
- function Weld(part0,part1,cf0,cf1)
- local w = Instance.new("Weld")
- local CJ = CFrame.new(part0.Position)
- w.Parent = part0
- w.Part0 = part0
- w.Part1 = part1
- w.C0 = part0.CFrame:inverse()*CJ
- w.C1 = part1.CFrame:inverse()*CJ
- w.Name = part1.Name
- part0.ChildRemoved:connect(function(removedWeld)
- if (removedWeld == w) then
- Weld(part0,part1,cf0,cf1)
- end
- end)
- wait()
- part1.Anchored = false
- end
- for i,p in pairs(TardisParts) do
- Weld(TBase,p,TBase.CFrame:inverse(),p.CFrame:inverse())
- p.Anchored = false
- end
- for i,p in pairs(EntryParts) do
- Weld(base,p,base.CFrame:inverse(),p.CFrame:inverse())
- p.Anchored = false
- end
- function PlaySound(sound,source,volume,soundrange,pitch)
- local p = Instance.new("Part")
- p.Anchored = true
- p.CanCollide = false
- p.Locked = true
- p.TopSurface = "Smooth"
- p.BottomSurface = "Smooth"
- p.formFactor = "Symmetric"
- p.Size = Vector3.new(1,1,1)
- p.Transparency = 1
- p.archivable = false
- p.Name = "SoundPlayer"
- p.Parent = workspace
- p.CFrame = CFrame.new(source)
- local s = Instance.new("Sound")
- s.SoundId = "http://www.roblox.com/asset/?id=" ..sound
- s.Pitch = pitch
- s.Volume = volume
- s.Parent = p
- s:play()
- game.Debris:AddItem(p,10)
- end
- e1.Teleport.Touched:connect(function(hit)
- wait()
- if (hit == nil) or (telebounce) or (not open.Value) or (work.Value) or (time.Value) then return end
- local hitguy = hit.Parent
- if (hitguy:findFirstChild("Humanoid")) and (hitguy:findFirstChild("Humanoid").Health > 0) then
- telebounce = true
- hitguy.Torso.CFrame = hitguy.Torso.CFrame + (parts.Door.Teleport.Position - hitguy.Torso.Position)
- wait(3)
- telebounce = false
- end
- end)
- parts.Door.Teleport.Touched:connect(function(hit)
- wait()
- if (hit == nil) or (telebounce) or (not open.Value) or (work.Value) or (time.Value) then return end
- local hitguy = hit.Parent
- if (hitguy:findFirstChild("Humanoid")) and (hitguy:findFirstChild("Humanoid").Health > 0) then
- telebounce = true
- hitguy.Torso.CFrame = hitguy.Torso.CFrame + (e1.Teleport.Position - hitguy.Torso.Position)
- wait(3)
- telebounce = false
- end
- end)
- function IsInside(small,big)
- local p = Instance.new("Part")
- p.Anchored = true
- p.Parent = workspace
- p.CFrame = small.CFrame - big.Position
- if (math.abs(p.Position.X) < (big.Size.X/2)) and (math.abs(p.Position.Y) < (big.Size.Y/2)) and (math.abs(p.Position.Z) < (big.Size.Z/2)) then
- local BrickIsIn = true
- print("Player is inside brick")
- else
- local BrickIsIn = false
- print("Player is not inside brick")
- end
- p:Remove()
- return BrickIsIn end
- coroutine.resume(coroutine.create(function()
- for i = 1,math.huge do
- wait(0.05)
- if (time.Value) or (work.Value) or (fly.Value) then
- for i = 1,5 do
- for a,p in pairs(TBase:children()) do
- if (p.Name == "Pumpy") then
- p.C1 = p.C1 * CFrame.new(0,-0.1,0)
- end
- end
- wait(0.05)
- end
- for i = 1,15 do
- for a,p in pairs(TBase:children()) do
- if (p.Name == "Pumpy") then
- p.C1 = p.C1 * CFrame.new(0,0.1,0)
- end
- end
- wait(0.05)
- end
- for i = 1,10 do
- for a,p in pairs(TBase:children()) do
- if (p.Name == "Pumpy") then
- p.C1 = p.C1 * CFrame.new(0,-0.1,0)
- end
- end
- wait(0.05)
- end
- end
- end
- end))
- shield.Value = false
- local t,t2,guy,player,gui,tool,tool2,vp1,vp2,vp3,fba,fbv,tbv,tbg,tba
- for i,p in pairs(e1:children()) do
- if (p.Name == "SecretButton") then
- local cd = Instance.new("ClickDetector")
- cd.MaxActivationDistance = 7
- cd.Parent = p
- cd.MouseClick:connect(function()
- if (work.Value) or (shield.Value) or (time.Value) or (locked.Value) then return end
- if (open.Value) then
- open.Value = false
- e1.Base.Hum.Volume = 0
- for i,p in pairs(e1:children()) do
- if (p.Name == "DoorPart") then
- p.Transparency = 0
- p.CanCollide = true
- end
- end
- for i,p in pairs(e1:children()) do
- if (p.Name == "LabelPart") then
- p.Mesh.MeshType = "Brick"
- p.CanCollide = true
- end
- end
- for i,p in pairs(TBase:children()) do
- if (p.Name == "DoorPart") then
- p.Part1.Transparency = 0
- p.Part1.CanCollide = true
- end
- end
- else
- open.Value = true
- e1.Base.Hum.Volume = 0.75
- for i,p in pairs(e1:children()) do
- if (p.Name == "DoorPart") then
- p.Transparency = 1
- p.CanCollide = false
- end
- end
- for i,p in pairs(e1:children()) do
- if (p.Name == "LabelPart") then
- p.Mesh.MeshType = "FileMesh"
- p.CanCollide = false
- end
- end
- for i,p in pairs(TBase:children()) do
- if (p.Name == "DoorPart") then
- p.Part1.Transparency = 1
- p.Part1.CanCollide = false
- end
- end
- end
- end)
- end
- end
- for i,p in pairs(parts.Door:children()) do
- if (p.Name == "OpenButton") then
- local cd = Instance.new("ClickDetector")
- cd.MaxActivationDistance = 7
- cd.Parent = p
- cd.MouseClick:connect(function()
- if (work.Value) or (shield.Value) or (time.Value) or (locked.Value) then return end
- if (open.Value) then
- open.Value = false
- e1.Base.Hum.Volume = 0
- for i,p in pairs(e1:children()) do
- if (p.Name == "DoorPart") then
- p.Transparency = 0
- p.CanCollide = true
- end
- end
- for i,p in pairs(e1:children()) do
- if (p.Name == "LabelPart") then
- p.Mesh.MeshType = "Brick"
- p.CanCollide = true
- end
- end
- for i,p in pairs(TBase:children()) do
- if (p.Name == "DoorPart") then
- p.Part1.Transparency = 0
- p.Part1.CanCollide = true
- end
- end
- else
- open.Value = true
- e1.Base.Hum.Volume = 0.75
- for i,p in pairs(e1:children()) do
- if (p.Name == "DoorPart") then
- p.Transparency = 1
- p.CanCollide = false
- end
- end
- for i,p in pairs(e1:children()) do
- if (p.Name == "LabelPart") then
- p.Mesh.MeshType = "FileMesh"
- p.CanCollide = false
- end
- end
- for i,p in pairs(TBase:children()) do
- if (p.Name == "DoorPart") then
- p.Part1.Transparency = 1
- p.Part1.CanCollide = false
- end
- end
- end
- end)
- end
- end
- vector.ClickDetector.MouseClick:connect(function()
- if vectorV.Value == 1 then
- vectorV.Value = 2
- else
- if vectorV.Value == 2 then
- vectorV.Value = 1
- end
- end
- end)
- for i,p in pairs(workspace:children()) do
- if (string.find(p.Name,"TardisSpot")) then
- table.insert(Spots,p)
- end
- end
- coroutine.resume(coroutine.create(function()
- for i = 1,math.huge do
- wait(1)
- if (strength.Value < 100) then
- strength.Value = strength.Value + 1
- end
- if (strength.Value > 100) then
- strength.Value = 100
- end
- if (strength.Value > 60) then
- dead = false
- cent.Cloister:stop()
- e1.Base.Cloister:stop()
- for i,p in pairs(e1:children()) do
- if (p:findFirstChild("Smoke") ~= nil) then
- p.Smoke.Enabled = false
- end
- if (p:findFirstChild("Fire") ~= nil) then
- p.Fire.Enabled = false
- end
- end
- end
- end
- end))
- function MakePart(x,y,z,trans,nam,colornam)
- local p = Instance.new("Part")
- p.Name = nam
- p.Transparency = trans
- p.TopSurface = "Smooth"
- p.BottomSurface = "Smooth"
- p.formFactor = "Symmetric"
- p.Size = Vector3.new(x,y,z)
- p.BrickColor = BrickColor.new(colornam)
- p.Anchored = true
- return p end
- function IsoMatch(nam)
- for i,p in pairs(users) do
- if (p == nam) then return true end
- end
- return false end
- function Push()
- if (not Windy) then return end
- for i,p in pairs(game.Players:children()) do
- if (p.Character ~= nil) and (p.Character:findFirstChild("Torso")) and ((p.Character.Torso.Position - base.Position).magnitude < 30) then
- local chance = math.random(1,5)
- if (chance == 1) then
- p.Character.Humanoid.Sit = true
- end
- end
- p.Character.Torso.Velocity = p.Character.Torso.Velocity + (CFrame.new(base.Position,p.Character.Torso.Position).lookVector * 2)
- end
- end
- function Teleport(PhOut,PhIn,cf)
- if (PhOut) then
- cent.Rotor:stop()
- e1.Base.Rotor:stop()
- cent.Hum:stop()
- e1.Base.Hum:stop()
- cent.Land:play()
- e1.Base.Land:play()
- Phase(false)
- end
- for i,p in pairs(e1:children()) do
- p.Transparency = 1
- end
- --[[for i,p in pairs(game.Players:children()) do
- if (p.Character ~= nil) and (p.Character:findFirstChild("Torso")) and ((p.Character.Torso.Position - base.Position).magnitude < 15) then
- p.Character.Torso.CFrame = p.Character.Torso.CFrame + (cf - base.Position)
- end
- end]]
- for i,p in pairs(e1:children()) do
- if (p ~= base) then
- p.CFrame = p.CFrame + (cf - base.Position)
- end
- end
- base.CFrame = base.CFrame + (cf - base.Position)
- if (PhIn) then
- Phase(true)
- end
- for i,p in pairs(e1:children()) do
- p.Transparency = 0
- end
- wait(0.5)
- cent.Hum:play()
- e1.Base.Hum:play()
- e1.Teleport.CanCollide = false
- e1.LSide.CanCollide = false
- e1.Inside.CanCollide = false
- e1.RSide.CanCollide = false
- e1.Top.CanCollide = false
- e1.Floor.CanCollide = false
- end
- function Phase(arriving)
- phase = true
- e1.LSide.Transparency = 5
- e1.Inside.Transparency = 5
- e1.RSide.Transparency = 5
- e1.Top.Transparency = 5
- e1.Floor.Transparency = 5
- if (arriving) then
- t = -0.1
- t2 = 0
- else
- t = 0.1
- t2 = 1
- end
- wait(0.5)
- for i,p in pairs(e1:children()) do
- table.insert(Materials,p.Material)
- table.insert(matParts,p)
- p.Material = "Plastic"
- end
- for i,p in pairs(e1:children()) do
- for x,z in pairs(p:children()) do
- if (z.className == "Decal") or (z.className == "Texture") then
- table.insert(Decals,z)
- z.Parent = nil
- table.insert(decalParts,p)
- end
- end
- end
- local lights = {}
- for i,p in pairs(e1:children()) do
- if (p.Name == "Light") then
- local flash = MakePart(1,1,1,0,"Flash",tostring(p.BrickColor))
- flash.Anchored = false
- flash.CanCollide = false
- local m = Instance.new("SpecialMesh")
- m.MeshType = "Sphere"
- m.Parent = flash
- flash.Parent = main
- local w = Instance.new("Weld")
- w.Part0 = p
- w.Part1 = flash
- w.Parent = game.JointsService
- table.insert(lights,flash)
- end
- end
- print("Beginning phase")
- cent.Rotor:stop()
- e1.Base.Rotor:stop()
- cent.Hum:stop()
- e1.Base.Hum:stop()
- cent.Land:play()
- e1.Base.Land:play()
- for i = 1,3 do
- Push()
- wait(0.2)
- for i,p in pairs(lights) do
- p.Mesh.Scale = p.Mesh.Scale + Vector3.new(10,10,10)
- end
- for i,p in pairs(e1:children()) do
- if (string.find(p.className, "Part")) or (string.find(p.className, "Seat")) then
- p.Transparency = p.Transparency + t
- end
- end
- end
- for i = 1,3 do
- wait(0.3)
- for i,p in pairs(lights) do
- p.Mesh.Scale = p.Mesh.Scale - Vector3.new(5,5,5)
- end
- end
- print("Phase complete")
- print("Beginning phase")
- for i = 1,3 do
- Push()
- wait(0.2)
- for i,p in pairs(lights) do
- p.Mesh.Scale = p.Mesh.Scale + Vector3.new(5,5,5)
- end
- for i,p in pairs(e1:children()) do
- if (string.find(p.className, "Part")) or (string.find(p.className, "Seat")) then
- p.Transparency = p.Transparency + t
- end
- end
- end
- for i = 1,3 do
- wait(0.3)
- for i,p in pairs(lights) do
- p.Mesh.Scale = p.Mesh.Scale - Vector3.new(5,5,5)
- end
- end
- print("Phase complete")
- print("Beginning phase")
- for i = 1,3 do
- Push()
- wait(0.2)
- for i,p in pairs(lights) do
- p.Mesh.Scale = p.Mesh.Scale + Vector3.new(5,5,5)
- end
- for i,p in pairs(e1:children()) do
- if (string.find(p.className, "Part")) or (string.find(p.className, "Seat")) then
- p.Transparency = p.Transparency + t
- end
- end
- end
- for i = 1,3 do
- wait(0.3)
- for i,p in pairs(lights) do
- p.Mesh.Scale = p.Mesh.Scale - Vector3.new(5,5,5)
- end
- end
- print("Phase complete")
- for i,p in pairs(e1:children()) do
- if (string.find(p.className, "Part")) or (string.find(p.className, "Seat")) then
- p.Transparency = t2
- end
- end
- for i,p in pairs(lights) do p:Remove() end
- if (not arriving) then
- for i,p in pairs(e1:children()) do
- if (string.find(p.className, "Part")) or (string.find(p.className, "Seat")) then
- p.BrickColor = BrickColor.new("White")
- end
- end
- for i = 1,4 do
- Push()
- wait(0.2)
- for i,p in pairs(e1:children()) do
- if (string.find(p.className, "Part")) or (string.find(p.className, "Seat")) then
- p.Transparency = p.Transparency - t/1.5
- end
- end
- end
- local FormerPosition = base.Position
- coroutine.resume(coroutine.create(function()
- for a = 1,math.random(2,4) do
- wait(0.75)
- for b = 1,4 do
- PlaySound(22919513,FormerPosition,(0.6 - ((b/10)*1.5)),30,1.5)
- wait(0.3)
- end
- end
- end))
- end
- for i = 1,4 do
- Push()
- wait(0.2)
- for i,p in pairs(e1:children()) do
- if (string.find(p.className, "Part")) or (string.find(p.className, "Seat")) then
- p.Transparency = p.Transparency + t/1.5
- end
- end
- end
- for i,p in pairs(EntryParts) do
- p.Transparency = t2
- p.BrickColor = EntryColors[i]
- end
- for i,p in pairs(decalParts) do
- Decals[i].Parent = p
- end
- Decals = {}
- decalParts = {}
- for i,p in pairs(matParts) do
- p.Material = Materials[i]
- end
- Materials = {}
- matParts = {}
- phase = false
- end
- go.ClickDetector.MouseClick:connect(function()
- if (Starter.Value == true) then
- Starter.Value = false
- end
- if (Starter.Value == false) then
- Starter.Value = true
- end
- end)
- Starter.Changed:connect(function()
- if (work.Value) or (time.Value) or (fuse.Value) or (fly.Value) or (shield.Value) or (open.Value) or (dead) then return end
- main.SpinSpeed.Value = 0
- time.Value = true
- work.Value = true
- cent.Land.Volume = 0
- cent.Warp:play()
- e1.Base.Land.Volume = 0
- e1.Base.Warp:play()
- local vortpos = Vector3.new(math.random(-800,800),10000,math.random(-800,800))
- vp1 = MakePart(1,1,1,0,"VortexMain","Really black")
- main.VortMesh:clone().Parent = vp1
- vp1.Parent = main
- vp1.CFrame = CFrame.new(vortpos) + Vector3.new(0,3.5,0)
- vp2 = MakePart(1,1,1,0,"VortexCap", "Really black")
- main.CapMesh:clone().Parent = vp2
- vp2.Parent = main
- vp2.CFrame = vp1.CFrame * CFrame.new(0,0,80)
- vp3 = MakePart(1,1,1,0,"VortexCap", "Really black")
- main.CapMesh:clone().Parent = vp3
- vp3.Parent = main
- vp3.CFrame = vp1.CFrame * CFrame.new(0,0,-80)
- coroutine.resume(coroutine.create(function()
- repeat
- wait(math.random(1,5))
- local lightning = MakePart(1,1,300,0.25,"Lightning","White")
- lightning.Parent = vp1
- lightning.CFrame = CFrame.new(vp1.Position + Vector3.new(0,0,math.random(-50,50)),(vp1.Position + Vector3.new(math.random(-5,5),math.random(-5,5),math.random(-5,5))))
- vp1.BrickColor = BrickColor.new("White")
- if (vp2.BrickColor ~= BrickColor.new("Sand green")) then
- vp2.BrickColor = BrickColor.new("White")
- end
- vp3.BrickColor = BrickColor.new("White")
- wait(0.25)
- lightning:Remove()
- vp1.BrickColor = BrickColor.new("Really black")
- if (vp2.BrickColor ~= BrickColor.new("Sand green")) then
- vp2.BrickColor = BrickColor.new("Really black")
- end
- vp3.BrickColor = BrickColor.new("Really black")
- until (vp2.BrickColor == BrickColor.new("Sand green"))
- end))
- Teleport(true,false,vortpos)
- local flightpos = base.Position
- tbg = Instance.new("BodyGyro")
- tbg.Name = "StayUp"
- tbg.Parent = e1.Base
- tbg.maxTorque = Vector3.new(500,0,500)
- tba = Instance.new("BodyAngularVelocity")
- tba.Name = "Spin"
- tba.Parent = e1.Base
- cent.Hum:play()
- e1.Base.Hum:play()
- e1.Base.Land.Volume = 1
- e1.Base.Rotor:play()
- cent.Land.Volume = 1
- cent.Rotor:play()
- tba.angularvelocity = Vector3.new(0,0,0)
- tba.maxTorque = Vector3.new(math.huge,math.huge,math.huge)
- coroutine.resume(coroutine.create(function()
- repeat
- if (math.abs(tba.angularvelocity.Y) > 10) then
- for i = 1,5 do
- wait(0.1)
- tba.angularvelocity = tba.angularvelocity * 0.9
- end
- else
- tba.angularvelocity = tba.angularvelocity + Vector3.new(0,math.random(-5,5)/10,0)
- end
- wait(0.1)
- --[[for i,p in pairs(game.Players:children()) do
- if (p.Character ~= nil) and (p.Character:findFirstChild("Torso")) and ((p.Character.Torso.Position - vp1.Position).magnitude < 50) then
- p.Character.Humanoid.Health = p.Character.Humanoid.Health - 1
- end
- end]]
- until (tba == nil)
- end))
- tbv = Instance.new("BodyPosition")
- tbv.Name = "Hover"
- tbv.Parent = e1.Base
- tbv.position = e1.Base.Position
- tbv.maxForce = Vector3.new(math.huge,math.huge,math.huge)
- coroutine.resume(coroutine.create(function()
- repeat
- for i = 1,10 do
- tbv.position = vp1.Position + Vector3.new(i,0,0)
- wait(0.1)
- end
- wait(1)
- for i = 1,20 do
- tbv.position = vp1.Position + Vector3.new((10-i),0,0)
- wait(0.1)
- end
- wait(1)
- for i = 1,10 do
- tbv.position = vp1.Position + Vector3.new(-(10-i),0,0)
- wait(0.1)
- end
- until (vp2.BrickColor == BrickColor.new("Sand green"))
- tbv.position = vp1.Position
- end))
- wait(0.5)
- work.Value = false
- end)
- workspace.DescendantAdded:connect(function(obj)
- if (obj.className == "Explosion") then
- if ((obj.Position - e1.Teleport.Position).magnitude < ((obj.BlastRadius/2)+7)) and (e1:findFirstChild("TARDISFF") == nil) then
- print("A TARDIS got hit by an explosion.")
- if (strength.Value > 0) then
- strength.Value = strength.Value - 25
- end
- if (strength.Value < 0) then
- strength.Value = 0
- end
- if (strength.Value == 0) then
- dead = true
- end
- if (strength.Value < 10) then
- cent.Cloister:play()
- e1.Base.Cloister:play()
- print("Ding! Ding! Cloister bell!")
- for i,p in pairs(e1:children()) do
- if (p:findFirstChild("Smoke") ~= nil) then
- p.Smoke.Enabled = true
- end
- if (p:findFirstChild("Fire") ~= nil) then
- p.Fire.Enabled = true
- end
- end
- end
- if (time.Value) and (dead) then
- work.Value = false
- local spot = Spots[math.random(1,#Spots)]
- if (spot) then
- e1.Parent = full
- pos = e1.Base.Position
- for i,p in pairs(e1:children()) do
- p.Transparency = 0
- if (p ~= base) then
- p.CFrame = p.CFrame + (pos - base.Position)
- end
- end
- base.CFrame = base.CFrame + (pos - base.Position)
- vp2.BrickColor = BrickColor.new("Sand green")
- local vpF = MakePart(1,1,1,0,"Flame Vortex","Sand green")
- main.FlameMesh:clone().Parent = vpF
- vpF.CFrame = vp1.CFrame * CFrame.new(0,0,160)
- vpF.Parent = main
- coroutine.resume(coroutine.create(function()
- wait(2)
- if (RandomPosition) then
- Teleport(false,true,spot.Position + Vector3.new(math.random(-Offset,Offset),0,math.random(-Offset,Offset)))
- else
- Teleport(false,true,spot.Position)
- end
- end))
- for i = 1,160 do
- vpF.CFrame = vpF.CFrame * CFrame.new(0,0,-1)
- wait(0.01)
- end
- vp3.BrickColor = BrickColor.new("Sand green")
- wait(3)
- vp1:Remove()
- vp2:Remove()
- vp3:Remove()
- vpF:Remove()
- time.Value = false
- work.Value = false
- cent.Rotor:stop()
- e1.Base.Rotor:stop()
- end
- end
- if (fly.Value) and (dead) then
- for i,p in pairs(e1.Base:children()) do
- if (not string.find(p.className, "Mesh")) then
- p:Remove()
- end
- end
- end
- end
- end
- end)
- Starter.Changed:connect(function()
- local TelePos = nil
- if (not time.Value) or (work.Value) or (fuse.Value) or (fly.Value) or (shield.Value) or (open.Value) then return end
- main.SpinSpeed.Value = 3
- if (vectorV.Value == 1) then
- local spot = workspace:findFirstChild("TardisSpot" ..placel.Value.. "-" ..timel.Value)
- if (spot) then
- TelePos = spot.Position
- end
- else
- local x = tonumber(main.X.Value)
- local y = tonumber(main.Y.Value)
- local z = tonumber(main.Z.Value)
- if (x) and (y) and (z) then
- TelePos = Vector3.new(x,y,z)
- end
- end
- if (TelePos ~= nil) then
- work.Value = true
- for i,p in pairs(e1:children()) do
- p.Transparency = 0
- end
- vp2.BrickColor = BrickColor.new("Sand green")
- local vpF = MakePart(1,1,1,0,"Flame Vortex","Sand green")
- main.FlameMesh:clone().Parent = vpF
- vpF.CFrame = vp1.CFrame * CFrame.new(0,0,160)
- vpF.Parent = main
- for i = 1,160 do
- vpF.CFrame = vpF.CFrame * CFrame.new(0,0,-1)
- wait(0.01)
- end
- vp3.BrickColor = BrickColor.new("Sand green")
- wait(1)
- tbg:Remove()
- tba:Remove()
- tbv:Remove()
- if (RandomPosition) then
- Teleport(false,true,TelePos + Vector3.new(math.random(-Offset,Offset),0,math.random(-Offset,Offset)))
- else
- Teleport(false,true,TelePos)
- end
- wait(0.5)
- vp1:Remove()
- vp2:Remove()
- vp3:Remove()
- vpF:Remove()
- time.Value = false
- cent.Rotor:stop()
- base.Rotor:stop()
- wait(0.5)
- work.Value = false
- end
- end)
- function Begin(weld)
- if (weld.className == "Weld") and ((IsoMatch(weld.Part1.Parent.Name)) or (not Isomorphic)) then
- local person = game.Players:findFirstChild(weld.Part1.Parent.Name)
- if (person) then player = person; guy = player.Character end
- nav = "Spots"
- seat.ChildRemoved:connect(End)
- gui = main.FlightGUI:clone()
- gui.Parent = player.PlayerGui
- tool = main.TardisCam:clone()
- tool.CamTarget.Value = e1.Base
- tool.Parent = player.Backpack
- tool2 = main.TardisLaser:clone()
- tool2.Origin.Value = full
- tool2.Parent = player.Backpack
- gmain = gui.Main
- gmain.SpnSpd.Text = "Spinning speed is " ..main.SpinSpeed.Value
- gmain.SpeedUp.MouseButton1Click:connect(function()
- if (main.SpinSpeed.Value < 5) then
- main.SpinSpeed.Value = main.SpinSpeed.Value + 1
- end
- gmain.SpnSpd.Text = "Spinning speed is " ..main.SpinSpeed.Value
- end)
- gmain.SpeedDown.MouseButton1Click:connect(function()
- if (main.SpinSpeed.Value > -5) then
- main.SpinSpeed.Value = main.SpinSpeed.Value - 1
- end
- gmain.SpnSpd.Text = "Spinning speed is " ..main.SpinSpeed.Value
- end)
- gmain.Stable.MouseButton1Click:connect(function()
- if (base:findFirstChild("BlueGyro")) then
- base.BlueGyro:Remove()
- else
- local blg = Instance.new("BodyGyro")
- blg.maxTorque = Vector3.new(math.huge,math.huge,math.huge)
- blg.Parent = base
- blg.Name = "BlueGyro"
- end
- end)
- gmain.LockButton.MouseButton1Click:connect(function()
- if (work.Value) or (shield.Value) or (time.Value) or (locked.Value) or (fuse.Value) then return end
- if (open.Value) then
- open.Value = false
- e1.Base.Hum.Volume = 0
- for i,p in pairs(e1:children()) do
- if (p.Name == "DoorPart") then
- p.Transparency = 0
- p.CanCollide = true
- end
- end
- for i,p in pairs(e1:children()) do
- if (p.Name == "LabelPart") then
- p.Mesh.MeshType = "Brick"
- p.CanCollide = true
- end
- end
- for i,p in pairs(TBase:children()) do
- if (p.Name == "DoorPart") then
- p.Part1.Transparency = 0
- p.Part1.CanCollide = true
- end
- end
- else
- open.Value = true
- e1.Base.Hum.Volume = 0.75
- for i,p in pairs(e1:children()) do
- if (p.Name == "DoorPart") then
- p.Transparency = 1
- p.CanCollide = false
- end
- end
- for i,p in pairs(e1:children()) do
- if (p.Name == "LabelPart") then
- p.Mesh.MeshType = "FileMesh"
- p.CanCollide = false
- end
- end
- for i,p in pairs(TBase:children()) do
- if (p.Name == "DoorPart") then
- p.Part1.Transparency = 1
- p.Part1.CanCollide = false
- end
- end
- end
- end)
- gmain.FlightStart.MouseButton1Click:connect(ManageFlight)
- gmain.Stop.MouseButton1Click:connect(function()
- if (fly.Value) then
- e1.Base.Fly.velocity = Vector3.new(0,0,0)
- end
- end)
- gmain.East.MouseButton1Click:connect(function()
- if (fly.Value) then
- e1.Base.Fly.velocity = Vector3.new(-15,0,0)
- end
- end)
- gmain.West.MouseButton1Click:connect(function()
- if (fly.Value) then
- e1.Base.Fly.velocity = Vector3.new(15,0,0)
- end
- end)
- gmain.North.MouseButton1Click:connect(function()
- if (fly.Value) then
- e1.Base.Fly.velocity = Vector3.new(0,0,15)
- end
- end)
- gmain.South.MouseButton1Click:connect(function()
- if (fly.Value) then
- e1.Base.Fly.velocity = Vector3.new(0,0,-15)
- end
- end)
- gmain.Up.MouseButton1Click:connect(function()
- if (fly.Value) then
- e1.Base.Fly.velocity = Vector3.new(0,15,0)
- end
- end)
- gmain.Down.MouseButton1Click:connect(function()
- if (fly.Value) then
- e1.Base.Fly.velocity = Vector3.new(0,-15,0)
- end
- end)
- end
- end
- function ManageFlight()
- if (not fly.Value) and (not work.Value) and (not fuse.Value) and (not dead) then
- work.Value = true
- fly.Value = true
- cent.Rotor:play()
- e1.Base.Rotor:play()
- local flightpos = base.Position
- local fba = Instance.new("BodyAngularVelocity")
- fba.Name = "Spin"
- fba.Parent = e1.Base
- fba.angularvelocity = Vector3.new(0,0,0)
- fba.maxTorque = Vector3.new(math.huge,math.huge,math.huge)
- coroutine.resume(coroutine.create(function()
- repeat
- wait(0.1)
- fba.angularvelocity = Vector3.new(0,main.SpinSpeed.Value,0)
- until (fba == nil)
- end))
- fbv = Instance.new("BodyVelocity")
- fbv.Name = "Fly"
- fbv.Parent = e1.Base
- fbv.velocity = Vector3.new(0,0,0)
- fbv.maxForce = Vector3.new(math.huge,math.huge,math.huge)
- work.Value = false
- elseif (not work.Value) and (not dead) then
- e1.Base.Spin:Remove()
- fbv:Remove()
- fly.Value = false
- cent.Rotor:stop()
- e1.Base.Rotor:stop()
- end
- end
- function End(weld)
- if (weld.className == "Weld") then
- wait(0.5)
- gui:Remove()
- gui = nil
- tool:Remove()
- tool = nil
- tool2:Remove()
- tool2 = nil
- guy = nil
- player = nil
- end
- end
- seat.ChildAdded:connect(Begin)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement