jecs/demo/src/ReplicatedStorage/start.luau

35 lines
992 B
Text
Raw Normal View History

local ReplicatedStorage = game:GetService("ReplicatedStorage")
2024-08-29 16:56:50 +00:00
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local jabby = require(ReplicatedStorage.Packages.jabby)
local std = ReplicatedStorage.std
local scheduler = require(std.scheduler)
local world = require(std.world)
2024-08-29 16:56:50 +00:00
local function start(modules)
for _, module in modules do
require(module)
end
local events = scheduler.COLLECT()
scheduler.BEGIN(events)
jabby.set_check_function(function(player)
return true
end)
if RunService:IsClient() then
2024-11-21 03:12:36 +00:00
local player = game:GetService("Players").LocalPlayer
local playergui = player:WaitForChild("PlayerGui")
local client = jabby.obtain_client()
UserInputService.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.F4 then
2024-11-21 03:12:36 +00:00
local home = playergui:FindFirstChild("Home")
if home then
home:Destroy()
end
2024-11-21 03:12:36 +00:00
client.spawn_app(client.apps.home)
end
end)
2024-08-29 16:56:50 +00:00
end
end
return start