Help with userinput service for Tools

i have a script for my gun tool that fires certain particle emittors on click, but the tool does not seem to work for mobile users as somoene said it would require a special service called user input service. Would anyone be able to implement the service into my script so when the player taps and holds the gun fires and stops when the player removes the touch . heres my script

local Tool = script.Parent
local Handle = Tool.Handle
local Emitter = Handle.Attachment.Money
local Sound = Handle.Bubbles1Loop

Tool.Activated:Connect(function()
	Sound.Playing = true
	Emitter.Enabled = true
end)

Tool.Deactivated:Connect(function()
	Sound.Playing = false
	Emitter.Enabled = false
end)

Tool.Unequipped:Connect(function()
	Sound.Playing = false
	Emitter.Enabled = false
end)

the .Activated event should work though, unless you are shooting at a certain spot thats when you need UserInputService

it doesnt work i treid it on mobile and have users complain

function Activated()
end

function Equipped()
end

function Unequipped()
end

Tool.Activated:connect(Activated)
Tool.Equipped:connect(Equipped)
Tool.Unequipped:connect(Unequipped)

This/These tools also have a Handle, named Handle.

With UIS all you need to do is…

Local UIS = game:GetService(“UserInputService”)

UIS.InputBegun:Connect(function(input)
If input.KeyCode = Enum.KeyCode.F then
— your logic here
end
end)

If you need more information look at this document:

https://create.roblox.com/docs/reference/engine/classes/UserInputService

(You can also use ContactActionService for this)

this isn’t compatible with mobile or console controls and only works with a keyboard, using ContextActionService:BindAction() with bindings for gamepad and create touch buttons makes it cross compatible