MagmaLP

Warp Pump Screen

Jul 10th, 2024 (edited)
328
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. mon = peripheral.wrap("top")
  2. lang = 1
  3.  
  4. function deutsch()
  5.     mon.setBackgroundColor(colors.black)
  6.     mon.setCursorPos(1,1)
  7.     mon.clear()  
  8.     mon.setTextColor(colors.lime)
  9.     mon.write("                    Warp Pump                      ")
  10.  
  11.     mon.setTextColor(colors.white)
  12.     mon.setCursorPos(1,4)
  13.     mon.write("- Nach dem Kauf werden dir aller 7 Tage 1500$")
  14.     mon.setCursorPos(3,5)
  15.     mon.write("als Miete abgebucht. (dies passiert automatisch)")
  16.  
  17.     mon.setCursorPos(1,7)
  18.     mon.write("- Dein Pump-GS wird gelöscht sobald du")
  19.     mon.setCursorPos(3,8)
  20.     mon.write("kein Geld mehr hast um es zu bezahlen.")
  21.  
  22.     mon.setCursorPos(1,10)
  23.     mon.write("- Benötigst du dein Pump-GS nichtmehr klick")
  24.     mon.setCursorPos(3,11)
  25.     mon.write("einfach erneut auf das Schild.")
  26.    
  27.     mon.setTextColor(colors.lightGray)
  28.     mon.setBackgroundColor(colors.gray)
  29.     mon.setCursorPos(1,17)
  30.     mon.write("                   ")
  31.     mon.setCursorPos(1,18)
  32.     mon.write("  change language  ")
  33.     mon.setCursorPos(1,19)
  34.     mon.write("                   ")
  35. end
  36.  
  37. function english()
  38.     mon.setBackgroundColor(colors.black)
  39.     mon.setCursorPos(1,1)
  40.     mon.clear()
  41.     mon.setTextColor(colors.lime)
  42.     mon.write("                    Warp Pump                      ")
  43.  
  44.     mon.setTextColor(colors.white)
  45.     mon.setCursorPos(1,4)
  46.     mon.write("- After the purchase you will be charged for")
  47.     mon.setCursorPos(3,5)
  48.     mon.write("1500$ every 7 days (that happens automatically).")
  49.  
  50.     mon.setCursorPos(1,7)
  51.     mon.write("- Your pumping-plot will be deleted the moment you")
  52.     mon.setCursorPos(3,8)
  53.     mon.write("dont have enough money to pay for the next days.")
  54.  
  55.     mon.setCursorPos(1,10)
  56.     mon.write("- If you dont need the pumping-plot anylonger,")
  57.     mon.setCursorPos(3,11)
  58.     mon.write("just click again on the sign.")
  59.    
  60.     mon.setTextColor(colors.lightGray)
  61.     mon.setBackgroundColor(colors.gray)
  62.     mon.setCursorPos(1,17)
  63.     mon.write("                   ")
  64.     mon.setCursorPos(1,18)
  65.     mon.write("  change language  ")
  66.     mon.setCursorPos(1,19)
  67.     mon.write("                   ")
  68. end
  69.  
  70. while true do
  71.     if lang == 1 then
  72.         english()
  73.     elseif lang == 2 then
  74.         deutsch()
  75.     end
  76.    
  77.     event, side, x, y = os.pullEvent()
  78.     if event == "monitor_touch" then
  79.         if x >= 1 and x <= 19 and y >= 17 and y <= 19 then
  80.             if lang == 1 then
  81.                 lang = 2
  82.             elseif lang == 2 then
  83.                 lang = 1
  84.             end
  85.         end
  86.     end
  87. end
Advertisement
Add Comment
Please, Sign In to add comment