repo stringclasses 302
values | file_path stringlengths 18 241 | language stringclasses 2
values | file_type stringclasses 4
values | code stringlengths 76 697k | tokens int64 10 271k |
|---|---|---|---|---|---|
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Classes/Public/TextTag.luau | luau | .luau | local upsideEngine = script.Parent.Parent.Parent
local BaseClass = require(upsideEngine.Classes.Internal.BaseClass)
local TextTagService = require(upsideEngine.Services.TextTagService)
local TextTag = {}
TextTag.__index = TextTag
function TextTag.new()
local self = BaseClass.new()
self:SetClassName(script.Name)
sel... | 540 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Lib/ActorLoader.client.luau | luau | .luau | local RunService = game:GetService("RunService")
local actor = script:GetActor()
if not RunService:IsRunning() or not actor then
return
end
local data = {}
local running = {}
local tasks = {}
local module = nil
local runMode = "Default"
local ready = script:WaitForChild("ready")
local function addTask(f)
return f... | 372 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Lib/Util/Generic/Merge.luau | luau | .luau | return function(t1, t2)
local result = t1
for index, value in t2 do
result[index] = value
end
return result
end
| 37 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Lib/Util/Generic/Wrap.luau | luau | .luau | return function(f, ...)
local args = { ... }
return function(...)
f(unpack(args), ...)
end
end
| 25 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Lib/Util/Geometry/CheckCollision/GetCorrectionVector.luau | luau | .luau | --!native
--!optimize 2
local supportFn = require(script.Parent.Support)
local function getEdge(simplex)
local minDistSq = math.huge
local edgeNormal = Vector3.zero
local index = -1
local n = #simplex
if n == 0 then
return index, edgeNormal
end
for i = 1, n do
local j = (i % n) + 1
local edge = simplex... | 470 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Lib/Util/Geometry/CheckCollision/Handlers.luau | luau | .luau | --!native
--!optimize 2
local handlers = {}
local function tripleProduct(a, b, c)
return b * a:Dot(c) - a * b:Dot(c)
end
function handlers.point(direction, simplex)
return -direction
end
@native
function handlers.line(direction, simplex)
local b = simplex[2]
local c = simplex[1]
local cb = b - c
local c0 = -c... | 256 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Lib/Util/Geometry/CheckCollision/Support.luau | luau | .luau | --!native
--!optimize 2
return function(object, direction)
if object.shape == "circle" then
if direction.X == 0 and direction.Y == 0 then
return object.centre
end
local unitDirection = direction.Unit
if unitDirection.X == 0 and unitDirection.Y == 0 then
return object.centre
end
return object.centre... | 203 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Lib/Util/Geometry/CheckCollision/init.luau | luau | .luau | --!native
--!optimize 2
local getCorrectionVector = require(script.GetCorrectionVector)
local support = require(script.Support)
local handlers = require(script.Handlers)
local handlersByLen = {
handlers.point,
handlers.line,
handlers.triangle,
}
local EvolveResult = {
NoIntersection = 1,
Intersection = 2,
Evolv... | 609 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Lib/Util/Geometry/GetCollidingObjects.luau | luau | .luau | --!native
--!optimize 2
local checkCollision = require(script.Parent.CheckCollision)
local function isFar(objectA, objectB)
local a = objectA.Instance
local b = objectB.Instance
local scaleA = objectA.HitboxScale
local scaleB = objectB.HitboxScale
local aw, ah = a.AbsoluteSize.X * scaleA, a.AbsoluteSize.Y * scal... | 854 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Lib/Util/Geometry/GetCorners.luau | luau | .luau | return function(object)
local instance = object.Instance
local size = instance.AbsoluteSize
local position = instance.AbsolutePosition
size = Vector3.new(size.X, size.Y, 0)
position = Vector3.new(position.X, position.Y, 0)
local hitboxSize = size * object.HitboxScale
local alignment = size * (1 - math.clamp(ob... | 290 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Lib/Util/Geometry/SpatialGrid.luau | luau | .luau | --!native
--!optimize 2
local SpatialGrid = {}
SpatialGrid.__index = SpatialGrid
function SpatialGrid.new(cellSize: number)
return setmetatable({
_cellSize = cellSize,
_cells = {},
}, SpatialGrid)
end
function SpatialGrid:clear()
for _, row in self._cells do
for _, cell in row do
table.clear(cell)
end
... | 521 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Lib/Util/Graphics/Canvas2d.luau | luau | .luau | local ContentManager = require(script.Parent.ContentManager)
local cache = {}
local exports = {}
exports.__index = exports
local function createCacheableImage(url)
local editableImage = ContentManager.createSafeEditableImage(url) :: EditableImage
local imageData = {
image = editableImage,
isFree = false,
}
ca... | 562 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Lib/Util/Graphics/ContentManager.luau | luau | .luau | local AssetService = game:GetService("AssetService")
local classes = script.Parent.Parent.Parent.Parent.Classes
local EventEmitter = require(classes.Internal.EventEmitter)
local cache = {}
local loading = {}
local events = EventEmitter.new()
local exports = {
cache = cache,
events = events,
loading = loading,
}
fu... | 440 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Lib/Util/Internal/CopyTable.luau | luau | .luau | function copyTable(__table, copyIn)
local copy = copyIn or {}
for key, value in __table do
local valueType = typeof(value)
if valueType ~= "table" then
copy[key] = value
else
copy[key] = copyTable(value, copy[key])
end
end
return copy
end
return copyTable
| 77 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Lib/Util/Internal/Delete.luau | luau | .luau | local appData = script.Parent.Parent.Parent.Parent.AppData
local data = require(appData.Data)
local default = {}
function delete(obj)
for key, val in (obj or default) do
local valueType = typeof(val)
if valueType ~= "table" and valueType ~= "Instance" then
obj[key] = nil
elseif valueType == "Instance" or val... | 119 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Lib/Util/Internal/Diff.luau | luau | .luau | local function diff(newObj, oldObj)
local changes = {}
for key, newVal in newObj do
local oldVal = oldObj[key]
if type(newVal) == "table" and type(oldVal) == "table" then
local subChanges = diff(newVal, oldVal)
if next(subChanges) then
changes[key] = subChanges
end
elseif newVal ~= oldVal then
... | 112 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Lib/Util/Internal/Encoder.luau | luau | .luau | --!nonstrict
local httpService = game:GetService("HttpService")
local encoder = {}
local encoders = {
UDim2 = function(data)
return {
X = {
Scale = data.X.Scale,
Offset = data.X.Offset,
},
Y = {
Scale = data.Y.Scale,
Offset = data.Y.Offset,
},
}
end,
Vector2 = function(data)
return... | 515 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Lib/Util/Internal/IsEqual.luau | luau | .luau | function isEqual(first, second)
if first == second then
return true
elseif
first == nil
or second == nil
or typeof(first) ~= typeof(second)
or typeof(first) ~= "table" and typeof(second) ~= "table"
then
return false
end
local firstCount, secondCount = 0, 0
for key, value in first do
firstCount += 1... | 139 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Lib/Util/Internal/Path.luau | luau | .luau | local path = {}
function path.getRoute(object: Instance): string
local route = {}
local baseRoute = {}
local parent = object
while parent ~= game do
table.insert(baseRoute, parent.Name)
parent = parent.Parent
end
for i = #baseRoute, 1, -1 do
table.insert(route, baseRoute[i])
end
return table.concat(rou... | 135 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Lib/Util/Math/GetDistance.luau | luau | .luau | return function(v1, v2)
local direction = v1 - v2
return direction:Dot(direction)
end
| 25 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Lib/Util/Math/IsOutScreen.luau | luau | .luau | return function(position, size)
local resolution = workspace.CurrentCamera.ViewportSize
local fakeRes = resolution + size
-- stylua: ignore start
return position.X < -size.X
or position.Y < -size.Y
or position.X > fakeRes.X
or position.Y > fakeRes.Y
-- stylua: ignore end
end
| 77 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Lib/Util/Math/SetSmoothPosition.luau | luau | .luau | return function(object: PhysicalObject, smoothness: number, target: UDim2)
local alpha = 1 - math.clamp(smoothness, 0, 0.95)
local instance = object.Instance :: ImageLabel
local currentPosition = instance.Position
instance.Position = currentPosition:Lerp(target, alpha)
end
| 66 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Lib/Util/Replication/Handlers.luau | luau | .luau | local data = require(script.Parent.Parent.Parent.Parent.AppData.Data)
local SceneManager = require(script.Parent.Parent.Parent.Parent.Services.SceneManager)
local handlers = {}
local function getObjectScene(object)
local sceneId = object and object.Scene or ""
return SceneManager:Get(sceneId)
end
local function sub... | 369 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Lib/Util/init.luau | luau | .luau | local modules = {}
for _, val in script:GetDescendants() do
if not val.Name:match(".spec") and val.Parent:IsA("Folder") then
modules[val.Name] = require(val)
end
end
return modules
| 51 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Runtime/BaseTextTags.luau | luau | .luau | local RunService = game:GetService("RunService")
local TextTag = require(script.Parent.Parent.Classes.Public.TextTag)
local frameRate = 60
local function createRandomDecayRenderFunction(defaultIntensity)
return function(label, i, args)
local intensity = args.intensity or defaultIntensity
local duration = args.dur... | 853 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Runtime/CrossPlatformTracker.luau | luau | .luau | local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local uis = game:GetService("UserInputService")
local runService = game:GetService("RunService")
local upsideEngine = script.Parent.Parent
local crossPlatformService = require(upsideEngine.Services).CrossPlatformService
local ... | 1,467 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Runtime/EveryStep/CameraTracker.luau | luau | .luau | local ToUDim2 = require(script.Parent.Parent.Parent.Lib.Util).ToUDim2
local function isOutsideLimits(target, limits, margin)
return target.X < limits.X - margin
or target.X > 1 - limits.X + margin
or target.Y < limits.Y - margin
or target.Y > 1 - limits.Y + margin
end
return function(scene, deltaTime)
local c... | 237 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Runtime/EveryStep/ParallaxTracker.luau | luau | .luau | local setSmoothPosition = require(script.Parent.Parent.Parent.Lib.Util.Math.SetSmoothPosition)
return function(scene: Scene)
local camera = scene.Camera
local subject = camera.Subject and camera.Subject.Instance
if not subject then
return
end
for _, parallax in scene.Objects.Content do
if not parallax:IsA("Pa... | 136 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Runtime/EveryStep/ParticleTracker.luau | luau | .luau | return function(scene, deltaTime)
local cl = os.clock()
for _, particle in scene.ParticleEnvironment.Content do
if cl - particle.Clock < particle.LifeTime/particle.Rate then
continue
end
particle.Clock = cl
particle:Emit(particle.Rate * deltaTime)
end
end | 69 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Runtime/EveryStep/Physics.luau | luau | .luau | --!native
--!optimize 2
local upsideEngine = script.Parent.Parent.Parent
local ToUDim2 = require(script.Parent.Parent.Parent.Lib.Util.DataType.ToUDim2)
local getCollidingObjects = require(script.Parent.Parent.Parent.Lib.Util.Geometry.GetCollidingObjects)
local SpatialGrid = require(script.Parent.Parent.Parent.Lib.Util.... | 1,588 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Runtime/EveryStep/ProximityPromptTracker.luau | luau | .luau | local TweenService = game:GetService("TweenService")
local getDistance = require(script.Parent.Parent.Parent.Lib.Util.Math.GetDistance)
local function setProximityPromptVisible(proximityPrompt, visible)
local targetTransparency = if visible then 0 else 1
local tweenInfo = TweenInfo.new(proximityPrompt.FadeDuration, ... | 539 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Runtime/EveryStep/SoundTracker.luau | luau | .luau | local util = require(script.Parent.Parent.Parent.Lib.Util)
local getDistance = require(script.Parent.Parent.Parent.Lib.Util.Math.GetDistance)
local normalize = util.Normalize
return function(scene)
if not scene.Camera.Subject or not scene.Camera.Subject.Instance then
return
end
for _, sound in scene.SoundEnviron... | 200 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Runtime/EveryStep/SpritePlayer.luau | luau | .luau | local IsOutScreen = require(script.Parent.Parent.Parent.Lib.Util).IsOutScreen
local function axeStep(active, axe, max)
local index = active.CurrentFrame[axe]
local value = index <= max - 1 and index + 1 or 0
active.CurrentFrame =
Vector2.new(axe == "X" and value or active.CurrentFrame["X"], axe == "Y" and value o... | 511 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Runtime/EveryStep/parallel.luau | luau | .luau | return function(scene)
local lighting = scene.LightingEnvironment
local shaders = scene.ShaderEnvironment
lighting.__actrees:SetVariable("lights", lighting.Content)
shaders.__actor:SetVariable("shadable", shaders.Content)
end
| 49 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Runtime/Networking.luau | luau | .luau | local upsideEngine = script.Parent.Parent
local runService = game:GetService("RunService")
local players = game:GetService("Players")
local request = require(script.Parent.Parent.Classes.Internal.Request)
local ToVector2 = require(script.Parent.Parent.Lib.Util.DataType.ToVector2)
local merge = require(script.Parent.Pa... | 1,523 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Runtime/ProximityPromptInput.luau | luau | .luau | local CrossPlatformService = require(script.Parent.Parent.Services.CrossPlatformService)
local SceneManager = require(script.Parent.Parent.Services.SceneManager)
local function emitTriggerEvent(input, eventName)
for _, scene in SceneManager.ActiveScenes do
for _, object in scene.Objects do
if not object:IsA("Pro... | 157 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Runtime/Runner.luau | luau | .luau | --!native
local upsideEngine = script.Parent.Parent
local stepFolder = script:FindFirstAncestorOfClass("Folder").EveryStep
local runService = game:GetService("RunService")
local sceneManager = require(upsideEngine.Services.SceneManager)
local childs = stepFolder:GetChildren()
local trackers = {}
for _, tracker in ch... | 372 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Services/AuthorityService.luau | luau | .luau | local upsideEngine = script.Parent.Parent
local eventEmitter = require(upsideEngine.Classes.Internal.EventEmitter)
local authorityService = {}
authorityService.__index = authorityService
function authorityService.new()
local self = eventEmitter.new()
self:SetClassName(script.Name)
self.AuthorityAssignments = {}
... | 374 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Services/CrossPlatformService.luau | luau | .luau | local UserInputService = game:GetService("UserInputService")
local upsideEngine = script.Parent.Parent
local classes = upsideEngine.Classes
local character = require(script.Parent.Parent.Classes.Public.Character)
local eventEmitter = require(classes.Internal.EventEmitter)
local crossPlatformService = {}
crossPlatformS... | 1,437 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Services/NetworkingService.luau | luau | .luau | local upsideEngine = script.Parent.Parent
local copyTable = require(script.Parent.Parent.Lib.Util.Internal.CopyTable)
local diff = require(script.Parent.Parent.Lib.Util.Internal.Diff)
local eventEmitter = require(upsideEngine.Classes.Internal.EventEmitter)
local request = require(upsideEngine.Classes.Internal.Request)
... | 904 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Services/PluginSupportService.luau | luau | .luau | local ue = script.Parent.Parent
local classes = ue.Classes
local objects = require(ue.AppData.Data).objects
local properties = require(ue.AppData.Properties)
local eventEmitter = require(classes.Internal.EventEmitter)
local encoder = require(ue.Lib.Util).Encoder
local runService = game:GetService("RunService")
local ... | 1,105 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Services/SceneManager.luau | luau | .luau | local upsideEngine = script.Parent.Parent
local eventEmitter = require(upsideEngine.Classes.Internal.EventEmitter)
local sceneManager = {}
sceneManager.__index = sceneManager
function sceneManager.new()
local self = eventEmitter.new()
self.Scenes = {}
self.ActiveScenes = {}
return setmetatable(self, sceneManager... | 277 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Services/TextTagService.luau | luau | .luau | local BaseClass = require(script.Parent.Parent.Classes.Internal.BaseClass)
local TextTagService = {}
TextTagService.__index = TextTagService
function TextTagService.new()
local self = BaseClass.new()
self:SetClassName(script.Name)
self.TextTags = {}
return setmetatable(self, TextTagService)
end
function TextTagS... | 124 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Services/init.luau | luau | .luau | local module = {}
for _, Service in script:GetChildren() do
if not Service.Name:match(".spec") then
module[Service.Name] = require(Service)
end
end
return module
| 42 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Systems/Lighting.luau | luau | .luau | local AssetService = game:GetService("AssetService")
local Canvas2d = require(script.Parent.Parent.Lib.Util.Graphics.Canvas2d)
local getDistance = require(script.Parent.Parent.Lib.Util.Math.GetDistance)
local normalize = require(script.Parent.Parent.Lib.Util.Math.Normalize)
local IsOutScreen = require(script.Parent.Par... | 2,531 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Systems/Shading.luau | luau | .luau | local path = require(script.Parent.Parent.Lib.Util.Internal.Path)
local isOutScreen = require(script.Parent.Parent.Lib.Util.Math.IsOutScreen)
local Canvas2d = require(script.Parent.Parent.Lib.Util.Graphics.Canvas2d)
local ContentManager = require(script.Parent.Parent.Lib.Util.Graphics.ContentManager)
local shadingSyst... | 2,491 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/UpsideEngine.luau | luau | .luau | local parent = script.Parent
local classes = {}
local services = require(parent.Services)
local upsideWorkspace = require(parent.AppData.Data).workSpace
local upsideEngine = {}
upsideEngine.Version = "v3.3.0"
upsideEngine.Workspace = upsideWorkspace
function upsideEngine.new(name: string)
return classes[name].new()... | 139 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/init.luau | luau | .luau | local types = require(script["init.d"])
local upsideEngine = require(script.UpsideEngine)
local runService = game:GetService("RunService")
local isServer = runService:IsServer()
local function destroy()
if isServer or not script.Lib:FindFirstChild("Data") then
return
end
script.AppData.Data:Destroy()
script.Lib... | 158 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/testez.d.luau | luau | .luau | declare function afterAll(callback: () -> ()): ()
declare function afterEach(callback: () -> ()): ()
declare function beforeAll(callback: () -> ()): ()
declare function beforeEach(callback: () -> ()): ()
declare function describe(phrase: string, callback: () -> ()): ()
declare function describeFOCUS(phrase: string, c... | 246 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Client/Bootstrapper/Controller/init.client.luau | luau | .luau | local ReplicatedFirst = game:GetService("ReplicatedFirst")
local Bootstrapper = ReplicatedFirst:WaitForChild("Bootstrapper")
local controller: Instance = script.Parent
assert(controller and controller:IsA("ModuleScript"))
local success, module = xpcall(require, function(err)
error(`!! FATAL ERROR REQUIRING CONTRO... | 284 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Client/Bootstrapper/Module/init.client.luau | luau | .luau | local ReplicatedFirst = game:GetService("ReplicatedFirst")
local Bootstrapper = ReplicatedFirst:WaitForChild("Bootstrapper")
local module = script.Parent
assert(module and module:IsA("ModuleScript"))
script.Name = `SHARED_{module.Name}`
task.defer(function ()
script.Parent = Bootstrapper
end)
task.spawn(xpcall,... | 115 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Client/Controllers/UIController.luau | luau | .luau | --!strict
local UIController = {}
type Self = typeof(UIController)
local Players = game:GetService("Players")
local StarterGui = game:GetService("StarterGui")
local ReplicatedFirst = game:GetService("ReplicatedFirst")
local player = assert(Players.LocalPlayer)
local playerGui = player:WaitForChild("PlayerGui")
loca... | 671 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Client/UI/Common/React.luau | luau | .luau | local React = require(game.ReplicatedStorage.Packages.React)
--[[
local createElement = React.createElement
local useEffect = React.useEffect
local Shared = game.ReplicatedStorage.Shared
local NoYield = require(Shared.NoYield)
local ConVar = require(Shared.ConVar)
local react_aggressive_log = ConVar.Declare("react_a... | 542 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Client/UI/Common/ReactRoblox.luau | luau | .luau | local ReactRoblox = require(game.ReplicatedStorage.Packages.ReactRoblox)
export type RootType = ReactRoblox.RootType
return ReactRoblox
| 33 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Client/UI/Common/Ripple.luau | luau | .luau | local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Ripple = require(ReplicatedStorage.Packages.Ripple)
export type Motion<T> = Ripple.Motion<T>
export type MotionState = Ripple.MotionState
export type MotionSolver = Ripple.MotionSolver
export type MotionGoal = Ripple.MotionGoal
return Ripple | 69 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Client/UI/Common/RootState.luau | luau | .luau | local Common = script.Parent
local React = require(Common.React)
local Context = React.createContext({} :: {
BasePlayerGui: BasePlayerGui?,
Root: { current: GuiBase2d },
DisplayOrder: number,
SetDisplayOrder: (number) -> (),
ScreenInsets: Enum.ScreenInsets,
SetScreenInsets: (Enum.ScreenInsets... | 806 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Client/UI/Common/StoryBuilder.luau | luau | .luau | --!strict
local StoryBuilder = {}
local Common = script.Parent
local Cache = shared.StoryCache
local React = require(Common.React)
local ReactRoblox = require(Common.ReactRoblox)
local RootState = require(Common.RootState)
if not Cache then
Cache = {}
shared.StoryCache = Cache
end
local Story = {}
Story.__in... | 1,169 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Client/UI/Components/Noise.luau | luau | .luau | local UI = script:FindFirstAncestor("UI")
local Common = UI.Common
local Hooks = UI.Hooks
local React = require(Common.React)
local useA11Y = require(Hooks.useA11Y)
local useTimer = require(Hooks.useTimer)
local NOISE_CROP = Vector2.new(256, 256)
local NOISE_SIZE = Vector2.new(1023, 577)
local NOISE_RANGE = NOISE_SI... | 411 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Client/UI/Components/Noise.story.luau | luau | .luau | local UI = script:FindFirstAncestor("UI")
local StoryBuilder = require(UI.Common.StoryBuilder)
return StoryBuilder.Create(script.Parent.Noise, {
Size = UDim2.fromScale(1, 1),
AnchorPoint = Vector2.one / 2,
Position = UDim2.fromScale(0.5, 0.5),
ImageColor3 = Color3.fromRGB(255, 255, 255),
ImageTrans... | 105 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Client/UI/Developer/CompileSettings.luau | luau | .luau | local ScriptEditorService = game:GetService("ScriptEditorService")
local Shared = game.ReplicatedStorage.Shared
local StringBuilder = require(Shared.StringBuilder)
local Settings = require(Shared.Settings)
local typeNames = table.freeze({
"Bool",
"Color",
"Number",
"String",
})
local enumTypes = tabl... | 1,455 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Client/UI/Developer/CompileSettings.story.luau | luau | .luau | local UI = script:FindFirstAncestor("UI")
local StoryBuilder = require(UI.Common.StoryBuilder)
local CompileSettings = require(script.Parent.CompileSettings)
return StoryBuilder.Custom(CompileSettings) | 41 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Client/UI/Hooks/useA11Y.luau | luau | .luau | local Hooks = script.Parent
local useProperty = require(Hooks.useProperty)
local GuiService = game:GetService("GuiService")
--- shorthand for useAccessibility
local function useA11Y()
return {
ReducedMotion = useProperty(GuiService, function (rbx)
return rbx.ReducedMotionEnabled
end),
... | 132 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Client/UI/Hooks/useAttribute.luau | luau | .luau | local UI = script:FindFirstAncestor("UI")
local React = require(UI.Common.React)
local Shared = game.ReplicatedStorage.Shared
local Guid = require(Shared.Guid)
type AttributeMemo = {
[string]: (any) -> (),
}
type InstanceMemo = {
[string]: AttributeMemo
}
local memos = {} :: {
[Instance]: InstanceMemo
}... | 466 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Client/UI/Hooks/useAttributeBinding.luau | luau | .luau | local UI = script:FindFirstAncestor("UI")
local React = require(UI.Common.React)
local Shared = game.ReplicatedStorage.Shared
local Guid = require(Shared.Guid)
type AttributeMemo = {
-- Guid
[string]: (any) -> (),
}
type InstanceMemo = {
[string]: AttributeMemo
}
local memos = {} :: {
[Instance]: In... | 485 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Client/UI/Hooks/useChild.luau | luau | .luau | --!strict
local UI = script:FindFirstAncestor("UI")
local React = require(UI.Common.React)
local Hooks = script.Parent
local useSignal = require(Hooks.useSignal)
local function useChild(inst: Instance?, name: string, recursive: boolean?): Instance?
local child: Instance?, setChild = React.useState(nil :: Instanc... | 254 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Client/UI/Hooks/useMotion.luau | luau | .luau | --[[
Creates a memoized Motion object set to the given initial value.
Returns a binding that updates with the Motion, along with the Motion
object.
]]
local UI = script:FindFirstAncestor("UI")
local Common = UI.Common
local React = require(Common.React)
local Ripple = require(Common.Ripple)
local Hooks ... | 207 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Client/UI/Hooks/useOwnership.luau | luau | .luau | local Shared = game.ReplicatedStorage.Shared
local Marketplace = require(Shared.Marketplace)
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local Promise = require(Shared.Promise)
type Promise = Promise.Class
local UI = script:FindFirstAncestor("UI")
local React = require(UI.Common.Rea... | 226 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Client/UI/Hooks/usePlayerData.luau | luau | .luau | local UI = script:FindFirstAncestor("UI")
local React = require(UI.Common.React)
local Shared = game.ReplicatedStorage.Shared
local PlayerData = require(Shared.PlayerData)
local Hooks = script.Parent
local useSignal = require(Hooks.useSignal)
type SaveData = PlayerData.SaveData
--- A hook that provides the local pl... | 525 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Client/UI/Hooks/useProductInfo.luau | luau | .luau | local Root = script:FindFirstAncestor("UI")
local Common = Root.Common
local React = require(Common.React)
local Shared = game.ReplicatedStorage.Shared
local Marketplace = require(Shared.Marketplace)
local Promise = require(Shared.Promise)
type Promise = Promise.Class
local promises = {} :: {
[string]: Promise
... | 442 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Client/UI/Hooks/useProperty.luau | luau | .luau | --!strict
local UI = script:FindFirstAncestor("UI")
local React = require(UI.Common.React)
local Shared = game.ReplicatedStorage.Shared
local Guid = require(Shared.Guid)
local useRef = React.useRef
local useState = React.useState
local useEffect = React.useEffect
type PropertyMemo = {
[string]: (any) -> ()
}
t... | 827 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Client/UI/Hooks/usePropertyBinding.luau | luau | .luau | --!strict
local UI = script:FindFirstAncestor("UI")
local React = require(UI.Common.React)
local Shared = game.ReplicatedStorage.Shared
local Guid = require(Shared.Guid)
local useRef = React.useRef
local useState = React.useState
type Binding<T> = React.Binding<T>
local nullBinding = React.createBinding(nil)
type ... | 812 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Client/UI/Hooks/useRestore.luau | luau | .luau | local UI = script:FindFirstAncestor("UI")
local React = require(UI.Common.React)
local mem = shared.__useRestoreTable
if mem == nil then
mem = {}
shared.__useRestoreTable = mem
end
type BasicStateAction<S> = ((S) -> S) | S
type Dispatch<A> = (A) -> ()
--- Functions the same as useState, but remembers its val... | 352 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Client/UI/Hooks/useSetting.lua | luau | .lua | local UI = script:FindFirstAncestor("UI")
local React = require(UI.Common.React)
local Shared = game.ReplicatedStorage.Shared
local Settings = require(Shared.Settings)
local Hooks = script.Parent
local useSignal = require(Hooks.useSignal)
local usePlayerData = require(Hooks.usePlayerData)
type SettingName = Settings... | 360 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Client/UI/Hooks/useSignal.luau | luau | .luau | --!strict
local Shared = game.ReplicatedStorage.Shared
local UI = script:FindFirstAncestor("UI")
local React = require(UI.Common.React)
local Signal = require(Shared.Signal)
type Signal<T...> = Signal.Typed<T...> | RBXScriptSignal<T...>
local function useSignal<T...>(signal: Signal<T...>?, callback: (T...) -> ()?, ... | 179 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Client/UI/Hooks/useTimer.luau | luau | .luau | local UI = script:FindFirstAncestor("UI")
local React = require(UI.Common.React)
local function useTimer(framerate: number, callback: (dt: number) -> (), deps: { any }?)
if deps then
table.insert(deps, framerate)
end
React.useEffect(function ()
local thread = task.spawn(function ()
... | 159 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Client/UI/Widgets/SourceMic.luau | luau | .luau | local UI = script:FindFirstAncestor("UI")
local React = require(UI.Common.React)
local Players = game:GetService("Players")
local Hooks = UI.Hooks
local useMotion = require(Hooks.useMotion)
local useSignal = require(Hooks.useSignal)
local useProperty = require(Hooks.useProperty)
export type Props = {
Player: Pla... | 1,862 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Packages/Future.lua | luau | .lua | local REQUIRED_MODULE = require(script.Parent._Index["red-blox_future@1.0.1"]["future"])
export type Future<T...> = REQUIRED_MODULE.Future<T...>
return REQUIRED_MODULE
| 40 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Packages/React.lua | luau | .lua | local REQUIRED_MODULE = require(script.Parent._Index["jsdotlua_react@17.2.1"]["react"])
export type Object = REQUIRED_MODULE.Object
export type Binding<T> = REQUIRED_MODULE.Binding<T>
export type BindingUpdater<T> = REQUIRED_MODULE.BindingUpdater<T>
export type LazyComponent<T, P> = REQUIRED_MODULE.LazyComponent<T, P>... | 448 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Packages/ReactRoblox.lua | luau | .lua | local REQUIRED_MODULE = require(script.Parent._Index["jsdotlua_react-roblox@17.2.1"]["react-roblox"])
export type RootType = REQUIRED_MODULE.RootType
return REQUIRED_MODULE
| 44 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Packages/Ripple.lua | luau | .lua | local REQUIRED_MODULE = require(script.Parent._Index["littensy_ripple@0.9.3"]["ripple"])
export type Motion<T > = REQUIRED_MODULE.Motion<T >
export type MotionState = REQUIRED_MODULE.MotionState
export type MotionSolver = REQUIRED_MODULE.MotionSolver
export type MotionGoal = REQUIRED_MODULE.MotionGoal
export type Sp... | 104 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Packages/Signal.lua | luau | .lua | local REQUIRED_MODULE = require(script.Parent._Index["sleitnick_signal@2.0.3"]["signal"])
export type Connection = REQUIRED_MODULE.Connection
export type Signal<T...> = REQUIRED_MODULE.Signal<T...>
return REQUIRED_MODULE
| 49 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Packages/_Index/jsdotlua_boolean@1.2.7/boolean/src/toJSBoolean.lua | luau | .lua | local Number = require(script.Parent.Parent:WaitForChild('number'))
-- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean
return function(val: any): boolean
return not not val and val ~= 0 and val ~= "" and not Number.isNaN(val)
end
| 65 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Packages/_Index/jsdotlua_collections@1.2.7/collections/src/Array/concat.lua | luau | .lua | local __DEV__ = _G.__DEV__
local isArray = require(script.Parent:WaitForChild('isArray'))
local types = require(script.Parent.Parent.Parent:WaitForChild('es7-types'))
type Array<T> = types.Array<T>
local RECEIVED_OBJECT_ERROR = [[Array.concat(...) only works with array-like tables but it received an object-like table.... | 439 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Packages/_Index/jsdotlua_collections@1.2.7/collections/src/Array/every.lua | luau | .lua | local __DEV__ = _G.__DEV__
local types = require(script.Parent.Parent.Parent:WaitForChild('es7-types'))
type Array<T> = types.Array<T>
type Object = types.Object
type callbackFn<T> = (element: T, index: number, array: Array<T>) -> boolean
type callbackFnWithThisArg<T, U> = (self: U, element: T, index: number, array: Ar... | 356 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Packages/_Index/jsdotlua_collections@1.2.7/collections/src/Array/filter.lua | luau | .lua | local __DEV__ = _G.__DEV__
local types = require(script.Parent.Parent.Parent:WaitForChild('es7-types'))
type Array<T> = types.Array<T>
type Object = types.Object
type callbackFn<T> = (element: T, index: number, array: Array<T>) -> boolean
type callbackFnWithThisArg<T, U> = (thisArg: U, element: T, index: number, array:... | 404 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Packages/_Index/jsdotlua_collections@1.2.7/collections/src/Array/find.lua | luau | .lua | local types = require(script.Parent.Parent.Parent:WaitForChild('es7-types'))
type Array<T> = types.Array<T>
type PredicateFunction<T> = (value: T, index: number, array: Array<T>) -> boolean
return function<T>(array: Array<T>, predicate: PredicateFunction<T>): T | nil
for i = 1, #array do
local element = array[i]
... | 110 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Packages/_Index/jsdotlua_collections@1.2.7/collections/src/Array/findIndex.lua | luau | .lua | local types = require(script.Parent.Parent.Parent:WaitForChild('es7-types'))
type Array<T> = types.Array<T>
type PredicateFunction<T> = (T, number, Array<T>) -> boolean
return function<T>(array: Array<T>, predicate: PredicateFunction<T>): number
for i = 1, #array do
local element = array[i]
if predicate(element, ... | 103 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Packages/_Index/jsdotlua_collections@1.2.7/collections/src/Array/flat.lua | luau | .lua | local __DEV__ = _G.__DEV__
local isArray = require(script.Parent:WaitForChild('isArray'))
local types = require(script.Parent.Parent.Parent:WaitForChild('es7-types'))
type Array<T> = types.Array<T>
local function flat<T>(array: Array<T>, depth_: number?): Array<T>
if __DEV__ then
if typeof(array) ~= "table" then
... | 250 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Packages/_Index/jsdotlua_collections@1.2.7/collections/src/Array/flatMap.lua | luau | .lua | local __DEV__ = _G.__DEV__
local flat = require(script.Parent:WaitForChild('flat'))
local map = require(script.Parent:WaitForChild('map'))
local types = require(script.Parent.Parent.Parent:WaitForChild('es7-types'))
type Array<T> = types.Array<T>
type callbackFn<T, U> = (element: T, index: number, array: Array<T>) -> U... | 242 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Packages/_Index/jsdotlua_collections@1.2.7/collections/src/Array/forEach.lua | luau | .lua | local __DEV__ = _G.__DEV__
local types = require(script.Parent.Parent.Parent:WaitForChild('es7-types'))
type Array<T> = types.Array<T>
type Object = types.Object
type callbackFn<T> = (element: T, index: number, array: Array<T>) -> ()
type callbackFnWithThisArg<T, U> = (thisArg: U, element: T, index: number, array: Arra... | 350 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Packages/_Index/jsdotlua_collections@1.2.7/collections/src/Array/from/fromArray.lua | luau | .lua | local types = require(script.Parent.Parent.Parent.Parent:WaitForChild('es7-types'))
type Object = types.Object
type Array<T> = types.Array<T>
type mapFn<T, U> = (element: T, index: number) -> U
type mapFnWithThisArg<T, U> = (thisArg: any, element: T, index: number) -> U
return function<T, U>(
value: Array<T>,
mapFn... | 301 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Packages/_Index/jsdotlua_collections@1.2.7/collections/src/Array/from/fromMap.lua | luau | .lua | local types = require(script.Parent.Parent.Parent.Parent:WaitForChild('es7-types'))
type Object = types.Object
type Array<T> = types.Array<T>
type Map<K, V> = types.Map<K, V>
type mapFn<T, U> = (element: T, index: number) -> U
type mapFnWithThisArg<T, U> = (thisArg: any, element: T, index: number) -> U
return function... | 309 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Packages/_Index/jsdotlua_collections@1.2.7/collections/src/Array/from/fromSet.lua | luau | .lua | local types = require(script.Parent.Parent.Parent.Parent:WaitForChild('es7-types'))
type Object = types.Object
type Array<T> = types.Array<T>
type Set<T> = types.Set<T>
type mapFn<T, U> = (element: T, index: number) -> U
type mapFnWithThisArg<T, U> = (thisArg: any, element: T, index: number) -> U
return function<T, U>... | 284 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Packages/_Index/jsdotlua_collections@1.2.7/collections/src/Array/from/fromString.lua | luau | .lua | local types = require(script.Parent.Parent.Parent.Parent:WaitForChild('es7-types'))
type Object = types.Object
type Array<T> = types.Array<T>
type mapFn<T, U> = (element: T, index: number) -> U
type mapFnWithThisArg<T, U> = (thisArg: any, element: T, index: number) -> U
return function<T, U>(
value: string,
mapFn: ... | 323 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Packages/_Index/jsdotlua_collections@1.2.7/collections/src/Array/from/init.lua | luau | .lua | local Set = require(script.Parent.Parent:WaitForChild('Set'))
local Map = require(script.Parent.Parent:WaitForChild('Map'):WaitForChild('Map'))
local isArray = require(script.Parent:WaitForChild('isArray'))
local instanceof = require(script.Parent.Parent.Parent:WaitForChild('instance-of'))
local types = require(script.... | 460 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Packages/_Index/jsdotlua_collections@1.2.7/collections/src/Array/includes.lua | luau | .lua | local types = require(script.Parent.Parent.Parent:WaitForChild('es7-types'))
type Array<T> = types.Array<T>
local indexOf = require(script.Parent:WaitForChild('indexOf'))
return function<T>(array: Array<T>, searchElement: T, fromIndex: number?): boolean
return indexOf(array, searchElement, fromIndex) ~= -1
end
| 76 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Packages/_Index/jsdotlua_collections@1.2.7/collections/src/Array/indexOf.lua | luau | .lua | local types = require(script.Parent.Parent.Parent:WaitForChild('es7-types'))
type Array<T> = types.Array<T>
-- Implements equivalent functionality to JavaScript's `array.indexOf`,
-- implementing the interface and behaviors defined at:
-- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects... | 249 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Packages/_Index/jsdotlua_collections@1.2.7/collections/src/Array/init.lua | luau | .lua | local ES7Types = require(script.Parent.Parent:WaitForChild('es7-types'))
export type Array<T> = ES7Types.Array<T>
return {
concat = require(script:WaitForChild('concat')),
every = require(script:WaitForChild('every')),
filter = require(script:WaitForChild('filter')),
find = require(script:WaitForChild('find')),
... | 295 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Packages/_Index/jsdotlua_collections@1.2.7/collections/src/Array/isArray.lua | luau | .lua | return function(value: any): boolean
if typeof(value) ~= "table" then
return false
end
if next(value) == nil then
-- an empty table is an empty array
return true
end
local length = #value
if length == 0 then
return false
end
local count = 0
local sum = 0
for key in pairs(value) do
if typeof(key) ... | 160 |
MaximumADHD/Roblox-Boilerplate | MaximumADHD-Roblox-Boilerplate-4358d1a/Packages/_Index/jsdotlua_collections@1.2.7/collections/src/Array/join.lua | luau | .lua | local types = require(script.Parent.Parent.Parent:WaitForChild('es7-types'))
type Array<T> = types.Array<T>
local map = require(script.Parent:WaitForChild('map'))
return function<T>(arr: Array<T>, separator: string?): string
if #arr == 0 then
return ""
end
-- JS does tostring conversion implicitely but in Lua we ... | 117 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.