Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- WalterHitbox.Touched:Connect(function(hit)
- if hit.Parent:FindFirstChild("Humanoid") and Player and debounces.debounce1 == true then
- debounces.debounce1 = false
- if Player.PlayerGui:WaitForChild("LocalSounds").HellTower.Playing == true and Sky.SkyboxBk == "http://www.roblox.com/asset/?id=227620983" then
- Player.PlayerGui:WaitForChild("LocalSounds").HellTower.Playing = false
- Player.PlayerGui:WaitForChild("LocalSounds").HellTower:Stop()
- -- print("false1")
- end
- if Player.PlayerGui:WaitForChild("LocalSounds").YellowTower.Playing == true or game.SoundService.YellowTower.Playing == true and Sky.SkyboxBk == "rbxasset://textures/sky/sky512_bk.tex" then
- Player.PlayerGui:WaitForChild("LocalSounds").YellowTower.Playing = false
- game.SoundService.YellowTower.Playing = false
- game.SoundService.YellowTower:Stop()
- -- print("false2")
- end
- if Player.PlayerGui:WaitForChild("LocalSounds").PirateSong.Playing == true and Sky.SkyboxBk == "rbxassetid://653719502" then
- Player.PlayerGui:WaitForChild("LocalSounds").PirateSong.Looped = false
- Player.PlayerGui:WaitForChild("LocalSounds").PirateSong.Playing = false
- Player.PlayerGui:WaitForChild("LocalSounds").PirateSong:Stop()
- end
- local players = game.Players:GetChildren()
- for i = 1,#players do
- if players[i].Name ~= Player.Name then
- table.insert(plrs,workspace[players[i].Name])
- end
- end
- for i = 1,#plrs do
- plrs[i].Parent = nil
- end
- -- Trap
- local Trap = game.ReplicatedStorage.LabLevelStuff.Trap:Clone()
- Trap.Parent = game.Workspace
- local humanoid = Player.Character:FindFirstChildOfClass("Humanoid")
- humanoid:UnequipTools()
- Player.Character.HumanoidRootPart.CFrame = CFrame.new(-12793.469, 695.633, 601.826) * CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))
- wait(.1)
- UnequipPart:Clone()
- UnequipPart.Parent = game.Workspace
- UnequipPart.CFrame = CFrame.new(-12793.467, 697.238, 601.826) * CFrame.Angles(math.rad(0),math.rad(180),math.rad(0))
- hit.Parent:FindFirstChild("Humanoid").WalkSpeed = 0
- hit.Parent:FindFirstChild("Humanoid").JumpHeight = 0
- local StarterGui = game:GetService("StarterGui")
- StarterGui:SetCore("ResetButtonCallback",false)
- hit.Parent:FindFirstChild("Humanoid").WalkSpeed = 0
- hit.Parent:FindFirstChild("Humanoid").JumpHeight = 0
- -- Cutscene code
- local Camera = workspace.CurrentCamera
- Camera.CameraType = Enum.CameraType.Scriptable
- -- Camera.HeadLocked = false
- -- Camera.CameraType = Enum.CameraType.Fixed
- -- local DefaultPart = game.Workspace.Part32
- local function tween(part1,part2,cutsceneTime)
- local tweenInfo = TweenInfo.new(
- cutsceneTime,
- Enum.EasingStyle.Sine,
- Enum.EasingDirection.Out,
- 0,
- false,
- 0
- )
- --Camera.CFrame = part1.CFrame * CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)) --DefaultPart.CFrame
- --Camera.Focus = DefaultPart.CFrame
- Camera.CameraSubject = part1
- local tween = TweenService:Create(Camera,tweenInfo,{CFrame = part2.CFrame})
- tween:Play()
- wait(cutsceneTime)
- Camera.CameraType = Enum.CameraType.Custom
- Camera.CameraSubject = part2
- end
- wait(.5)
- TextLabel.Parent.Visible = true
- BlackScreen.Visible = true
- wait(.1)
- --local transparency = 10
- for i = 1, 10 do
- BlackScreen.BackgroundTransparency = i/10
- wait(0.075)
- end
- -- tween(Camera,game.Workspace.Part32,5)
- -- tween.Completed:Wait()
- -- print("hi")
- --tween(Camera,game.Workspace.Part32,10)
- --tween(game.Workspace.Cameras.camera2,game.Workspace.Cameras.camera3,10)
- -- wait(1)
- BlackScreen.Visible = false
- --camera tween start here
- --print("camera started tweening")
- local function typewrite(object,text,lenght)
- for i = 1, #text,1 do
- object.Text = string.sub(text,1,i)
- wait(lenght)
- end
- end
- typewrite(TextLabel,"The Lab",0.05)
- tween(game.Workspace.Cameras.cam1,game.Workspace.Cameras.cam2,5)
- wait(.5)
- script.TextScript.Disabled = false
- --[[TextLabel.Text = "he Lab"
- wait(0.05)
- TextLabel.Text = "e Lab"
- wait(0.05)
- TextLabel.Text = " Lab"
- wait(0.05)
- TextLabel.Text = "Lab"
- wait(0.05)
- TextLabel.Text = "ab"
- wait(0.05)
- TextLabel.Text = "b"
- wait(0.05)
- TextLabel.Text = ""]]--
- tween(game.Workspace.Cameras.cam2,game.Workspace.Cameras.cam1,5)
- --wait(1)
- TextLabel.Parent.Visible = false
- WalterAnimationTrack:Play()
- -- tween from walter to character
- --Camera.Focus = Walter.HumanoidRootPart.CFrame
- --Camera.CFrame = Walter.HumanoidRootPart.CFrame * CFrame.Angles(0,90,0)
- --tween(game.Workspace.Cameras.cam3,Player.Character.HumanoidRootPart,9)
- -- Camera.DiagonalFieldOfView = 50
- -- Camera.CFrame.LookVector = CFrame.new(0,0,0) * CFrame.Angles(0,0,0)
- -- Camera.CFrame = CFrame.new(Camera.CFrame.Position, game.Workspace.Cameras.cam3.CFrame.LookVector) -- works but strange
- --Camera.CameraType = Enum.CameraType.Scriptable
- --Camera.CameraType = "Track"
- -- Camera.CameraSubject = game.Workspace.Cameras.cam3
- --Camera.CameraType = "Scriptable"
- tween(game.Workspace.Cameras.cam3,game.Workspace.Cameras.cam4,5.5)
- tween(game.Workspace.Cameras.cam4,Player.Character.HumanoidRootPart,1)
- Camera.CameraSubject = Player.Character.Humanoid
- -- Camera.DiagonalFieldOfView = 70
- --print("WalterAnimation")
- wait(25)
- -- print("First animation ended")
- --Camera.CameraSubject = game.Workspace.Cameras.cam1
- Camera.CFrame = game.Workspace.Cameras.cam1.CFrame -- Not sure if it does anything,deleting this is not fatal at all!!
- -- play second animation
- TextLabel.Parent.Visible = true
- BlackScreen.Visible = true
- BlackScreen.BackgroundTransparency = 0
- TextLabel.TextStrokeColor3 = Color3.fromRGB(255, 5, 9)
- typewrite(TextLabel,"10 Minutes Later",0.05)
- wait(.5)
- Camera.CameraSubject = game.Workspace.Cameras.cam1
- for i = 1, 10 do
- BlackScreen.BackgroundTransparency = i/10
- wait(0.075)
- end
- tween(game.Workspace.Cameras.cam1,game.Workspace.Cameras.cam5,5)
- Alien1Track:Play()
- Alien2Track:Play()
- Alien3Track:Play()
- TextLabel.Text = "10 Minutes Later"
- wait(0.05)
- TextLabel.Text = "0 Minutes Later"
- wait(0.05)
- TextLabel.Text = " Minutes Later"
- wait(0.05)
- TextLabel.Text = "Minutes Later"
- wait(0.05)
- TextLabel.Text = "inutes Later"
- wait(0.05)
- TextLabel.Text = "nutes Later"
- wait(0.05)
- TextLabel.Text = "utes Later"
- wait(0.05)
- TextLabel.Text = "tes Later"
- wait(0.05)
- TextLabel.Text = "es Later"
- wait(0.05)
- TextLabel.Text = "s Later"
- wait(0.05)
- TextLabel.Text = " Later"
- wait(0.05)
- TextLabel.Text = "Later"
- wait(0.05)
- TextLabel.Text = "ater"
- wait(0.05)
- TextLabel.Text = "ter"
- wait(0.05)
- TextLabel.Text = "er"
- wait(0.05)
- TextLabel.Text = "r"
- wait(0.05)
- TextLabel.Text = ""
- BlackScreen.Visible = false
- TextLabel.Parent.Visible = false
- --Camera.CameraType = Enum.CameraType.Scriptable
- -- Camera.CameraSubject = game.Workspace.Cameras.cam5
- Camera.CFrame = CFrame.new(Camera.CFrame.Position, game.Workspace.Cameras.cam5.Position)
- --Camera.Focus = game.Workspace.Cameras.cam5.CFrame
- wait(10)
- Camera.CameraType = Enum.CameraType.Custom
- Camera.CameraSubject = Player.Character.Humanoid -- maybe set it up when the animation ends
- wait(.5)
- BlackScreen.Visible = false
- BlackScreen.BackgroundTransparency = 1
- for i = 1,#plrs do
- plrs[i].Parent = workspace
- end
- plrs = {}
- -- destroy the part that wont let you equip a tool while in the cutscene mode
- game.Workspace.LabLevelUnequipPart:Destroy()
- game.Workspace.Trap:Destroy()
- -- sets your default jump and speed back to normal
- hit.Parent:FindFirstChild("Humanoid").WalkSpeed = 16
- hit.Parent:FindFirstChild("Humanoid").JumpHeight = 7.2
- -- can suicide agen yay:)
- StarterGui:SetCore("ResetButtonCallback",true)
- if Player.PlayerGui:WaitForChild("LocalSounds").HellTower.Playing == false and Sky.SkyboxBk == "http://www.roblox.com/asset/?id=227620983" then
- Player.PlayerGui:WaitForChild("LocalSounds").HellTower.Playing = true
- Player.PlayerGui:WaitForChild("LocalSounds").HellTower:Play()
- --print("false3")
- end
- if Player.PlayerGui:WaitForChild("LocalSounds").YellowTower.Playing == false and Sky.SkyboxBk == "rbxasset://textures/sky/sky512_bk.tex" then
- Player.PlayerGui:WaitForChild("LocalSounds").YellowTower.Playing = true
- Player.PlayerGui:WaitForChild("LocalSounds").YellowTower:Play()
- --print("false4")
- end
- if Player.PlayerGui:WaitForChild("LocalSounds").PirateSong.Playing == false and Sky.SkyboxBk == "rbxassetid://653719502" then
- Player.PlayerGui:WaitForChild("LocalSounds").PirateSong.Looped = true
- Player.PlayerGui:WaitForChild("LocalSounds").PirateSong.Playing = true
- Player.PlayerGui:WaitForChild("LocalSounds").PirateSong:Play()
- end
- --debounces.debounce1 = true
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement