Advertisement
Cricrox

Bomb Script

Jan 12th, 2019
2,922
-1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.71 KB | None | 0 1
  1. local tool = script.Parent
  2. local player = game.Players.LocalPlayer
  3. local mouse = player:GetMouse()
  4.  
  5. tool.Activated:Connect(function()
  6.    
  7. --> BLOQUE BOMBA
  8.    
  9.     local bomb = tool.Handle:Clone()
  10.     bomb.CanCollide = true
  11.     bomb.Parent = game.Workspace
  12.     bomb.CFrame = tool.Handle.CFrame*CFrame.new(0,0,-1)
  13.     bomb.Velocity = mouse.Hit.lookVector*50 -- VELOCIDAD DE BOMBA , PUEDES BORRARLO SI SOLO QUIERES SOLTARLO
  14.  
  15. --> EXPLOSIÓN
  16.    
  17.     script.Disabled = true
  18.     wait(1) -- TIEMPO DE ESPERA DE EXPLOSIÓN
  19.     local explosion = Instance.new("Explosion")
  20.     explosion.Position = bomb.Position
  21.     explosion.Parent = game.Workspace
  22.     explosion.BlastRadius = 10 -- ÁREA DE EXPLOSIÓN
  23.     bomb:Destroy() 
  24.     script.Disabled = false
  25.  
  26. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement