Jas1066
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 647 |
|
|
| 17 Apr 2012 11:15 AM |
Could some one add a reload thing to this so you can only place the bomb every 10 secounds
Tool = script.Parent local planting = true local bomb = nil
local sound = Instance.new("Sound") sound.SoundId = "http://www.roblox.com/asset/?id=28517063" sound.Looped = true
local explosion = Instance.new("Sound") explosion.SoundId = "http://www.roblox.com/asset/?id=28518734" explosion.Volume = 0.01 explosion:Play() explosion.Volume = 0.5
function plant(pos) Tool.Handle.Plant:Play() local vCharacter = Tool.Parent local vPlayer = game.Players:playerFromCharacter(vCharacter)
local spawnPos = vCharacter.PrimaryPart.Position
bomb = Instance.new("Part") bomb.Locked = true bomb.formFactor = 2 bomb.Size = Vector3.new(1,0.4,1) bomb.Name = "Mine" bomb.Position = pos
sound.Parent = bomb sound:Play()
explosion:Stop()
local mesh = Instance.new("SpecialMesh") mesh.MeshId = "http://www.roblox.com/asset/?id=28511843" mesh.TextureId = "http://www.roblox.com/asset/?id=28512114" mesh.Parent = bomb
local creator_tag = Instance.new("ObjectValue") creator_tag.Value = vPlayer creator_tag.Name = "creator" creator_tag.Parent = bomb
local script = Tool.BombBlink:clone() script.Parent = bomb script.Disabled = false
bomb.Parent = game.Workspace bomb.Touched:connect(function(part) if part ~= Tool.Handle and part.Parent:FindFirstChild("Humanoid") == nil then bomb.Anchored = true bomb.CanCollide = false end end)
end
function blowUp()
local e = Instance.new("Explosion") e.BlastPressure = 12000 e.BlastRadius = 12 e.Parent = game.Workspace e.Position = bomb.Position sound:Stop() explosion.Parent = e explosion:Play() bomb:remove() end
Tool.Enabled = true function onActivated()
if not Tool.Enabled then return end
Tool.Enabled = false
local character = Tool.Parent; local humanoid = character.Humanoid if humanoid == nil then print("Humanoid not found") return end
local targetPos = humanoid.TargetPoint
if planting then plant(Tool.Handle.Position) planting = false else blowUp() planting = true end
Tool.Enabled = true end
script.Parent.Activated:connect(onActivated)
Thanks:D |
|
|
| Report Abuse |
|
|
| |
|
Jas1066
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 647 |
|
| |
|
|
| 18 Apr 2012 03:37 PM |
FREE MODEL VIRUS INBOUND
~Techboy6601: The IDE guy~ |
|
|
| Report Abuse |
|
|
sam6175
|
  |
| Joined: 16 Aug 2008 |
| Total Posts: 1391 |
|
| |
|
booing
|
  |
| Joined: 04 May 2009 |
| Total Posts: 6594 |
|
| |
|