function getPlayer()local a=Tool.Parent return(game:GetService("\080\108\097\121\101\114\115")):GetPlayerFromCharacter(Character)end function Toss(a)local z=Vector3.new(Tool.Handle.Position.X,0,Tool.Handle.Position.Z)local d=Character.Head.Position d=d+a*5 Tool.Handle.Transparency=1 local m=Tool.Handle:Clone()m.Parent=workspace m.Transparency=0 m.CanCollide=true m.Server.Disabled=false m.Stabilize.Disabled=false m.Interface.Enabled=true m.CFrame=Tool.Handle.CFrame m.Velocity=a*AttackVelocity+Vector3.new(0,AttackVelocity/7.5,0)local Q=11.25 m.RotVelocity=Vector3.new(math.random(-Q,Q),math.random(-Q,Q),math.random(-Q,Q))m:SetNetworkOwner(getPlayer())local E=Instance.new("\079\098\106\101\099\116\086\097\108\117\101")E.Value=getPlayer()E.Name="\099\114\101\097\116\111\114"E.Parent=m Tool:Destroy()end script.Parent.Power.OnServerEvent:Connect(function(a,z)AttackVelocity=z end)Remote.OnServerEvent:Connect(function(a,z)if not AttackAble then return end AttackAble=false if Humanoid and Humanoid.RigType==Enum.HumanoidRigType.R15 then Remote:FireClient(getPlayer(),"\080\108\097\121\065\110\105\109\097\116\105\111\110","\065\110\105\109\097\116\105\111\110")end local d=z.p local m=(d-Character.Head.Position).unit Toss(m)LeftDown=true end)function onLeftUp()LeftDown=false end Tool.Equipped:Connect(function()Character=Tool.Parent Humanoid=Character:FindFirstChildOfClass("\072\117\109\097\110\111\105\100")end)Tool.Unequipped:Connect(function()Character=nil Humanoid=nil end)

function getPlayer()
	local char = Tool.Parent
	return game:GetService("Players"):GetPlayerFromCharacter(Character)
end

function Toss(direction)
	local handlePos = Vector3.new(Tool.Handle.Position.X, 0, Tool.Handle.Position.Z)
	local spawnPos = Character.Head.Position
	spawnPos  = spawnPos + (direction * 5)
	Tool.Handle.Transparency = 1

	local Object = Tool.Handle:Clone()
	Object.Parent = workspace
	Object.Transparency = 0
	Object.CanCollide = true
	Object.Server.Disabled = false
	Object.Stabilize.Disabled = false
	Object.Interface.Enabled = true

	Object.CFrame = Tool.Handle.CFrame
	Object.Velocity = (direction*AttackVelocity) + Vector3.new(0,AttackVelocity/7.5,0)
	local rand = 11.25
	Object.RotVelocity = Vector3.new(math.random(-rand,rand),math.random(-rand,rand),math.random(-rand,rand))
	Object:SetNetworkOwner(getPlayer())

	local tag = Instance.new("ObjectValue")
	tag.Value = getPlayer()
	tag.Name = "creator"
	tag.Parent = Object
	Tool:Destroy()
end


script.Parent.Power.OnServerEvent:Connect(function(player, Power)
	AttackVelocity = Power
end)

Remote.OnServerEvent:Connect(function(player, mousePosition)
	if not AttackAble then return end
	AttackAble = false
	if Humanoid and Humanoid.RigType == Enum.HumanoidRigType.R15 then
		Remote:FireClient(getPlayer(), "PlayAnimation", "Animation")
	end
	local targetPos = mousePosition.p
	local lookAt = (targetPos - Character.Head.Position).unit
	Toss(lookAt)
	LeftDown = true
end)

function onLeftUp()
	LeftDown = false
end

Tool.Equipped:Connect(function()
	Character = Tool.Parent
	Humanoid = Character:FindFirstChildOfClass("Humanoid")
end)

Tool.Unequipped:Connect(function()
	Character = nil
	Humanoid = nil
end)
