Warp/src/Index/Event.luau

23 lines
847 B
Text
Raw Normal View History

2024-01-05 12:14:38 +00:00
--!strict
local RunService = game:GetService("RunService")
local Type = require(script.Parent.Type)
if RunService:IsServer() then
if not script:FindFirstChild("Event") then
2024-01-09 06:26:47 +00:00
Instance.new("RemoteEvent", script).Name = "Reliable"
2024-01-05 12:14:38 +00:00
end
if not script:FindFirstChild("Event2") then
2024-01-09 06:26:47 +00:00
Instance.new("UnreliableRemoteEvent", script).Name = "Unreliable"
2024-01-05 12:14:38 +00:00
end
if not script:FindFirstChild("Request") then
Instance.new("RemoteEvent", script).Name = "Request"
end
2024-01-09 06:26:47 +00:00
elseif not script:FindFirstChild("Reliable") or not script:FindFirstChild("Unreliable") or not script:FindFirstChild("Request") then
repeat task.wait() until script:FindFirstChild("Reliable") and script:FindFirstChild("Unreliable") and script:FindFirstChild("Request")
2024-01-05 12:14:38 +00:00
end
return {
2024-01-09 06:26:47 +00:00
Reliable = script.Reliable,
Unreliable = script.Unreliable,
2024-01-05 12:14:38 +00:00
Request = script.Request
} :: Type.Event