Advertisement
DEVJORDAN22

Chaos Follow Camera

Dec 8th, 2024 (edited)
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.43 KB | Source Code | 0 0
  1. --este script fue echo por el dev (DEVJORDAN22)
  2.  
  3. local STG = game:GetService("StarterGui")
  4. local uis = game:GetService("UserInputService")
  5. local plr = game.Players.LocalPlayer
  6. local cam = game.Workspace.CurrentCamera
  7. local mouse = plr:GetMouse()
  8. local RS = game:GetService("RunService")
  9.  
  10. local focused = nil
  11. local enabled = false
  12.  
  13. wait(3)
  14. STG:SetCore("SendNotification", {
  15.     Title = "Auto Camera Follow Script";
  16.     Text = "Press V to Toggle";
  17.     Icon = "rbxassetid://11346388439";
  18.     Duration = "5";
  19. })
  20.  
  21. uis.InputBegan:Connect(function(key, gp)
  22.     if key.KeyCode == Enum.KeyCode.V and not gp then
  23.         if cam.CameraType == Enum.CameraType.Custom then
  24.             if enabled == false then
  25.                 if mouse.Target.Parent:FindFirstChild("Humanoid") then
  26.                     cam.CameraType = Enum.CameraType.Custom
  27.                     cam.CameraSubject = plr.Character.Humanoid
  28.                     focused = mouse.Target.Parent
  29.                     enabled = true
  30.                 end
  31.             else
  32.                 cam.CameraType = Enum.CameraType.Custom
  33.                 cam.CameraSubject = plr.Character.Humanoid
  34.                 focused = nil
  35.                 enabled = false
  36.             end
  37.         end
  38.     end
  39. end)
  40.  
  41. RS.Stepped:Connect(function()
  42.     if enabled == true then
  43.         cam.CFrame = CFrame.new(cam.CFrame.Position + Vector3.new(0,1,0), focused.Head.Position)
  44.         cam.Focus = CFrame.new(focused.Head.Position)
  45.         if focused.Humanoid.Health <= 0 then
  46.             cam.CameraType = Enum.CameraType.Custom
  47.             cam.CameraSubject = plr.Character.Humanoid
  48.             focused = nil
  49.             enabled = false
  50.         end
  51.     end
  52. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement