Advertisement
robloxscriptsbbbbb

Roblox Camera shake

Jul 5th, 2022
327
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local c = game.Workspace.Camera
  2. repeat wait() until game.Players.LocalPlayer.Character
  3. local hed = game.Players.LocalPlayer.Character:WaitForChild("Head")
  4. local r = math.random
  5. local rad = math.rad
  6. function shake(times)
  7.     c.CameraType = 'Scriptable'
  8.     local Lv = CFrame.new(c.CFrame.lookVector)
  9.     local amt = r(3,5)
  10.     for i = 1, times do
  11.         if hed.Parent.Humanoid.Health == 0 then break end
  12.         c.CFrame = hed.CFrame * CFrame.new(0,0, 12)
  13.         c.CFrame = c.CFrame * CFrame.Angles(rad(r(-r(), r())), rad(r(-r(), r())), rad(r(-amt, amt)))
  14.         wait()
  15.     end
  16.     c.CameraType = 'Custom'
  17. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement