If you’re looking for a touch of realism, or to confine players on an Island, this script will make long distance swimming a risk that might not be worth it.
Players can swim for 30s unhindered.
After 30s you’ll become exhausted, and slowly lose hunger.
After being on land for 45s you’ll recover and can swim normally again.