-- find player's head pos


	local vCharacter = Tool.Parent
	local vPlayer = game.Players:playerFromCharacter(vCharacter)

	local head = vCharacter:findFirstChild("Head")
	if head == nil then return end


	local launch = head.Position + 10 * v

		

	local missile = Pellet:clone()
        

	Tool.Handle.Mesh:clone().Parent = missile
		

	missile.Position = launch
	missile.Velocity = v * 80

	local force = Instance.new("BodyForce")
	force.force = Vector3.new(0,40,0)
	force.Parent = missile

	missile.StarScript.Disabled = false

	local creator_tag = Instance.new("ObjectValue")
	creator_tag.Value = vCharacter
	creator_tag.Name = "creator"
	creator_tag.Parent = missile
	
	missile.Parent = game.Workspace

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
if loaded==true then
	loaded=false

	local targetPos = humanoid.TargetPoint
	local lookAt = (targetPos - character.Head.Position).unit

	fire(lookAt)

	if (isTurbo(character) == true) then
		wait(.2)
	else
		wait(.3)
	end

	Tool.Enabled = true
elseif loaded==false then
Tool.Parent.Torso["Right Shoulder"].MaxVelocity = 0.6
Tool.Parent.Torso["Right Shoulder"].DesiredAngle = -3.6
	wait(.1)
Tool.Handle.Transparency=0
wait(.1)
	loaded=true
	end
	Tool.Enabled = true
end

script.Parent.Activated:connect(onActivated)
