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 Promise = require(script.Parent.Parent.Vendor.Promise) | |
local function SafeWaitForChild(Parent, ChildName, Timeout) | |
return Promise.new(function(Resolve, Reject, OnCancel) | |
local Child = Parent:FindFirstChild(ChildName) | |
if Child then | |
Resolve(Child) | |
else | |
local Offset = Timeout or 5 | |
local StartTime = os.clock() |
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 RunService = game:GetService("RunService") | |
local Heartbeat = RunService.Heartbeat | |
local LinkToInstanceIndex = newproxy(false) | |
local Janitors = setmetatable({}, {__mode = "k"}) | |
local Janitor = {__index = {CurrentlyCleaning = true}} | |
local TypeDefaults = { | |
["function"] = true; |
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 Functions = {} | |
local function Alphabetically(a, b) | |
local typeA = type(a) | |
local typeB = type(b) | |
if typeA == typeB then | |
if typeA == "number" then | |
return a < b | |
else |
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 Players: Players = game:GetService("Players") | |
local CollectionService: CollectionService = game:GetService("CollectionService") | |
local RunService: RunService = game:GetService("RunService") | |
local Door: Part = script.Parent | |
local POSSIBLE_CODES: {[string]: boolean} = { | |
["bruce wayne"] = true; | |
["batman"] = true; | |
} |
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 BLACK_COLOR3 = Color3.new() | |
local function SortByTime(A, B) | |
return A.Time < B.Time | |
end | |
local function Color3Lerp(C0, C1) | |
local L0, U0, V0 | |
local R0, G0, B0 = C0.R, C0.G, C0.B | |
R0 = R0 < 0.0404482362771076 and R0 / 12.92 or 0.87941546140213 * (R0 + 0.055) ^ 2.4 |
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 RunService = game:GetService("RunService") | |
local Heartbeat = RunService.Heartbeat | |
local Scheduler = {} | |
--[[** | |
Yields the current thread until the specified amount of seconds have elapsed. This uses Heartbeat to avoid using the legacy scheduler. | |
@param [t:optional<t:numberMin<0>>] Seconds The amount of seconds the thread will be yielded for. Defaults to 0.03. | |
@returns [t:number] The actual time yielded (in seconds). |
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 syntax = require("core.syntax") | |
syntax.add{ | |
files = {"%.lp$", "%.lh$"}; | |
comment = "//"; | |
patterns = { | |
{pattern = "//.-\n", type = "comment"}; | |
{pattern = {"/%*", "%*/"}, type = "comment"}; | |
{pattern = {"#", "[^\\]\n"}, type = "comment"}; | |
{pattern = {"L\"", "\"", "\\"}, type = "string"}; |
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 Bezier = require(script.Parent.Bezier) | |
local function RevBack(T) | |
T = 1 - T | |
return 1 - (math.sin(T * 1.5707963267949) + (math.sin(T * 3.1415926535898) * (math.cos(T * 3.1415926535898) + 1) / 2)) | |
end | |
local function Linear(T) | |
return T | |
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
-- I've purposely left out the client side code so you can test your code skills for yourself, it's thhe best way to learn after all! | |
local Workspace = game:GetService("Workspace") | |
local Players = game:GetService("Players") | |
local ReplicatedStorage = game:GetService("ReplicatedStorage") | |
local MarketplaceService = game:GetService("MarketplaceService") | |
local RunService = game:GetService("RunService") | |
local GameEvent: RemoteEvent = ReplicatedStorage.GameEvent | |
local Heartbeat: RBXScriptSignal = RunService.Heartbeat |
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
--[=[ | |
--Copyright boatbomber 2019-- | |
--Given under a BSD 3-Clause License-- | |
Explanation of license: https://tldrlegal.com/license/bsd-3-clause-license-(revised) | |
--FEATURES-- | |
Creates droplets of "water" on the screen, with a distortion effect, giving great immersion |