C4

Run Settings
LanguageLua
Language Version
Run Command
detonating = false local det = Instance.new("Tool",owner.Backpack) det.Name = "Detonator" det.Grip = CFrame.new(0,0.2,0.2) * CFrame.Angles(math.rad(-90),0,0) local part2 = Instance.new("Part",det) part2.Name = "Handle" part2.Size = Vector3.new(0.206, 0.845, 1.455) local m = Instance.new("SpecialMesh",part2) m.MeshId = "rbxassetid://8890151805" m.TextureId = "rbxassetid://8890151861" m.Scale = Vector3.new(0.05,0.05,0.05) local c4 = Instance.new("Tool",owner.Backpack) c4.Name = "C4" c4.Grip = CFrame.new(0.45,0,-0.5) * CFrame.Angles(0,math.rad(90),0) local part = Instance.new("Part",c4) part.Size = Vector3.new(1.34, 0.659, 2.023) part.Name = "Handle" local m = Instance.new("SpecialMesh",part) m.MeshId = "rbxassetid://454801145" m.TextureId = "rbxassetid://454801149" m.Scale = Vector3.new(0.002,0.002,0.002) local c4out = false local weld = Instance.new("Weld",owner.Character.Torso) weld.Part0 = owner.Character["Right Arm"] weld.Part1 = owner.Character.Torso weld.C1 = CFrame.new(1.5,0.5,0) weld.C0 = CFrame.new(0,0.5,0) * CFrame.Angles(math.rad(-90),0,0) weld.Enabled = false local tweenService = game:GetService("TweenService") local timeToFade = 0.2 local object = weld local tweenInfo = TweenInfo.new(timeToFade,Enum.EasingStyle.Back,Enum.EasingDirection.Out) local goal = {} goal.C0 = CFrame.new(0,0.5,0) * CFrame.Angles(math.rad(-70),math.rad(-30),math.rad(10)) local throw1 = tweenService:Create(object, tweenInfo, goal) local timeToFade = 0.15 local tweenInfo = TweenInfo.new(timeToFade,Enum.EasingStyle.Sine,Enum.EasingDirection.Out) local goal = {} goal.C0 = CFrame.new(0,0.5,0) * CFrame.Angles(math.rad(-100),math.rad(15),math.rad(10)) local throw2 = tweenService:Create(object, tweenInfo, goal) local z = Instance.new("Part") local timeToFade = 0.1 local tweenInfo = TweenInfo.new(timeToFade,Enum.EasingStyle.Sine,Enum.EasingDirection.Out) local goal = {} goal.CFrame = CFrame.new(0,0.5,0) * CFrame.Angles(math.rad(-95),math.rad(10),math.rad(5)) local throwwai = tweenService:Create(z, tweenInfo, goal) local timeToFade = 0.2 local tweenInfo = TweenInfo.new(timeToFade,Enum.EasingStyle.Sine,Enum.EasingDirection.Out) local goal = {} goal.C0 = CFrame.new(0,0.5,0) * CFrame.Angles(math.rad(-90),0,0) local throw3 = tweenService:Create(object, tweenInfo, goal) local timeToFade = 1 local tweenInfo = TweenInfo.new(timeToFade,Enum.EasingStyle.Sine,Enum.EasingDirection.Out) local goal = {} goal.Transparency = 0 local trans = tweenService:Create(part, tweenInfo, goal) e = Instance.new("RemoteEvent",owner.Character) local clic = Instance.new("Sound") clic.SoundId = "rbxassetid://6884595870" clic.PlayOnRemove = true clic.TimePosition = 0.02 local c4slanded = {} det.Activated:Connect(function() clic.Parent = part2 clic.Parent = nil for i,v in pairs(c4slanded) do if v:FindFirstChild("BOOM") then v:FindFirstChild("BOOM").Value = true end end for i,v in pairs(c4slanded) do if v:FindFirstChild("BOOM") then table.remove(c4slanded,table.find(c4slanded,v)) end end end) e.OnServerEvent:Connect(function(_,what,who,cf) coroutine.wrap(function() pcall(function() if what:FindFirstAncestorWhichIsA("Model") and game:GetService("Players"):GetPlayerFromCharacter(what:FindFirstAncestorWhichIsA("Model")) then what:SetNetworkOwner(game:GetService("Players"):GetPlayerFromCharacter(what:FindFirstAncestorWhichIsA("Model"))) what:FindFirstChild("gaming"):SetNetworkOwner(game:GetService("Players"):GetPlayerFromCharacter(what:FindFirstAncestorWhichIsA("Model"))) end end) end)() local weldt = Instance.new("Weld",who) weldt.Part0 = what weldt.Part1 = who weldt.C1 = cf e:FireClient(owner,what) what.Anchored = false local kablooey = Instance.new("BoolValue",what) kablooey.Value = false kablooey.Name = "BOOM" table.insert(c4slanded,what) what.CanCollide = false coroutine.wrap(function() local billboard = Instance.new("BillboardGui", what) billboard.Brightness = 3 billboard.Adornee = what billboard.Size = UDim2.new(2,0,2,0) billboard.StudsOffsetWorldSpace = Vector3.new(0.215,0.4,0.05) local frame = Instance.new("ImageLabel",billboard) frame.Size = UDim2.new(2,0,2,0) frame.BackgroundTransparency = 1 frame.Position = UDim2.new(0.5, 0, 0.5, 0) frame.AnchorPoint = Vector2.new(0.5, 0.5) frame.Image = "rbxassetid://6991253900" frame.ImageColor3 = Color3.new(255/255, 43/255, 43/255) frame.ImageTransparency = 1 frame.ZIndex = 2 local frame2 = Instance.new("ImageLabel",billboard) frame2.Size = UDim2.new(0.5,0,0.5,0) frame2.BackgroundTransparency = 1 frame2.Position = UDim2.new(0.5, 0, 0.5, 0) frame2.AnchorPoint = Vector2.new(0.5, 0.5) frame2.Image = "rbxassetid://162595515" frame2.ImageColor3 = Color3.new(255/255, 22/255, 22/255) frame2.ImageTransparency = 1 frame2.ZIndex = 1 local open = Instance.new("Sound",what) open.SoundId = "rbxassetid://5833216142" open:Play() local beep = Instance.new("Sound") beep.SoundId = "rbxassetid://7818577205" beep.Volume = 0.5 beep.PlayOnRemove = true wait(0.37) frame.ImageTransparency = 0.4 frame2.ImageTransparency = 0.4 wait(0.1) frame.ImageTransparency = 1 frame2.ImageTransparency = 1 wait(0.05) frame.ImageTransparency = 0.4 frame2.ImageTransparency = 0.4 wait(0.1) frame.ImageTransparency = 1 frame2.ImageTransparency = 1 while what ~= nil do if what:FindFirstChild("BOOM").Value ~= true then wait(1.37) beep.Parent = what beep.Parent = nil frame.ImageTransparency = 0.4 frame2.ImageTransparency = 0.4 wait(0.1) frame.ImageTransparency = 1 frame2.ImageTransparency = 1 else for i = 1,0.1,-0.05 do wait(0.27 * i) beep.Parent = what beep.Parent = nil frame.ImageTransparency = 0.4 frame2.ImageTransparency = 0.4 wait(0.1) frame.ImageTransparency = 1 frame2.ImageTransparency = 1 end local attach = Instance.new("Attachment",workspace.Terrain) attach.WorldPosition = what.Position local boom2 = Instance.new("ParticleEmitter",attach) boom2.ZOffset = -10 boom2.LightEmission = 0 boom2.LightInfluence = 1 boom2.Drag = 0.5 boom2.Enabled = false boom2.Lifetime = NumberRange.new(1, 1.05) boom2.Rate = 1000 boom2.RotSpeed = NumberRange.new(500,500) boom2.Rotation = NumberRange.new(100,100) boom2.SpreadAngle = Vector2.new(360,360) boom2.Transparency = NumberSequence.new{NumberSequenceKeypoint.new(0, 0.587), NumberSequenceKeypoint.new(0.703, 0.563), NumberSequenceKeypoint.new(1, 1)} boom2.Color = ColorSequence.new{ColorSequenceKeypoint.new(0, Color3.fromRGB(0, 0, 0)), ColorSequenceKeypoint.new(0.499, Color3.fromRGB(138, 138, 138)), ColorSequenceKeypoint.new(1, Color3.fromRGB(0, 0, 0))} boom2.Texture = "rbxassetid://284205403" boom2.Speed = NumberRange.new(15,35) boom2.Size = NumberSequence.new{NumberSequenceKeypoint.new(0, 4.973 * 0.5), NumberSequenceKeypoint.new(0.502, 10 * 0.5), NumberSequenceKeypoint.new(0.921, 2.787 * 0.5), NumberSequenceKeypoint.new(1, 0.5 * 0.5)} local boom = Instance.new("ParticleEmitter",attach) boom.LightEmission = 1 boom.LightInfluence = 1 boom.Drag = 2 boom.Enabled = false boom.Lifetime = NumberRange.new(0.875, 0.9) boom.Rate = 1000 boom.RotSpeed = NumberRange.new(100,100) boom.Rotation = NumberRange.new(100,100) boom.SpreadAngle = Vector2.new(5000,5000) boom.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0),NumberSequenceKeypoint.new(0.8,0),NumberSequenceKeypoint.new(1,0)}) boom.Color = ColorSequence.new{ColorSequenceKeypoint.new(0, Color3.fromRGB(153, 69, 20)), ColorSequenceKeypoint.new(0.499, Color3.fromRGB(204, 106, 41)), ColorSequenceKeypoint.new(1, Color3.fromRGB(22, 22, 22))} boom.Texture = "rbxassetid://284205403" boom.Speed = NumberRange.new(15,25) boom.Size = NumberSequence.new{NumberSequenceKeypoint.new(0, 4.098 * 0.5), NumberSequenceKeypoint.new(0.491, 8.033 * 0.5), NumberSequenceKeypoint.new(0.914, 2.186 * 0.5), NumberSequenceKeypoint.new(1, 0.5 * 0.5)} local boom3 = Instance.new("ParticleEmitter",attach) boom3.LightEmission = 0.5 boom3.LightInfluence = 1 boom3.Drag = 1 boom3.Enabled = false boom3.Lifetime = NumberRange.new(1.075, 1.1) boom3.Rate = 1000 boom3.RotSpeed = NumberRange.new(100,100) boom3.Rotation = NumberRange.new(100,100) boom3.SpreadAngle = Vector2.new(5000,5000) boom3.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0),NumberSequenceKeypoint.new(0.8,0),NumberSequenceKeypoint.new(1,0)}) boom3.Color = ColorSequence.new{ColorSequenceKeypoint.new(0, Color3.fromRGB(153, 69, 20)), ColorSequenceKeypoint.new(0.499, Color3.fromRGB(204, 106, 41)), ColorSequenceKeypoint.new(1, Color3.fromRGB(22, 22, 22))} boom3.Texture = "rbxassetid://284205403" boom3.Speed = NumberRange.new(15,25) boom3.Size = NumberSequence.new{NumberSequenceKeypoint.new(0, 6.175 * 0.5), NumberSequenceKeypoint.new(0.494, 10 * 0.5), NumberSequenceKeypoint.new(0.916, 3.443 * 0.5), NumberSequenceKeypoint.new(1, 0.5 * 0.5)} boom3:Emit(300) boom:Emit(300) boom2:Emit(300) local explod = Instance.new("Explosion") explod.BlastRadius = 25 explod.DestroyJointRadiusPercent = 0 explod.BlastPressure = 1000 explod.Visible = false explod.Position = what.Position local modelsHit = {} explod.Hit:Connect(function(whatp, distance) local parentModel = whatp.Parent if parentModel then if modelsHit[parentModel] then return end modelsHit[parentModel] = true local humanoid = parentModel:FindFirstChild("Humanoid") if humanoid then local distanceFactor = distance / explod.BlastRadius distanceFactor = 1 - distanceFactor humanoid.Health = humanoid.Health - (250 * distanceFactor) end end end) explod.Parent = workspace game:GetService("Debris"):AddItem(attach,3) task.wait() what:Destroy() break end end end)() end) c4.Activated:Connect(function() if not c4out then c4out = true weld.Enabled = true throw1:Play() throw1.Completed:Wait() throw2:Play() throw2.Completed:Wait() part.Transparency = 1 part.Material = "ForceField" local yeec4 = Instance.new("Part",script) yeec4.Size = Vector3.new(1.34, 0.659, 2.023) yeec4.CFrame = owner.Character.Head.CFrame * CFrame.new(0,-owner.Character.Head.Size.Y,-owner.Character.Head.Size.Z * 3) yeec4.Material = "Fabric" local yeec42 = Instance.new("Part",yeec4) yeec42.Name = "gaming" yeec42.Size = Vector3.new(2.34, 1.659, 3.023) yeec42.CFrame = owner.Character.Head.CFrame * CFrame.new(0,-owner.Character.Head.Size.Y,-owner.Character.Head.Size.Z * 3) yeec42.CanCollide = false yeec42.Transparency = 1 yeec42.Massless = true local bom = Instance.new("Sound",yeec4) bom.SoundId = "rbxassetid://577577319" bom.Volume = 2 bom.PlayOnRemove = true local w = Instance.new("Weld",yeec4) w.Part0 = yeec42 w.Part1 = yeec4 yeec4:SetNetworkOwner(owner) yeec42:SetNetworkOwner(owner) local m = Instance.new("SpecialMesh",yeec4) m.MeshId = "rbxassetid://454801145" m.TextureId = "rbxassetid://454801149" m.Scale = Vector3.new(0.002,0.002,0.002) task.wait() e:FireClient(owner,yeec4) throw3:Play() throw3.Completed:Wait() weld.Enabled = false wait(1) trans:Play() trans.Completed:Wait() c4out = false part.Material = "Fabric" end end) NLS([[ e = script.Parent e.OnClientEvent:Connect(function(what) if not what.Anchored == true then local yeec4 = what local yeec42 = what:WaitForChild("gaming") yeec4:ApplyImpulse(owner.Character.Head.CFrame.lookVector * (50 * (yeec4:GetMass() + yeec42:GetMass())) + Vector3.new(0,(30 * (yeec4:GetMass() + yeec42:GetMass())),0)) yeec4:ApplyAngularImpulse(owner.Character.Head.CFrame.upVector * (-5 * ((yeec4:GetMass() + yeec42:GetMass()))) + owner.Character.Head.CFrame.lookVector * (-2 * (yeec4:GetMass() + yeec42:GetMass()))) local s local touched = false yeec42.Touched:Connect(function(a) if (a ~= owner.Character and a:FindFirstAncestorWhichIsA("Model") ~= owner.Character) and (a.Parent ~= what.Parent and a.Parent.Parent ~= what.Parent) then touched = true end end) s = game:GetService("RunService").RenderStepped:Connect(function() if what ~= nil then if touched then local params = RaycastParams.new() params.FilterDescendantsInstances = {owner.Character,what.Parent} params.FilterType = Enum.RaycastFilterType.Blacklist local res = workspace:Raycast(what.Position, CFrame.new(what.Position, what.Position + what.Velocity).lookVector * 5, params) if res then local wha = res.Instance local currentRightVector = wha.CFrame.RightVector local upVector = res.Normal local newFacialVector = currentRightVector:Cross(upVector) local c = CFrame.fromMatrix(res.Position, currentRightVector, upVector, newFacialVector) * CFrame.new(0,0.25,0) * CFrame.Angles(0,math.rad(math.random(-80,80)),0) what.CFrame = c what.Anchored = true task.wait() e:FireServer(what,wha,wha.CFrame:Inverse() * c) s:Disconnect() end end else s:Disconnect() end end) else what.Anchored = false end end) ]],e)
Editor Settings
Theme
Key bindings
Full width
Lines