SHOW:
|
|
- or go back to the newest paste.
| 1 | local char = owner.Character | |
| 2 | ||
| 3 | - | ArtificialHB = Instance.new("BindableEvent", script)
|
| 3 | + | |
| 4 | - | ArtificialHB.Name = "Heartbeat" |
| 4 | + | |
| 5 | - | script:WaitForChild("Heartbeat")
|
| 5 | + | |
| 6 | - | frame = 0.03333333333333 |
| 6 | + | |
| 7 | - | tf = 0 |
| 7 | + | |
| 8 | - | allowframeloss = false |
| 8 | + | |
| 9 | - | tossremainder = false |
| 9 | + | |
| 10 | - | lastframe = tick() |
| 10 | + | |
| 11 | - | script.Heartbeat:Fire() |
| 11 | + | |
| 12 | - | game:GetService("RunService").Heartbeat:connect(function(s, p)
|
| 12 | + | |
| 13 | - | tf = tf + s |
| 13 | + | |
| 14 | - | if tf >= frame then |
| 14 | + | |
| 15 | - | if allowframeloss then |
| 15 | + | |
| 16 | - | script.Heartbeat:Fire() |
| 16 | + | |
| 17 | - | lastframe = tick() |
| 17 | + | |
| 18 | - | else |
| 18 | + | |
| 19 | - | for i = 1, math.floor(tf / frame) do |
| 19 | + | |
| 20 | - | script.Heartbeat:Fire() |
| 20 | + | |
| 21 | end | |
| 22 | - | lastframe = tick() |
| 22 | + | |
| 23 | end | |
| 24 | - | if tossremainder then |
| 24 | + | |
| 25 | - | tf = 0 |
| 25 | + | |
| 26 | - | else |
| 26 | + | |
| 27 | - | tf = tf - frame * math.floor(tf / frame) |
| 27 | + | |
| 28 | for i,s in pairs(v:GetChildren()) do | |
| 29 | if s.ClassName == "Decal" then | |
| 30 | - | end) |
| 30 | + | |
| 31 | - | |
| 31 | + | |
| 32 | - | function swait(num) |
| 32 | + | |
| 33 | - | if num == 0 or num == nil then |
| 33 | + | |
| 34 | - | ArtificialHB.Event:wait() |
| 34 | + | |
| 35 | - | else |
| 35 | + | |
| 36 | - | for i = 0, num do |
| 36 | + | |
| 37 | - | ArtificialHB.Event:wait() |
| 37 | + | |
| 38 | s.Transparency = 0 | |
| 39 | s.Material = "ForceField" | |
| 40 | s.BrickColor = BrickColor.new("Medium stone gray")
| |
| 41 | end | |
| 42 | end | |
| 43 | - | local r = 255 |
| 43 | + | |
| 44 | - | local g = 0 |
| 44 | + | |
| 45 | - | local b = 0 |
| 45 | + | |
| 46 | if v.ClassName == "Part" or v.ClassName == "MeshPart" then | |
| 47 | - | spawn(function() |
| 47 | + | |
| 48 | - | while wait() do |
| 48 | + | |
| 49 | - | for i = 0, 254/5 do |
| 49 | + | |
| 50 | - | swait() |
| 50 | + | |
| 51 | - | g = g + 5 |
| 51 | + | |
| 52 | - | end |
| 52 | + | |
| 53 | - | for i = 0, 254/5 do |
| 53 | + | |
| 54 | - | swait() |
| 54 | + | |
| 55 | - | r = r - 5 |
| 55 | + |