Game Attack

This script will automatically set number to your casino game. Let's try to do it.

  1. // ==UserScript==
  2. // @name Game Attack
  3. // @namespace https://github.com/ghsjulian
  4. // @version 1.0
  5. // @description This script will automatically set number to your casino game. Let's try to do it.
  6. // @author Ghs Julian
  7. // @match *://*/*
  8. // @grant none
  9. // @downloadURL
  10. // @updateURL
  11. // ==/UserScript==
  12.  
  13. (function () {
  14. "use strict";
  15. const container = document.querySelector(".container");
  16. const insetForm = document.createElement("div");
  17. const input = document.createElement("input");
  18.  
  19. function openBox() {
  20. // Apply styles directly using JavaScript
  21. insetForm.style.width = "200px";
  22. insetForm.style.maxWidth = "200px";
  23. insetForm.style.padding = "0.2rem";
  24. insetForm.style.background = "#002e38";
  25. insetForm.style.position = "absolute";
  26. insetForm.style.left = "0";
  27. insetForm.style.right = "0";
  28. insetForm.style.top = "0";
  29. insetForm.style.margin = "3rem auto";
  30. insetForm.style.borderRadius = "10px";
  31. insetForm.style.animation = "gh-spin 0.5s linear";
  32.  
  33. input.type = "number";
  34. input.placeholder = "Enter Target Number";
  35. // Apply styles to the input
  36. input.style.width = "200px";
  37. input.style.maxWidth = "200px";
  38. input.style.fontWeight = "900";
  39. input.style.color = "#ffffff";
  40. input.style.fontSize = "19px";
  41. input.style.borderRadius = "10px";
  42. input.style.border = "none";
  43. input.style.outline = "none";
  44. input.style.background = "transparent";
  45. input.style.padding = "0.7rem 1rem";
  46. input.style.margin = "auto";
  47. input.setAttribute("id", "gh-value");
  48.  
  49. insetForm.appendChild(input);
  50. container.appendChild(insetForm);
  51. // Add the keyframes for the animation
  52. const styleSheet = document.styleSheets[0];
  53. styleSheet.insertRule(
  54. `
  55. @keyframes gh-spin {
  56. from {
  57. transform: scale(0);
  58. opacity: 0.7;
  59. }
  60. to {
  61. transform: scale(1);
  62. opacity: 1;
  63. }
  64. }
  65. `,
  66. styleSheet.cssRules.length
  67. );
  68. }
  69.  
  70. function setNumber(target) {
  71. alert(target);
  72. }
  73.  
  74. input.addEventListener("keyup", e => {
  75. const event = e.target.value;
  76. if (event !== "") {
  77. if (e.keyCode == 13) {
  78. setNumber(event);
  79. }
  80. } else {
  81. return;
  82. }
  83. });
  84.  
  85. openBox();
  86. })();