Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- LocalScript for Launcher
- local tool = script.Parent
- local handle = tool:WaitForChild("Handle")
- local player = game.Players.LocalPlayer
- local mouse = player:GetMouse()
- local humanoid = player.Character:FindFirstChild("Humanoid")
- local debounce = true
- tool.Activated:connect(function()
- if debounce then
- if humanoid.Health > 0 then
- debounce = false
- local rocket = Instance.new("Part",game.Workspace)
- rocket.Position = handle.Position
- rocket.CanCollide = true
- rocket.TopSurface = "Smooth"
- rocket.BottomSurface = "Smooth"
- rocket.Size = Vector3.new(1,1,1)
- rocket.CFrame = handle.CFrame
- rocket.CFrame = CFrame.new(rocket.Position,mouse.Hit.p)
- rocket.Touched:connect(function(hit)
- if hit.Name == "Part" then
- local explosion = Instance.new('Explosion')
- --[[explosion.Parent = game.Workspace
- explosion.Position = rocket.Position
- explosion.BlastPressure = 1
- explosion.BlastRadius = 2
- explosion.Visible = true
- --]]explosion.DestroyJointRadiusPercent = 0.2
- local model = hit.Parent
- for _, part in next, model:GetChildren() do
- if part.Name == "Part" and (part.Position - hit.Position).magnitude <= 5 then
- local weld = part:FindFirstChild('Weld')
- if weld then weld:Destroy() end
- end
- end
- rocket:Destroy()
- end
- end)
- local speed = Instance.new("BodyVelocity", rocket)
- speed.Velocity = rocket.CFrame.lookVector *90
- speed.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
- wait(1)
- debounce = true
- end
- end
- end)
- -- Script for Block
- local parts = script.Parent:GetChildren()
- local lastPart
- for i = 1, #parts do
- if parts[i]:IsA('BasePart') then
- if lastPart then
- local weld = Instance.new('Weld')
- weld.Part0 = parts[i]
- weld.Part1 = lastPart
- weld.C0 = parts[i].CFrame:inverse()
- weld.C1 = lastPart.CFrame:inverse()
- weld.Parent = parts[i]
- end
- lastPart = parts[i]
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment