2much4Us

Untitled

Jun 11th, 2018
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. [[
  2.  
  3. if !timer.Exists( "earthquake" ) then
  4.  
  5. timer.Create( "earthquake", 0.5, 500, function()
  6.  
  7. for _, p in pairs(player.GetAll()) do
  8.  
  9. p:SetPos( p:GetPos() + Vector( 0, 0, 1 ) )
  10.  
  11. p:SetVelocity( Vector( math.random( -50, 50 ), math.random( -50, 50 ), math.random( 100, 150 ) ) )
  12.  
  13. util.ScreenShake( p:GetPos(), 20, 1, 1, 100 )
  14.  
  15. p:EmitSound( "ambient/explosions/exp1.wav", 100, math.random( 60, 100 ) )
  16.  
  17. end
  18.  
  19.  
  20.  
  21. for _, e in pairs(ents.GetAll()) do
  22.  
  23. if e:GetPhysicsObject() and e:GetPhysicsObject():IsValid() then e:GetPhysicsObject():AddVelocity( Vector( math.random( -50, 50 ), math.random( -50, 50 ), math.random( 100, 150 ) ) ) end
  24.  
  25. end
  26.  
  27.  
  28.  
  29.  
  30.  
  31. end)
  32.  
  33. else
  34.  
  35. timer.Remove( "earthquake" )
  36.  
  37. end]]
Advertisement
Add Comment
Please, Sign In to add comment