This file contains hidden or 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
| --[[ | |
| set mass | |
| sets a parts mass to the given new_mass using PhysicalProperties | |
| ]] | |
| local function set_mass(part: BasePart, new_mass: number) | |
| local current_physical_properties = part.CurrentPhysicalProperties | |
| local extents_size = part.ExtentsSize |
This file contains hidden or 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
Show hidden characters
| { | |
| "cSpell.languageSettings": [ | |
| { | |
| "name": "lua", | |
| "languageId": [ "luau", "lua" ], | |
| "patterns": [ | |
| { | |
| "name": "short-comment", | |
| "pattern": "(?<![-])--.*" | |
| }, |
This file contains hidden or 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
| --!native | |
| local CFRAME_FROM_MATRIX = CFrame.fromMatrix | |
| local WEDGE = Instance.new("Part") | |
| local INSTANCE_CLONE = WEDGE.Clone | |
| local function create_3d_triangle( | |
| a: vector, b: vector, c: vector, | |
| parent: Instance?, part_1: Part?, part_2: Part? | |
| ): (Part, Part) |
This file contains hidden or 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
| --!native | |
| --[[ | |
| setup dragdetector | |
| originally wriitten by PrinceTybalt on 10/6/2023, this is a refactored version | |
| that is a function that can be applied to any drag detector, and doesnt require | |
| cloning any scripts | |
| original: https://create.roblox.com/store/asset/14988529693 | |
| ]] |
This file contains hidden or 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
| --!native | |
| -- weak | |
| -- a weak table utility so its easier to get types with weak tables | |
| --[[ | |
| this has string temporarially, so that the type checker wont scream when | |
| the __call metamethod is used | |
| --]] | |
| export type WeakType = |
This file contains hidden or 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
| -- impl | |
| -- a wrapper for easily implementing properties and methods | |
| -- in lune to mock roblox stuffs | |
| local roblox = require("@lune/roblox") | |
| export type GenericInstance<I> = roblox.Instance & I | |
| type PropertySetter<I, P> = (instance: GenericInstance<I>, new_value: unknown) -> P |
This file contains hidden or 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
| --!native | |
| -- duster | |
| -- fast and lightweight maid impl ( thats also better than janitor ) | |
| type Types = "table" | "function" | "thread" | "Instance" | "RBXScriptConnection" | |
| type TableCleanupMethod = <V>(self: (V & {})) -> () | |
| export type Cleanable = |
This file contains hidden or 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
| --!native | |
| -- uuid | |
| -- function for generating a uuid, based on https://gist.github.com/jrus/3197011 | |
| local uuid_format = "%x%x%x%x%x%x%x%x-%x%x%x%x-4%x%x%x-%x%x%x%x-%x%x%x%x%x%x%x%x%x%x%x%x" | |
| local wrap_in_curly_braces_format = "{%*}" | |
| local string_format = string.format | |
| local random_seed = math.randomseed | |
| local random = math.random |
This file contains hidden or 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
| --!native | |
| --!strict | |
| -- Exp | |
| -- Level and experience class modified from | |
| -- https://rostrap.github.io/Libraries/Math/Leveler/ | |
| -- @Kalrnlo | |
| -- 20/03/2024 | |
| local Players = game:GetService("Players") |
This file contains hidden or 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
| --!native | |
| -- abbrev timezone | |
| -- simple function for getting a timezone in its abbreviated form | |
| -- ie EST (Eastern Standard Time) | |
| local GSUB = string.gsub | |
| local DATE = os.date | |
| local function abbrev_timezone(offset: number?): string |
NewerOlder