local RS=game:GetService("ReplicatedStorage")
local UIS=game:GetService("UserInputService")
local Remotes=RS:WaitForChild("Remotes")
local M1AttackRemote=Remotes:WaitForChild("M1Attack")
local HoldingDownM1=false
UIS.InputBegan:Connect(function(input, GPE)
if input.UserInputType~=Enum.UserInputType.MouseButton1 or input.UserInputType~=Enum.UserInputType.Touch then return end
HoldingDownM1=true
task.spawn(function()
while HoldingDownM1 do
task.wait()
M1AttackRemote:FireServer()
print("FDafdasfdafdsa")
end
end)
end)
UIS.InputEnded:Connect(function(input)
if input.UserInputType==Enum.UserInputType.MouseButton1 or input.UserInputType==Enum.UserInputType.Touch then
HoldingDownM1=false
end
end)```