Skip to content

Instantly share code, notes, and snippets.

@RealEthanPlayzDev
RealEthanPlayzDev / ModelTween.luau
Last active May 30, 2023 06:38
ModelTween - Utility for tweening models
--[[
File name: ModelTween.luau
Author: RadiatedExodus (RealEthanPlayzDev)
Created at: May 30, 2023
Utility for tweening models
--]]
local serv = {
TweenService = game:GetService("TweenService");
--!strict
--// Types
type Function = (...any) -> (...any)
export type ConnectionObject = {
Disconnect: () -> (),
Connect: (() -> ())?
}
export type SignalObject = {
Connect: (self: SignalObject, f: Function) -> (ConnectionObject?),
@RealEthanPlayzDev
RealEthanPlayzDev / ClientStatisticsProvider.lua
Last active April 26, 2023 05:41
Client statistics stuff (Roblox)
--!strict
--[[
File name: ClientStatisticsProvider.luau
Author: RadiatedExodus (RealEthanPlayzDev)
Created at: April 26, 2023
Module for providing various client statistics related information
--]]
--// Types
Moved to https://github.com/RealEthanPlayzDev/LuauInLuau
@RealEthanPlayzDev
RealEthanPlayzDev / Note.txt
Last active December 19, 2022 17:33
Builder - A instance building system [MOVED]
Moved to https://github.com/RealEthanPlayzDev/Builder
@RealEthanPlayzDev
RealEthanPlayzDev / TaskScheduler.luau
Last active December 11, 2022 04:02
TaskScheduler - A custom task scheduler written in nearly pure Luau (Roblox usage)
--!strict
--[[
File name: TaskScheduler.luau
Author: RadiatedExodus (RealEthanPlayzDev)
Created at: December 10, 2022
A custom task scheduler implementation
Inspired by Anaminus's Sched library at:
https://github.com/Anaminus/roblox-library/blob/master/modules/Sched
--]]
@RealEthanPlayzDev
RealEthanPlayzDev / RbxHolodexAPI.luau
Last active November 26, 2022 09:31
RbxHolodexAPI - A Holodex API wrapper for usage in Roblox
--[[
File name: RbxHoloDexAPI.luau
Author: RadiatedExodus (RealEthanPlayzDev)
Version: 2.0.0
API wrapper for Holodex, written in Luau for usage in Roblox
--]]
--// Static configuration
local BASE_HOLODEXAPI_URL = "https://holodex.net/api/v2" --// The base url of the Holodex api, must NOT end with a slash
@RealEthanPlayzDev
RealEthanPlayzDev / Benchmark.lua
Created November 2, 2022 15:39
Benchmark function
local function Benchmark(name, times, f, ...)
warn("--- BEGINNING BENCHMARK: \""..name.."\" ---")
local RunTimes = {}
for i = 1, times, 1 do
local Start = os.clock()
f(...)
local End = os.clock()
local CalcTime = End - Start
table.insert(RunTimes, CalcTime)
print(" Run #"..i..": "..CalcTime)
@RealEthanPlayzDev
RealEthanPlayzDev / WaitForChildWhichIsA.luau
Last active October 1, 2022 16:51
WaitForChildWhichIsA - Roblox Instance:WaitForChild() but like Instance:FindFirstChildWhichIsA()
local function WaitForChildWhichIsA(parent: Instance, className: string, timeOut: number?)
if parent:FindFirstChildWhichIsA(className) then
return parent:FindFirstChildWhichIsA(className)
end
local CurrentThread = coroutine.running()
local Found = false
local Connection; Connection = parent.ChildAdded:Connect(function(child: Instance)
if child:IsA(className) then
@RealEthanPlayzDev
RealEthanPlayzDev / YieldFunctionResult.lua
Last active September 1, 2022 09:19
YieldFunctionResult, a small wrapper that wraps around a function for handling yields asynchronously, this is similar to JS promises. (supports lua and luau, look for the second file for luau)
--[[
File name: YieldFunctionResult.lua
Author: RadiatedExodus (RealEthanPlayzDev)
Created at: September 1, 2022
YieldFunctionResult, a small wrapper that wraps around a function
for handling yields asynchronously, this is similar to JS promises.
--]]
local YieldFunctionResult = {}