TheUnknownDiscord

DEMOMAN!

Sep 23rd, 2021 (edited)
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.88 KB | None | 0 0
  1. local tool = Instance.new("Tool")
  2. local part = Instance.new("Part")
  3. part.Name = "Handle"
  4. tool.Name = "Grenade launcher"
  5. tool.ToolTip = "*Insert demoman scream*"
  6. part.Parent = tool
  7. tool.Parent = owner.Character
  8. part.Size = Vector3.new(1.118,2.0803,4.7996)
  9. Mesh = Instance.new("SpecialMesh")
  10. Mesh.Parent = part
  11. Mesh.MeshId = "http://www.roblox.com/asset/?id=528632153"
  12. Mesh.TextureId = "http://www.roblox.com/asset/?id=528632171"
  13. Mesh.Scale = Vector3.new(0.1, 0.1, 0.1)
  14. tool.GripPos = Vector3.new(0,0,1)
  15. armed = false
  16. local pipe
  17. function Kaboom(otherPart)
  18. amount = math.random(-1000,1000)
  19. local partParent = otherPart.Parent
  20. local humanoid = partParent:FindFirstChildWhichIsA("Humanoid")
  21. if humanoid then
  22. humanoid.Health = humanoid.Health - 65
  23. humanoid.PlatformStand = true
  24. local yeet = Instance.new("BodyVelocity", humanoid)
  25. yeet.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  26. yeet.Velocity = Vector3.new(amount,0,amount)
  27. wait(0.5)
  28. yeet:Destroy()
  29. humanoid.PlatformStand = false
  30. elseif not humanoid then
  31. local yeet = Instance.new("BodyVelocity", partParent)
  32. yeet.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  33. yeet.Velocity = Vector3.new(amount,0,amount)
  34. wait(0.5)
  35. yeet:Destroy()
  36. end
  37. end
  38. function Kaboomhit()
  39. if armed then
  40. boom = Instance.new("Part", game.Workspace)
  41. boom.Size = Vector3.new(5,5,5)
  42. boom.Position = pipe.Position
  43. boom.Touched:Connect(Kaboom)
  44. boom.Anchored = true
  45. boom.CanCollide = false
  46. boom.Transparency = 0.5
  47. wait(0.5)
  48. pipe:Destroy()
  49. armed = false
  50. boom:Destroy()
  51. end
  52. end
  53.  
  54. tool.Activated:Connect(function()
  55. pipe = Instance.new("Part")
  56. pipe.Size = Vector3.new(1.5,1.5,2.5)
  57. pipe.Parent = game.Workspace
  58. pipe.CanCollide = false
  59. pipe.Anchored = true
  60. wait(0.25)
  61. armed = true
  62. pipe.Touched:Connect(Kaboomhit)
  63. end)
  64. tool.Equipped:connect(function()
  65. equipped = true
  66. owner = game:GetService("Players"):GetPlayerFromCharacter(tool.Parent)
  67. character = owner.Character
  68. local rightarm = Instance.new("Weld", character.Torso)
  69. rightarm.Part0 = character.Torso
  70. rightarm.Part1 = character["Right Arm"]
  71. rightarm.C0 = CFrame.new(1.5,0.5,-0.5) * CFrame.Angles(1.6,0,0)
  72. rightarm.Name = "RightArmWeldportal"
  73. local leftarm = Instance.new("Weld", character.Torso)
  74. leftarm.Part0 = character.Torso
  75. leftarm.Part1 = character["Left Arm"]
  76. leftarm.C0 = CFrame.new(-1,0.5,-0.5) * CFrame.Angles(1.6,0,0.5)
  77. leftarm.Name = "LeftArmWeldportal"
  78. local head = Instance.new("Weld", character.Torso)
  79. head.Part0 = character.Torso
  80. head.Part1 = character.Head
  81. head.C0 = CFrame.new(0,1.5,0)
  82. head.Name = "HeadWeldportal"
  83. local humanoidrootpart = Instance.new("Weld", character.HumanoidRootPart)
  84. humanoidrootpart.Part0 = character.HumanoidRootPart
  85. humanoidrootpart.Part1 = character.Torso
  86. humanoidrootpart.Name = "HumanoidRootPartWeldportal"
  87. end)
  88. tool.Unequipped:connect(function()
  89. equipped = false
  90. if character.Torso:findFirstChild("LeftArmWeldportal") then
  91. character.Torso:findFirstChild("LeftArmWeldportal"):destroy()
  92. end
  93. if character.Torso:findFirstChild("RightArmWeldportal") then
  94. character.Torso:findFirstChild("RightArmWeldportal"):destroy()
  95. end
  96. if character.Torso:findFirstChild("HeadWeldportal") then
  97. character.Torso:findFirstChild("HeadWeldportal"):destroy()
  98. end
  99. if character:findFirstChild("HumanoidRootPart") then
  100. if character.HumanoidRootPart:findFirstChild("HumanoidRootPartWeldportal") then
  101. character.HumanoidRootPart:findFirstChild("HumanoidRootPartWeldportal"):destroy()
  102. end
  103. end
  104. end)
  105.  
  106. NLS([[
  107. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  108. local E = ReplicatedStorage:WaitForChild("wherepipe")
  109. local tool = owner.Character:WaitForChild("Grenade launcher")
  110. local part = tool:WaitForChild("Handle")
  111. local Players = game:GetService("Players")
  112. local player = Players.LocalPlayer
  113. local mouse = player:GetMouse()
  114. alive = false
  115. tool.Activated:Connect(function()
  116. local hrp = owner.Character.HumanoidRootPart
  117. if not DB then
  118. local comet = Instance.new("Part")
  119. comet.Size = Vector3.new(1,1,2)
  120. comet.CanCollide = false
  121. comet.CFrame = hrp.CFrame
  122. comet.Parent = game.Workspace
  123.  
  124. local antiGravity = Instance.new("BodyForce")
  125. local antiGravityFactor = 0.9--1 = gravity force counteracted, 0 = no force lol
  126. antiGravity.Force = comet:GetMass()*workspace.Gravity*antiGravityFactor *Vector3.new(0,1,0)
  127. antiGravity.Parent = comet
  128. local appliedVelocity = (CFrame.new(hrp.Position,mouse.Hit.Position).LookVector * 150)
  129. comet:ApplyImpulse(appliedVelocity)
  130.  
  131. local tracker = Instance.new("Part")
  132. tracker.Size = Vector3.new(1,1,2)
  133. tracker.CanCollide = false
  134. tracker.CFrame = hrp.CFrame
  135. tracker.Parent = game.Workspace
  136. tracker.Transparency = 1
  137. comet.Transparency = 1
  138.  
  139. local antiGravity2 = Instance.new("BodyForce")
  140. local antiGravityFactor2 = 0.9--1 = gravity force counteracted, 0 = no force lol
  141. antiGravity2.Force = tracker:GetMass()*workspace.Gravity*antiGravityFactor2 *Vector3.new(0,1,0)
  142. antiGravity2.Parent = tracker
  143. local appliedVelocity2 = (CFrame.new(hrp.Position,mouse.Hit.Position).LookVector * 155)
  144. tracker:ApplyImpulse(appliedVelocity2)
  145.  
  146. alive = true
  147. wait(0.1)
  148. while alive do
  149. task.wait()
  150. comet.CFrame = CFrame.lookAt(comet.Position, tracker.Position)
  151. local pos = comet.CFrame
  152. E:FireServer(pos)
  153. end
  154. wait(1)
  155. antiGravity2.Force = tracker:GetMass()*workspace.Gravity*antiGravityFactor2 *Vector3.new(0,0.85,0)
  156. spawn(function()
  157. DB = false
  158. wait(5)
  159. comet:Destroy()
  160. tracker:Destroy()
  161. alive = false
  162. end)
  163. end
  164. end)
  165. ]],owner.PlayerGui)
  166. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  167. local E = Instance.new("RemoteEvent", ReplicatedStorage)
  168. E.Name = "wherepipe"
  169.  
  170. local function loc(player, pos)
  171. task.wait()
  172. pipe.CFrame = pos
  173. end
  174. E.OnServerEvent:Connect(loc)
Add Comment
Please, Sign In to add comment