Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- updateInterval = .4
- 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 = 120000000000000000000000000000000000000000000000000000000000000000000000000000000000
- explosion.BlastPressure = 1000000000000000000000000000000000000000000000000000000000000000000000000000000000 -- these are really dangerous 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.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(1000)
- wait(1000)
- script.Parent:remove()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement