Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local player = game.Players.LocalPlayer
- local char = player.Character
- local camera = game.Workspace.CurrentCamera
- local repStorage = game:GetService("ReplicatedStorage")
- local closed = script.Parent.Parent.Parent.Closed
- local open = script.Parent.Parent.Parent.Open
- script.Parent.MouseButton1Click:Connect(function()
- if open.Value == true then
- if closed.Value == false then
- open.Value = false
- closed = true
- local hum = char:WaitForChild("Humanoid")
- hum.WalkSpeed = 16
- for i = 1,0,-0.1 do
- script.Parent.Parent.Parent.blackBG.BackgroundTransparency = i
- wait(0.05)
- end
- wait(1)
- script.Parent.Parent.Visible = false
- camera.CameraType = Enum.CameraType.Custom
- camera.CameraSubject = hum
- for i = 0,1,0.05 do
- script.Parent.Parent.Parent.blackBG.BackgroundTransparency = i
- wait(0.05)
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement