repo
stringclasses
350 values
file_path
stringlengths
29
200
language
stringclasses
2 values
file_type
stringclasses
4 values
code
stringlengths
2
1.01M
tokens
int64
2
598k
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/RoQuest/Shared/Data/StatusToLifeCycle.luau
luau
.luau
local QuestStatus = require(script.Parent.Parent.Enums.QuestStatus) return { [QuestStatus.InProgress] = "OnStart", [QuestStatus.Completed] = "OnComplete", [QuestStatus.Delivered] = "OnDeliver", }
53
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/RoQuest/Shared/Data/TimeRequirement.luau
luau
.luau
local QuestRepeatableType = require(script.Parent.Parent.Enums.QuestRepeatableType) local function hoursToSeconds(hours: number): number return hours * 3600 end return { [QuestRepeatableType.Custom] = 0, [QuestRepeatableType.Daily] = hoursToSeconds(23), [QuestRepeatableType.Weekly] = hoursToSeconds(16...
113
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/RoQuest/Shared/Data/WarningMessages.luau
luau
.luau
return { RoQuestAlreadyInit = "RoQuest has already been initialized", LoadDirectoryMixedType = "Cannot load directory with mixed file types. Make sure you only load Quests or only QuestLifeCycles", NoQuestById = "No quest with the id %s was found", DuplicateQuestId = "Duplicate quest id %s found", ...
211
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/RoQuest/Shared/Enums/QuestAcceptType.luau
luau
.luau
--!strict --[=[ @class QuestAcceptType @tag Enum Sets if the quest should be accepted automatically or manually ]=] local QuestAcceptType = { Automatic = "Automatic", Manual = "Manual", } --[=[ @interface Status @within QuestAcceptType .Automatic "Automatic" -- The quest will automatic...
130
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/RoQuest/Shared/Enums/QuestDeliverType.luau
luau
.luau
--!strict --[=[ @class QuestDeliverType @tag Enum Sets if the quest should be delivered automatically or manually ]=] local QuestDeliverType = { Automatic = "Automatic", Manual = "Manual", } --[=[ @interface Status @within QuestDeliverType .Automatic "Automatic" -- The quest will autom...
131
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/RoQuest/Shared/Enums/QuestRepeatableType.luau
luau
.luau
--!strict --[=[ @class QuestRepeatableType @tag Enum Sets how often and if it is possible to repeat a quest ]=] local QuestRepeatableType = { NonRepeatable = "NonRepeatable", Infinite = "Infinite", Daily = "Daily", Weekly = "Weekly", Custom = "Custom", } --[=[ @interface Status ...
210
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/RoQuest/Shared/Enums/QuestStatus.luau
luau
.luau
--!strict --[=[ @class QuestStatus @tag Enum Tracks the current status of the player's quest ]=] local QuestStatus = { NotStarted = "NotStarted", InProgress = "InProgress", Completed = "Completed", Delivered = "Delivered", } --[=[ @interface Status @within QuestStatus .NotStart...
172
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/RoQuest/Shared/Functions/assertProperties.luau
luau
.luau
local function assertProperties(properties, class) properties = properties or {} for index: string, value: any in properties do if class[index] == nil then error(string.format("Property %s does not exist in class %s", index, class.__type)) end if typeof(value) ~= typeof(cla...
129
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/RoQuest/Shared/Functions/createStruct.luau
luau
.luau
local function createStruct(data) return setmetatable({}, { __call = function(_, properties) local dataTable = setmetatable({}, data) for index: string, value: any in pairs(data) do if properties[index] == nil then if typeof(value) == ...
118
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/RoQuest/Shared/Functions/loadDirectory.luau
luau
.luau
local WarningMessages = require(script.Parent.Parent.Data.WarningMessages) local Quest = require(script.Parent.Parent.Classes.Quest) local QuestLifeCycle = require(script.Parent.Parent.Classes.QuestLifeCycle) type Quest = Quest.Quest type QuestLifeCycle = QuestLifeCycle.QuestLifeCycle local LOAD_DIRECTORY_TYPES: {[st...
278
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/RoQuest/Shared/Functions/networkQuestParser.luau
luau
.luau
local Quest = require(script.Parent.Parent.Classes.Quest) type Quest = Quest.Quest local REPLICATE_PROPERTIES: {[string]: true} = { Name = true, Description = true, QuestId = true, QuestAcceptType = true, QuestDeliverType = true, QuestRepeatableType = true, QuestStart = true, QuestEnd ...
164
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/RoQuest/Shared/Functions/warn.luau
luau
.luau
--!strict local HEADER: string = "[RoQuest]: " return function(message: string): () warn(HEADER .. message, "\n", debug.traceback()) end
36
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/RoQuest/Shared/Structs/PlayerQuestData.luau
luau
.luau
local QuestProgress = require(script.Parent.QuestProgress) local createStruct = require(script.Parent.Parent.Functions.createStruct) export type QuestProgress = QuestProgress.QuestProgress --[=[ @class PlayerQuestData @tag Struct ```csharp struct PlayerQuestData { InProgress: {[string]: Quest...
256
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/RoQuest/Shared/Structs/QuestObjectiveProgress.luau
luau
.luau
local createStruct = require(script.Parent.Parent.Functions.createStruct) --[=[ @class QuestObjectiveProgress @tag Struct ```csharp struct QuestObjectiveProgress { CurrentProgress: number, Completed: boolean } ``` ]=] local QuestObjectiveProgress = { CurrentProgress = 0, ...
154
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/RoQuest/Shared/Structs/QuestProgress.luau
luau
.luau
local QuestStatus = require(script.Parent.Parent.Enums.QuestStatus) local createStruct = require(script.Parent.Parent.Functions.createStruct) local QuestObjectiveProgress = require(script.Parent.QuestObjectiveProgress) type QuestStatus = QuestStatus.QuestStatus type QuestObjectiveProgress = QuestObjectiveProgress.Ques...
393
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/RoQuest/Vendor/Red/Net/Event.luau
luau
.luau
local RunService = game:GetService("RunService") local ReplicatedStorage = game:GetService("ReplicatedStorage") local Remote = ReplicatedStorage:FindFirstChild("RedEvent") :: RemoteEvent local IS_CLIENT = RunService:IsClient() local Serdes = require(script.Parent.Serdes) local Spawn = require(script.Parent.Parent.Ut...
1,927
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/RoQuest/Vendor/Red/Net/Serdes.luau
luau
.luau
local RunService = game:GetService("RunService") local ReplicatedStorage = game:GetService("ReplicatedStorage") local Event = ReplicatedStorage:WaitForChild("RedEvent") local Promise = require(script.Parent.Parent.Util.Promise) local Serdes = {} Serdes.NextId = 0 Serdes.NextOT = 0 function Serdes.RegisterIdentifie...
372
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/RoQuest/Vendor/Red/Util/Bin.luau
luau
.luau
local Spawn = require(script.Parent.Spawn) type BinItem = Instance | RBXScriptConnection | () -> ...any return function() local Bin: { BinItem } = {} return function(Item: BinItem) table.insert(Bin, Item) end, function() for _, Item in Bin do if typeof(Item) == "Instance" then Item:Destroy() elseif ...
131
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/RoQuest/Vendor/Red/Util/Clock.luau
luau
.luau
local ReplicatedStorage = game:GetService("ReplicatedStorage") local RunService = game:GetService("RunService") local function MakeHeartbeatFunction(Clock: Clock) return function(Delta) Clock:Advance(Delta) end end local Clock = {} Clock.__index = Clock function Clock.Clock(Interval: number, Callback: () -> ()) ...
326
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/RoQuest/Vendor/Red/Util/Collection.luau
luau
.luau
local CollectionService = game:GetService("CollectionService") local Spawn = require(script.Parent.Spawn) return function<T...>(Tag: string, Start: (Instance) -> T..., Stop: (T...) -> ()): () -> () local InstanceMap = {} for _, Instance in CollectionService:GetTagged(Tag) do Spawn(function() InstanceMap[Insta...
223
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/RoQuest/Vendor/Red/Util/Promise.luau
luau
.luau
local Spawn = require(script.Parent.Spawn) local Promise = {} Promise.__index = Promise function Promise.Promise(Callback: (Resolve: (...any) -> (), Reject: (...any) -> ()) -> ()) local self = setmetatable({}, Promise) self.Status = "Pending" self.OnResolve = {} :: { (...any) -> () } self.OnReject = {} :: { (......
1,039
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/RoQuest/Vendor/Red/Util/Ratelimit.luau
luau
.luau
return function<T>(Limit: number, Interval: number) assert(Limit > 0, "Limit must be greater than 0") local CountMap = {} :: { [T]: number } local CountKeyless = 0 return function(Key: T?) if Key then local Count = CountMap[Key] if Count == nil then Count = 0 task.delay(Interval, function() ...
209
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/RoQuest/Vendor/Red/Util/Signal.luau
luau
.luau
local Promise = require(script.Parent.Promise) local Spawn = require(script.Parent.Spawn) type SignalNode<T...> = { Next: SignalNode<T...>?, Callback: (T...) -> (), } export type Signal<T...> = { Root: SignalNode<T...>?, Connect: (self: Signal<T...>, Callback: (T...) -> ()) -> () -> (), Wait: (self: Signal<T......
403
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/RoQuest/Vendor/Red/Util/Spawn.luau
luau
.luau
local FreeThread: thread? = nil local function FunctionPasser(fn, ...) local AquiredThread = FreeThread FreeThread = nil fn(...) FreeThread = AquiredThread end local function Yielder() while true do FunctionPasser(coroutine.yield()) end end return function<T...>(fn: (T...) -> (), ...: T...) if not FreeThrea...
124
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/RoQuest/Vendor/Red/init.luau
luau
.luau
local Net = require(script.Net) return { Server = Net.Server, Client = Net.Client, Collection = require(script.Util.Collection), Ratelimit = require(script.Util.Ratelimit), Promise = require(script.Util.Promise), Signal = require(script.Util.Signal), Clock = require(script.Util.Clock), Spawn = require(script....
80
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/RoQuest/Vendor/Trove.luau
luau
.luau
--!strict local RunService = game:GetService("RunService") export type Trove = { Extend: (self: Trove) -> Trove, Clone: <T>(self: Trove, instance: T & Instance) -> T, Construct: <T, A...>(self: Trove, class: Constructable<T, A...>, A...) -> T, Connect: (self: Trove, signal: SignalLike | RBXScriptSignal, fn: (...a...
3,857
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/RoQuest/init.luau
luau
.luau
local RunService = game:GetService("RunService") local Client = require(script.Client) local Server = require(script.Server) if RunService:IsClient() then -- No Server object on the client script.Server:Destroy() Server = nil else Client = nil end return setmetatable({ Client = Client, Server = S...
175
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/src/ReplicatedStorage/LifeCycles/Client/AppleQuest.luau
luau
.luau
local ReplicatedStorage = game:GetService("ReplicatedStorage") local RoQuest = require(ReplicatedStorage.RoQuest).Client type QuestLifeCycle = RoQuest.QuestLifeCycle local QuestLifeCycle = RoQuest.QuestLifeCycle local AppleQuest = QuestLifeCycle { Name = "AppleQuest", } function AppleQuest:OnStart() -- prin...
154
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/src/ReplicatedStorage/LifeCycles/Server/AppleQuest.luau
luau
.luau
local ReplicatedStorage = game:GetService("ReplicatedStorage") local RoQuest = require(ReplicatedStorage.RoQuest).Server type QuestLifeCycle = RoQuest.QuestLifeCycle local QuestLifeCycle = RoQuest.QuestLifeCycle local AppleQuest = QuestLifeCycle { Name = "AppleQuest", } function AppleQuest:OnStart() --prin...
154
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/src/ReplicatedStorage/LifeCycles/Server/CornQuest.luau
luau
.luau
local ReplicatedStorage = game:GetService("ReplicatedStorage") local RoQuest = require(ReplicatedStorage.RoQuest).Server type QuestLifeCycle = RoQuest.QuestLifeCycle local QuestLifeCycle = RoQuest.QuestLifeCycle local CornQuest: QuestLifeCycle = QuestLifeCycle { Name = "CornQuest", } return CornQuest
75
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/src/ReplicatedStorage/ObjectiveInfos/Apple.luau
luau
.luau
local ReplicatedStorage = game:GetService("ReplicatedStorage") local RoQuest = require(ReplicatedStorage.RoQuest).Server local ObjectiveInfo = RoQuest.ObjectiveInfo return ObjectiveInfo.new { Description = "%s/%s apples collected", Name = "Collect Apples", ObjectiveId = "Apple", }
69
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/src/ReplicatedStorage/ObjectiveInfos/Corn.luau
luau
.luau
local ReplicatedStorage = game:GetService("ReplicatedStorage") local RoQuest = require(ReplicatedStorage.RoQuest).Server local ObjectiveInfo = RoQuest.ObjectiveInfo return ObjectiveInfo.new { Description = "%s/%s corn collected", Name = "Collect Corn", ObjectiveId = "Corn", }
68
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/src/ReplicatedStorage/ObjectiveInfos/Flower.luau
luau
.luau
local ReplicatedStorage = game:GetService("ReplicatedStorage") local RoQuest = require(ReplicatedStorage.RoQuest).Server local ObjectiveInfo = RoQuest.ObjectiveInfo return ObjectiveInfo.new { Description = "%s/%s flowers collected", Name = "Collect Flowers", ObjectiveId = "Flower", }
69
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/src/ReplicatedStorage/ObjectiveInfos/Marble.luau
luau
.luau
local ReplicatedStorage = game:GetService("ReplicatedStorage") local RoQuest = require(ReplicatedStorage.RoQuest).Server local ObjectiveInfo = RoQuest.ObjectiveInfo return ObjectiveInfo.new { Description = "%s/%s marbles collected", Name = "Collect Marbles", ObjectiveId = "Marble", }
71
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/src/ReplicatedStorage/ObjectiveInfos/Zombie.luau
luau
.luau
local ReplicatedStorage = game:GetService("ReplicatedStorage") local RoQuest = require(ReplicatedStorage.RoQuest).Server local ObjectiveInfo = RoQuest.ObjectiveInfo return ObjectiveInfo.new { Description = "%s/%s zombies killed", Name = "Kill Zombies", ObjectiveId = "KillZombie", }
70
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/src/ReplicatedStorage/Quests/Apple.luau
luau
.luau
local ReplicatedStorage = game:GetService("ReplicatedStorage") local RoQuest = require(ReplicatedStorage.RoQuest).Server local appleObjective = require(ReplicatedStorage.ObjectiveInfos.Apple) local Quest = RoQuest.Quest return Quest { Name = "Collect Apples", -- The name of our quest Description = "Collect 2...
308
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/src/ReplicatedStorage/Quests/Apple2.luau
luau
.luau
local ReplicatedStorage = game:GetService("ReplicatedStorage") local RoQuest = require(ReplicatedStorage.RoQuest).Server local appleObjective = require(ReplicatedStorage.ObjectiveInfos.Apple) local Quest = RoQuest.Quest return Quest { Name = "Collect Apples", -- The name of our quest Description = "Collect 3...
312
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/src/ReplicatedStorage/Quests/CornCurse.luau
luau
.luau
local ReplicatedStorage = game:GetService("ReplicatedStorage") local RoQuest = require(ReplicatedStorage.RoQuest).Server local cornObjective = require(ReplicatedStorage.ObjectiveInfos.Corn) local Quest = RoQuest.Quest return Quest { Name = "Corn Curse!", -- The name of our quest Description = "Collect 3 corn...
306
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/src/ReplicatedStorage/Quests/Event.luau
luau
.luau
local ReplicatedStorage = game:GetService("ReplicatedStorage") local RoQuest = require(ReplicatedStorage.RoQuest).Server local flowerObjective = require(ReplicatedStorage.ObjectiveInfos.Flower) local Quest = RoQuest.Quest return Quest { Name = "Collect Flowers", -- The name of our quest Disabled = true, ...
322
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/src/ReplicatedStorage/Quests/Flower.luau
luau
.luau
local ReplicatedStorage = game:GetService("ReplicatedStorage") local RoQuest = require(ReplicatedStorage.RoQuest).Server local flowerObjective = require(ReplicatedStorage.ObjectiveInfos.Flower) local Quest = RoQuest.Quest return Quest { Name = "Collect Flowers", -- The name of our quest Description = "Collec...
307
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/src/ReplicatedStorage/Quests/InfiniteCorn.luau
luau
.luau
local ReplicatedStorage = game:GetService("ReplicatedStorage") local RoQuest = require(ReplicatedStorage.RoQuest).Server local cornObjective = require(ReplicatedStorage.ObjectiveInfos.Corn) local Quest = RoQuest.Quest return Quest { Name = "Corn Trouble!", -- The name of our quest Description = "Collect 1 co...
302
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/src/ReplicatedStorage/Quests/Marble.luau
luau
.luau
local ReplicatedStorage = game:GetService("ReplicatedStorage") local RoQuest = require(ReplicatedStorage.RoQuest).Server local marbleObjective = require(ReplicatedStorage.ObjectiveInfos.Marble) local Quest = RoQuest.Quest return Quest { Name = "Collect Shiny Marble", -- The name of our quest Description = "C...
304
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/src/ReplicatedStorage/Quests/Zombie.luau
luau
.luau
local ReplicatedStorage = game:GetService("ReplicatedStorage") local RoQuest = require(ReplicatedStorage.RoQuest).Server local zombieObjective = require(ReplicatedStorage.ObjectiveInfos.Zombie) local Quest = RoQuest.Quest return Quest { Name = "An undead problem!", -- The name of our quest Description = "Kil...
309
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/src/ServerScriptService/QuestManager.server.luau
luau
.luau
local ReplicatedStorage = game:GetService("ReplicatedStorage") local RoQuest = require(ReplicatedStorage.RoQuest).Server local Red = require(ReplicatedStorage.RoQuest.Vendor.Red).Server RoQuest.OnStart():andThen(function() local Net = Red "QuestManager" Net:On("AcceptQuest", function(player: Player, questId:...
163
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/src/ServerScriptService/main.server.luau
luau
.luau
local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local DataStoreService = game:GetService("DataStoreService") local RoQuest = require(ReplicatedStorage.RoQuest).Server local questsStore = DataStoreService:GetDataStore("PlayerQuests") local PlayerQuestData = RoQ...
454
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/src/StarterPlayerScripts/Components/QuestGiver.client.luau
luau
.luau
local ReplicatedStorage = game:GetService("ReplicatedStorage") local CollectionService = game:GetService("CollectionService") local RoQuest = require(ReplicatedStorage.RoQuest).Client local Hud = require(script.Parent.Parent.Interface.Hud) local Prompt = require(script.Parent.Parent.Interface.Prompt) local QuestStatus...
597
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/src/StarterPlayerScripts/Interface/Hud.luau
luau
.luau
--!strict local Players = game:GetService("Players") local localPlayer: Player = Players.LocalPlayer local playerGui: PlayerGui = localPlayer:WaitForChild("PlayerGui") local questLog: ScreenGui = playerGui:WaitForChild("QuestLog") local prompts: ScreenGui = playerGui:WaitForChild("Prompts") local hud: ScreenGui = play...
293
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/src/StarterPlayerScripts/Interface/Popup.luau
luau
.luau
local ReplicatedStorage = game:GetService("ReplicatedStorage") local SoundService = game:GetService("SoundService") local Players = game:GetService("Players") local TweenService = game:GetService("TweenService") local RoQuest = require(ReplicatedStorage.RoQuest).Client type Quest = RoQuest.Quest local localPlayer: P...
476
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/src/StarterPlayerScripts/Interface/Prompt.luau
luau
.luau
--!strict local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local RoQuest = require(ReplicatedStorage.RoQuest).Client local Red = require(ReplicatedStorage.RoQuest.Vendor.Red).Client local Hud = require(script.Parent.Hud) type Quest = RoQuest.Quest type QuestObj...
541
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/src/StarterPlayerScripts/Interface/QuestLog.luau
luau
.luau
local ReplicatedStorage = game:GetService("ReplicatedStorage") local Players = game:GetService("Players") local RoQuest = require(ReplicatedStorage.RoQuest).Client local Red = require(ReplicatedStorage.RoQuest.Vendor.Red).Client type Quest = RoQuest.Quest local DEFAULT_COLOR: Color3 = Color3.fromRGB(140, 140, 140) l...
1,173
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/src/StarterPlayerScripts/Interface/Quests.luau
luau
.luau
local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local RoQuest = require(ReplicatedStorage.RoQuest).Client type Quest = RoQuest.Quest type QuestObjective = RoQuest.QuestObjective local QuestStatus = RoQuest.QuestStatus local localPlayer: Player = Players.Loca...
798
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/src/StarterPlayerScripts/Interface/init.client.luau
luau
.luau
local ReplicatedStorage = game:GetService("ReplicatedStorage") local RoQuest = require(ReplicatedStorage.RoQuest).Client RoQuest.OnStart():andThen(function() for _, moduleScript: ModuleScript in script:GetChildren() do require(moduleScript):Init() end end)
64
prooheckcp/RoQuest
prooheckcp-RoQuest-ab9fff8/src/StarterPlayerScripts/main.client.luau
luau
.luau
local ReplicatedStorage = game:GetService("ReplicatedStorage") local RoQuest = require(ReplicatedStorage.RoQuest).Client RoQuest:Init(RoQuest:LoadDirectory(ReplicatedStorage.LifeCycles.Client))
48
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/scripts/cloud_entry.luau
luau
.luau
-- darklua bundles this whole require graph into the one script string the -- create-task api accepts, which is why the specs reach the engine without a -- place upload local run = require("@tests/roblox/run") local passed, failed, report = run() print(report) -- a failing suite has to fail the TASK, not just print....
123
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/effects/camera_shake.luau
luau
.luau
local RunService = game:GetService("RunService") local attr = require("@mod/attributes") local tween = require("@mod/tween") local types = require("@root/types") local utility = require("@mod/utility") local Shake = require("@pkg/Shake") local activeShakes = {} local totalShakeCF = CFrame.identity local function up...
1,261
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/effects/mesh.luau
luau
.luau
--!nolint LocalShadow local RunService = game:GetService("RunService") local attr = require("@mod/attributes") local tween = require("@mod/tween") local types = require("@root/types") local utility = require("@mod/utility") local flipbook_common = require("@mod/common/flipbook") local Oklab = require("@mod/color/Okla...
3,421
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/effects/particle.luau
luau
.luau
local attr = require("@mod/attributes") local tween = require("@mod/tween") local types = require("@root/types") local utility = require("@mod/utility") local particle = {} function particle.emit(ref: ParticleEmitter, obj: ParticleEmitter, scope: types.scope) if ref.Enabled then ref.Enabled = false end loc...
456
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/effects/randomizer.luau
luau
.luau
local attr = require("@mod/attributes") local lerp = require("@mod/lerp") local tween = require("@mod/tween") local types = require("@root/types") local utility = require("@mod/utility") local Bezier = require("@obj/Bezier") local rng = Random.new() local randomizer = {} local function getBezier(params: string): B...
580
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/effects/screen.luau
luau
.luau
local RunService = game:GetService("RunService") local attr = require("@mod/attributes") local types = require("@root/types") local utility = require("@mod/utility") local screen = {} function screen.emit(ref: BasePart, scope: types.scope) if not ref:GetAttribute("Enabled") then return end local scale = a...
468
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/effects/sound.luau
luau
.luau
local RunService = game:GetService("RunService") local CollectionService = game:GetService("CollectionService") local attr = require("@mod/attributes") local tween = require("@mod/tween") local types = require("@root/types") local utility = require("@mod/utility") local Promise = require("@pkg/Promise") local rng = ...
1,913
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/effects/spin.luau
luau
.luau
local attr = require("@mod/attributes") local tween = require("@mod/tween") local types = require("@root/types") local utility = require("@mod/utility") local spin = {} function spin.emit(ref: Model, scope: types.scope) if utility.isSpinModelStatic(ref) then return end local rotation = attr.get(ref, "SpinR...
672
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/effects/tweener.luau
luau
.luau
local attr = require("@mod/attributes") local lerp = require("@mod/lerp") local tween = require("@mod/tween") local types = require("@root/types") local utility = require("@mod/utility") local rng = Random.new() local tweener = {} function tweener.emit(obj: RayValue, scope: types.scope, isAttribute: boolean) local...
729
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/emitters.luau
luau
.luau
local Beam = require("@vfx/beam") local Spin = require("@vfx/spin") local Mesh = require("@vfx/mesh") local Sound = require("@vfx/sound") local Bezier = require("@vfx/bezier") local Screen = require("@vfx/screen") local Particle = require("@vfx/particle") local Lightning = require("@vfx/lightning") local CameraShake = ...
2,925
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/mod/attributes.luau
luau
.luau
local RunService = game:GetService("RunService") local logger = require("./logger") local IS_SERVER = RunService:IsServer() local ATTR_CACHE_ID = "U" type AttrCache = { [number]: { [string]: any, }, } type AttrHooks = { [Instance]: { [string]: { (v: any) -> never }, }, } type RuntimeState = { [In...
1,214
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/mod/common/flipbook.luau
luau
.luau
local RunService = game:GetService("RunService") local CollectionService = game:GetService("CollectionService") local common = {} function common.serialize(ids: { number }) local buf = buffer.create(#ids * 8) for i, id in ids do buffer.writef64(buf, (i - 1) * 8, id) end return buf end function common.d...
545
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/mod/common/path.luau
luau
.luau
-- Pure Path2D control-point (de)serialization + curve sampling. No engine -- access (no `game`/`script`) so this is requirable under lune as well as in -- Studio -- unlike `@mod/utility`, which does top-level `game:GetService`. -- -- `serializePath`/`deserializePath` are moved verbatim from `mod/utility.luau` -- (whic...
1,057
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/mod/logger.luau
luau
.luau
local function msg(...: string) return `[Forge Emit API]: {table.concat({ ... }, " ")}` end local logger = {} function logger.error(...) error(msg(..., "\n")) end function logger.warn(...) warn(msg(...)) warn(msg(debug.traceback("stack trace:"))) end function logger.info(...) print(msg(...)) end return l...
80
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/mod/modifier_codec.luau
luau
.luau
local value = require("./value") local codec = {} local VERSION = 1 -- fields the schema names explicitly; anything else on a modifier goes to -- `extra`, so a field written by a newer plugin survives a round trip here local KNOWN = { kind = true, chain = true, duration = true, start = true, finish = true,...
1,384
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/mod/modifier_frame.luau
luau
.luau
local modifier_frame = {} -- frames an encoded modifier queue as "v1:" .. base64(body), matching -- model_serializer's convention that attributes hold strings, not buffers modifier_frame.PREFIX = "v1:" -- the flag is not a version: both forms are current and the writer picks per -- payload, because zstd roughly halve...
1,104
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/mod/modifiers.luau
luau
.luau
-- Runtime evaluator for a per-target modifier queue. A modifier is -- lerp(start, finish, alpha); tween alpha = curve(progress), randomizer -- alpha = weighted random via `rng`. `chain` feeds the previous modifier's -- output into the next modifier's start. Unknown kinds pass their `start` -- value through unchanged (...
610
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/mod/recolor.luau
luau
.luau
local colorProps = { Single = { Color3 = { "Decal", "Texture", }, Color = { "Part", "Union", "MeshPart", "SpotLight", "PointLight", "SurfaceLight", "SurfaceAppearance", }, }, Sequence = { Color = { "Beam", "Trail", "Pa...
854
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/mod/resize.luau
luau
.luau
local utility = require("@mod/utility") local resize = {} function resize.apply(obj: Instance, factor: number) if obj:IsA("ParticleEmitter") then obj.Size = utility.scaleNumberSequence(obj.Size, factor) obj.Speed = NumberRange.new(obj.Speed.Min * factor, obj.Speed.Max * factor) obj.Acceleration *= facto...
814
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/mod/shape.luau
luau
.luau
--!native --!optimize 2 local utility = require("@mod/utility") local shape = {} function shape.getSurfaceCFrame(cf: CFrame, n: Vector3, pos: Vector3) local up = math.abs(n:Dot(Vector3.yAxis)) > 0.99 and Vector3.zAxis or Vector3.yAxis local rot = CFrame.lookAt(Vector3.zero, n, up) return cf * CFrame.new(pos) * ...
1,586
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/mod/tween.luau
luau
.luau
local RunService = game:GetService("RunService") local logger = require("@mod/logger") local utility = require("@mod/utility") local Bezier = require("@obj/Bezier") local tween = {} tween.bezier_cache = {} :: { [string]: Bezier.Bezier } function tween.fromParams( params: string, duration: number, animator: (...
887
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/mod/utility.luau
luau
.luau
--!native --!nolint LocalShadow local RunService = game:GetService("RunService") local PhysicsService = game:GetService("PhysicsService") local attr = require("@mod/attributes") local logger = require("@mod/logger") local Promise = require("@pkg/Promise") local path = require("@mod/common/path") local utility = {} ...
4,856
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/mod/value.luau
luau
.luau
-- a modifier value is a tagged union so a future dynamic variable slots in -- with no format change; only lit is produced in spec 1, var round-trips -- already export type Value = { t: "lit", v: any } | { t: "var", ref: string } local value = {} function value.lit(v: any): Value return { t = "lit", v = v } end fu...
172
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/obj/Bezier.luau
luau
.luau
--!native --!nocheck --!optimize 2 type n = vector | number local EASE_LUT_SIZE = 64 local NEWTON_MIN_TOL = 0.001 local NEWTON_MAX_ITER = 5 local function cubicBezier(p0: n, p1: n, p2: n, p3: n, t: n): n -- stylua: ignore return (1-t)^3*p0+3*(1-t)^2*t*p1+3*(1-t)*t^2*p2+t^3*p3 end local function cubicBezierDeriv...
1,803
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/obj/ObjectCache.luau
luau
.luau
local utility = require("@mod/utility") local RECYCLE_INTERVAL = 15 local cache = {} cache.__index = cache type item = { key: any, value: Instance, added: number, dependents: number, } type params = { size: number?, excess_lifetime: number?, on_free: ((item) -> ())?, } export type ObjectCache = type...
1,379
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/schema.luau
luau
.luau
-- Open, versioned schema standard for property/attribute rows. Data-only so it -- round-trips across the plugin<->runtime boundary and can be authored by custom -- effects. Unknown fields are preserved (validation never mutates the descriptor). -- An entry is a row (has `name`) or a group (has `title` + ordered `entri...
1,573
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/services/caches.luau
luau
.luau
local ObjectCache = require("@obj/ObjectCache") local utility = require("@mod/utility") local caches = {} function caches.init(scope: { any }) local shared_part_cache do local template = Instance.new("Part") template.Transparency = 1 template.Anchored = true template.CanCollide = false templ...
325
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/services/effects.luau
luau
.luau
local types = require("@root/types") local logger = require("@mod/logger") local utility = require("@mod/utility") local emitters = require("@root/emitters") local Promise = require("@pkg/Promise") local EffectSelectors = table.concat({ "Beam", "Trail", "Sound", "ParticleEmitter", -- Beziers `.{utility.B...
1,553
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/services/enabled_effects.luau
luau
.luau
local RunService = game:GetService("RunService") local CollectionService = game:GetService("CollectionService") local attr = require("@mod/attributes") local types = require("@root/types") local utility = require("@mod/utility") local emitters = require("@root/emitters") local enabled_effects = {} function enabled_e...
902
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/services/texture_loader.luau
luau
.luau
local CollectionService = game:GetService("CollectionService") local ObjectCache = require("@obj/ObjectCache") local types = require("@root/types") local utility = require("@mod/utility") local flipbook_common = require("@mod/common/flipbook") local texture_loader = {} function texture_loader.init(scope: types.scop...
990
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/src/types.luau
luau
.luau
local Promise = require("@pkg/Promise") local ObjectCache = require("@obj/ObjectCache") export type scope = { any } & { depth: number, effects: EffectsService, _context: { _promises: { any } }?, _onCancel: { () -> () }?, } export type EmitEnv = { Finished: typeof(Promise.resolve()), Clear: (self: EmitEnv)...
351
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/tests/harness.luau
luau
.luau
local roblox = require("@lune/roblox") :: any -- assigned bare rather than into a table, because lune propagates bare globals -- into plainly required chunks. that is what lets modules under test and the -- vendored Z see Color3 with no environment plumbing -- this project's roblox.yml std (the stock generated Roblox ...
1,345
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/tests/roblox/run.luau
luau
.luau
local specs = { require("./modifier_frame.spec"), require("./modifier_codec.spec"), } return function() local passed = 0 local failed = 0 local lines = {} for _, spec in specs do for _, case in spec do local ok, err = pcall(case.run) if ok then passed += 1 table.insert(lin...
166
zilibobi/forge-vfx
zilibobi-forge-vfx-f3faf4f/tests/run.luau
luau
.luau
local process = require("@lune/process") local harness = require("@tests/harness") require("@tests/schema.spec") require("@tests/schema_curves.spec") require("@tests/modifiers_eval.spec") require("@tests/value.spec") require("@tests/modifier_codec.spec") require("@tests/modifier_frame.spec") process.exit(harness.run(...
68
ratplier/jello
ratplier-jello-d8c36ea/src/config.luau
luau
.luau
local color4 = require("./utils/color4") return { colors = { Border = color4.create(160, 160, 175, 0.7), BorderDark = color4.create(110, 110, 125, 0.5), Text = color4.create(255, 255, 255, 1), TextDisabled = color4.create(128, 128, 128, 1), ResizeGrip = color4.create(66, 150, 250, 0.2), ResizeGripHovere...
1,015
ratplier/jello
ratplier-jello-d8c36ea/src/defaults.luau
luau
.luau
return { shouldDefault = true, default = function(self: any, instance: Instance, applier: (Instance, any, any) -> ()) if self.shouldDefault then local default = self[instance.ClassName] :: any if not default then return end for key, value in default do (instance::any)[key] = value end end en...
823
ratplier/jello
ratplier-jello-d8c36ea/src/gizmos/box.luau
luau
.luau
local root = require("../utils/rootkit") local gizmo = require("../utils/gizmo") type vec3 = gizmo.vec3 type arguments = { transform: CFrame, size: vec3, } local edges = { {1, 2}, {2, 3}, {3, 4}, {4, 1}, {5, 6}, {6, 7}, {7, 8}, {8, 5}, {1, 5}, {2, 6}, {3, 7}, {4, 8} } return gizmo.create("box", function(argum...
409
ratplier/jello
ratplier-jello-d8c36ea/src/gizmos/circle.luau
luau
.luau
local config = require("../config") local root = require("../utils/rootkit") local gizmo = require("../utils/gizmo") type arguments = { radius: number, transform: CFrame, subdivisions: number?, angle: number?, close_shape: boolean?, } return gizmo.create("circle", function(arguments: arguments) local args = r...
262
ratplier/jello
ratplier-jello-d8c36ea/src/gizmos/cone.luau
luau
.luau
local config = require("../config") local root = require("../utils/rootkit") local gizmo = require("../utils/gizmo") local circle = require("./circle") type arguments = { transform: CFrame, radius: number, height: number, subdivisions: number?, } return gizmo.create("cone", function(arguments: arguments) local ...
255
ratplier/jello
ratplier-jello-d8c36ea/src/gizmos/cylinder.luau
luau
.luau
local config = require("../config") local root = require("../utils/rootkit") local gizmo = require("../utils/gizmo") local circle = require("./circle") type vec3 = gizmo.vec3 type arguments = { transform: CFrame, radius: number, height: number, subdivisions: number?, } return gizmo.create("cylinder", function(ar...
345
ratplier/jello
ratplier-jello-d8c36ea/src/gizmos/line.luau
luau
.luau
local root = require("../utils/rootkit") local gizmo = require("../utils/gizmo") type vec3 = gizmo.vec3 type arguments = { origin: vec3, target: vec3, } return gizmo.create("line", function(arguments: arguments) local args = root.default(arguments, {}) :: arguments gizmo.draw_line( args.origin :: Vector3, arg...
95
ratplier/jello
ratplier-jello-d8c36ea/src/gizmos/polyline.luau
luau
.luau
local root = require("../utils/rootkit") local gizmo = require("../utils/gizmo") type vec3 = gizmo.vec3 type arguments = { points: { vec3 }, close: boolean?, } return gizmo.create("polyline", function(arguments: arguments) local args = root.default(arguments, {}) :: arguments gizmo.draw_path( args.points :: { V...
93
ratplier/jello
ratplier-jello-d8c36ea/src/gizmos/sphere.luau
luau
.luau
local config = require("../config") local root = require("../utils/rootkit") local gizmo = require("../utils/gizmo") local circle = require("./circle") type arguments = { radius: number, transform: CFrame, subdivisions: number?, } return gizmo.create("sphere", function(arguments: arguments) local args = root.def...
219
ratplier/jello
ratplier-jello-d8c36ea/src/init.luau
luau
.luau
local RunService = game:GetService("RunService") local Players = game:GetService("Players") local UserInputService = game:GetService("UserInputService") local internal = require(script.internal) export type props = internal.props export type source<T> = internal.source<T> local function get_target() local player = ...
1,409
ratplier/jello
ratplier-jello-d8c36ea/src/internal.luau
luau
.luau
type id = string type object<P=props> = { class_name: string, properties: P, } type listeners = { [string]: { (Instance, ...any) -> ()}} type actions = { [(Instance) -> ()]: true } export type props = { [any]: any } & { any } export type source<T> = (T) -> () & () -> (T) local defaults = require("./defaults") loc...
3,001
ratplier/jello
ratplier-jello-d8c36ea/src/utils/color4.luau
luau
.luau
local color4 = {} export type color4 = buffer function color4.create(r: number?, g: number?, b: number?, a: number?): color4 r, g, b, a = r or 0, g or 0, b or 0, a or 1 local color = buffer.create(4) buffer.writeu8(color, 0, r) buffer.writeu8(color, 1, g) buffer.writeu8(color, 2, b) buffer.writeu8(color, 3, ma...
279
ratplier/jello
ratplier-jello-d8c36ea/src/utils/gizmo.luau
luau
.luau
local root = require("./rootkit") local adornments = { adornment = nil :: WireframeHandleAdornment?, aot_adornment = nil :: WireframeHandleAdornment?, } local last_update = -1 local state_stack = {} local default_state = { color = Color3.new(0.937255, 0.0392157, 1), transparency = 0, always_on_top = false, tar...
836