Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Client Camera Shaker
- local function CES(Length,Intensity)
- local Humanoid = Character:FindFirstChildOfClass("Humanoid")
- coroutine.resume(coroutine.create(function()
- local intensity = 1*Intensity
- local rotM = 0.01*Intensity
- for i = 0,Length,0.1 do
- swait()
- intensity = intensity - 0.05 * Intensity/Length
- rotM = rotM - 0.0005 * Intensity/Length
- Humanoid.CameraOffset = Vector3.new(math.rad(math.random(-intensity, intensity)),math.rad(math.random(-intensity, intensity)),math.rad(math.random(-intensity, intensity)))
- game:GetService("Workspace").CurrentCamera.CFrame = game:GetService("Workspace").CurrentCamera.CFrame * CFrame.new(math.rad(math.random(-intensity, intensity)),math.rad(math.random(-intensity, intensity)),math.rad(math.random(-intensity, intensity))) * CFrame.fromEulerAnglesYXZ(math.rad(math.random(-intensity, intensity)) * rotM, math.rad(math.random(-intensity, intensity)) * rotM, math.rad(math.random(-intensity, intensity)) * rotM)
- end
- Humanoid.CameraOffset = Vector3.new(0, 0, 0)
- end))
- end
Add Comment
Please, Sign In to add comment