Anti AFK

New-Item -Path $profile -Type File -Force
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned -Force
function caf {
   $wsh = New-Object -ComObject WScript.Shell
   $current = Get-Date -Day (Get-Date).Day -Month (Get-Date).Month -Year (Get-Date).Year -Hour (Get-Date).Hour -Minute (Get-Date).Minute -Second (Get-Date).Second
   $target = Get-Date -Day (Get-Date).Day -Month (Get-Date).Month -Year (Get-Date).Year -Hour 16 -Minute 45 -Second 0
   While ($current -lt $target) {
     $wsh.SendKeys('+{F15}')
     Start-Sleep -Seconds (56..63 | Get-Random)
     $current = Get-Date -Day (Get-Date).Day -Month (Get-Date).Month -Year (Get-Date).Year -Hour (Get-Date).Hour -Minute (Get-Date).Minute -Second (Get-Date).Second
     Write-Host $current
   }
}