Skip to content

Instantly share code, notes, and snippets.

@puppis42
Last active June 21, 2020 21:25
Show Gist options
  • Save puppis42/120ab5f0833c9098d139c0582556bf10 to your computer and use it in GitHub Desktop.
Save puppis42/120ab5f0833c9098d139c0582556bf10 to your computer and use it in GitHub Desktop.
Coin tool for Agar.io game.
#!/usr/bin/python3
from selenium import webdriver
import time
from selenium.webdriver.common.keys import Keys
driver_path = 'C:\\webdrivers\\chromedriver.exe'
driver = webdriver.Chrome(driver_path)
driver.get("https://agar.io/")
print("Website title: " + driver.title)
print("If you are logged in game, write y >")
input1 = input()
if input1 == "y" or input1 == "Y":
print(input1)
tme = driver.find_element_by_id("freeCoins").text
print(tme)
while True:
try:
tme2 = driver.find_element_by_id("freeCoins").text
except Exception as r:
driver.refresh()
print("(TF)ERROR: " + r.args[0])
print(tme2)
time.sleep(1)
if tme2.__contains__("-1m -1s"):
try:
elements = driver.find_element_by_id("freeCoins")
elements.click()
print("Free Coins (20) | by id (freeCoins)")
time.sleep(1)
#webdriver.ActionChains(driver).send_keys(Keys.ESCAPE).perform()
driver.refresh()
except Exception as a:
print("(T)ERROR: " + a.args[0])
if tme2.__contains__("Free Coins"):
try:
elements = driver.find_element_by_id("freeCoins")
elements.click()
print("Free Coins (20) | by id (freeCoins)")
time.sleep(1)
webdriver.ActionChains(driver).send_keys(Keys.ESCAPE).perform()
except Exception as e:
print("(F)ERROR: " + e.args[0])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment