Loading gui work, needs finished

This commit is contained in:
2023-12-28 02:40:00 -05:00
parent e55b8763f3
commit c3069d11f9
9 changed files with 273 additions and 20 deletions

View File

@@ -9,11 +9,20 @@ local Players = game:GetService("Players")
local Storage = game:GetService("ReplicatedStorage")
local ClientStorage = Storage:WaitForChild("Client")
local LoadCompleted = ClientStorage:WaitForChild("LoadingComplete")
local KeyBindsModule = require(ClientStorage:WaitForChild("KeyBinds"))
local Player = Players.LocalPlayer
local PlayerGui = Player:WaitForChild("PlayerGui")
CoreGuis:Off()
--We need to wait for the game to load before spamming functionality
repeat
local GameIsLoaded = LoadCompleted:Invoke()
task.wait()
until GameIsLoaded
local CurrentCamera = nil
repeat
task.wait()
@@ -28,17 +37,16 @@ local Crosshair = CrosshairSettings.constructor(PlayerGui)
local function CameraBinds()
local CameraBindMap = KeyBindsModule.constructor()
CameraBindMap:AddInputBegan(Enum.KeyCode.C, function()
CameraBindMap:AddInputBegan({Enum.KeyCode.C, Enum.KeyCode.Z}, function()
Camera:ZoomIn(Vignette, Crosshair)
end)
CameraBindMap:AddInputEnded(Enum.KeyCode.C, function()
CameraBindMap:AddInputEnded({Enum.KeyCode.C, Enum.KeyCode.Z}, function()
Camera:ZoomOut(Vignette, Crosshair)
end)
end
CoreGuis:off()
Mouse:DisablePointer()
Camera:FirstPerson()
Mouse:DisablePointer()
Crosshair:Enable()
CameraBinds()