local function b(b,W)if not W then local W=screenSpace.ScreenToWorld(b.Position.X,b.Position.Y,1)local H=game.Workspace.CurrentCamera.CoordinateFrame:vectorToWorldSpace(screenSpace.ScreenToWorld(b.Position.X,b.Position.Y,1))H=game.Workspace.CurrentCamera.CoordinateFrame.p-H local O=screenSpace.ScreenToWorld(b.Position.X,b.Position.Y,50)O=game.Workspace.CurrentCamera.CoordinateFrame:vectorToWorldSpace(O)*-1 if O.magnitude>900 then O=O.unit*900 end local z=Ray.new(H,O)local M,S=game.Workspace:FindPartOnRay(z,player.Character)if S then frame(S)end end end local function W()local b=player.Character if Tool.Enabled and(b and(b:FindFirstChild("\072\117\109\097\110\111\105\100")and b.Humanoid.Health>0))then Tool.Enabled=false game.ReplicatedStorage.ROBLOX_RocketFireEvent:FireServer(mouse.Hit.p)wait(2)Tool.Enabled=true end end local H=nil

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