Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- heartbeat = script.Parent.Heartbeat
- stepped = script.Parent.Stepped
- renderstepped = script.Parent.RenderStepped
- sp=script.Parent.sp
- game:GetService("RunService").Heartbeat:Connect(function(step)heartbeat:Fire(step)end)
- game:GetService("RunService").Stepped:Connect(function(step)stepped:Fire(step)end)
- script.Parent.remote_render.OnServerEvent:Connect(function(plr,step)renderstepped:Fire(step)end)
- script.Parent.remote_sp.OnServerEvent:Connect(function(plr,step)sp:Fire(step)end)
- --//=================================\\
- --|| SAZERENOS' ARTIFICIAL HEARTBEAT
- --\\=================================//
- ArtificialHB = Instance.new("BindableEvent", script)
- ArtificialHB.Name = "ArtificialHB"
- script:WaitForChild("ArtificialHB")
- ArtificialHB.Event:Connect(function()print("FIRE!")end)
- frame = 60
- tf = 0
- allowframeloss = false
- tossremainder = false
- lastframe = tick()
- script.ArtificialHB:Fire()
- script.Parent.sp.Event:connect(function(step, p)
- --game:GetService("RunService").Heartbeat:Connect(function(step,p)
- tf = tf + step
- -- print(step)
- -- print(p)
- -- print(tf)
- 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)
- --//=================================\\
- --\\=================================//
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement