Skip to content

Instantly share code, notes, and snippets.

Avatar

rust devrusty

  • Earth
View GitHub Profile
@devrusty
devrusty / Ponies.sh
Created January 15, 2023 17:46
A bash script that shows a certain pony using ponysay.
View Ponies.sh
# written by github:devrusty
# January, 15, 2023
PONY=twilight;
MSG="close this window for more PONY";
COUNT=10;
PONIES=("Twilight" "Applejack" "Pinkie" "Fluttershy" "Rarity" "Rainbow Dash" "Celestia" "Luna" "Cadance" "Flurryheart");
function createPonyWindow {
xterm -bg black -hold -e ponysay -f $PONY $MSG;
}
@devrusty
devrusty / progressBar.ts
Created September 5, 2022 03:10
A function that generates a progress bar using emojis.
View progressBar.ts
const max = 10
function CreateProgressBar(progress: number) {
if (progress > max) {
console.log(`Progress bar is out of range of ${max}`)
return
}
const progressBar = `${"🟩".repeat(progress)}${"⬛".repeat(max - progress)}`
return progressBar
}
@devrusty
devrusty / seed.lua
Created August 31, 2022 05:52
weird terrain generator
View seed.lua
local gen = 1000
function generate(i)
local num = math.random(0, i)
local part = Instance.new("Part")
part.BrickColor = BrickColor.random()
part.Anchored = true
part.Parent = workspace
part.Position = Vector3.new(num * 2, 1, num * 3) * math.random(0, 200)
@devrusty
devrusty / BuildClient.lua
Created September 2, 2022 20:21
Client script for a Roblox build mode system
View BuildClient.lua
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local Players = game:GetService("Players")
local Building = false
local Mouse = Players.LocalPlayer:GetMouse()
local Brick = script.Part
local function RoundVector3(vector: Vector3)
return Vector3.new(