Advertisement
API_nornorm

123

Nov 19th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.07 KB | None | 0 0
  1. local player = game.Players.LocalPlayer
  2. local mouse = player:GetMouse()
  3.  
  4. local tool = Instance.new("Tool", player.Backpack)
  5. tool.Name = "Doom Cannon"
  6. tool.GripUp = Vector3.new(0, 0, 1)
  7.  
  8. local handle = Instance.new("Part", tool)
  9. handle.Name = "Handle"
  10. handle.Anchored = false
  11.  
  12. local gunmesh = Instance.new("SpecialMesh", handle)
  13. gunmesh.MeshId = "http://www.roblox.com/asset/?id=78002401"
  14. gunmesh.TextureId = "rbxassetid://78002441"
  15.  
  16.  
  17. tool.Equipped:connect(function(mouse)
  18.  
  19. mouse.Button1Down:connect(function()
  20. local ray = Ray.new(handle.CFrame.p, (mouse.Hit.p - handle.CFrame.p).unit * 300)
  21. local human, position = workspace:FindPartOnRay(ray, player.Character, false, true)
  22.  
  23. local bullet = Instance.new("Part", workspace)
  24. bullet.BrickColor = BrickColor.new("Black")
  25. bullet.Material = "Neon"
  26. bullet.TopSurface = "Smooth"
  27. bullet.BottomSurface = "Smooth"
  28. bullet.Locked = true
  29. bullet.Anchored = true
  30. bullet.CanCollide = false
  31.  
  32. local distance = (handle.CFrame.p - position).magnitude
  33. bullet.Size = Vector3.new(0.5, 0.5, distance)
  34. bullet.CFrame = CFrame.new(handle.CFrame.p, position) * CFrame.new(0, 0, -distance / 2)
  35.  
  36. game:GetService("Debris"):AddItem(bullet, 0.1)
  37.  
  38. if human then
  39.  
  40. if human then
  41. local human = human.Parent:FindFirstChild("Humanoid")
  42.  
  43. if not human then
  44. human = human.Parent.Parent:FindFirstChild("Humanoid")
  45. print("Not Mob")
  46. end
  47.  
  48. if human then
  49. human:TakeDamage(10 * 2)
  50. human.Parent.Torso.BrickColor = BrickColor.new("Black")
  51. human.Parent.Head.BrickColor = BrickColor.new("Black")
  52. human.Parent:FindFirstChild("Left Arm").BrickColor = BrickColor.new("Black")
  53. human.Parent:FindFirstChild("Right Arm").BrickColor = BrickColor.new("Black")
  54. human.Parent:FindFirstChild("Left Leg").BrickColor = BrickColor.new("Black")
  55. human.Parent:FindFirstChild("Right Leg").BrickColor = BrickColor.new("Black")
  56. while true do
  57.  
  58. for i = 1,10 do
  59. wait(0.1)
  60.  
  61. human.Parent.Torso.Size = human.Torso.Size - Vector3.new(1,1,1)
  62. human.Parent.Head.Size = human.Torso.Size - Vector3.new(1,1,1)
  63. human.Parent:FindFirstChild("Left Arm").Size = human.Torso.Size - Vector3.new(1,1,1)
  64. human.Parent:FindFirstChild("Right Arm").Size = human.Torso.Size - Vector3.new(1,1,1)
  65. human.Parent:FindFirstChild("Left Leg").Size = human.Torso.Size - Vector3.new(1,1,1)
  66. human.Parent:FindFirstChild("Right Leg").Size = human.Torso.Size - Vector3.new(1,1,1)
  67. end
  68. end
  69.  
  70.  
  71. end
  72.  
  73. end
  74. end
  75.  
  76.  
  77.  
  78. end)
  79. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement