Facebook
From Cobalt Duck, 2 Years ago, written in Lua.
This paste is a reply to Slow Motion from Bit Maker - view diff
Embed
Download Paste or View Raw
Hits: 206
  1. -- Script no workspace
  2. local flash
  3. local db = true
  4. local Humanoid
  5.  
  6. local velocidadeflash = 50 -- velocidade de quem ativou
  7. local porcentagem = 90 -- porcentagem de redução de velocidade
  8. local duracao = 10 -- duração do poder
  9.  
  10.  
  11. script.Slow.OnServerEvent:Connect(function(p)
  12.         flash = p
  13.         if  db then
  14.    Humanoid = workspace:GetDescendants()
  15.                 db = false
  16.                 for i,v in pairs(Humanoid)do
  17.                         print(v.Parent)
  18.                         print(p.Character)
  19.                         if v.ClassName == "Humanoid" then
  20.                                 print(v.Parent)
  21.                                 v.WalkSpeed = v.WalkSpeed - v.WalkSpeed * porcentagem  / 100
  22.                                 v.JumpPower = v.JumpPower - v.JumpPower * porcentagem / 100
  23.                                 p.Character.Humanoid.WalkSpeed = velocidadeflash
  24.                         elseif v.ClassName == "BodyVelocity" then
  25.                                 v.Velocity = v.Velocity / 100
  26.                         end
  27.                 end            
  28.  
  29.                 workspace.Terrain.WaterWaveSpeed = 0.5
  30.                 workspace.Gravity = 3
  31.                 wait(duracao)
  32.                 db = true
  33.                 voltar()
  34.         end  
  35. end)
  36.  
  37. function voltar()
  38.         for i,v in pairs(Humanoid)do
  39.                 print(v.Parent)
  40.                 if v.ClassName == "Humanoid"  then
  41.                         v.WalkSpeed = v.WalkSpeed + v.WalkSpeed * porcentagem * 10  / 100
  42.                         v.JumpPower = v.JumpPower + v.JumpPower * porcentagem * 10 / 100
  43.                         flash.Character.Humanoid.WalkSpeed = velocidadeflash
  44.                 elseif v.ClassName == "BodyVelocity" then
  45.                         v.Velocity = v.Velocity * 100
  46.                 end
  47.         end
  48.         game.Workspace.Terrain.WaterWaveSpeed = 3
  49.         game.Workspace.Gravity = 196.2
  50. end
  51.  
  52.  
  53. -- Script no Starter Character Scripts
  54.  
  55.  
  56. tecla = game:GetService("UserInputService")
  57.  
  58. tecla.InputBegan:connect(function(tecla)
  59.         if tecla.KeyCode == Enum.KeyCode.F then
  60.                 workspace.SlowMotion.Slow:FireServer()
  61.         end
  62. end)
  63.  

Replies to Re: Slow Motion rss

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