Skip to content

Instantly share code, notes, and snippets.

@davidsaccavino
Last active January 29, 2021 18:20
Show Gist options
  • Save davidsaccavino/738af49a9e2c64d6fd13efbac464b498 to your computer and use it in GitHub Desktop.
Save davidsaccavino/738af49a9e2c64d6fd13efbac464b498 to your computer and use it in GitHub Desktop.
#! python 3
# griff.py - Makes fortnite unplayable between 9am until 2pm and not after 10pm on weekdays.
import datetime, os, time
dt = datetime.datetime.now()
while True:
if dt.weekday() < 5:
try:
if dt.hour >= 9 and dt.hour < 14:
os.rename("C:\Program Files\Epic Games\Fortnite\FortniteGame\Binaries\Win64\FortniteLauncher.exe", "C:\Program Files\Epic Games\Fortnite\FortniteGame\Binaries\Win64\FortniteLauncher.old")
elif dt.hour > 22:
os.rename("C:\Program Files\Epic Games\Fortnite\FortniteGame\Binaries\Win64\FortniteLauncher.exe", "C:\Program Files\Epic Games\Fortnite\FortniteGame\Binaries\Win64\FortniteLauncher.old")
else:
os.rename("C:\Program Files\Epic Games\Fortnite\FortniteGame\Binaries\Win64\FortniteLauncher.old", "C:\Program Files\Epic Games\Fortnite\FortniteGame\Binaries\Win64\FortniteLauncher.exe")
except PermissionError:
time.sleep(300)
time.sleep(300)
else:
time.sleep(43200)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment