i have an event that starts but i want it to have a possibility of stopping at any time how can i do that heres what i mean
game.ReplicatedStorage.Events.StartedMining.OnClientEvent:Connect(function() --lots of stuff here end)
how can i make the code stop at any time?