Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Players = game:GetService("Players")
- local UserInputService = game:GetService("UserInputService")
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local StarterGui = game:GetService("StarterGui")
- local LoadingScreen = require(script:WaitForChild("LoadingScreen"))
- local player = game:GetService("Players").LocalPlayer
- local mouse = player:GetMouse()
- local playerGui = player:WaitForChild("PlayerGui")
- local inv = require(script.InventoryController)
- local done = false
- local screen = LoadingScreen.new(playerGui)
- local Interact = require(script.InteractController)
- StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false)
- StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, true)
- local Services = {}
- local coreUI = Instance.new("ScreenGui")
- coreUI.Name = "CoreUI"
- coreUI.Parent = player:WaitForChild("PlayerGui")
- screen.ServerFinished:Connect(function()
- if done then
- return
- end
- done = true
- for _, service in pairs(script:GetChildren()) do
- if service:IsA("ModuleScript") then
- Services[service.Name] = require(service)
- end
- end
- local suc
- repeat
- suc = pcall(function()
- StarterGui:SetCore("ResetButtonCallback", false)
- end)
- wait()
- until suc
- Services.KeyBinder.Init(playerGui)
- Services.PlayerList.Init(playerGui)
- Services.NotificationHandler.Init(playerGui)
- Services.Minimap.Init()
- Services.BankController.Init()
- Services.Components.Init(playerGui)
- Services.InventoryController.Init(playerGui)
- Services.ZoneController.Init()
- Services.ElectionController.Init(playerGui)
- screen:SendResponse()
- end)
- local humanoid
- local function SetupDefaults(humanoid)
- UserInputService.MouseDeltaSensitivity = 1
- mouse.Icon = ""
- end
- local loaded = false
- local function GetHumanoid(char)
- if char then
- Services.DynamicArms.Deactivate()
- Services.InteractController.Init()
- Services.Verificator.Init()
- humanoid = char:WaitForChild("Humanoid")
- Services.MovementController.OnDeath()
- Services.MovementController.InitHumanoid(humanoid)
- SetupDefaults(humanoid)
- Services.JusticeController.InitHumanoid(humanoid)
- Services.KeyBinder.InitHumanoid(humanoid)
- Services.InventoryController.InitHumanoid(humanoid)
- Services.VehicleController.InitHumanoid(humanoid, playerGui)
- Services.Minimap.InitHumanoid(humanoid)
- Services.BankController.InitHumanoid(humanoid)
- Services.ClientFunctions.InitHumanoid(humanoid)
- Services.RadioController.Init(playerGui, humanoid)
- Services.JusticeController.CheckJail(humanoid, playerGui)
- Services.ToolHandler.Init(humanoid)
- Services.DynamicArms.Init(humanoid)
- if not loaded then
- loaded = true
- do
- local cmdr = require(ReplicatedStorage:WaitForChild("Resources").Libraries:WaitForChild("CmdrClient"))
- local roles = Services.Verificator.GetPlayerRoles()
- cmdr:SetEnabled(roles.Moderator or roles.Admin or false)
- cmdr:SetActivationKeys({
- Enum.KeyCode.Semicolon
- })
- screen:End()
- local hotkeyEnabled = false
- local currentState = true
- local hideNames = false
- local lastHit = tick()
- local Assets = require(ReplicatedStorage.Databases.Assets)
- local chars = {}
- local function PlayerAdded(argPlayer)
- local function CharAdded(argChar)
- local hum = argChar:WaitForChild("Humanoid")
- hum.DisplayDistanceType = not (not currentState and hideNames) and Enum.HumanoidDisplayDistanceType.Viewer or Enum.HumanoidDisplayDistanceType.None
- chars[argPlayer] = hum
- end
- argPlayer.CharacterAdded:Connect(CharAdded)
- if argPlayer.Character then
- CharAdded(argPlayer.Character)
- end
- end
- Players.PlayerAdded:Connect(PlayerAdded)
- Players.PlayerRemoving:Connect(function(plr)
- chars[plr] = nil
- end)
- for _, v in pairs(Players:GetPlayers()) do
- PlayerAdded(v)
- end
- local guis = {}
- local function ChildAdded(child)
- if child:IsA("LayerCollector") then
- guis[child] = true
- child.Enabled = currentState
- end
- end
- playerGui.ChildAdded:Connect(ChildAdded)
- playerGui.ChildRemoved:Connect(function(child)
- guis[child] = nil
- end)
- for _, v in pairs(playerGui:GetChildren()) do
- ChildAdded(v)
- end
- UserInputService.InputBegan:Connect(function(inputObject, processed)
- if processed or not hotkeyEnabled then
- return
- end
- if inputObject.KeyCode == Enum.KeyCode.Backquote then
- local thisHit = tick()
- if thisHit - lastHit <= 0.5 then
- currentState = not currentState
- local ctrlDown = UserInputService:IsKeyDown(Enum.KeyCode.LeftControl) or UserInputService:IsKeyDown(Enum.KeyCode.RightControl)
- local shiftDown = UserInputService:IsKeyDown(Enum.KeyCode.LeftShift) or UserInputService:IsKeyDown(Enum.KeyCode.RightShift)
- for gui, _ in pairs(guis) do
- gui.Enabled = currentState
- end
- if player.Character then
- for _, v in pairs(player.Character:GetDescendants()) do
- if v:IsA("BasePart") or v:IsA("Decal") then
- v.LocalTransparencyModifier = not (not currentState and ctrlDown) and 0 or 1
- end
- end
- end
- mouse.Icon = currentState and "" or Assets.Blank
- hideNames = shiftDown
- for _, v in pairs(chars) do
- v.DisplayDistanceType = not (not currentState and hideNames) and Enum.HumanoidDisplayDistanceType.Viewer or Enum.HumanoidDisplayDistanceType.None
- end
- end
- lastHit = tick()
- end
- end)
- local function CheckHideGuis()
- local roles = Services.Verificator.GetPlayerRoles()
- hotkeyEnabled = roles.PBSTeam
- end
- CheckHideGuis()
- Services.Verificator.OnVerifyUpdate:Connect(CheckHideGuis)
- end
- end
- end
- end
- wait(1)
- GetHumanoid(player.Character)
- player.CharacterAdded:Connect(GetHumanoid)
Add Comment
Please, Sign In to add comment