Skip to content

Commit

Permalink
added option to target roblox programs
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyGamer13 committed Mar 16, 2023
1 parent 7fab107 commit 77329a5
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 2 deletions.
3 changes: 2 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ <h1 style="font-weight: bold">Please wait for him to finish.</h1>
<h1>Settings</h1>
<p>Attempt attack every <input id="AttackInterval" type="number" value="5000">milliseconds</p>
<p><input id="AttackChance" type="number" value="40">% chance to attack every attempt</p>
<p>Close random window on attack <input id="CloseRandomWindow" type="checkbox" checked="true"></p>
<p>Close windows on attack <input id="CloseRandomWindow" type="checkbox" checked="true"></p>
<p>Only close Roblox windows <input id="CloseRobloxWindow" type="checkbox" checked="true"></p>
<br>
<p>Notice: If you enable closing windows, expect a lag spike every 10 seconds as the program needs to refresh the list of closable windows every time.</p>
<button id="Begin">Begin A-90</button>
Expand Down
34 changes: 33 additions & 1 deletion preload.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,19 @@ function KillRandomProgram() {
killablePrograms.splice(index, 1)
})
}
function KillRobloxPrograms() {
const robloxPrograms = killablePrograms.filter(program => {
const check = String(program.command).toLowerCase().replace(/\//gi, "\\")
return check.includes("roblox")
})
robloxPrograms.forEach(program => {
console.log('DIE', program?.command, "!")
ipcRenderer.invoke("killProgram", String(program.pid)).then(err => {
if (err) console.error(err)
killablePrograms.splice(0, killablePrograms.length)
})
})
}

window.addEventListener("DOMContentLoaded", () => {
function WaitForBegin() {
Expand All @@ -58,10 +71,25 @@ window.addEventListener("DOMContentLoaded", () => {
options.interval = Number(document.getElementById("AttackInterval").value)
options.chance = Number(document.getElementById("AttackChance").value)
options.canCloseWindows = String(document.getElementById("CloseRandomWindow").checked) == "true"
options.targetRoblox = String(document.getElementById("CloseRobloxWindow").checked) == "true"
resolve(options)
}
})
}
document.getElementById("CloseRandomWindow").onchange = () => {
const value = String(document.getElementById("CloseRandomWindow").checked) == "true"
if (!value) {
if (String(document.getElementById("CloseRobloxWindow").checked) != "true") return // roblox is already disabled
document.getElementById("CloseRobloxWindow").checked = false
}
}
document.getElementById("CloseRobloxWindow").onchange = () => {
const value = String(document.getElementById("CloseRobloxWindow").checked) == "true"
if (value) {
if (String(document.getElementById("CloseRandomWindow").checked) == "true") return // closing is already enabled
document.getElementById("CloseRandomWindow").checked = true
}
}

const peepoo = setInterval(() => {
if (programsAttempted) {
Expand Down Expand Up @@ -284,7 +312,11 @@ window.addEventListener("DOMContentLoaded", () => {
document.body.style.backgroundColor = "red"
if (shouldKillProgram) {
if (options.canCloseWindows) {
KillRandomProgram()
if (options.targetRoblox) {
KillRobloxPrograms()
} else {
KillRandomProgram()
}
}
shouldKillProgram = false
}
Expand Down

0 comments on commit 77329a5

Please sign in to comment.