Facebook
From Cobalt Duck, 2 Years ago, written in Lua.
This paste is a reply to Slow Motion from Bit Maker - go back
Embed
Viewing differences between Slow Motion and Re: Slow Motion
-- Script no workspace
local flash
local db = true
local Humanoid

local velocidadeflash = 50 -- velocidade de quem ativou
local porcentagem = 90 -- porcentagem de redução de velocidade
local duracao = 10 -- duração do poder


script.Slow.OnServerEvent:Connect(function(p)
        flash = p
        if  db then
   Humanoid = workspace:GetDescendants()
                db = false
                for i,v in pairs(Humanoid)do
                        print(v.Parent)
                        print(p.Character)
                        if v.ClassName == "Humanoid" then
                                print(v.Parent)
                                v.WalkSpeed = v.WalkSpeed - v.WalkSpeed * porcentagem  / 100
                                v.JumpPower = v.JumpPower - v.JumpPower * porcentagem / 100
                                p.Character.Humanoid.WalkSpeed = velocidadeflash 
                        elseif v.ClassName == "BodyVelocity" then
                                v.Velocity = v.Velocity / 100
                        end
                end                

                workspace.Terrain.WaterWaveSpeed = 0.5
                workspace.Gravity = 3
                wait(duracao)
                db = true
                voltar()
        end  
end)

function voltar()
        for i,v in pairs(Humanoid)do
                print(v.Parent)
                if v.ClassName == "Humanoid"  then
                        v.WalkSpeed = v.WalkSpeed + v.WalkSpeed * porcentagem * 10  / 100
                        v.JumpPower = v.JumpPower + v.JumpPower * porcentagem * 10 / 100
                        flash.Character.Humanoid.WalkSpeed = velocidadeflash
                elseif v.ClassName == "BodyVelocity" then
                        v.Velocity = v.Velocity * 100
                end
        end
        game.Workspace.Terrain.WaterWaveSpeed = 3
        game.Workspace.Gravity = 196.2
end


-- Script no Starter Character Scripts


tecla = game:GetService("UserInputService")

tecla.InputBegan:connect(function(tecla)
        if tecla.KeyCode == Enum.KeyCode.F then
                workspace.SlowMotion.Slow:FireServer()
        end
end)

Replies to Re: Slow Motion rss

Title Name Language When
Re: Re: Slow Motion davi lua 2 Years ago.