Skip to content

Instantly share code, notes, and snippets.

@tnhung2011
Last active December 28, 2025 13:39
Show Gist options
  • Select an option

  • Save tnhung2011/5249855ea28e84030f095c61b007fd13 to your computer and use it in GitHub Desktop.

Select an option

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 doesn't like Bloxstrap)
<# :
@echo off
setlocal enableextensions
set stop=:eof
set powershell="%__appdir__%WindowsPowershell\v1.0\powershell.exe"
>nul 2>nul dir /b /a:-d %powershell% || (
echo Unsupported OS.
goto %stop%
)
set internal=%~n0
set program=RoCursor
set version=0.1
for /f %%A in ('prompt $H ^&echo on ^&for %%B in (1^) do rem') do set bs=%%A
if "%~1" equ "" ( goto :main
) else if "%~1" equ "help" ( goto :help
) else if "%~1" equ "/?" ( goto :help
) else if "%~1" equ "version" ( goto :version
) else if "%~1" equ "dest" ( goto :finstpath
) else if "%~1" equ "install" ( call :finstall %2 & goto :eof
)
set ts=
call :error Option "%~1" is not recognized
goto :eof
:: ---------------------------------
:: -- CMDLINE
:: ---------------------------------
:finstpath
call :instpath
echo %instpath%\Cursors\KeyboardMouse
goto :eof
:finstall
if "%~1" equ "old" ( goto :install
) else if "%~1" equ "new" ( goto :install
) else if "%~1" 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
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 && set /a inc+=1
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
%powershell% -NoProfile -NoLogo "iex (${%~f0} | out-string)"
goto :eof
:custom
pushd %instpath%\content\textures || goto %stop%
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 "ts=%bs% "
set stop=end
if errorlevel 255 goto %stop%
if %errorlevel% EQU 1 ( set op=old
) else ( if %errorlevel% EQU 2 ( set op=new
) else ( if %errorlevel% 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%
goto %stop%
:: ---------------------------------
:: -- OUTPUTS
:: ---------------------------------
:instpath
for /f "skip=2 tokens=2*" %%G in ('2^>nul reg query HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\roblox-player /v InstallLocation') do set instpath=%%H
goto :eof
:normal
echo %ts%[+] %*
goto :eof
:error
echo %ts%[-] %*
goto :eof
:info
echo %ts%[.] %*
goto :eof
:end
endlocal
echo.
echo.
<nul set /p=[Press any key to exit]
pause >nul
goto :eof
#>
try {
$z = 'rocursor-textures.zip'
$e = (Join-Path $env:temp $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
Write-Host "[.] Copying to $env:instpath"
$o.NameSpace((Join-Path $env:instpath 'content\textures\Cursors')).CopyHere($o.NameSpace($e).ParseName("Cursors\KeyboardMouse"), 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