Advertisement
Joriangames

SecurityHandler

Feb 8th, 2021
3,761
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.41 KB | None | 0 0
  1. --Thanks for using this script
  2. --This script is made by Joriangames/Problox Studio Scripts
  3. --Want to know how to use this? Watch my tutorial: https://youtu.be/f_rPeT83WGg
  4. local leftArrow = script.Parent.LeftArrow
  5. local rightArrow = script.Parent.RightArrow
  6. local camFolder = workspace.CamPositions
  7.  
  8. local plr = game.Players.LocalPlayer
  9. local char = plr.Character or plr:WaitForChild("Character")
  10. local cam = game.Workspace.CurrentCamera
  11.  
  12. local number = 1
  13.  
  14. char:WaitForChild("Humanoid").Seated:Connect(function(Sitting, seat)
  15.     if not Sitting or seat.Name ~= "SecuritySeat" then
  16.         leftArrow.Visible = false
  17.         rightArrow.Visible = false
  18.         cam.CameraType = Enum.CameraType.Custom
  19.         return
  20.     end
  21.    
  22.     leftArrow.Visible = true
  23.     rightArrow.Visible = true
  24.     cam.CameraType = Enum.CameraType.Scriptable
  25.     cam.CFrame = workspace.CamPositions["1"].CFrame
  26.    
  27.     rightArrow.MouseButton1Click:Connect(function()
  28.         if number == 3 then --change 3 to the highest number in  your folder
  29.             cam.CFrame = camFolder["1"].CFrame
  30.             number = 1
  31.         else
  32.             cam.CFrame = camFolder[number +1].CFrame
  33.             number = number +1
  34.         end
  35.         wait(.1)
  36.     end)
  37. end)
  38.    
  39.     leftArrow.MouseButton1Click:Connect(function()
  40.         if number == 1 then
  41.             cam.CFrame = camFolder["3"].CFrame --change 3 to the highest number in your campositions-folder!!
  42.             number = 3
  43.         else
  44.             cam.CFrame = camFolder[number -1].CFrame
  45.             number = number -1
  46.         end
  47.         wait(.1)
  48.     end)
  49.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement