How do I make this client-side melee hit box more secure?

To detect when mouse is clicked in client, do this:

local mouse = plr:GetMouse()
local clicked

mouse.Button1Down:Connect(function()
clicked = true
if clicked == true then
-- code here when they click\attack the player
end)

mouse.Button1Up:Connect(function()
clicked = false
end)