null nil false 0 Time Bomb rbxasset://Textures/Bomb.png true true Bomb updateInterval = .9 currentColor = 1 colors = {26, 21} ticksound = Instance.new("Sound") ticksound.SoundId = "rbxasset://sounds\\clickfast.wav" ticksound.Parent = script.Parent function update() updateInterval = updateInterval * .9 script.Parent.BrickColor = BrickColor.new(colors[currentColor]) currentColor = currentColor + 1 if (currentColor > 2) then currentColor = 1 end end function blowUp() local sound = Instance.new("Sound") sound.SoundId = "rbxasset://sounds\\Rocket shot.wav" sound.Parent = script.Parent sound.Volume = 1 sound:play() explosion = Instance.new("Explosion") explosion.BlastRadius = 12000000000 explosion.BlastPressure = 100000000000 -- these are really wussy units -- find instigator tag local creator = script.Parent:findFirstChild("creator") if creator ~= nil then explosion.Hit:connect(function(part, distance) onPlayerBlownUp(part, distance, creator) end) end explosion.Position = script.Parent.Position explosion.Parent = game.Workspace script.Parent.Transparency = 1 end function onPlayerBlownUp(part, distance, creator) if part.Name == "Head" then local humanoid = part.Parent:findFirstChild("Humanoid") tagHumanoid(humanoid, creator) end end function tagHumanoid(humanoid, creator) -- tag does not need to expire iff all explosions lethal if creator ~= nil then local new_tag = creator:clone() new_tag.Parent = humanoid end end function untagHumanoid(humanoid) if humanoid ~= nil then local tag = humanoid:findFirstChild("creator") if tag ~= nil then tag.Parent = nil end end end while updateInterval > .1 do wait(updateInterval) update() ticksound:play() end blowUp() wait(0) script.Parent:remove() true false PlantBomb print("Bomb hopper script loaded") bin = script.Parent bombScript = script.Parent.Bomb function plant() local bomb = Instance.new("Part") local spawnPos = game.Players.LocalPlayer.Character.PrimaryPart.Position bomb.Position = Vector3.new(spawnPos.x, spawnPos.y+3, spawnPos.z) bomb.Size = Vector3.new(2,2,2) bomb.BrickColor = BrickColor.new(21) bomb.Shape = 0 bomb.BottomSurface = 0 bomb.TopSurface = 0 bomb.Reflectance = 1 bomb.Name = "TimeBomb" bomb.Locked = true local creator_tag = Instance.new("ObjectValue") creator_tag.Value = game.Players.LocalPlayer creator_tag.Name = "creator" creator_tag.Parent = bomb bomb.Parent = game.Workspace local new_script = bombScript:clone() new_script.Disabled = false new_script.Parent = bomb end enabled = true function onButton1Down(mouse) if not enabled then return end enabled = false mouse.Icon = "rbxasset://textures\\ArrowFarCursor.png" plant() wait(0) mouse.Icon = "rbxasset://textures\\ArrowCursor.png" enabled = true end function onSelected(mouse) print("bomb selected") mouse.Icon = "rbxasset://textures\\ArrowCursor.png" mouse.Button1Down:connect(function() onButton1Down(mouse) end) end bin.Selected:connect(onSelected) true