Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.87 KB | None | 0 0
  1. local player = game.Players.LocalPlayer
  2. local char = player.Character
  3. local camera = game.Workspace.CurrentCamera
  4. local repStorage = game:GetService("ReplicatedStorage")
  5. local closed = script.Parent.Parent.Parent.Closed
  6. local open = script.Parent.Parent.Parent.Open
  7.  
  8. script.Parent.MouseButton1Click:Connect(function()
  9.     if open.Value == true then
  10.         if closed.Value == false then
  11.             open.Value = false
  12.             closed = true
  13.             local hum = char:WaitForChild("Humanoid")
  14.             hum.WalkSpeed = 16
  15.             for i = 1,0,-0.1 do
  16.                 script.Parent.Parent.Parent.blackBG.BackgroundTransparency = i
  17.                 wait(0.05)
  18.             end
  19.             wait(1)
  20.            
  21.             script.Parent.Parent.Visible = false
  22.            
  23.             camera.CameraType = Enum.CameraType.Custom
  24.             camera.CameraSubject = hum
  25.            
  26.             for i  = 0,1,0.05 do
  27.                 script.Parent.Parent.Parent.blackBG.BackgroundTransparency = i
  28.                 wait(0.05)
  29.             end
  30.         end
  31.     end
  32. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement