add custom hotbar

This commit is contained in:
Reid 2023-08-11 17:38:07 -07:00
parent 72029047a5
commit 8232eacff2
12 changed files with 304 additions and 8 deletions

View file

@ -1,25 +1,31 @@
import { CharacterRigR6 } from "@rbxts/character-promise"
import Log, { Logger } from "@rbxts/log"
import { Players } from "@rbxts/services"
import { Players, StarterGui } from "@rbxts/services"
import { start } from "ReplicatedStorage/ecs"
import { clientState } from "ReplicatedStorage/ecs/state"
import { Host } from "ReplicatedStorage/hosts"
import { setEnvironment } from "ReplicatedStorage/idAttribute"
import showGUI from "./showGUI"
const HOST = Host.Client
const clientLogger = Logger.configure()
.WriteTo(Log.RobloxOutput())
.Create()
.WriteTo(Log.RobloxOutput())
.Create()
const ClientState = new clientState(
Players.LocalPlayer,
(Players.LocalPlayer.Character || Players.LocalPlayer.CharacterAdded.Wait()[0]) as CharacterRigR6,
false,
false,
Players.LocalPlayer.WaitForChild("Backpack") as Backpack,
clientLogger
)
setEnvironment(HOST)
start(HOST, ClientState)
// no fuck off
StarterGui.SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
const worldAndClientState = start(HOST, ClientState)
showGUI(worldAndClientState[0], ClientState)
setEnvironment(HOST)