This file contains 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
--| 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 |
This file contains 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
--[[ | |
@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), |
This file contains 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
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), |
This file contains 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
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 |
This file contains 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
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 |
This file contains 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
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 |
This file contains 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
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, " ")) |
This file contains 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
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? |