null
nil
-
0
0
0
1
0
0
0
1
0
0
0
1
Cannon car
[null]
true
-
false
-0.5
0.5
0
0
-0.5
0.5
4
0
26
4.5
10.4000006
0
1
0
0
0
1
0
0
0
1
true
false
0.5
1
0.300000012
-0.5
0.5
0
0
-0.5
0.5
0
0
false
256
Body
0
-0.5
0.5
2
0
0
0
0
-0.5
0.5
0
0
0
0
0
0
true
1
7
1.20000005
2
-
false
-0.5
0.5
0
0
-0.5
0.5
4
0
28
-3
15.2000008
0
1
0
0
0
1
0
0
0
1
true
false
0.5
1
0.300000012
-0.5
0.5
0
0
-0.5
0.5
0
0
false
256
Body
0
-0.5
0.5
0
0
0
0
0
-0.5
0.5
3
0
0
0
0
0
true
1
10
1.20000005
8
-
false
-0.5
0.5
0
0
-0.5
0.5
4
0
28
-3
11
3.5
1
0
0
0
1
0
0
0
1
true
false
0.5
1
0.300000012
-0.5
0.5
0
0
-0.5
0.5
0
0
false
256
Body
0
-0.5
0.5
0
0
0
0
0
-0.5
0.5
3
0
0
0
0
0
true
1
10
7.20000029
1
-
false
-0.5
0.5
0
0
-0.5
0.5
4
0
28
-3
11
-3.5
1
0
0
0
1
0
0
0
1
true
false
0.5
1
0.300000012
-0.5
0.5
0
0
-0.5
0.5
0
0
false
256
Body
0
-0.5
0.5
0
0
0
0
0
-0.5
0.5
3
0
0
0
0
0
true
1
10
7.20000029
1
-
0
0
0
1
0
0
0
1
0
0
0
1
TankGun
[null]
true
-
false
-0.5
0.5
0
0
-0.5
0.5
4
0
28
1
8.60000038
0
1
0
0
0
1
0
0
0
1
true
false
0.5
1
0.300000012
-0.5
0.5
0
0
-0.5
0.5
0
0
false
256
Body
0
-0.5
0.5
0
0
0
0
0
-0.5
0.5
3
0
0
0
0
0
true
1
4
2.4000001
6
-
false
-0.5
0.5
0
0
-0.5
0.5
4
0
26
4.5
10.4000006
0
1
0
0
0
1
0
0
0
1
true
false
0.5
1
0.300000012
-0.5
0.5
0
0
-0.5
0.5
0
0
false
256
Body
0
-0.5
0.5
2
0
0
0
0
-0.5
0.5
0
0
0
0
0
0
true
1
7
1.20000005
2
-
0
0
0
1
0
0
0
1
0
0
0
1
Cannon
[null]
true
-
0
0
0
1
0
0
0
1
0
0
0
1
GunBarrel
[null]
true
-
false
-0.5
0.5
0
0
-0.5
0.5
4
0
21
9
10.4000006
0
1
0
0
0
1
0
0
0
1
true
false
0.5
1
0.300000012
-0.5
0.5
0
0
-0.5
0.5
2
0
false
256
One
0
-0.5
0.5
0
0
0
0
0
-0.5
0.5
0
0
0
0
0
0
true
1
2
1.20000005
2
-
false
-0.5
0.5
0
0
-0.5
0.5
4
0
1020
0
10.4000006
0
1
0
0
0
1
0
0
0
1
true
false
0.5
1
0.300000012
-0.5
0.5
0
0
-0.5
0.5
0
0
false
256
Switch
0
-0.5
0.5
0
0
0
0
0
-0.5
0.5
3
0
0
0
0
0
true
1
2
1.20000005
4
-
false
FireGun
local switch = script.Parent
local gunBarrelOne = script.Parent.Parent.GunBarrel.One
local debounce = false
local gunOne = true
local cannonBall = Instance.new("Part")
cannonBall.Size = Vector3.new(1,1,1)
cannonBall.BrickColor = BrickColor.new(1) -- medium blue
cannonBall.Shape = 0
cannonBall.BottomSurface = 0
cannonBall.TopSurface = 0
cannonBall.Name = "Cannon Shot"
cannonBall.Elasticity = .1
cannonBall.Reflectance = 0
cannonBall.Friction = 0
function fire(player)
local sound = script.Parent:findFirstChild("GunSound")
if sound == nil then
sound = Instance.new("Sound")
sound.Name = "GunSound"
sound.SoundId = "http://www.roblox.com/asset?id=2101148"
sound.Volume = 1
sound.Parent = script.Parent
end
sound:play()
local missile = Instance.new("Part")
local barrel
if gunOne == true then
barrel = gunBarrelOne
gunOne = true
end
local spawnPos = barrel.CFrame * Vector3.new(6, 0, 0)
local dx = math.random(50,50)
local dy = math.random(0,0)
local dz = math.random(0,0)
local mag = math.random(750,750)
local v = barrel.CFrame:vectorToWorldSpace(Vector3.new(mag + dx,dy,dz))
local missile = cannonBall:clone()
missile.Position = spawnPos
missile.Velocity = v
local new_script = script.Parent.CannonBall:clone()
new_script.Disabled = false
new_script.Parent = missile
local creator_tag = Instance.new("ObjectValue")
creator_tag.Value = player
creator_tag.Name = "creator"
creator_tag.Parent = missile
missile.Parent = game.Workspace
end
function onClicked()
if debounce == false then
debounce = true
switch.BrickColor = BrickColor.new(21)
-- let slip the dogs of war
fire(player)
wait(.5)
wait(1)
debounce = false
switch.BrickColor = BrickColor.new(37)
end
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
true
-
true
CannonBall
ball = script.Parent
damage = 100
function onTouched(hit)
local humanoid = hit.Parent:findFirstChild("Humanoid")
if humanoid~=nil then
tagHumanoid(humanoid)
humanoid.Health = humanoid.Health - damage
wait(0.00000001)
untagHumanoid(humanoid)
connection:disconnect()
else
damage = damage / 2
if damage < 2 then
connection:disconnect()
ball.Parent = nil
end
end
if math.random(1,1) == 1 then
explosion = Instance.new("Explosion")
explosion.BlastRadius = 15
explosion.BlastPressure = 600000 -- these are really wussy units
explosion.Position = script.Parent.Position
explosion.Parent = game.Workspace
connection:disconnect()
ball.Parent = nil
cancollide = true
end
end
function tagHumanoid(humanoid)
-- todo: make tag expire
local tag = ball:findFirstChild("creator")
if tag ~= nil then
local new_tag = tag: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
connection = ball.Touched:connect(onTouched)
r = game:service("RunService")
t, s = r.Stepped:wait()
d = t + 5.0 - s
while t < d do
t = r.Stepped:wait()
end
ball.Parent = nil
true
-
false
Sound
1
-1
false
http://www.roblox.com/asset/?id=12222084
0.5
true
-
32
ClickDetector
true
-
false
-0.5
0.5
0
0
-0.5
0.5
4
0
26
-2.5
4.30000019
-5.5
0
0
-1
0
1
-0
1
0
-0
true
false
0.5
0
0.300000012
-0.5
0.5
0
0
-0.5
0.5
0
0
false
256
Wheel
0
0
0
6
0
0
0
0
-0.5
0.5
3
0
0
0
0
0
true
2
3
3
3
-
false
-0.5
0.5
0
0
-0.5
0.5
4
0
26
1.5
4.30000019
-5.5
0
0
-1
0
1
-0
1
0
-0
true
false
0.5
0
0.300000012
-0.5
0.5
0
0
-0.5
0.5
0
0
false
256
Wheel
0
0
0
6
0
0
0
0
-0.5
0.5
3
0
0
0
0
0
true
2
3
3
3
-
false
-0.5
0.5
0
0
-0.5
0.5
4
0
28
-2.5
5.5999999
0
1
0
0
0
1
0
0
0
1
true
false
0.5
1
0.300000012
-0.5
0.5
0
0
-0.5
0.5
0
0
false
256
Body
0
-0.5
0.5
0
0
0
0
0
-0.5
0.5
3
0
0
0
0
0
true
1
11
3.60000014
8
-
false
-0.5
0.5
0
0
-0.5
0.5
4
0
28
-7
11
2.5
1
0
0
0
1
0
0
0
1
true
false
0.5
1
0.300000012
-0.5
0.5
0
0
-0.5
0.5
0
0
false
256
Body
0
-0.5
0.5
0
0
0
0
0
-0.5
0.5
3
0
0
0
0
0
true
1
2
7.20000029
1
-
false
-0.5
0.5
0
0
-0.5
0.5
4
0
26
-6.5
4.30000019
-5.5
0
0
-1
0
1
-0
1
0
-0
true
false
0.5
0
0.300000012
-0.5
0.5
0
0
-0.5
0.5
0
0
false
256
Wheel
0
0
0
6
0
0
0
0
-0.5
0.5
3
0
0
0
0
0
true
2
3
3
3
-
false
-0.5
0.5
0
0
-0.5
0.5
4
0
28
-7
11
-2.5
1
0
0
0
1
0
0
0
1
true
false
0.5
1
0.300000012
-0.5
0.5
0
0
-0.5
0.5
0
0
false
256
Body
0
-0.5
0.5
0
0
0
0
0
-0.5
0.5
3
0
0
0
0
0
true
1
2
7.20000029
1
-
false
-0.5
0.5
0
0
-0.5
0.5
4
0
26
-9
5.4000001
0
1
0
0
0
1
0
0
0
1
true
false
0.5
1
0.300000012
-0.5
0.5
0
0
-0.5
0.5
0
0
false
256
Body
0
-0.5
0.5
2
0
0
0
0
-0.5
0.5
3
0
0
0
0
0
true
1
2
1.20000005
2
-
false
-0.5
0.5
0
0
-0.5
0.5
4
0
26
1.5
4.30000019
5.5
-0
0
1
-0
1
0
-1
0
0
true
false
0.5
0
0.300000012
-0.5
0.5
0
0
-0.5
0.5
0
0
false
256
Wheel
0
0
0
6
0
0
0
0
-0.5
0.5
3
0
0
0
0
0
true
2
3
3
3
-
false
-0.5
0.5
0
0
-0.5
0.5
4
0
26
-6.5
4.30000019
5.5
-0
0
1
-0
1
0
-1
0
0
true
false
0.5
0
0.300000012
-0.5
0.5
0
0
-0.5
0.5
0
0
false
256
Wheel
0
0
0
6
0
0
0
0
-0.5
0.5
3
0
0
0
0
0
true
2
3
3
3
-
false
-0.5
0.5
0
0
-0.5
0.5
4
0
26
-2.5
4.30000019
5.5
-0
0
1
-0
1
0
-1
0
0
true
false
0.5
0
0.300000012
-0.5
0.5
0
0
-0.5
0.5
0
0
false
256
Wheel
0
0
0
6
0
0
0
0
-0.5
0.5
3
0
0
0
0
0
true
2
3
3
3
-
false
-0.5
0.5
0
0
-0.5
0.5
4
0
26
-3
7.9000001
0
0
0
-1
0
1
-0
1
0
-0
true
false
0.5
0.300000012
-0.5
0.5
0
0
true
-0.5
0.5
0
0
false
256
22
Seat
0
-0.5
0.5
0
0
0
0
0
0
0
-0.5
0.5
3
0
10
0
1
0
0
0
true
4
1
2
-
false
-0.5
0.5
0
0
-0.5
0.5
4
0
194
-1
0.600000024
-9
1
0
0
0
1
0
0
0
1
true
false
0.5
1
0.300000012
-0.5
0.5
0
0
-0.5
0.5
0
0
false
256
Part
0
-0.5
0.5
0
0
0
0
0
-0.5
0.5
3
0
0
0
0
0
true
1
4
1.20000005
2