SebTDZ

Grenade

Jul 27th, 2019
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.60 KB | None | 0 0
  1. local tool = Instance.new("Tool")
  2. tool.Name = "Grenade"
  3. tool.Parent = owner.Backpack
  4.  
  5. function rgb(RED,GREEN,BLUE)
  6.     local Count = 1 / 255
  7.     --Red Count
  8.     local red = Count * RED
  9.     --Green Count
  10.     local green = Count * GREEN
  11.     --Blue Count
  12.     local blue = Count * BLUE
  13.     --Give Color3
  14.     local FColor = Color3.new(red,green,blue)
  15.     return FColor
  16. end
  17.  
  18. local handle = Instance.new("Part")
  19. handle.Name = "Handle"
  20. handle.Parent = tool
  21. handle.Size = Vector3.new(0.8, 0.92, 0.8)
  22. handle.Color = rgb(25, 160, 10)
  23.  
  24. local mesh = Instance.new("SpecialMesh")
  25. mesh.Name = "Mesh"
  26. mesh.Parent = handle
  27. mesh.MeshType = "Sphere"
  28. mesh.Scale = Vector3.new(1,1,1)
  29.  
  30. local handle2 = Instance.new("Part")
  31. handle2.Name = "Handle2"
  32. handle2.Parent = handle
  33. handle2.Size = Vector3.new(0.2, 0.2, 0.2)
  34. handle2.Color = rgb(150, 150, 150)
  35.  
  36. local weld = Instance.new("Weld")
  37. weld.Name = "weld"
  38. weld.Parent = handle
  39. weld.Part0 = handle
  40. weld.Part1 = handle2
  41. weld.C1 = CFrame.new(0,-0.92 / 2,0)
  42.  
  43. local handle3 = Instance.new("Part")
  44. handle3.Name = "handle3"
  45. handle3.Parent = handle
  46. handle3.Size = Vector3.new(0.3, 0.1, 0.2)
  47. handle3.Color = rgb(150, 150, 150)
  48.  
  49. local weld2 = Instance.new("Weld")
  50. weld2.Name = "weld2"
  51. weld2.Parent = handle
  52. weld2.Part0 = handle2
  53. weld2.Part1 = handle3
  54. weld2.C1 = CFrame.new(0.3 / 2,-0.2 / 2,0)
  55.  
  56. tool.Activated:Connect(function()
  57.     local new = handle:Clone()
  58.     new.Parent = workspace
  59.     new.CanCollide = true
  60.     wait(2.5)
  61.     local Explosion = Instance.new("Explosion", new)
  62.     Explosion.BlastRadius = 15
  63.     Explosion.Position = new.Position
  64.     wait(0.25)
  65.     new:Remove()
  66. end)
Advertisement
Add Comment
Please, Sign In to add comment