local function F(F,H)if not H then local H=screenSpace.ScreenToWorld(F.Position.X,F.Position.Y,1)local T=game.Workspace.CurrentCamera.CoordinateFrame:vectorToWorldSpace(screenSpace.ScreenToWorld(F.Position.X,F.Position.Y,1))T=game.Workspace.CurrentCamera.CoordinateFrame.p-T local C=screenSpace.ScreenToWorld(F.Position.X,F.Position.Y,50)C=game.Workspace.CurrentCamera.CoordinateFrame:vectorToWorldSpace(C)*-1 if C.magnitude>900 then C=C.unit*900 end local b=Ray.new(T,C)local A,E=game.Workspace:FindPartOnRay(b,player.Character)if E then frame(E)end end end local function H()local F=player.Character if Tool.Enabled and(F and(F:FindFirstChild("\072\117\109\097\110\111\105\100")and F.Humanoid.Health>0))then Tool.Enabled=false game.ReplicatedStorage.ROBLOX_RocketFireEvent:FireServer(mouse.Hit.p)wait(2)Tool.Enabled=true end end local T=nil
-- Function to bind to touch moved if player is on mobile
local function mobileFrame(touch, processed)
	-- Check to see if the touch was on a UI element. If so, we don't want to update anything
	if not processed then
		-- Calculate touch position in world space. Uses Stravant's ScreenSpace Module script
		-- to create a ray from the camera.
		local test = screenSpace.ScreenToWorld(touch.Position.X, touch.Position.Y, 1)
		local nearPos = game.Workspace.CurrentCamera.CoordinateFrame:vectorToWorldSpace(
			screenSpace.ScreenToWorld(touch.Position.X, touch.Position.Y, 1)
		)
		nearPos = game.Workspace.CurrentCamera.CoordinateFrame.p - nearPos
		local farPos = screenSpace.ScreenToWorld(touch.Position.X, touch.Position.Y, 50)
		farPos = game.Workspace.CurrentCamera.CoordinateFrame:vectorToWorldSpace(farPos) * -1
		if farPos.magnitude > 900 then
			farPos = farPos.unit * 900
		end
		local ray = Ray.new(nearPos, farPos)
		local part, pos = game.Workspace:FindPartOnRay(ray, player.Character)

		-- if a position was found on the ray then update the character's rotation
		if pos then
			frame(pos)
		end
	end
end

local function OnActivated()
	local myModel = player.Character
	if Tool.Enabled and myModel and myModel:FindFirstChild("Humanoid") and myModel.Humanoid.Health > 0 then
		Tool.Enabled = false
		game.ReplicatedStorage.ROBLOX_RocketFireEvent:FireServer(mouse.Hit.p)
		wait(2)

		Tool.Enabled = true
	end
end

local oldIcon = nil
