Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local plr = owner
- local char = plr.Character
- local hum = char:FindFirstChildOfClass("Humanoid")
- local torso = char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart")
- debris = game:GetService("Debris")
- tween = game:GetService("TweenService")
- local ToolEquipped = false
- local holding = false
- local equipped = false
- local using = false
- local Tool0 = Instance.new("Tool")
- local Part1 = Instance.new("Part")
- local SpecialMesh2 = Instance.new("SpecialMesh")
- Tool0.Name = "C4"
- Tool0.Parent = plr['Backpack']
- Tool0.TextureId = "rbxassetid://172171690"
- Tool0.Grip = CFrame.new(-0.600610614, -0.169408143, -8.8817842e-16, -0.808358014, 7.02007208e-09, -0.588691175, -0.588691175, -9.6395727e-09, 0.808358014, 0, 1, 1.19248806e-08)
- Tool0.ToolTip = "Plant the bomb, complete the objective."
- Part1.Name = "Handle"
- Part1.Parent = Tool0
- Part1.CFrame = CFrame.new(0.0049970001, 0.340999991, -0.00151099998, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part1.Position = Vector3.new(0.0049970001, 0.340999991, -0.00151099998)
- Part1.Size = Vector3.new(1.59000003, 0.681999981, 2.26300001)
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.TopSurface = Enum.SurfaceType.Smooth
- SpecialMesh2.Parent = Part1
- SpecialMesh2.MeshId = "rbxassetid://454801145"
- SpecialMesh2.Scale = Vector3.new(0.00200000009, 0.00200000009, 0.00200000009)
- SpecialMesh2.TextureId = "rbxassetid://454801149"
- SpecialMesh2.MeshType = Enum.MeshType.FileMesh
- local handle = Part1
- local tool = Tool0
- local equip = Instance.new("Sound",handle)
- equip.SoundId = "rbxassetid://169799883"
- equip.Volume = 10
- equip.EmitterSize = 1
- local planting = Instance.new("Sound",handle)
- planting.SoundId = "rbxassetid://340617924"
- planting.Volume = 10
- planting.EmitterSize = 1
- local planted = Instance.new("Sound",script)
- planted.SoundId = "rbxassetid://180746510"
- planted.Volume = 2
- local twin = Instance.new("Sound",script)
- twin.SoundId = "rbxassetid://180746497"
- twin.Volume = 2
- local ctwin = Instance.new("Sound",script)
- ctwin.SoundId = "rbxassetid://180746506"
- ctwin.Volume = 2
- function explode(bomb)
- local ex = Instance.new("Explosion",workspace)
- ex.Visible = true
- ex.Position = bomb.Position
- ex.BlastRadius = 55
- ex.BlastPressure = 1000000
- ex.DestroyJointRadiusPercent = 100
- ex.ExplosionType = "CratersAndDebris"
- ex.Hit:connect(function(Part, Distance)
- if Distance <= 55 and Part ~= bomb then
- Part.Anchored = false
- Part:BreakJoints()
- if Part.Parent.ClassName == "Model" or Part.Parent.ClassName == "Part" or Part.Parent.ClassName == "Folder" then
- Part.Parent:BreakJoints()
- end
- end
- end)
- bomb:destroy()
- debris:AddItem(ex,5)
- wait(.5)
- twin:Play()
- end
- function timer(bomb)
- local BillboardGui0 = Instance.new("BillboardGui")
- local TextButton1 = Instance.new("TextBox")
- BillboardGui0.Parent = bomb
- BillboardGui0.Size = UDim2.new(40, 40, 1, 1)
- BillboardGui0.Active = true
- BillboardGui0.StudsOffset = Vector3.new(0, 3, 0)
- TextButton1.Parent = BillboardGui0
- TextButton1.Size = UDim2.new(1, 0, 1, 0)
- TextButton1.BackgroundColor = BrickColor.new("Institutional white")
- TextButton1.BackgroundColor3 = Color3.new(1, 1, 1)
- TextButton1.BackgroundTransparency = 1
- TextButton1.Selectable = false
- TextButton1.Font = Enum.Font.SourceSans
- TextButton1.FontSize = Enum.FontSize.Size14
- TextButton1.Text = "Clicks left: 360"
- TextButton1.TextColor = BrickColor.new("Salmon")
- TextButton1.TextColor3 = Color3.new(1, 0.509804, 0.639216)
- TextButton1.TextScaled = true
- TextButton1.TextSize = 14
- TextButton1.TextStrokeTransparency = 0.5
- TextButton1.TextWrap = true
- TextButton1.TextWrapped = true
- TextButton1.TextYAlignment = Enum.TextYAlignment.Top
- local clicks = 0
- local clicker = Instance.new("ClickDetector",bomb)
- clicker.MaxActivationDistance = 10
- clicker.MouseClick:Connect(function()
- clicks = clicks + 1
- TextButton1.Text = "Clicks left: " .. tostring(360 - clicks)
- end)
- local beep = Instance.new("Sound",script)
- beep.SoundId = "rbxassetid://1609211368"
- beep.Volume = 1
- beep:Play()
- repeat wait() until beep.TimePosition >= 41 or clicks >= 360
- clicker:Destroy()
- if 360 > clicks then
- explode(bomb)
- elseif clicks >= 360 then
- bomb:Destroy()
- beep:Stop()
- ctwin:Play()
- end
- end
- function plant()
- local currentplr = plr
- planting:Play()
- wait(3)
- if currentplr == plr and CheckIfAlive then else return end
- planted:Play()
- local bomb = handle:Clone()
- bomb.Anchored = true
- bomb.CanCollide = true
- bomb.Parent = script
- bomb.CFrame = torso.CFrame - Vector3.new(0,2.6,0)
- if bomb and bomb.Parent then
- tool:Destroy()
- timer(bomb)
- end
- end
- tool.Equipped:Connect(function()
- char = tool.Parent
- plr = game:GetService("Players"):GetPlayerFromCharacter(char)
- hum = char:FindFirstChildOfClass("Humanoid")
- torso = char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart")
- if not CheckIfAlive() then tool.Parent = nil return end
- equipped = true
- equip:Play()
- end)
- tool.Unequipped:Connect(function()
- equipped = false
- equip:Stop()
- end)
- tool.Activated:Connect(function()
- if not using then
- using = true
- plant()
- end
- end)
- function CheckIfAlive()
- local alive = false
- if (plr and plr.Parent and char and char.Parent and hum and hum.Parent and hum.Health > 0 and torso and torso.Parent) then
- alive = true
- end
- return alive
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement