Skip to content

Instantly share code, notes, and snippets.

View ryanlua's full-sized avatar

Ryan Luu ryanlua

View GitHub Profile
@ryanlua
ryanlua / BackpackDebugIcon.luau
Last active November 30, 2025 09:48
Creates a TopbarPlus dropdown that allows you to add Tools and HopperBins to the backpack along with clearing it.
--!strict
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Icon = require(ReplicatedStorage.Packages.topbarplus)
local player = Players.LocalPlayer :: Player
local toolIcon = Icon.new()
@ryanlua
ryanlua / edpuzzle-playback-speed.js
Created September 2, 2025 18:26
Snippet for speeding up Edpuzzle videos to 5x which is the limit before Edpuzzle limits the speed. Paste this code into the console of a Edpuzzle video for it to work.
const videos = document.querySelectorAll("video");
videos.forEach((video) => {
try {
video.playbackRate = 5;
} catch (e) {
console.warn(`Could not set playback rate for video`, video, e);
}
});
@ryanlua
ryanlua / fritzing-download.md
Last active December 8, 2025 12:40
Free download of Fritzing using the official download links
@ryanlua
ryanlua / GroupBlacklist.server.luau
Created February 2, 2025 03:13
Kick people from a certain group on Roblox. Place this in a Script under ServerScriptStorage
--!strict
local Players = game:GetService("Players")
local groupId: number = 0 -- Blacklisted group id
local kickReason: string = "Your group is blacklisted" -- Kick reason
local function onPlayerAdded(player: Player): ()
if player:IsInGroup(groupId) then
player:Kick(kickReason)
end
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ryanlua
ryanlua / TimeOfDay.luau
Last active January 31, 2025 09:24
Script for a time cycle on Roblox using an infinite loop and compound assignment operators. Place this in a Script under ServerScriptService.
local Lighting = game:GetService("Lighting")
local SECOND_DURATION = 0.001
while true do
Lighting.ClockTime += 1/360
task.wait(SECOND_DURATION)
end
@ryanlua
ryanlua / LevelOfDetailOptimize.luau
Last active January 31, 2025 09:26
Changes the LevelOfDetail for all Models to StreamingMesh
local ChangeHistoryService = game:GetService("ChangeHistoryService")
local recording = ChangeHistoryService:TryBeginRecording("Change LevelOfDetail to StreamingMesh")
for _, descendant in pairs(game:GetDescendants()) do
if descendant:IsA("Model") then
descendant.LevelOfDetail = Enum.ModelLevelOfDetail.StreamingMesh
end
end
local GuiService = game:GetService("GuiService")
local TweenService = game:GetService("TweenService")
local Players = game:GetService("Players")
local PlayerGui = Players.LocalPlayer.PlayerGui
local selectionImage = Instance.new("Frame")
selectionImage.Name = "SelectionImage"
selectionImage.BackgroundTransparency = 1
selectionImage.Size = UDim2.fromScale(1, 1)
@ryanlua
ryanlua / CollisionFidelityOptimize.luau
Last active January 31, 2025 09:23
Change all CollisionFidelity to Box
local ChangeHistoryService = game:GetService("ChangeHistoryService")
local recording = ChangeHistoryService:TryBeginRecording("Change CollisionFidelity to Box on TriangleMeshParts")
for _, descendant in pairs(game:GetDescendants()) do
if descendant:IsA("TriangleMeshPart") then
descendant.CollisionFidelity = Enum.CollisionFidelity.Box
end
end
@ryanlua
ryanlua / DestroyWelds.luau
Last active January 31, 2025 09:21
Destory all welds
local ChangeHistoryService = game:GetService("ChangeHistoryService")
local recording = ChangeHistoryService:TryBeginRecording("Destory Welds")
for _, descendant in pairs(game:GetDescendants()) do
if descendant:IsA("Weld") then
descendant:Destroy()
end
end