Skip to content

Instantly share code, notes, and snippets.

View RuizuKun-Dev's full-sized avatar
🦊

Kitsune RuizuKun-Dev

🦊
  • F2P
  • Area 51
View GitHub Profile
@RuizuKun-Dev
RuizuKun-Dev / GistUtil.lua
Created June 7, 2023 08:00
A Module for Interacting with GitHub's Gist API from within Roblox!
local HttpService = game:GetService("HttpService")
local API = "https://api.github.com/gists"
export type JSONString = string
-- Function to encode data into JSON format
-- @param data The data to be encoded
-- @return The encoded data
local function encode(data: table?): JSONString?
local function generateInput()
local file = io.open("Input.txt", "w")
local nums = {}
for _ = 1, 100 do
table.insert(nums, math.random(1, 100))
end
file:write(table.concat(nums, " "))
@RuizuKun-Dev
RuizuKun-Dev / Fizzbuzz.lua
Last active April 1, 2023 00:52
This is my fizz buzz implementation
local list = {
{word = "Fizz", number = 3},
{word = "Buzz", number = 5},
}
local function fizzbuzz(iterations)
for i = 1, iterations do
local str = i..": "
for _, data in pairs(list) do
if i % data.number == 0 then
@RuizuKun-Dev
RuizuKun-Dev / Signal.lua
Last active June 3, 2023 01:00 — forked from stravant/GoodSignal.lua
Good Roblox Signal Implementation
local available_runner_thread = nil
local function acquire_runner_and_call_event_handler(callback, ...)
local acquired_runner = available_runner_thread
available_runner_thread = nil
callback(...)
available_runner_thread = acquired_runner
end
@RuizuKun-Dev
RuizuKun-Dev / RthroScaleFix.lua
Created March 16, 2021 22:33 — forked from EgoMoose/RthroScaleFix.lua
Adjusts Roblox Rthro avatars so that their height scales match a 5 stud high R15 rig
local CLASSIC_HEIGHT = 5
local function getObjectValue(parent: Instance, name: string, default)
local found = parent:FindFirstChild(name)
if found then
return found.Value
end
return default
end
local BrickColors = {
Alder = Color3.new(0.705882, 0.501961, 1.000000),
Artichoke = Color3.new(0.541176, 0.670588, 0.521569),
Beige = Color3.new(0.792157, 0.749020, 0.639216),
Black = Color3.new(0.105882, 0.164706, 0.207843),
Bronze = Color3.new(0.494118, 0.407843, 0.247059),
Brown = Color3.new(0.486275, 0.360784, 0.274510),
Burgundy = Color3.new(0.533333, 0.243137, 0.243137),
Burlap = Color3.new(0.780392, 0.674510, 0.470588),
Buttermilk = Color3.new(0.996078, 0.952941, 0.733333),
--[[
@game/ReplicatedStorage/Debris2
Debris2 = {
Instances {
[Debris: instance or table or RBXScriptConnection] = {
lifeTime = lifeTime: number,
removalTime = tick() + lifeTime: number,
Destroyed = nil, -- Destroyed: callback Function | nil by default
Cancel = function -- remove references and disconnect Hearbeat
Instance = item: (Instance or table or RBXScriptConnection),
--| LICENSE: https://gist.github.com/RuizuKun-Dev/768981cc6d68f996a041a4fa1761ea02#file-license-txt
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Configurations = ReplicatedStorage.Shared:FindFirstChild("Configurations")
and require(ReplicatedStorage.Shared.Configurations)
local Utilities = ReplicatedStorage.Utilities
local instanceUtil = require(Utilities.instanceUtil)
local JSON = require(Utilities.JSON)
local Promise = require(Utilities.Packages.Promise)
local t = require(Utilities.Packages.t) -- github.com/osyrisrblx/t