Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function waitForChild(parent, name)
- while parent:FindFirstChild(name) == nil do -- if the object can't be found inside the parent, the script will wait for it (this is unstable because it might freeze the script while waiting)
- wait()
- end
- return parent:FindFirstChild(name) -- this will return the OBJECT that the script found, it means that you can either clone or delete it
- end
- local planemodel = waitForChild(game.Workspace, "Plane"):Clone()
- wait(5)
- local wii = game.Workspace.Wii
- local boss = game.Workspace.BossMusic
- local isis = game.Workspace.ISIS
- local isisexplosion = game.Workspace.ISISExplosion
- local firenoise = game.Workspace.FireNoise
- local trump = game.Workspace.WeAreNumberTrump
- local heavywind = game.Workspace.HeavyWind
- local tornadowind = game.Workspace.TornadoWind
- local rain = game.Workspace.Rain
- local thunder = game.Workspace.Thunder
- local running90s = game.Workspace:FindFirstChild("90s")
- local sonic = game.Workspace.SuperSonic
- local dubstep = game.Workspace.LazorDubstep
- local lazor = game.Workspace.FiringLazor
- local tooslow = game.Workspace.TooSlow
- local sanics = game.Workspace.SanicSong
- local nyans = game.Workspace.NyanCatSong
- local rainingmen = game.Workspace.RainingMen
- local fidgets = game.Workspace.FidgetSpinnerSong
- local normalexplosion = game.Workspace.NormalExplosion
- local launch = game.Workspace.Launch
- local explosionv = game.Workspace.explosion
- local hasglitched = game.Workspace.PlaneHasGlitched
- local glitchdetector = game.Workspace.BrickToSeeIfPlaneHasGlitch.Check
- local dooropen = game.Workspace.DoorOpened
- local conveyor = game.Workspace.ConveyorOn
- local triggers = game.Workspace.EVENT_TRIGGERS
- local timesup = false
- local events = {
- "Normal",
- "Terrorist",
- "Fire",
- "Trump",
- "Tornado",
- "Lightning",
- "Nuke",
- "90s",
- "Shoop Da Woop",
- "Sanic",
- "Nyan Cat",
- "Raining Bomb",
- "Fidget Spinner"
- }
- function countdown()
- wii:Play()
- local h = Instance.new("Hint", game.Workspace)
- h.Text = "The next flight will arrive shortly, please wait..."
- wait(3)
- glitchdetector.Disabled = false -- when the plane respawn, it gets very glitchy even though later it's fine, so we will wait before actually checking is it glitched or not
- h.Text = "The plane has arrived!"
- launch.Value = false
- dooropen.Value = true
- wait(5)
- local seconds = 20
- for i = 1, 20 do
- h.Text = "The current plane will leave in " ..seconds.. " seconds."
- seconds = seconds - 1
- wait(1)
- end
- h.Text = "The current plane is about to leave. Have a nice trip!"
- wait(5)
- h:remove()
- dooropen.Value = false
- wii:Stop()
- end
- function setEventTime(Time)
- for i = Time, 0, -1 do -- the second value is 0 because you want the timer to countdown all the way to 0
- local eventtime = game.Workspace:FindFirstChild("EventTime")
- if eventtime ~= nil then
- eventtime.Value = i
- end
- wait(1)
- end
- timesup = true
- end
- while true do
- countdown()
- local chosenevent = events[math.random(1, #events)]
- print("Now playing: " ..chosenevent.. " event")
- timesup = false -- reset the time for another event to occur
- if chosenevent == "Normal" then
- if hasglitched.Value == false then
- glitchdetector.Disabled = true
- local routine = coroutine.create(setEventTime)
- coroutine.resume(routine, 120)
- local plane = game.Workspace:FindFirstChild("Plane")
- boss:Play()
- local m = Instance.new("Message", game.Workspace)
- m.Text = "OH NO! THE PLANE IS LOSING CONTROL!"
- launch.Value = true
- wait(5)
- m:remove()
- local h = Instance.new("Hint", game.Workspace)
- h.Text = "The plane is about to crash into an island!"
- explosionv.Value = math.random(1,3)
- repeat
- wait()
- until timesup == true
- coroutine.yield(routine) -- if you don't yield, the coroutine will not be able to restart (aka dead forever)
- h.Text = "Oh well, this happened many times already, the next plane will arrive soon."
- boss:Stop()
- launch.Value = false
- explosionv.Value = 0
- plane:remove()
- wait(5)
- h:remove()
- local newplane = planemodel:Clone()
- newplane.Parent = game.Workspace
- newplane:MakeJoints()
- else
- local m = Instance.new("Message", game.Workspace)
- m.Text = "SERVER: The plane seems to have glitched out somehow, reseting game..."
- game.Workspace:FindFirstChild("Plane"):remove()
- wait(5)
- m:remove()
- local newplane = planemodel:Clone()
- newplane.Parent = game.Workspace
- newplane:MakeJoints()
- hasglitched.Value = false -- reset the value to continue debugging
- end
- end
- if chosenevent == "Terrorist" then
- if hasglitched.Value == false then
- glitchdetector.Disabled = true
- local routine = coroutine.create(setEventTime)
- coroutine.resume(routine, 100)
- local plane = game.Workspace:FindFirstChild("Plane")
- for i,v in pairs(plane:FindFirstChild("Terrorist"):GetChildren()) do
- if v:IsA("Part") then
- v.Transparency = 0
- if v.Name == "Head" then
- --v.face.Transparency = 0
- end
- elseif v:IsA("Hat") then
- v.Handle.Transparency = 0
- end
- end
- local m = Instance.new("Message", game.Workspace)
- launch.Value = true
- boss:Play()
- m.Text = "THERE IS A TERRORIST ON THE PLANE!!"
- wait(3)
- m.Text = "Terrorist: ALLAHU AKBAR!!!"
- wait(1)
- m:remove()
- boss:Stop()
- local terrorist = plane:FindFirstChild("Terrorist")
- if terrorist and terrorist:FindFirstChild("Torso") then
- local h = Instance.new("Hint", game.Workspace)
- h.Text = "THE TERRORIST HAS EXPLODED THE PLANE!!"
- local explosion = Instance.new("Explosion", plane:FindFirstChild("Terrorist").Torso)
- explosion.BlastRadius = 1000
- explosion.BlastPressure = 500000
- explosion.Position = plane:FindFirstChild("Terrorist").Torso.Position
- game.Debris:AddItem(explosion, 5)
- isisexplosion:Play()
- isis:Play()
- repeat
- wait()
- until timesup == true
- coroutine.yield(routine) -- without yield, the coroutine will not be able to restart (aka dead forever)
- h.Text = "Hopefully next time, we will check our passengers more carefully."
- isis:Stop()
- isisexplosion:Stop()
- launch.Value = false
- plane:remove()
- wait(5)
- h:remove()
- local newplane = planemodel:Clone()
- newplane.Parent = game.Workspace
- newplane:MakeJoints()
- else
- local m = Instance.new("Message", game.Workspace)
- m.Text = "SERVER: Something went wrong with the current event, reseting game..."
- plane:remove()
- wait(5)
- m:remove()
- local newplane = planemodel:Clone()
- newplane.Parent = game.Workspace
- newplane:MakeJoints()
- end
- else
- local m = Instance.new("Message", game.Workspace)
- m.Text = "SERVER: The plane seems to have glitched out somehow, reseting game..."
- game.Workspace:FindFirstChild("Plane"):remove()
- wait(5)
- m:remove()
- local newplane = planemodel:Clone()
- newplane.Parent = game.Workspace
- newplane:MakeJoints()
- hasglitched.Value = false -- reset the value to continue debugging
- end
- end
- if chosenevent == "Fire" then
- if hasglitched.Value == false then
- glitchdetector.Disabled = true
- local routine = coroutine.create(setEventTime)
- coroutine.resume(routine, 120)
- local m = Instance.new("Message", game.Workspace)
- m.Text = "Uh oh, the plane's engine seems to be overheating."
- wait(3)
- m.Text = "IT'S BURNING, THE PLANE IS ON FIRE!!"
- launch.Value = true
- boss:Play()
- firenoise:Play()
- local plane = game.Workspace:FindFirstChild("Plane")
- if plane == nil then return end
- local jet = plane.Black:FindFirstChild("Jet")
- delay(0, function()
- for i,x in pairs(game.Workspace:FindFirstChild("Plane"):GetChildren()) do
- if x:IsA("BasePart") then
- x.BrickColor = BrickColor.new("Really red")
- x.Material = "CorrodedMetal"
- x.Touched:connect(function(p)
- if p and p.Parent then
- local hum = p.Parent:FindFirstChild("Humanoid")
- if hum ~= nil then
- hum:TakeDamage(1)
- end
- end
- end)
- game.Debris:AddItem(x, 30)
- wait()
- elseif x:IsA("Model") then
- for i,y in pairs(x:GetChildren()) do
- if y:IsA("BasePart") then
- y.BrickColor = BrickColor.new("Really red")
- y.Material = "CorrodedMetal"
- y.Touched:connect(function(p)
- if p and p.Parent then
- local hum = p.Parent:FindFirstChild("Humanoid")
- if hum ~= nil then
- hum:TakeDamage(1)
- end
- end
- end)
- game.Debris:AddItem(y, 30)
- wait()
- end
- end
- end
- end
- end)
- wait(2)
- m:remove()
- h = Instance.new("Hint", game.Workspace)
- h.Text = "The plane is burning, try to save yourself!"
- wait(30)
- firenoise.Volume = 0.25
- repeat
- wait()
- until timesup == true
- coroutine.yield(routine) -- if you don't yield, the coroutine will not be able to restart (aka dead forever)
- h.Text = "Next time we should bring a bucket of water on the plane if this happens again..."
- boss:Stop()
- firenoise.Volume = 0.1
- launch.Value = false
- plane:remove()
- wait(5)
- h:remove()
- firenoise:Stop()
- local newplane = planemodel:Clone()
- newplane.Parent = game.Workspace
- newplane:MakeJoints()
- else
- local m = Instance.new("Message", game.Workspace)
- m.Text = "SERVER: The plane seems to have glitched out somehow, reseting game..."
- game.Workspace:FindFirstChild("Plane"):remove()
- wait(5)
- m:remove()
- local newplane = planemodel:Clone()
- newplane.Parent = game.Workspace
- newplane:MakeJoints()
- hasglitched.Value = false -- reset the value to continue debugging
- end
- end
- if chosenevent == "Trump" then
- if hasglitched.Value == false then
- glitchdetector.Disabled = true
- local routine = coroutine.create(setEventTime)
- coroutine.resume(routine, 60) -- cannot put in decimal because the setEventTime() function only minus the time by 1
- local wall = game.Lighting.BorderWall:Clone()
- local plane = game.Workspace:FindFirstChild("Plane")
- local center = plane.PlaneCenterPart
- if plane ~= nil and center ~= nil and conveyor ~= nil then
- launch.Value = true
- conveyor.Value = true
- local bv = Instance.new("BodyVelocity", center)
- bv.maxForce = Vector3.new(math.huge, math.huge, math.huge)
- bv.velocity = Vector3.new(750,0,0)
- game.Debris:AddItem(bv, 16)
- wall.Parent = game.Workspace
- local m = Instance.new("Message", game.Workspace)
- m.Text = "The plane is taking off!"
- wait(3)
- m:remove()
- wait(5)
- local m = Instance.new("Message", game.Workspace)
- m.Text = "Wait I haven't noticed, what is that thing in the distance?"
- wait(8)
- m.Text = "It is Trump's border wall! The plane is flying straight into it and can't be stopped!"
- trump:Play()
- wait(7)
- m:remove()
- local h = Instance.new("Hint", game.Workspace)
- h.Text = "THE PLANE HAS CRASHED INTO TRUMP'S BORDER WALL!"
- conveyor.Value = false
- repeat
- wait()
- until timesup == true
- coroutine.yield(routine) -- if you don't yield, the coroutine will not be able to restart (aka dead forever)
- trump:Stop()
- h.Text = "That wall really needs to be destroyed..."
- wall:remove()
- launch.Value = false
- plane:remove()
- wait(5)
- h:remove()
- local newplane = planemodel:Clone()
- newplane.Parent = game.Workspace
- newplane:MakeJoints()
- else
- local m = Instance.new("Message", game.Workspace)
- m.Text = "SERVER: Something went wrong with the current event, reseting game..."
- plane:remove()
- wait(5)
- m:remove()
- local newplane = planemodel:Clone()
- newplane.Parent = game.Workspace
- newplane:MakeJoints()
- end
- else
- local m = Instance.new("Message", game.Workspace)
- m.Text = "SERVER: The plane seems to have glitched out somehow, reseting game..."
- game.Workspace:FindFirstChild("Plane"):remove()
- wait(5)
- m:remove()
- local newplane = planemodel:Clone()
- newplane.Parent = game.Workspace
- newplane:MakeJoints()
- hasglitched.Value = false -- reset the value to continue debugging
- end
- end
- if chosenevent == "Tornado" then
- if hasglitched.Value == false then
- glitchdetector.Disabled = true
- local routine = coroutine.create(setEventTime)
- coroutine.resume(routine, 120)
- local originaltime = game.Lighting.TimeOfDay
- local originalambient = game.Lighting.Ambient
- local plane = game.Workspace:FindFirstChild("Plane")
- local tornado = game.Lighting.Tornado:Clone()
- local cloud = game.Lighting.StormyCloud:Clone()
- local m = Instance.new("Message", game.Workspace)
- cloud.Parent = game.Workspace
- m.Text = "The weather is a very windy and foggy at the moment..."
- heavywind:Play()
- launch.Value = true
- conveyor.Value = true
- game.Lighting.TimeOfDay = "18:15:00"
- game.Lighting.Ambient = Color3.new(0.3, 0.3, 0.3)
- wait(5)
- m:remove()
- tornado.Parent = game.Workspace
- tornadowind:Play()
- wait(5)
- local m = Instance.new("Message", game.Workspace)
- m.Text = "What is that spinning thing in the distance? It's too blury."
- wait(5)
- m.Text = "IT'S ACTUALLY A TORNADO! THE PLANE IS BEING SUCKED INTO IT!"
- boss:Play()
- wait(2.5)
- m:remove()
- local h = Instance.new("Hint", game.Workspace)
- h.Text = "The plane got destroyed by the tornado! Survive the fall!"
- conveyor.Value = false
- repeat
- wait()
- until timesup == true
- coroutine.yield(routine) -- if you don't yield, the coroutine will not be able to restart (aka dead forever)
- h.Text = "Next time we should check the weather forecast before flying..."
- boss:Stop()
- launch.Value = false
- plane:remove()
- wait(5)
- h:remove()
- heavywind:Stop()
- tornadowind:Stop()
- tornado:remove()
- cloud:remove()
- game.Lighting.Ambient = originalambient
- game.Lighting.TimeOfDay = originaltime
- local newplane = planemodel:Clone()
- newplane.Parent = game.Workspace
- newplane:MakeJoints()
- else
- local m = Instance.new("Message", game.Workspace)
- m.Text = "SERVER: The plane seems to have glitched out somehow, reseting game..."
- game.Workspace:FindFirstChild("Plane"):remove()
- wait(5)
- m:remove()
- local newplane = planemodel:Clone()
- newplane.Parent = game.Workspace
- newplane:MakeJoints()
- hasglitched.Value = false -- reset the value to continue debugging
- end
- end
- if chosenevent == "Lightning" then
- if hasglitched.Value == false then
- glitchdetector.Disabled = true
- local routine = coroutine.create(setEventTime)
- coroutine.resume(routine, 120)
- local originaltime = game.Lighting.TimeOfDay
- local originalambient = game.Lighting.Ambient
- local plane = game.Workspace:FindFirstChild("Plane")
- local bolt = game.Lighting.LightningBolt:Clone()
- local bolt2 = game.Lighting.LightningBolt:Clone()
- local cloud = game.Lighting.StormyCloud:Clone()
- cloud.Parent = game.Workspace
- local m = Instance.new("Message", game.Workspace)
- m.Text = "It's raining heavily right now, let's hope nothing will go wrong in our flight."
- rain:Play()
- launch.Value = true
- conveyor.Value = true
- game.Lighting.TimeOfDay = "18:15:00"
- game.Lighting.Ambient = Color3.new(0.3, 0.3, 0.3)
- wait(6)
- local l1 = plane:FindFirstChild("Bright red").lightning1
- bolt.Parent = game.Workspace
- bolt.Position = l1.Position + Vector3.new(0, (bolt.Size/2), 0)
- local explosion = Instance.new("Explosion", l1)
- explosion.BlastPressure = 999999999
- explosion.BlastRadius = 15
- explosion.Position = l1.Position
- game.Debris:AddItem(explosion, 5)
- thunder:Play()
- wait(0.5)
- bolt:remove()
- boss:Play()
- conveyor.Value = false
- m.Text = "THE PLANE IS GETTING HIT BY LIGHTNING!"
- wait(2)
- m:remove()
- local l2 = plane:FindFirstChild("Bright red").lightning2
- bolt2.Parent = game.Workspace
- bolt2.Position = l2.Position + Vector3.new(0, (bolt2.Size/2), 0)
- local explosion2 = Instance.new("Explosion", l2)
- explosion.BlastPressure = 999999999
- explosion2.BlastRadius = 15
- explosion2.Position = l2.Position
- game.Debris:AddItem(explosion2, 5)
- thunder:Play()
- local h = Instance.new("Hint", game.Workspace)
- h.Text = "The plane got hit twice and lost control, it's now falling down!"
- wait(0.5)
- bolt2:remove()
- repeat
- wait()
- until timesup == true
- coroutine.yield(routine) -- if you don't yield, the coroutine will not be able to restart (aka dead forever)
- h.Text = "Next time we should check the weather forecast before flying..."
- launch.Value = false
- boss:Stop()
- plane:remove()
- wait(5)
- h:remove()
- rain:Stop()
- cloud:remove()
- game.Lighting.Ambient = originalambient
- game.Lighting.TimeOfDay = originaltime
- local newplane = planemodel:Clone()
- newplane.Parent = game.Workspace
- newplane:MakeJoints()
- else
- local m = Instance.new("Message", game.Workspace)
- m.Text = "SERVER: The plane seems to have glitched out somehow, reseting game..."
- game.Workspace:FindFirstChild("Plane"):remove()
- wait(5)
- m:remove()
- local newplane = planemodel:Clone()
- newplane.Parent = game.Workspace
- newplane:MakeJoints()
- hasglitched.Value = false -- reset the value to continue debugging
- end
- end
- if chosenevent == "Nuke" then
- if hasglitched.Value == false then
- glitchdetector.Disabled = true
- local routine = coroutine.create(setEventTime)
- coroutine.resume(routine, 80)
- local plane = game.Workspace:FindFirstChild("Plane")
- local nuke = game.Lighting.Nuke:Clone()
- nuke.Parent = plane
- nuke:MakeJoints()
- local center = nuke.Parts.Center
- local exvalue = nuke.Explode
- local smallboom = nuke.SmallBoom
- local boom = nuke.Boom
- local rocket = nuke.RocketBoom
- launch.Value = true
- conveyor.Value = true
- wait(5)
- local m = Instance.new("Message", game.Workspace)
- m.Text = "What's that? People are complaining about something..."
- wait(7)
- boss:Play()
- m.Text = "THERE'S A MASSIVE NUKE INSIDE THE PLANE'S STORAGE?!?!"
- wait(6)
- conveyor.Value = false
- m:remove()
- delay(0, function()
- if plane:FindFirstChild("Nuke") ~= nil then
- local part = Instance.new("Part", game.Workspace)
- part.Name = "NukeExplosion"
- part.Shape = "Ball"
- part.Size = Vector3.new(4,4,4)
- part.TopSurface = "Smooth"
- part.BottomSurface = "Smooth"
- part.BrickColor = BrickColor.Yellow()
- part.CanCollide = false
- part.Anchored = true
- part.Transparency = 0.3
- part.CFrame = center.CFrame
- local ring = Instance.new("Part", game.Workspace)
- ring.Name = "NukeRing"
- ring.BrickColor = BrickColor.White()
- ring.Size = Vector3.new(8,8,2)
- ring.CanCollide = false
- ring.Anchored = true
- ring.CFrame = center.CFrame
- local mesh = Instance.new("SpecialMesh", ring)
- mesh.MeshId = "http://www.roblox.com/asset/?id=3270017"
- mesh.Scale = Vector3.new(10,10,0.25)
- local currentpos = center.CFrame
- local newboom = boom:Clone()
- newboom.Parent = game.Workspace
- newboom:Play()
- game.Debris:AddItem(newboom, 10)
- local explosion = Instance.new("Explosion", center)
- explosion.BlastRadius = 1000
- explosion.Position = center.Position
- wait(1)
- local newsmallboom = smallboom:Clone()
- newsmallboom.Parent = game.Workspace
- newsmallboom:Play()
- game.Debris:AddItem(newsmallboom, 10)
- local newrocket = rocket:Clone()
- newrocket.Parent = game.Workspace
- newrocket:Play()
- game.Debris:AddItem(newrocket, 10)
- --[[part.Touched:connect(function(p)
- if p:IsA("BasePart") then
- p.BrickColor = BrickColor.new("Black")
- p.Material = "Slate"
- p.Material = "CorrodedMetal"
- p:BreakJoints()
- end
- end)]]--
- for i,x in pairs(game.Workspace:FindFirstChild("Plane"):GetChildren()) do
- if x:IsA("BasePart") then
- x.BrickColor = BrickColor.new("Black")
- x.Material = "CorrodedMetal"
- elseif x:IsA("Model") then
- for i,y in pairs(x:GetChildren()) do
- if y:IsA("BasePart") then
- y.BrickColor = BrickColor.new("Black")
- y.Material = "CorrodedMetal"
- end
- end
- end
- end
- local h = Instance.new("Hint", game.Workspace)
- h.Text = "THE NUKE EXPLODED AND EVERYTHING ON THE PLANE GOT INCINERATED!"
- for i = 1,100 do
- part.Size = part.Size + Vector3.new(4,4,4)
- mesh.Scale = mesh.Scale + Vector3.new(6,6,0)
- part.CFrame = currentpos
- ring.CFrame = currentpos
- wait()
- end
- for i = 1,10 do
- part.Transparency = part.Transparency + 0.1
- ring.Transparency = ring.Transparency + 0.1
- wait(0.1)
- end
- part:remove()
- ring:remove()
- else
- boss:Stop()
- local m = Instance.new("Message", game.Workspace)
- m.Text = "SERVER: Something went wrong with the current event, reseting game..."
- plane:remove()
- wait(5)
- m:remove()
- local newplane = planemodel:Clone()
- newplane.Parent = game.Workspace
- newplane:MakeJoints()
- end
- end)
- repeat
- wait()
- until timesup == true
- coroutine.yield(routine) -- if you don't yield, the coroutine will not be able to restart (aka dead forever)
- h.Text = "Next time we will check people's luggage more carefully, just hopefully..."
- launch.Value = false
- plane:remove()
- wait(5)
- h:remove()
- boss:Stop()
- local newplane = planemodel:Clone()
- newplane.Parent = game.Workspace
- newplane:MakeJoints()
- else
- local m = Instance.new("Message", game.Workspace)
- m.Text = "SERVER: The plane seems to have glitched out somehow, reseting game..."
- game.Workspace:FindFirstChild("Plane"):remove()
- wait(5)
- m:remove()
- local newplane = planemodel:Clone()
- newplane.Parent = game.Workspace
- newplane:MakeJoints()
- hasglitched.Value = false -- reset the value to continue debugging
- end
- end
- if chosenevent == "90s" then
- if hasglitched.Value == false then
- glitchdetector.Disabled = true
- local routine = coroutine.create(setEventTime)
- coroutine.resume(routine, 80)
- local plane = game.Workspace:FindFirstChild("Plane")
- local center = plane.PlaneCenterPart
- local wall = game.Lighting.BorderWall:Clone()
- local originalambient = game.Lighting.Ambient
- local m = Instance.new("Message", game.Workspace)
- m.Text = "The plane is going to take off in a few moments, please wait..."
- wall.Parent = game.Workspace
- wait(5)
- running90s:Play()
- m.Text = "What's that song? No way... Could it be?..."
- wait(3)
- m.Text = "OH GOD, IT'S RUNNING IN THE 90's! THAT SONG IS TOO..."
- wait(3)
- if center ~= nil then
- m:remove()
- local h = Instance.new("Hint", game.Workspace)
- h.Text = "The plane went flying at super sonic speed and crashed into Trump's border wall... again!"
- local bv = Instance.new("BodyVelocity", center)
- bv.maxForce = Vector3.new(math.huge, math.huge, math.huge)
- bv.velocity = Vector3.new(7500,0,0)
- game.Debris:AddItem(center, 15)
- sonic:Play()
- repeat
- game.Lighting.Ambient = Color3.new(math.random(255)/255, math.random(255)/255, math.random(255)/255)
- wait(0.3773584)
- until timesup == true
- coroutine.yield(routine) -- if you don't yield, the coroutine will not be able to restart (aka dead forever)
- running90s:Stop()
- game.Lighting.Ambient = originalambient
- h.Text = "Next time we will kick out anyone who play that song on the plane..."
- plane:remove()
- wait(5)
- h:remove()
- wall:remove()
- local newplane = planemodel:Clone()
- newplane.Parent = game.Workspace
- newplane:MakeJoints()
- else
- running90s:Stop()
- local m = Instance.new("Message", game.Workspace)
- m.Text = "SERVER: Something went wrong with the current event, reseting game..."
- plane:remove()
- wait(5)
- m:remove()
- local newplane = planemodel:Clone()
- newplane.Parent = game.Workspace
- newplane:MakeJoints()
- end
- else
- local m = Instance.new("Message", game.Workspace)
- m.Text = "SERVER: The plane seems to have glitched out somehow, reseting game..."
- game.Workspace:FindFirstChild("Plane"):remove()
- wait(5)
- m:remove()
- local newplane = planemodel:Clone()
- newplane.Parent = game.Workspace
- newplane:MakeJoints()
- hasglitched.Value = false -- reset the value to continue debugging
- end
- end
- if chosenevent == "Shoop Da Woop" then
- if hasglitched.Value == false then
- glitchdetector.Disabled = true
- local routine = coroutine.create(setEventTime)
- coroutine.resume(routine, 100)
- local shooptrigger = triggers.ShoopDaWoopTrigger
- local plane = game.Workspace:FindFirstChild("Plane")
- local center = plane:FindFirstChild("PlaneCenterPart")
- launch.Value = true
- conveyor.Value = true
- wait(5)
- local m = Instance.new("Message", game.Workspace)
- m.Text = "It's a beautiful day, isn't it? It's pretty quiet too."
- dubstep:Play()
- wait(5)
- m.Text = "Okay, I take that back. What's that noise?"
- dubstep.Volume = 0.5
- wait(5.2)
- m.Text = "OH GOD! IT'S SHOOP DA WOOP!!!"
- lazor:Play()
- local shoop = game.Lighting.ShoopDaWoop:Clone()
- shoop.CFrame = CFrame.new(center.Position) * CFrame.new(50, 0, 150) * CFrame.Angles(0, math.rad(0), 0) -- :O putting the angles in the middle is different than putting it at the end! that's why cframe is so confusing
- shoop.Parent = game.Workspace
- wait(3.75)
- m:remove()
- local h = Instance.new("Hint", game.Workspace)
- h.Text = "SHOOP DA WOOP HAS PWNED THE PLANE!"
- conveyor.Value = false
- local beam = Instance.new("Part")
- beam.Name = "LAZORBEAM"
- beam.BrickColor = BrickColor.new("Cyan")
- beam.Size = Vector3.new(25, 9999, 25)
- beam.CanCollide = false
- beam.Anchored = true
- beam.TopSurface = "Smooth"
- beam.BottomSurface = "Smooth"
- beam.Reflectance = 0.5
- beam.CFrame = CFrame.Angles(math.rad(90),0,0) * CFrame.new(shoop.Position - Vector3.new(0,0,(beam.Size.Y/2)) - Vector3.new(0,0,0.5))
- beam.Parent = game.Workspace
- local mesh = Instance.new("CylinderMesh", beam)
- beam.Touched:connect(function(p)
- if p.Anchored == false and p.CanCollide == true then
- local explosion = Instance.new("Explosion", p)
- explosion.BlastRadius = 15
- explosion.Position = p.Position
- game.Debris:AddItem(explosion, 3)
- end
- end)
- delay(0, function()
- for i = 1, 100 do -- this one doesn't use setEventTime() too
- beam.Size = Vector3.new(25,9999,25)
- beam.CFrame = CFrame.Angles(math.rad(90),0,0) + (shoop.Position - Vector3.new(0,0,(beam.Size.Y/2)))
- wait()
- beam.Size = Vector3.new(27.5,9999,27.5)
- beam.CFrame = CFrame.Angles(math.rad(90),0,0) + (shoop.Position - Vector3.new(0,0,(beam.Size.Y/2)))
- --beam.CFrame = CFrame.fromEulerAnglesXYZ(math.rad(90),0,0)
- wait()
- beam.Size = Vector3.new(30,9999,30)
- beam.CFrame = CFrame.Angles(math.rad(90),0,0) + (shoop.Position - Vector3.new(0,0,(beam.Size.Y/2)))
- --beam.CFrame = CFrame.fromEulerAnglesXYZ(math.rad(90),0,0)
- wait()
- beam.Size = Vector3.new(27.5,9999,27.5)
- beam.CFrame = CFrame.Angles(math.rad(90),0,0) + (shoop.Position - Vector3.new(0,0,(beam.Size.Y/2)))
- --beam.CFrame = CFrame.fromEulerAnglesXYZ(math.rad(90),0,0)
- wait()
- end
- for i = 1,10 do
- beam.Transparency = beam.Transparency + 0.1
- wait()
- end
- wait(2)
- for i = 1,10 do
- shoop.Transparency = shoop.Transparency + 0.1
- wait()
- end
- beam:remove()
- shoop:remove()
- end)
- repeat
- wait()
- until timesup == true
- coroutine.yield(routine) -- if you don't yield, the coroutine will not be able to restart (aka dead forever)
- dubstep:Stop()
- launch.Value = false
- h.Text = "Maybe it's not really that beautiful when seeing that thing..."
- plane:remove()
- wait(5)
- h:remove()
- local newplane = planemodel:Clone()
- newplane.Parent = game.Workspace
- newplane:MakeJoints()
- else
- local m = Instance.new("Message", game.Workspace)
- m.Text = "SERVER: The plane seems to have glitched out somehow, reseting game..."
- game.Workspace:FindFirstChild("Plane"):remove()
- wait(5)
- m:remove()
- local newplane = planemodel:Clone()
- newplane.Parent = game.Workspace
- newplane:MakeJoints()
- hasglitched.Value = false -- reset the value to continue debugging
- end
- end
- if chosenevent == "Sanic" then
- if hasglitched.Value == false then
- glitchdetector.Disabled = true
- local routine = coroutine.create(setEventTime)
- coroutine.resume(routine, 120)
- local sanictrigger = triggers.SanicTrigger
- local plane = game.Workspace:FindFirstChild("Plane")
- local center = plane.PlaneCenterPart
- launch.Value = true
- conveyor.Value = true
- normalexplosion.Volume = 0.2
- local m = Instance.new("Message", game.Workspace)
- m.Text = "The plane is now taking off..."
- wait(2)
- m.Text = "Why does it looks like the plane is going slower than usual?"
- wait(5)
- tooslow:Play()
- wait(1.5)
- m.Text = "That voice sounds familier..."
- wait(1.5)
- sanics:Play()
- m.Text = "OH MY GOD, IT'S SANIC DE HEDGEHOG!"
- -- before i didn't use CFrame, which was pretty dumb
- sanic = game.Lighting.Sanic:Clone()
- sanic.CFrame = CFrame.new(center.Position) * CFrame.new(0, 0, -150)
- sanic.Parent = game.Workspace
- local bv = Instance.new("BodyVelocity", sanic)
- bv.maxForce = Vector3.new(math.huge, math.huge, math.huge)
- bv.velocity = Vector3.new(0, 0, 500)
- local bg = Instance.new("BodyGyro", sanic)
- bg.maxTorque = Vector3.new(999999,999999,999999)
- bg.cframe = CFrame.Angles(0,math.rad(90),0)
- wait(2.5)
- m:remove()
- conveyor.Value = false
- local h = Instance.new("Hint", game.Workspace)
- h.Text = "SANIC HAS CUT THE PLANE INTO HALF!"
- repeat
- wait()
- until timesup == true
- coroutine.yield(routine) -- if you don't yield, the coroutine will not be able to restart (aka dead forever)
- sanics:Stop()
- sanic:remove()
- h.Text = "He was just too fast."
- normalexplosion.Volume = 0.5
- plane:remove()
- wait(5)
- h:remove()
- local newplane = planemodel:Clone()
- newplane.Parent = game.Workspace
- newplane:MakeJoints()
- else
- local m = Instance.new("Message", game.Workspace)
- m.Text = "SERVER: The plane seems to have glitched out somehow, reseting game..."
- game.Workspace:FindFirstChild("Plane"):remove()
- wait(5)
- m:remove()
- local newplane = planemodel:Clone()
- newplane.Parent = game.Workspace
- newplane:MakeJoints()
- hasglitched.Value = false -- reset the value to continue debugging
- end
- end
- if chosenevent == "Nyan Cat" then
- if hasglitched.Value == false then
- glitchdetector.Disabled = true
- local routine = coroutine.create(setEventTime)
- coroutine.resume(routine, 100)
- local plane = game.Workspace:FindFirstChild("Plane")
- local center = plane:FindFirstChild("PlaneCenterPart")
- local rainbow = game.Lighting.Rainbow:Clone()
- rainbow.Parent = game.Workspace
- local nyancat = game.Lighting.NyanCat:Clone()
- nyancat.CFrame = CFrame.new(Vector3.new(rainbow:FindFirstChild("Cloud").Position.X, center.Position.Y + 5, center.Position.Z)) * CFrame.Angles(0, math.rad(0), 0)
- nyancat.Parent = game.Workspace
- launch.Value = true
- conveyor.Value = true
- normalexplosion.Volume = 0.2
- wait(5)
- local m = Instance.new("Message", game.Workspace)
- m.Text = "Oh wow! There is a very beautiful rainbow in front of us!"
- wait(5)
- m.Text = "Wait, something is coming out..."
- wait(3)
- m.Text = "IT'S THE NYAN CAT! IT'S FLYING STRAIGHT TOWARDS THE PLANE!"
- nyans:Play()
- local bv = Instance.new("BodyVelocity", nyancat)
- bv.maxForce = Vector3.new(math.huge, math.huge, math.huge)
- bv.velocity = Vector3.new(-1250,0,0)
- nyancat.Anchored = false
- wait(3)
- m:remove()
- local h = Instance.new("Hint", game.Workspace)
- h.Text = "Nyan Cat barraged through the plane!"
- conveyor.Value = false
- repeat
- wait()
- until timesup == true
- coroutine.yield(routine) -- if you don't yield, the coroutine will not be able to restart (aka dead forever)
- nyans:Stop()
- nyancat:remove()
- rainbow:remove()
- h.Text = "I don't like rainbows anymore..."
- normalexplosion.Volume = 0.5
- launch.Value = false
- plane:remove()
- wait(5)
- h:remove()
- local newplane = planemodel:Clone()
- newplane.Parent = game.Workspace
- newplane:MakeJoints()
- else
- local m = Instance.new("Message", game.Workspace)
- m.Text = "SERVER: The plane seems to have glitched out somehow, reseting game..."
- game.Workspace:FindFirstChild("Plane"):remove()
- wait(5)
- m:remove()
- local newplane = planemodel:Clone()
- newplane.Parent = game.Workspace
- newplane:MakeJoints()
- hasglitched.Value = false -- reset the value to continue debugging
- end
- end
- if chosenevent == "Raining Bomb" then
- if hasglitched.Value == false then
- glitchdetector.Disabled = true
- local routine = coroutine.create(setEventTime)
- coroutine.resume(routine, 120)
- local plane = game.Workspace:FindFirstChild("Plane")
- local m = Instance.new("Message", game.Workspace)
- m.Text = "I hear some plane noises, they are doing something above us."
- wait(5)
- m.Text = "OMG, IT'S RAINING BOMB FROM THE SKY!!"
- boss:Play()
- launch.Value = true
- wait(5)
- m:remove()
- local h = Instance.new("Hint", game.Workspace)
- h.Text = "Survive the bomb attack!"
- delay(0, function()
- for i = 1, 200 do -- total wait time is from 60 to 100 seconds
- local bomb = game.Lighting.Bomb:Clone()
- bomb.CFrame = CFrame.Angles(math.rad(-90), math.rad(math.random(-180,180)), 0) + Vector3.new(math.random(-500, 250), math.random(1500,3000), math.random(-500, 1000))
- game.Debris:AddItem(bomb, 30)
- local bv = Instance.new("BodyVelocity", bomb)
- bv.maxForce = Vector3.new(math.huge, math.huge, math.huge)
- bv.velocity = Vector3.new(0, -500, 0)
- bomb.Parent = game.Workspace
- wait(math.random(0.3, 0.5))
- end
- h.Text = "The bomb rain has stopped..."
- end)
- repeat
- wait()
- until timesup == true
- coroutine.yield(routine) -- if you don't yield, the coroutine will not be able to restart (aka dead forever)
- h.Text = "I blame North Korea to be behind all of this..."
- boss:Stop()
- launch.Value = false
- plane:remove()
- wait(5)
- h:remove()
- local newplane = planemodel:Clone()
- newplane.Parent = game.Workspace
- newplane:MakeJoints()
- else
- local m = Instance.new("Message", game.Workspace)
- m.Text = "SERVER: The plane seems to have glitched out somehow, reseting game..."
- game.Workspace:FindFirstChild("Plane"):remove()
- wait(5)
- m:remove()
- local newplane = planemodel:Clone()
- newplane.Parent = game.Workspace
- newplane:MakeJoints()
- hasglitched.Value = false -- reset the value to continue debugging
- end
- end
- if chosenevent == "Fidget Spinner" then
- if hasglitched.Value == false then
- glitchdetector.Disabled = true
- local routine = coroutine.create(setEventTime)
- coroutine.resume(routine, 90)
- normalexplosion.Volume = 0.07
- local plane = game.Workspace:FindFirstChild("Plane")
- local center = plane.PlaneCenterPart
- local smallspinner = game.Lighting.SmallFidgetSpinner:Clone()
- local spinnergroup = game.Lighting.FidgetSpinnerGroup:Clone()
- smallspinner.Parent = game.Workspace
- smallspinner:MakeJoints()
- wait(1)
- local m = Instance.new("Message", game.Workspace)
- m.Text = "WHAT THE...?! THE PLANE JUST GOT HIT BY A FIDGET SPINNER!"
- fidgets:Play()
- local bv = Instance.new("BodyForce", center)
- bv.force = Vector3.new(1000000,-1000000,0)
- wait(4)
- m.Text = "AND BELOW THERE ARE EVEN MORE FIDGET SPINNERS!!"
- spinnergroup.Parent = game.Workspace
- spinnergroup:MakeJoints()
- launch.Value = true
- wait(3)
- m:remove()
- local h = Instance.new("Hint", game.Workspace)
- h.Text = "The plane is getting destroyed by the fidget spinners!"
- repeat
- wait()
- until timesup == true
- coroutine.yield(routine) -- if you don't yield, the coroutine will not be able to restart (aka dead forever)
- h.Text = "I wish fidget spinners never existed."
- smallspinner:remove()
- spinnergroup:remove()
- launch.Value = false
- plane:remove()
- wait(5)
- h:remove()
- fidgets:Stop()
- normalexplosion.Volume = 0.5
- local newplane = planemodel:Clone()
- newplane.Parent = game.Workspace
- newplane:MakeJoints()
- else
- local m = Instance.new("Message", game.Workspace)
- m.Text = "SERVER: The plane seems to have glitched out somehow, reseting game..."
- game.Workspace:FindFirstChild("Plane"):remove()
- wait(5)
- m:remove()
- local newplane = planemodel:Clone()
- newplane.Parent = game.Workspace
- newplane:MakeJoints()
- hasglitched.Value = false -- reset the value to continue debugging
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement