Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tool = Instance.new("Tool")
- local part = Instance.new("Part")
- part.Name = "Handle"
- tool.Name = "Grenade launcher"
- tool.ToolTip = "*Insert demoman scream*"
- part.Parent = tool
- tool.Parent = owner.Character
- part.Size = Vector3.new(1.118,2.0803,4.7996)
- Mesh = Instance.new("SpecialMesh")
- Mesh.Parent = part
- Mesh.MeshId = "http://www.roblox.com/asset/?id=528632153"
- Mesh.TextureId = "http://www.roblox.com/asset/?id=528632171"
- Mesh.Scale = Vector3.new(0.1, 0.1, 0.1)
- tool.GripPos = Vector3.new(0,0,1)
- armed = false
- local pipe
- function Kaboom(otherPart)
- amount = math.random(-1000,1000)
- local partParent = otherPart.Parent
- local humanoid = partParent:FindFirstChildWhichIsA("Humanoid")
- if humanoid then
- humanoid.Health = humanoid.Health - 65
- humanoid.PlatformStand = true
- local yeet = Instance.new("BodyVelocity", humanoid)
- yeet.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- yeet.Velocity = Vector3.new(amount,0,amount)
- wait(0.5)
- yeet:Destroy()
- humanoid.PlatformStand = false
- elseif not humanoid then
- local yeet = Instance.new("BodyVelocity", partParent)
- yeet.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- yeet.Velocity = Vector3.new(amount,0,amount)
- wait(0.5)
- yeet:Destroy()
- end
- end
- function Kaboomhit()
- if armed then
- boom = Instance.new("Part", game.Workspace)
- boom.Size = Vector3.new(5,5,5)
- boom.Position = pipe.Position
- boom.Touched:Connect(Kaboom)
- boom.Anchored = true
- boom.CanCollide = false
- boom.Transparency = 0.5
- wait(0.5)
- pipe:Destroy()
- armed = false
- boom:Destroy()
- end
- end
- tool.Activated:Connect(function()
- pipe = Instance.new("Part")
- pipe.Size = Vector3.new(1.5,1.5,2.5)
- pipe.Parent = game.Workspace
- pipe.CanCollide = false
- pipe.Anchored = true
- wait(0.25)
- armed = true
- pipe.Touched:Connect(Kaboomhit)
- end)
- tool.Equipped:connect(function()
- equipped = true
- owner = game:GetService("Players"):GetPlayerFromCharacter(tool.Parent)
- character = owner.Character
- local rightarm = Instance.new("Weld", character.Torso)
- rightarm.Part0 = character.Torso
- rightarm.Part1 = character["Right Arm"]
- rightarm.C0 = CFrame.new(1.5,0.5,-0.5) * CFrame.Angles(1.6,0,0)
- rightarm.Name = "RightArmWeldportal"
- local leftarm = Instance.new("Weld", character.Torso)
- leftarm.Part0 = character.Torso
- leftarm.Part1 = character["Left Arm"]
- leftarm.C0 = CFrame.new(-1,0.5,-0.5) * CFrame.Angles(1.6,0,0.5)
- leftarm.Name = "LeftArmWeldportal"
- local head = Instance.new("Weld", character.Torso)
- head.Part0 = character.Torso
- head.Part1 = character.Head
- head.C0 = CFrame.new(0,1.5,0)
- head.Name = "HeadWeldportal"
- local humanoidrootpart = Instance.new("Weld", character.HumanoidRootPart)
- humanoidrootpart.Part0 = character.HumanoidRootPart
- humanoidrootpart.Part1 = character.Torso
- humanoidrootpart.Name = "HumanoidRootPartWeldportal"
- end)
- tool.Unequipped:connect(function()
- equipped = false
- if character.Torso:findFirstChild("LeftArmWeldportal") then
- character.Torso:findFirstChild("LeftArmWeldportal"):destroy()
- end
- if character.Torso:findFirstChild("RightArmWeldportal") then
- character.Torso:findFirstChild("RightArmWeldportal"):destroy()
- end
- if character.Torso:findFirstChild("HeadWeldportal") then
- character.Torso:findFirstChild("HeadWeldportal"):destroy()
- end
- if character:findFirstChild("HumanoidRootPart") then
- if character.HumanoidRootPart:findFirstChild("HumanoidRootPartWeldportal") then
- character.HumanoidRootPart:findFirstChild("HumanoidRootPartWeldportal"):destroy()
- end
- end
- end)
- NLS([[
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local E = ReplicatedStorage:WaitForChild("wherepipe")
- local tool = owner.Character:WaitForChild("Grenade launcher")
- local part = tool:WaitForChild("Handle")
- local Players = game:GetService("Players")
- local player = Players.LocalPlayer
- local mouse = player:GetMouse()
- alive = false
- tool.Activated:Connect(function()
- local hrp = owner.Character.HumanoidRootPart
- if not DB then
- local comet = Instance.new("Part")
- comet.Size = Vector3.new(1,1,2)
- comet.CanCollide = false
- comet.CFrame = hrp.CFrame
- comet.Parent = game.Workspace
- local antiGravity = Instance.new("BodyForce")
- local antiGravityFactor = 0.9--1 = gravity force counteracted, 0 = no force lol
- antiGravity.Force = comet:GetMass()*workspace.Gravity*antiGravityFactor *Vector3.new(0,1,0)
- antiGravity.Parent = comet
- local appliedVelocity = (CFrame.new(hrp.Position,mouse.Hit.Position).LookVector * 150)
- comet:ApplyImpulse(appliedVelocity)
- local tracker = Instance.new("Part")
- tracker.Size = Vector3.new(1,1,2)
- tracker.CanCollide = false
- tracker.CFrame = hrp.CFrame
- tracker.Parent = game.Workspace
- tracker.Transparency = 1
- comet.Transparency = 1
- local antiGravity2 = Instance.new("BodyForce")
- local antiGravityFactor2 = 0.9--1 = gravity force counteracted, 0 = no force lol
- antiGravity2.Force = tracker:GetMass()*workspace.Gravity*antiGravityFactor2 *Vector3.new(0,1,0)
- antiGravity2.Parent = tracker
- local appliedVelocity2 = (CFrame.new(hrp.Position,mouse.Hit.Position).LookVector * 155)
- tracker:ApplyImpulse(appliedVelocity2)
- alive = true
- wait(0.1)
- while alive do
- task.wait()
- comet.CFrame = CFrame.lookAt(comet.Position, tracker.Position)
- local pos = comet.CFrame
- E:FireServer(pos)
- end
- wait(1)
- antiGravity2.Force = tracker:GetMass()*workspace.Gravity*antiGravityFactor2 *Vector3.new(0,0.85,0)
- spawn(function()
- DB = false
- wait(5)
- comet:Destroy()
- tracker:Destroy()
- alive = false
- end)
- end
- end)
- ]],owner.PlayerGui)
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local E = Instance.new("RemoteEvent", ReplicatedStorage)
- E.Name = "wherepipe"
- local function loc(player, pos)
- task.wait()
- pipe.CFrame = pos
- end
- E.OnServerEvent:Connect(loc)
Add Comment
Please, Sign In to add comment