Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- player = game.Players.LocalPlayer
- char = paly.Character
- local cam = game.Workspace.CurrentCamera
- vt = Vector3.new
- hum = char:FindFirstChildOfClass("Humanoid")
- charderpz = game.Players.Upscalegaming.Character
- root = charderpz.HumanoidRootPart
- Angles = CFrame.Angles
- --------- SazEreno's Artificial HB --------------
- ArtificialHB = Instance.new("BindableEvent", script)
- ArtificialHB.Name = "ArtificialHB"
- script:WaitForChild("ArtificialHB")
- Frame_Speed = 1 / 60
- frame = Frame_Speed
- tf = 0
- allowframeloss = false
- tossremainder = false
- lastframe = tick()
- script.ArtificialHB:Fire()
- game:GetService("RunService").Heartbeat:connect(function(s, p)
- tf = tf + s
- if tf >= frame then
- if allowframeloss then
- script.ArtificialHB:Fire()
- lastframe = tick()
- else
- for i = 1, math.floor(tf / frame) do
- script.ArtificialHB:Fire()
- end
- lastframe = tick()
- end
- if tossremainder then
- tf = 0
- else
- tf = tf - frame * math.floor(tf / frame)
- end
- end
- end)
- ------------------
- function swait(num)
- if num == 0 or num == nil then
- ArtificialHB.Event:wait()
- else
- for i = 1, num do
- ArtificialHB.Event:wait()
- end
- end
- end
- function lerp(object, newCFrame, alpha)
- return object:lerp(newCFrame, alpha)
- end
- cam.CameraSubject = charderpz
- wait()
- local sv = script.Shakeval
- local ml = script.MultLength
- local va = sv.Value*10
- local vax = sv.Value*100
- coroutine.resume(coroutine.create(function()
- for i = 0, 99*ml.Value do
- swait()
- va = va - sv.Value/10/ml.Value
- vax = vax - sv.Value/ml.Value
- end
- end))
- for i = 0, 99*ml.Value do
- cam.CameraType = "Custom"
- game:GetService('RunService').RenderStepped:wait()
- cam.CameraType = "Scriptable"
- cam.CFrame = lerp(cam.CFrame, charderpz.HumanoidRootPart.CFrame * CFrame.new(1, 1.5, -6) * CFrame.Angles(math.rad(0), math.rad(180), math.rad(90)), 0.1)
- swait()
- cam.CameraType = "Custom"
- end
- wait(1)
- cam.CameraSubject = hum
- script:Destroy()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement