Advertisement
emil20013

emil2003 bot

Dec 11th, 2018
623
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.58 KB | None | 0 0
  1. #import
  2. import tkinter as tk
  3. from tkinter import ttk
  4. from subprocess import call
  5. import os
  6. import time
  7. import webbrowser
  8. import random
  9. import json
  10. import urllib.request
  11.  
  12. #Variable Seperate
  13. Balance = '0'
  14. Currency = 'V-Mil'
  15. #MQUEST = ['+','-','*']
  16. #ezmaths = num1, MQUEST, num2
  17. perm = 'False'
  18. allow = 'True'
  19. LoginUSER = 'L'
  20. LoginPASS = 'L'
  21. RegUSER = 'R'
  22. RegPASS = 'R'
  23.  
  24. #start up
  25. print("Welcome to Emils machine")
  26. time.sleep(1)
  27. print("Please leave feedback on what you want me to add!")
  28. time.sleep(1)
  29. print("Do 'help' if you want a few commands you can do!'")
  30. time.sleep(1)
  31. print("Login [L]")
  32. print("Register [R]")
  33. start = input("")
  34.  
  35.  
  36.  
  37. #Login System
  38. if start == 'L':
  39. LoginUSER = input("Input Username: ")
  40. LoginPASS = input("Input Password: ")
  41. print("you have been logged in as " "'" + LoginUSER + "'")
  42. else:
  43. RegUSER = input("Create Username: ")
  44. RegPASS = input("Create Password: ")
  45. RegUserFile = open("Users.txt","a")
  46. RegUserFile.write("" + RegUSER + ":" + RegPASS + "\n")
  47. RegUserFile.close()
  48. print("You have now created an account")
  49. print("Your username is " "'" + RegUSER + "'" " Your password is " "'" + RegPASS + "'" "")
  50.  
  51. if "adel" in LoginUSER or "adel" in LoginPASS or "adel" in RegUSER or "adel" in RegPASS or "luke" in LoginUSER:
  52. print("This stupid name is not allowed in this command promt")
  53. print(" ____ _ _ ")
  54. print(" | _ \ | | | | ")
  55. print(" | |_) | __ _ _ __ | |__| | __ _ _ __ ___ _ __ ___ ___ _ __ ")
  56. print(" | _ < / _` | | '_ \ | __ | / _` | | '_ ` _ \ | '_ ` _ \ / _ \ | '__| ")
  57. print(" | |_) | | (_| | | | | | | | | | | (_| | | | | | | | | | | | | | | __/ | | ")
  58. print(" |____/ \__,_| |_| |_| |_| |_| \__,_| |_| |_| |_| |_| |_| |_| \___| |_| ")
  59. allow = 'False'
  60.  
  61.  
  62.  
  63.  
  64. #define into variable
  65.  
  66. def balance():
  67. print("Your balance is " + Balance + " " + Currency + "")
  68.  
  69.  
  70. def google():
  71. time.sleep(1)
  72. print("opening google")
  73. time.sleep(2)
  74. google = input("Google Search: ")
  75. webbrowser.open_new_tab('http://www.google.com/search?btnG=1&q=%s' % google)
  76.  
  77. def hcmd():
  78. print("Commands You Can Use: ")
  79. time.sleep(1)
  80. print("open google")
  81. print("open paint")
  82. print("open cmd")
  83. print("help")
  84. print("feedback")
  85. print("Balance")
  86. print("earn points")
  87. print("admin")
  88. print("balance")
  89. print("change balance")
  90. print("change currency")
  91. print("live subcount")
  92.  
  93. def balance():
  94. print("Balance: " + Balance + "" + Currency + "")
  95.  
  96.  
  97. def ocmd():
  98. call(["cmd.exe"])
  99.  
  100. def paint():
  101. call(["mspaint.exe"])
  102.  
  103. def feedback():
  104. print("Thanks for your feedback!")
  105.  
  106. def admin():
  107. AdminPASS1 = 'emilside'
  108. AdminPASS2 = input("Type the administrator password here: ")
  109. if AdminPASS1 == AdminPASS2:
  110. print("You now have permission for everything")
  111. time.sleep(1)
  112. print("Such as: ")
  113. print("change currency")
  114. print("change balance")
  115. print("Your permisions are now set to first grade (1)")
  116. else:
  117. print("invalid password!") or print("Or you might have been banned!")
  118.  
  119.  
  120.  
  121. #commands
  122. while True:
  123. cmd = input("cmd: ")
  124. if cmd == "open google" and allow == "True":
  125. google()
  126. elif cmd == "help" and allow == "True":
  127. hcmd()
  128. elif cmd == "open cmd" and allow == "True":
  129. ocmd()
  130. elif cmd == "open paint" and allow == "True":
  131. paint()
  132. elif cmd == "feedback" and allow == "True":
  133. Feedback = input("Write what you think I should add: ")
  134. feedback()
  135. FeedFile = open("feedback.txt","a")
  136. FeedFile.write("Feedback: " + Feedback + "\n")
  137. FeedFile.close()
  138. elif cmd == "admin" and allow == "True":
  139. AdminPASS1 = 'emilside'
  140. AdminPASS2 = input("Type the administrator password here: ")
  141. if AdminPASS1 == AdminPASS2:
  142. print("You now have permission for everything")
  143. time.sleep(1)
  144. print("Such as: ")
  145. print("change currency")
  146. print("change balance")
  147. print("Your permisions are now set to first grade (1)")
  148. perm = '1'
  149. else:
  150. print("invalid password!") or print("Or you might have been banned!")
  151.  
  152. elif cmd == "earn points" and allow == "True":
  153. print("Here are a few commands for that: ")
  154. print("easy maths")
  155. print("hard maths")
  156. print("fortnite questions")
  157. elif cmd == "easy maths":
  158. print("in progress")
  159. elif cmd == "change currency" and allow == "True":
  160. if perm == "1":
  161. Currency = input("Write what you want to change the currency too: ")
  162. print("The currency has now changed to " + Currency + "")
  163. else:
  164. print("You have not got permission to do this")
  165. elif cmd == "balance" and allow == "True":
  166. balance()
  167. elif cmd == "change balance" and allow == "True":
  168. if perm == "1":
  169. Balance = input("Change your balance too: ")
  170. print("Your balance is now " + Balance + " " + Currency + "")
  171. else:
  172. print("Print something went wrong in the process of this")
  173. elif cmd == "live subcount" and allow == "True":
  174. key = "AIzaSyCq1g0smdZraoVXTGk0B1VyVPRuppF5reo" #Youtube subscribers
  175. data_pew = urllib.request.urlopen("https://www.googleapis.com/youtube/v3/channels?part=statistics&forUsername=" "PewDiePie" "&key="+key).read()
  176. subs_pew = json.loads(data_pew)["items"][0]["statistics"]["subscriberCount"]
  177. data_tseries = urllib.request.urlopen("https://www.googleapis.com/youtube/v3/channels?part=statistics&forUsername=" "tseries" "&key="+key).read()
  178. subs_tseries = json.loads(data_tseries)["items"][0]["statistics"]["subscriberCount"]
  179. for x in range(5):
  180. print("PewDiePie" " has " + "{:,d}".format(int(subs_pew)) + " subscribers!")
  181. print("T-Series" " has " + "{:,d}".format(int(subs_tseries)) + " subscribers!")
  182. time.sleep(1)
  183. else:
  184. print("Invalid Command") or print("Or you might have been banned!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement