2024-01-05 12:14:38 +00:00
|
|
|
--!strict
|
2026-02-10 18:11:25 +00:00
|
|
|
--@EternityDev
|
|
|
|
|
local Remote = {}
|
2024-01-05 12:14:38 +00:00
|
|
|
|
2026-02-10 18:11:25 +00:00
|
|
|
if game.RunService:IsServer() then
|
|
|
|
|
if not script:FindFirstChild("Event") then
|
|
|
|
|
Instance.new("RemoteEvent", script).Name = "Event"
|
|
|
|
|
end
|
2026-02-11 08:00:23 +00:00
|
|
|
if not script:FindFirstChild("UnreliableEvent") then
|
|
|
|
|
Instance.new("UnreliableRemoteEvent", script).Name = "UnreliableEvent"
|
|
|
|
|
end
|
2026-02-10 18:11:25 +00:00
|
|
|
if not script:FindFirstChild("Function") then
|
|
|
|
|
Instance.new("RemoteFunction", script).Name = "Function"
|
|
|
|
|
end
|
|
|
|
|
end
|
2024-12-01 14:10:56 +00:00
|
|
|
|
2026-02-10 18:11:25 +00:00
|
|
|
local Client = require("@self/Client")
|
|
|
|
|
local Server = require("@self/Server")
|
2026-02-11 04:34:45 +00:00
|
|
|
local Buffer = require("@self/Buffer")
|
2024-03-16 16:49:23 +00:00
|
|
|
|
2026-02-11 04:34:45 +00:00
|
|
|
--[[
|
|
|
|
|
@class Remote
|
|
|
|
|
@client
|
|
|
|
|
]]
|
2026-02-10 18:11:25 +00:00
|
|
|
Remote.Client = function()
|
|
|
|
|
return Client
|
|
|
|
|
end
|
|
|
|
|
|
2026-02-11 04:34:45 +00:00
|
|
|
--[[
|
|
|
|
|
@class Remote
|
|
|
|
|
@server
|
|
|
|
|
]]
|
2026-02-10 18:11:25 +00:00
|
|
|
Remote.Server = function()
|
|
|
|
|
return Server
|
|
|
|
|
end
|
|
|
|
|
|
2026-02-11 04:34:45 +00:00
|
|
|
--[[
|
|
|
|
|
@class Remote
|
|
|
|
|
@schema
|
|
|
|
|
define a schema for your data and use a strict packing
|
|
|
|
|
]]
|
|
|
|
|
Remote.Buffer = Buffer
|
|
|
|
|
|
2026-02-10 18:11:25 +00:00
|
|
|
return Remote :: typeof(Remote)
|