Get a brick you want to be a bomb.
Call it Handle.
Select Handle, and go to Insert > Object > Script.
Now, deselect Handle, and go to Insert > Object > Tool.
( If you don't have Explorer open already, go to View > Explorer. )
Drag Handle ontop of Tool, and release it. ( Just make sure Handle is inside Tool. )
Remeber this, this is important! Name Tool, BombTool.
Now, open up BombTool, so you can see Handle, open up Handle, so you can see Script.
Double click Script, so the script comes up. Now, delete the text in the script, so it its COMPLETELY blank. Now, copy and paste this into the script:
function onTouched(Hit)
wait(0.5)
z = Instance.new("Hint")
z.Text = "Someone has picked up the bomb!"
wait(3.5)
z.Text = "They now have 60 seconds until the bomb explodes!"
wait(5)
z.Text = "~~~~~"
wait(21)
z.Text = "30 seconds until the bomb explodes!"
wait(17)
z.Text = "Only 10 seconds left!"
wait(2.8)
z.Text = "9"
wait(0.8)
z.Text = "8"
wait(0.8)
z.Text = "7"
wait(0.8)
z.Text = "6"
wait(0.8)
z.Text = "5"
wait(0.8)
z.Text = "4"
wait(0.8)
z.Text = "3"
wait(0.8)
z.Text = "2"
wait(0.8)
z.Text = "1"
wait(0.8)
z.Text = "0! Boom time!"
wait(1.5)
g = Instance.new("Explosion")
g.Position = script.Parent.Position
g.Parent = script.Parent
g.BlastRadius = 5
g.BlastPressure = 7500
wait(0.1)
z.Text = "~~~~~"
wait(10)
z.Text = "Regening the bomb. Try not to get blown up..."
wait(8)
z:Remove ()
end
script.Parent.Touched:connect(onTouched)
------------
Now, insert another Script, into Workspace.
Put inside it, this:
model = game.Workspace.BombTool
backup = model:clone()
function onTouched(Hit)
wait(59.6)
model:remove()
model = backup:clone()
model.Parent = game.Workspace
model:makeJoints()
end
script.Parent.BombTool.Handle.Touched:connect(onTouched)
--------
Now, because I am a beginner to scripting, I dont know if that will work, and mention somewhere to drop the bomb, press backspace. |