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
-- You should use the benchmarker to compare this one to the one you have. :P | |
local SpawnEvent = Instance.new("BindableEvent") | |
SpawnEvent.Event:Connect(function(Function, Pointer) Function(Pointer()) end) | |
local function FastSpawn(Function, ...) | |
local Length = select("#", ...) | |
local Arguments = {...} | |
SpawnEvent:Fire(Function, function() return unpack(Arguments, 1, Length) end) | |
end |
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
--credit to scarious for this god module | |
--t1, origin CFrame | |
--d, distance | |
--s, size (vector3, center based as the middle) | |
--l, ignore list (array) | |
local Workspace = game:GetService("Workspace") | |
local cf =CFrame.new |
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
local Players = game:GetService("Players") | |
local ReplicatedStorage = game:GetService("ReplicatedStorage") | |
local RunService = game:GetService("RunService") | |
local Resources = require(ReplicatedStorage:WaitForChild("Resources")) | |
local Color = Resources:LoadLibrary("Color") | |
local Tween = Resources:LoadLibrary("Tween") | |
local Typer = Resources:LoadLibrary("Typer") | |
local Enumeration = Resources:LoadLibrary("Enumeration") | |
local PseudoInstance = Resources:LoadLibrary("PseudoInstance") |
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
local CHARACTERS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz~`!@#$%^&*()-_=+[{]}\\|;:'\",<.>/?" | |
local RandomLib = Random.new(os.clock() % 1 * 1E7) | |
local function RandomString(Length) | |
local String = "" | |
for _ = Length, 0, -1 do | |
local Index = RandomLib:NextInteger(1, 94) | |
String ..= string.sub(CHARACTERS, Index, Index) | |
end |
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
local Janitor = (function() | |
local Instance_new = Instance.new | |
local LinkToInstanceIndex = newproxy(false) | |
local Janitors = setmetatable({}, {__mode = "k"}) | |
local Janitor = { | |
__index = {CurrentlyCleaning = true}; | |
} |
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
------------------------------------------------------------------------ | |
-- Freecam | |
-- Cinematic free camera for spectating and video production. | |
------------------------------------------------------------------------ | |
local pi = math.pi | |
local abs = math.abs | |
local clamp = math.clamp | |
local exp = math.exp | |
local rad = math.rad |
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
local Functions = {} | |
Functions["table.insert"] = function() | |
local Array = {} | |
for Index = 1, 1E4 do | |
table.insert(Array, Index * 2) | |
end | |
end | |
Functions["#X + 1"] = function() |
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
-- VARIABLES | |
local ServersHandler = {} | |
local ServerList = {} | |
-- This is O(1) vs table.remove being O(n) (I think) | |
local function FastRemove(Table, Index) | |
local Length = #Table | |
Table[Index] = Table[Length] |
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
local RunService = game:GetService 'RunService' | |
local TextService = game:GetService 'TextService' | |
local Root = script.Parent.Parent | |
local Libraries = Root:WaitForChild 'Libraries' | |
local Vendor = Root:WaitForChild 'Vendor' | |
local UI = Root:WaitForChild 'UI' | |
-- Constants | |
local EMPTY_VECTOR2 = Vector2.new() |
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
local Players = game:GetService("Players") | |
-- Load the DataStore stuff | |
local DEFAULT_DATA = { | |
Money = 0; | |
Inventory = { | |
Cat = false; | |
Dog = false; | |
Fish = true; | |
} |