--Converted with ttyyuu12345's model to script plugin v4
function sandbox(var,func)
local env = getfenv(func)
local newenv = setmetatable({},{
__index = function(self,k)
if k=="script" then
return var
else
return env[k]
end
end,
})
setfenv(func,newenv)
return func
end
cors = {}
mas = Instance.new("Model",game:GetService("Lighting"))
Tool0 = Instance.new("Tool")
Script1 = Instance.new("Script")
Script2 = Instance.new("Script")
LocalScript3 = Instance.new("LocalScript")
LocalScript4 = Instance.new("LocalScript")
RemoteFunction5 = Instance.new("RemoteFunction")
Part6 = Instance.new("Part")
Decal7 = Instance.new("Decal")
Sound8 = Instance.new("Sound")
Part9 = Instance.new("Part")
WeldConstraint10 = Instance.new("WeldConstraint")
Part11 = Instance.new("Part")
WeldConstraint12 = Instance.new("WeldConstraint")
Tool0.Name = "ANGER"
Tool0.Parent = mas
Tool0.TextureId = "rbxassetid://3175304460"
Tool0.ToolTip = "?????????????"
Script1.Name = "CannonBall"
Script1.Parent = Tool0
table.insert(cors,sandbox(Script1,function()
local Ball = script.Parent
local damage = 35
local r = game:GetService("RunService")
local debris = game:GetService("Debris")
local last_sound_time = r.Stepped:Wait()
function IsTeamMate(Player1, Player2)
return (Player1 and Player2 and not Player1.Neutral and not Player2.Neutral and Player1.TeamColor == Player2.TeamColor)
end
function onTouched(hit)
if not hit or not hit.Parent then return end
local now = r.Stepped:Wait()
if (now - last_sound_time > .1) then
Ball.Boing:Play()
last_sound_time = now
else
return
end
local humanoid = hit.Parent:FindFirstChildOfClass("Humanoid")
local tag = Ball:FindFirstChild("creator")
if tag and humanoid then
if not IsTeamMate(tag.Value,game.Players:GetPlayerFromCharacter(humanoid.Parent)) then
tagHumanoid(humanoid)
humanoid:TakeDamage(damage)
if connection then connection:Disconnect() end
end
else
damage = damage / 2
if damage < 2 then
if connection then connection:Disconnect() end
end
end
end
function tagHumanoid(humanoid)
-- todo: make tag expire
local tag = Ball:FindFirstChild("creator")
if tag then
-- kill all other tags
while(humanoid:FindFirstChild("creator")) do
humanoid:FindFirstChild("creator").Parent:Destroy()
end
local new_tag = tag:Clone()
new_tag.Parent = humanoid
debris:AddItem(new_tag, 1)
end
end
connection = Ball.Touched:Connect(onTouched)
t, s = r.Stepped:Wait()
d = t + 5.0 - s
while t < d do
t = r.Stepped:Wait()
end
Ball:Destroy()
end))
Script1.Disabled = true
Script2.Name = "CannonScript"
Script2.Parent = Tool0
table.insert(cors,sandbox(Script2,function()
local Tool = script.Parent
local Ball = Tool.Handle
local MouseLoc = Tool:WaitForChild("MouseLoc",10)
function fire(direction)
Tool.Handle.Boing:Play()
local vCharacter = Tool.Parent
local vPlayer = game.Players:GetPlayerFromCharacter(vCharacter)
local missile = Instance.new("Part")
local spawnPos = vCharacter.PrimaryPart.Position
spawnPos = spawnPos + (direction * 5)
missile.Position = spawnPos
missile.Size = Vector3.new(3,3,3)
missile.Velocity = direction * 150
missile.BrickColor = BrickColor.Random()
missile.Shape = 0
missile.Locked = true
prop = PhysicalProperties.new(.1,.1,.1,1,1)
missile.CustomPhysicalProperties = prop
missile.BottomSurface = 0
missile.TopSurface = 0
missile.Name = "Cannon Shot"
coroutine.resume(coroutine.create(function()
Ball.el.Transparency = 0
Ball.er.Transparency = 0
wait(0.8)
for i=1, 10 do
wait(0.1)
Ball.el.Transparency = Ball.el.Transparency + 0.1
Ball.er.Transparency = Ball.er.Transparency + 0.1
end
end))
missile.Elasticity = 1
missile.Reflectance = .2
missile.Friction = 0
missile.Material = Enum.Material.Neon
missile.BrickColor = BrickColor.Red()
firee = Instance.new("Fire",missile)
firee.Color = BrickColor.Red().Color
firee.SecondaryColor = BrickColor.Red().Color
pl = Instance.new("PointLight",missile)
pl.Color = BrickColor.Red().Color
Tool.Handle.Boing:Clone().Parent = missile
local new_script = script.Parent.CannonBall:Clone()
new_script.Disabled = false
new_script.Parent = missile
local creator_tag = Instance.new("ObjectValue")
creator_tag.Value = vPlayer
creator_tag.Name = "creator"
creator_tag.Parent = missile
missile.Parent = workspace
end
Tool.Enabled = true
function onActivated()
if not Tool.Enabled then
return
end
Tool.Enabled = false
local character = Tool.Parent;
local humanoid = character:FindFirstChildOfClass("Humanoid")
if not humanoid then
print("Humanoid not found")
return
end
local targetPos = MouseLoc:InvokeClient(game:GetService("Players"):GetPlayerFromCharacter(character))
local lookAt = (targetPos - character.Head.Position).unit
fire(lookAt)
wait(2)
Tool.Enabled = true
end
Tool.Activated:Connect(onActivated)
end))
LocalScript3.Name = "Client"
LocalScript3.Parent = Tool0
table.insert(cors,sandbox(LocalScript3,function()
--Rescripted by TakeoHonorable
local Tool = script.Parent
local MouseLoc = Tool:WaitForChild("MouseLoc")
function MouseLoc.OnClientInvoke()
return game:GetService("Players").LocalPlayer:GetMouse().Hit.p
end
end))
LocalScript4.Name = "MouseIcon"
LocalScript4.Parent = Tool0
table.insert(cors,sandbox(LocalScript4,function()
local MOUSE_ICON = 'rbxasset://textures/GunCursor.png'
local RELOADING_ICON = 'rbxasset://textures/GunWaitCursor.png'
local Tool = script.Parent
local Mouse = nil
local function UpdateIcon()
if Mouse then
Mouse.Icon = Tool.Enabled and MOUSE_ICON or RELOADING_ICON
end
end
local function OnEquipped(mouse)
Mouse = mouse
UpdateIcon()
end
local function OnChanged(property)
if property == 'Enabled' then
UpdateIcon()
end
end
Tool.Equipped:connect(OnEquipped)
Tool.Changed:connect(OnChanged)
end))
RemoteFunction5.Name = "MouseLoc"
RemoteFunction5.Parent = Tool0
Part6.Name = "Handle"
Part6.Parent = Tool0
Part6.CFrame = CFrame.new(-23.567627, 1.14500427, 9.70361328, -1.00000036, 0, 0, 0, 1, 0, 0, 0, -1.00000036)
Part6.Orientation = Vector3.new(0, 180, 0)
Part6.Position = Vector3.new(-23.567626953125, 1.1450042724609, 9.70361328125)
Part6.Rotation = Vector3.new(-180, 0, -180)
Part6.Color = Color3.new(0.768627, 0.156863, 0.109804)
Part6.Size = Vector3.new(2.289999961853, 2.289999961853, 2.289999961853)
Part6.BottomSurface = Enum.SurfaceType.Smooth
Part6.BrickColor = BrickColor.new("Bright red")
Part6.Material = Enum.Material.Slate
Part6.TopSurface = Enum.SurfaceType.Smooth
Part6.brickColor = BrickColor.new("Bright red")
Part6.Shape = Enum.PartType.Ball
Decal7.Parent = Part6
Decal7.Texture = "rbxassetid://2016770311"
Decal7.Transparency = 0.25
Sound8.Name = "Boing"
Sound8.Parent = Part6
Sound8.SoundId = "rbxassetid://1638671375"
Sound8.Volume = 4
Part9.Name = "er"
Part9.Parent = Part6
Part9.CFrame = CFrame.new(-23.7842941, 1.46602023, 10.7569733, -1.00000036, 0, 0, 0, 1, 0, 0, 0, -1.00000036)
Part9.Orientation = Vector3.new(0, 180, 0)
Part9.Position = Vector3.new(-23.784294128418, 1.4660202264786, 10.756973266602)
Part9.Rotation = Vector3.new(-180, 0, -180)
Part9.Color = Color3.new(1, 0, 0)
Part9.Transparency = 1
Part9.Size = Vector3.new(0.10999990999699, 0.10999990999699, 0.10999990999699)
Part9.BottomSurface = Enum.SurfaceType.Smooth
Part9.BrickColor = BrickColor.new("Really red")
Part9.CanCollide = false
Part9.Material = Enum.Material.Neon
Part9.TopSurface = Enum.SurfaceType.Smooth
Part9.brickColor = BrickColor.new("Really red")
Part9.Shape = Enum.PartType.Ball
WeldConstraint10.Parent = Part9
WeldConstraint10.Part0 = Part9
WeldConstraint10.Part1 = Part6
Part11.Name = "el"
Part11.Parent = Part6
Part11.CFrame = CFrame.new(-23.3024445, 1.46602023, 10.7569733, -1.00000036, 0, 0, 0, 1, 0, 0, 0, -1.00000036)
Part11.Orientation = Vector3.new(0, 180, 0)
Part11.Position = Vector3.new(-23.302444458008, 1.4660202264786, 10.756973266602)
Part11.Rotation = Vector3.new(-180, 0, -180)
Part11.Color = Color3.new(1, 0, 0)
Part11.Transparency = 1
Part11.Size = Vector3.new(0.10999990999699, 0.10999990999699, 0.10999990999699)
Part11.BottomSurface = Enum.SurfaceType.Smooth
Part11.BrickColor = BrickColor.new("Really red")
Part11.CanCollide = false
Part11.Material = Enum.Material.Neon
Part11.TopSurface = Enum.SurfaceType.Smooth
Part11.brickColor = BrickColor.new("Really red")
Part11.Shape = Enum.PartType.Ball
WeldConstraint12.Parent = Part11
WeldConstraint12.Part0 = Part11
WeldConstraint12.Part1 = Part6
for i,v in pairs(mas:GetChildren()) do
v.Parent = script
pcall(function() v:MakeJoints() end)
end
mas:Destroy()
for i,v in pairs(cors) do
spawn(function()
pcall(v)
end)
end