Last active
July 5, 2025 06:25
-
-
Save tnhung2011/5249855ea28e84030f095c61b007fd13 to your computer and use it in GitHub Desktop.
A handy program for customizing your Roblox cursor (ANSI-encoded) (now a kludge for people who hate Bloxstrap)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
setlocal | |
set __p=%systemroot%\System32\WindowsPowershell\v1.0\powershell.exe | |
2>nul >nul %__p% /? | |
if not errorlevel 0 goto :eof | |
set stop=:eof | |
set internal=%~n0 | |
set program=RoCursor | |
set version=0.1 | |
set p=%1 | |
for /f %%A in ('"prompt $H &echo on &for %%B in (1) do rem"') do set bs=%%A | |
if [%p%] equ [] ( goto :main | |
) else if [%p%] equ [help] ( goto :help | |
) else if [%p%] equ [/?] ( goto :help | |
) else if [%p%] equ [version] ( goto :version | |
) else if [%p%] equ [dest] ( goto :finstpath | |
) else if [%p%] equ [install] ( call :finstall %2 & goto :eof | |
) | |
set ts= | |
call :error Option %p% is unknown | |
goto :eof | |
:: --------------------------------- | |
:: -- CMDLINE | |
:: --------------------------------- | |
:finstpath | |
call :instpath | |
echo %instpath%\Cursors\KeyboardMouse | |
goto :eof | |
:finstall | |
set p=%1 | |
rem set stop=:eof | |
if [%p% equ [old ( goto :install | |
) else if [%p% equ [new ( goto :install | |
) else if [%p% equ [custom ( goto :install | |
) | |
goto :eof | |
:help | |
echo. | |
echo %~n0 [params...] | |
echo A handy program for customizing your Roblox cursor | |
echo. | |
echo (none) Start the main TUI | |
echo. /?, help Get help for commands | |
rem echo -s, --sched Schedules a specific operation to run at startup | |
echo install Install cursor of type ^<old ^| new ^| custom^> | |
echo dest Show what folder do `install` copy to | |
echo version Show version number and quit | |
goto :eof | |
:install | |
set op=%p% | |
goto :cmdline | |
:version | |
echo %program% v%version% | |
goto :eof | |
:: --------------------------------- | |
:: -- BACKBONE | |
:: --------------------------------- | |
REM // start copya funcs // | |
:copy | |
copy %1 %2 >nul | |
if errorlevel 0 set /a inc+=1 >nul | |
goto :eof | |
:copya | |
echo %ts%[.] Copying files: | |
for %%A IN (.) DO set d=%%~sA | |
echo %ts%(CD'd %d%) | |
set d= | |
set inc=0 | |
set t=. | |
echo %ts% %t%\ArrowCursor.png ~^> Cursors\KeyboardMouse | |
call :copy %t%\ArrowCursor.png Cursors\KeyboardMouse | |
echo %ts% %t%\ArrowFarCursor.png ~^> Cursors\KeyboardMouse | |
call :copy %t%\ArrowFarCursor.png Cursors\KeyboardMouse | |
if [%inc% EQU [2 ( | |
set t=+ | |
) else ( if [%inc% EQU [1 ( set t=~ | |
) else ( set t=- ) | |
) | |
echo. | |
echo %ts%[%t%] Successfully copied %inc% files | |
set inc= | |
goto :eof | |
REM // end copya funcs // | |
:old | |
pushd %instpath%\content\textures | |
call :copya | |
popd | |
goto :eof | |
:new | |
goto :isPowershellCore | |
:: Launches PowerShell to download files | |
:: https://community.chocolatey.org/packages/winfetch#files -> tools\winfetch.bat | |
:isPowershellCore | |
where pwsh >nul 2>&1 | |
if %errorlevel% neq 0 goto :isPowershell | |
pwsh -NoProfile -ExecutionPolicy Unrestricted -Command "& '%~dp0rocursor.ps1'" | |
exit /b | |
goto :eof | |
:isPowershell | |
%__p% -NoProfile -ExecutionPolicy Unrestricted -Command "& '%~dp0rocursor.ps1'" | |
goto :eof | |
:custom | |
pushd %instpath%\content\textures | |
if %errorlevel% NEQ 0 goto :eof | |
call :copya | |
popd | |
goto :eof | |
:: --------------------------------- | |
:: -- MAIN TUI | |
:: --------------------------------- | |
:main | |
rem https://stackoverflow.com/q/9864620 | |
cls | |
echo. | |
echo ÉÍ %program% v%version% ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» | |
echo º º | |
echo º 1. Restore the 2013 cursor º | |
echo º 2. Restore the 2021 cursor º | |
echo º 3. Use custom cursor º | |
echo º º | |
echo ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ | |
echo. | |
choice /c 123 /m "%bs% Pick an option: " /n | |
set e=%errorlevel% | |
set stop=end | |
set "ts=%bs% " | |
if %e% EQU 1 ( set op=old | |
) else ( if %e% EQU 2 ( set op=new | |
) else ( if %e% EQU 3 ( | |
echo. | |
set /p t=%ts%"Enter a directory: " | |
set op=custom | |
) else ( goto %stop%)) | |
) | |
echo. | |
echo. | |
echo %ts%---- Processing ---- | |
:cmdline | |
2>nul >nul reg query HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\roblox-player /v InstallLocation | |
if errorlevel 1 ( | |
call :error No Roblox installation found (errorlevel %errorlevel%^) | |
goto %stop% | |
) | |
call :instpath | |
call :%op% | |
::cls | |
goto %stop% | |
:: --------------------------------- | |
:: -- OUTPUTS | |
:: --------------------------------- | |
:instpath | |
for /f "tokens=3" %%G in ('2^>nul reg query HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\roblox-player /v InstallLocation') do set instpath=%%G | |
goto :eof | |
:normal | |
echo %ts%[+] %* | |
goto :eof | |
:error | |
echo %ts%[-] %* | |
goto :eof | |
:info | |
echo %ts%[.] %* | |
goto :eof | |
:end | |
endlocal | |
echo. | |
echo. | |
echo [Press any key to exit] | |
pause >nul | |
cls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
$instpath = (Get-ItemProperty -Path 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\roblox-player' -Name InstallLocation).InstallLocation | |
$z = 'rocursor-textures.zip' | |
$e = "$env:localappdata\$z" | |
Write-Host "[.] Downloading cursors from `nhttps://setup.rbxcdn.com/version-70a2467227df4077-content-textures2.zip" | |
Invoke-WebRequest -Uri 'https://setup.rbxcdn.com/version-70a2467227df4077-content-textures2.zip' -OutFile $e | |
Write-Host "[.] Downloaded to "$e | |
$o = New-Object -ComObject Shell.Application | |
$tcpy = ($o.NameSpace($e).Items() | Where-Object {$_.Name -eq 'Cursors'}).GetFolder().Items() | Where-Object {$_.Name -eq 'KeyboardMouse'} | |
Write-Host "[.] Copying to "$instpath | |
$o.NameSpace((Join-Path $instpath 'content\textures\Cursors')).CopyHere($tcpy, 20) | |
Write-Host "[+] Copied successfully!" | |
} catch { | |
Write-Host $s'[-] Exception '$_.FullyQualifiedErrorId': '$_.Exception^"`n This may be triggered of allergic reactions to non-existing or tampered files/folders." | |
} finally { if($e){try{Write-Host "[.] Removing downloaded file..."; Remove-Item $e -Recurse}catch{Write-Host "[-] Error removing $e`nYou may do a manual cleanup instead."}} } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment