From 3c73562c50966285aabdbefe4b867e3fcd8174d3 Mon Sep 17 00:00:00 2001 From: Lewin Kelly Date: Mon, 24 Apr 2023 06:46:17 +0100 Subject: [PATCH] Port RbxGui corescript again --- processed/46295863.lua | 1440 ++++++++++------------------------- yue/46295863.yue | 1616 ++++++++++++++++++++-------------------- 2 files changed, 1211 insertions(+), 1845 deletions(-) diff --git a/processed/46295863.lua b/processed/46295863.lua index a13a343..400ec16 100644 --- a/processed/46295863.lua +++ b/processed/46295863.lua @@ -1,57 +1,48 @@ -local function waitForChild(instance, name) +print("[Mercury]: Loaded corescript 46295863") +local waitForChild +waitForChild = function(instance, name) while not instance:FindFirstChild(name) do instance.ChildAdded:wait() end end - -local function waitForProperty(instance, property) +local waitForProperty +waitForProperty = function(instance, property) while not instance[property] do instance.Changed:wait() end end - --- A Few Script Globals local gui -if script.Parent:FindFirstChild "ControlFrame" then - gui = script.Parent:FindFirstChild "ControlFrame" +if script.Parent:FindFirstChild("ControlFrame") then + gui = script.Parent:FindFirstChild("ControlFrame") else gui = script.Parent end - -local helpButton = nil -local updateCameraDropDownSelection = nil -local updateVideoCaptureDropDownSelection = nil +local helpButton +local updateCameraDropDownSelection +local updateVideoCaptureDropDownSelection local tweenTime = 0.2 - local mouseLockLookScreenUrl = "http://www.roblox.com/asset?id=54071825" local classicLookScreenUrl = "http://www.roblox.com/Asset?id=45915798" - -local hasGraphicsSlider = (game:GetService("CoreGui").Version >= 5) -local GraphicsQualityLevels = 10 -- how many levels we allow on graphics slider +local hasGraphicsSlider = game:GetService("CoreGui").Version >= 5 +local GraphicsQualityLevels = 10 local recordingVideo = false - -local currentMenuSelection = nil -local lastMenuSelection = {} - --- local defaultPosition = UDim2.new(0, 0, 0, 0) --- local newGuiPlaces = { 0, 41324860 } - -local centerDialogs = {} -local mainShield = nil - +local currentMenuSelection +local lastMenuSelection = { } +local centerDialogs = { } +local mainShield local inStudioMode = UserSettings().GameSettings:InStudioMode() - local macClient = false -local success, isMac = pcall(function() +local success, isMac +success, isMac = pcall(function() return not game.GuiService.IsWindows end) macClient = success and isMac - -local function Color3I(r, g, b) +local Color3I +Color3I = function(r, g, b) return Color3.new(r / 255, g / 255, b / 255) end - -local function robloxLock(instance) +local robloxLock +robloxLock = function(instance) instance.RobloxLocked = true local children = instance:GetChildren() if children then @@ -60,16 +51,10 @@ local function robloxLock(instance) end end end - -function resumeGameFunction(shield) - shield.Settings:TweenPosition( - UDim2.new(0.5, -262, -0.5, -200), - Enum.EasingDirection.InOut, - Enum.EasingStyle.Sine, - tweenTime, - true - ) - delay(tweenTime, function() +local resumeGameFunction +resumeGameFunction = function(shield) + shield.Settings:TweenPosition(UDim2.new(0.5, -262, -0.5, -200), Enum.EasingDirection.InOut, Enum.EasingStyle.Sine, tweenTime, true) + return delay(tweenTime, function() shield.Visible = false for i = 1, #centerDialogs do centerDialogs[i].Visible = false @@ -78,87 +63,44 @@ function resumeGameFunction(shield) game.GuiService:RemoveCenterDialog(shield) settingsButton.Active = true currentMenuSelection = nil - lastMenuSelection = {} + lastMenuSelection = { } end) end - -function goToMenu(container, menuName, moveDirection, size, position) +local goToMenu +goToMenu = function(container, menuName, moveDirection, size, position) if type(menuName) ~= "string" then return end - table.insert(lastMenuSelection, currentMenuSelection) if menuName == "GameMainMenu" then - lastMenuSelection = {} + lastMenuSelection = { } end - local containerChildren = container:GetChildren() for i = 1, #containerChildren do if containerChildren[i].Name == menuName then containerChildren[i].Visible = true - currentMenuSelection = - { container = container, name = menuName, direction = moveDirection, lastSize = size } - -- selectedMenu = true + currentMenuSelection = { + container = container, + name = menuName, + direction = moveDirection, + lastSize = size + } if size and position then - containerChildren[i]:TweenSizeAndPosition( - size, - position, - Enum.EasingDirection.InOut, - Enum.EasingStyle.Sine, - tweenTime, - true - ) + containerChildren[i]:TweenSizeAndPosition(size, position, Enum.EasingDirection.InOut, Enum.EasingStyle.Sine, tweenTime, true) elseif size then - containerChildren[i]:TweenSizeAndPosition( - size, - UDim2.new(0.5, -size.X.Offset / 2, 0.5, -size.Y.Offset / 2), - Enum.EasingDirection.InOut, - Enum.EasingStyle.Sine, - tweenTime, - true - ) + containerChildren[i]:TweenSizeAndPosition(size, UDim2.new(0.5, -size.X.Offset / 2, 0.5, -size.Y.Offset / 2), Enum.EasingDirection.InOut, Enum.EasingStyle.Sine, tweenTime, true) else - containerChildren[i]:TweenPosition( - UDim2.new(0, 0, 0, 0), - Enum.EasingDirection.InOut, - Enum.EasingStyle.Sine, - tweenTime, - true - ) + containerChildren[i]:TweenPosition(UDim2.new(0, 0, 0, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Sine, tweenTime, true) end else if moveDirection == "left" then - containerChildren[i]:TweenPosition( - UDim2.new(-1, -525, 0, 0), - Enum.EasingDirection.InOut, - Enum.EasingStyle.Sine, - tweenTime, - true - ) + containerChildren[i]:TweenPosition(UDim2.new(-1, -525, 0, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Sine, tweenTime, true) elseif moveDirection == "right" then - containerChildren[i]:TweenPosition( - UDim2.new(1, 525, 0, 0), - Enum.EasingDirection.InOut, - Enum.EasingStyle.Sine, - tweenTime, - true - ) + containerChildren[i]:TweenPosition(UDim2.new(1, 525, 0, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Sine, tweenTime, true) elseif moveDirection == "up" then - containerChildren[i]:TweenPosition( - UDim2.new(0, 0, -1, -400), - Enum.EasingDirection.InOut, - Enum.EasingStyle.Sine, - tweenTime, - true - ) + containerChildren[i]:TweenPosition(UDim2.new(0, 0, -1, -400), Enum.EasingDirection.InOut, Enum.EasingStyle.Sine, tweenTime, true) elseif moveDirection == "down" then - containerChildren[i]:TweenPosition( - UDim2.new(0, 0, 1, 400), - Enum.EasingDirection.InOut, - Enum.EasingStyle.Sine, - tweenTime, - true - ) + containerChildren[i]:TweenPosition(UDim2.new(0, 0, 1, 400), Enum.EasingDirection.InOut, Enum.EasingStyle.Sine, tweenTime, true) end delay(tweenTime, function() containerChildren[i].Visible = false @@ -166,18 +108,16 @@ function goToMenu(container, menuName, moveDirection, size, position) end end end - -function resetLocalCharacter() +local resetLocalCharacter +resetLocalCharacter = function() local player = game.Players.LocalPlayer - if player then - if player.Character and player.Character:FindFirstChild "Humanoid" then - player.Character.Humanoid.Health = 0 - end + if player and player.Character and player.Character:FindFirstChild("Humanoid") then + player.Character.Humanoid.Health = 0 end end - -local function createTextButton(text, style, fontSize, buttonSize, buttonPosition) - local newTextButton = Instance.new "TextButton" +local createTextButton +createTextButton = function(text, style, fontSize, buttonSize, buttonPosition) + local newTextButton = Instance.new("TextButton") newTextButton.Font = Enum.Font.Arial newTextButton.FontSize = fontSize newTextButton.Size = buttonSize @@ -187,16 +127,15 @@ local function createTextButton(text, style, fontSize, buttonSize, buttonPositio newTextButton.Text = text return newTextButton end - -local function CreateTextButtons(frame, buttons, yPos, ySize) +local CreateTextButtons +CreateTextButtons = function(frame, buttons, yPos, ySize) if #buttons < 1 then - error "Must have more than one button" + error("Must have more than one button") end - local buttonNum = 1 - local buttonObjs = {} - - local function toggleSelection(button) + local buttonObjs = { } + local toggleSelection + toggleSelection = function(button) for _, obj in ipairs(buttonObjs) do if obj == button then obj.Style = Enum.ButtonStyle.RobloxButtonDefault @@ -205,9 +144,8 @@ local function CreateTextButtons(frame, buttons, yPos, ySize) end end end - for _, obj in ipairs(buttons) do - local button = Instance.new "TextButton" + local button = Instance.new("TextButton") button.Name = "Button" .. buttonNum button.Font = Enum.Font.Arial button.FontSize = Enum.FontSize.Size18 @@ -217,42 +155,35 @@ local function CreateTextButtons(frame, buttons, yPos, ySize) button.TextColor3 = Color3.new(1, 1, 1) button.MouseButton1Click:connect(function() toggleSelection(button) - obj.Function() + return obj.Function() end) button.Parent = frame buttonObjs[buttonNum] = button - buttonNum = buttonNum + 1 end - toggleSelection(buttonObjs[1]) - local numButtons = buttonNum - 1 - if numButtons == 1 then frame.Button1.Position = UDim2.new(0.35, 0, yPos.Scale, yPos.Offset) frame.Button1.Size = UDim2.new(0.4, 0, ySize.Scale, ySize.Offset) elseif numButtons == 2 then frame.Button1.Position = UDim2.new(0.1, 0, yPos.Scale, yPos.Offset) frame.Button1.Size = UDim2.new(0.35, 0, ySize.Scale, ySize.Offset) - frame.Button2.Position = UDim2.new(0.55, 0, yPos.Scale, yPos.Offset) frame.Button2.Size = UDim2.new(0.35, 0, ySize.Scale, ySize.Offset) elseif numButtons >= 3 then local spacing = 0.1 / numButtons local buttonSize = 0.9 / numButtons - buttonNum = 1 while buttonNum <= numButtons do - buttonObjs[buttonNum].Position = - UDim2.new(spacing * buttonNum + (buttonNum - 1) * buttonSize, 0, yPos.Scale, yPos.Offset) + buttonObjs[buttonNum].Position = UDim2.new(spacing * buttonNum + (buttonNum - 1) * buttonSize, 0, yPos.Scale, yPos.Offset) buttonObjs[buttonNum].Size = UDim2.new(buttonSize, 0, ySize.Scale, ySize.Offset) buttonNum = buttonNum + 1 end end end - -function setRecordGui(recording, stopRecordButton, recordVideoButton) +local setRecordGui +setRecordGui = function(recording, stopRecordButton, recordVideoButton) if recording then stopRecordButton.Visible = true recordVideoButton.Text = "Stop Recording" @@ -261,51 +192,49 @@ function setRecordGui(recording, stopRecordButton, recordVideoButton) recordVideoButton.Text = "Record Video" end end - -function recordVideoClick(recordVideoButton, stopRecordButton) +local recordVideoClick +recordVideoClick = function(recordVideoButton, stopRecordButton) recordingVideo = not recordingVideo - setRecordGui(recordingVideo, stopRecordButton, recordVideoButton) + return setRecordGui(recordingVideo, stopRecordButton, recordVideoButton) end - -function backToGame(buttonClicked, shield, settingsButton) +local backToGame +backToGame = function(buttonClicked, shield, settingsButton) buttonClicked.Parent.Parent.Parent.Parent.Visible = false shield.Visible = false for i = 1, #centerDialogs do game.GuiService:RemoveCenterDialog(centerDialogs[i]) centerDialogs[i].Visible = false end - centerDialogs = {} + centerDialogs = { } game.GuiService:RemoveCenterDialog(shield) settingsButton.Active = true end - -function setDisabledState(guiObject) +local setDisabledState +setDisabledState = function(guiObject) if not guiObject then return end - - if guiObject:IsA "TextLabel" then + if guiObject:IsA("TextLabel") then guiObject.TextTransparency = 0.9 - elseif guiObject:IsA "TextButton" then + elseif guiObject:IsA("TextButton") then guiObject.TextTransparency = 0.9 guiObject.Active = false else if guiObject["ClassName"] then - print("setDisabledState() got object of unsupported type. object type is ", guiObject.ClassName) + return print("setDisabledState! got object of unsupported type. object type is ", guiObject.ClassName) end end end - -local function createHelpDialog(baseZIndex) +local createHelpDialog +createHelpDialog = function(baseZIndex) if helpButton == nil then - if gui:FindFirstChild "TopLeftControl" and gui.TopLeftControl:FindFirstChild "Help" then + if gui:FindFirstChild("TopLeftControl" and gui.TopLeftControl:FindFirstChild("Help")) then helpButton = gui.TopLeftControl.Help - elseif gui:FindFirstChild "BottomRightControl" and gui.BottomRightControl:FindFirstChild "Help" then + elseif gui:FindFirstChild("BottomRightControl" and gui.BottomRightControl:FindFirstChild("Help")) then helpButton = gui.BottomRightControl.Help end end - - local shield = Instance.new "Frame" + local shield = Instance.new("Frame") shield.Name = "HelpDialogShield" shield.Active = true shield.Visible = false @@ -314,16 +243,14 @@ local function createHelpDialog(baseZIndex) shield.BorderColor3 = Color3I(27, 42, 53) shield.BackgroundTransparency = 0.4 shield.ZIndex = baseZIndex + 1 - - local helpDialog = Instance.new "Frame" + local helpDialog = Instance.new("Frame") helpDialog.Name = "HelpDialog" helpDialog.Style = Enum.FrameStyle.RobloxRound helpDialog.Position = UDim2.new(0.2, 0, 0.2, 0) helpDialog.Size = UDim2.new(0.6, 0, 0.6, 0) helpDialog.Active = true helpDialog.Parent = shield - - local titleLabel = Instance.new "TextLabel" + local titleLabel = Instance.new("TextLabel") titleLabel.Name = "Title" titleLabel.Text = "Keyboard & Mouse Controls" titleLabel.Font = Enum.Font.ArialBold @@ -333,30 +260,26 @@ local function createHelpDialog(baseZIndex) titleLabel.TextColor3 = Color3.new(1, 1, 1) titleLabel.BackgroundTransparency = 1 titleLabel.Parent = helpDialog - - local buttonRow = Instance.new "Frame" + local buttonRow = Instance.new("Frame") buttonRow.Name = "Buttons" buttonRow.Position = UDim2.new(0.1, 0, 0.07, 40) buttonRow.Size = UDim2.new(0.8, 0, 0, 45) buttonRow.BackgroundTransparency = 1 buttonRow.Parent = helpDialog - - local imageFrame = Instance.new "Frame" + local imageFrame = Instance.new("Frame") imageFrame.Name = "ImageFrame" imageFrame.Position = UDim2.new(0.05, 0, 0.075, 80) imageFrame.Size = UDim2.new(0.9, 0, 0.9, -120) imageFrame.BackgroundTransparency = 1 imageFrame.Parent = helpDialog - - local layoutFrame = Instance.new "Frame" + local layoutFrame = Instance.new("Frame") layoutFrame.Name = "LayoutFrame" layoutFrame.Position = UDim2.new(0.5, 0, 0, 0) layoutFrame.Size = UDim2.new(1.5, 0, 1, 0) layoutFrame.BackgroundTransparency = 1 layoutFrame.SizeConstraint = Enum.SizeConstraint.RelativeYY layoutFrame.Parent = imageFrame - - local image = Instance.new "ImageLabel" + local image = Instance.new("ImageLabel") image.Name = "Image" if UserSettings().GameSettings.ControlMode == Enum.ControlMode["Mouse Lock Switch"] then image.Image = mouseLockLookScreenUrl @@ -367,9 +290,8 @@ local function createHelpDialog(baseZIndex) image.Size = UDim2.new(1, 0, 1, 0) image.BackgroundTransparency = 1 image.Parent = layoutFrame - - local buttons = {} - buttons[1] = {} + local buttons = { } + buttons[1] = { } buttons[1].Text = "Look" buttons[1].Function = function() if UserSettings().GameSettings.ControlMode == Enum.ControlMode["Mouse Lock Switch"] then @@ -378,25 +300,22 @@ local function createHelpDialog(baseZIndex) image.Image = classicLookScreenUrl end end - buttons[2] = {} + buttons[2] = { } buttons[2].Text = "Move" buttons[2].Function = function() image.Image = "http://www.roblox.com/Asset?id=45915811" end - buttons[3] = {} + buttons[3] = { } buttons[3].Text = "Gear" buttons[3].Function = function() image.Image = "http://www.roblox.com/Asset?id=45917596" end - buttons[4] = {} + buttons[4] = { } buttons[4].Text = "Zoom" buttons[4].Function = function() image.Image = "http://www.roblox.com/Asset?id=45915825" end - CreateTextButtons(buttonRow, buttons, UDim.new(0, 0), UDim.new(1, 0)) - - -- set up listeners for type of mouse mode, but keep constructing gui at same time delay(0, function() waitForChild(gui, "UserSettingsShield") waitForChild(gui.UserSettingsShield, "Settings") @@ -404,26 +323,20 @@ local function createHelpDialog(baseZIndex) waitForChild(gui.UserSettingsShield.Settings.SettingsStyle, "GameSettingsMenu") waitForChild(gui.UserSettingsShield.Settings.SettingsStyle.GameSettingsMenu, "CameraField") waitForChild(gui.UserSettingsShield.Settings.SettingsStyle.GameSettingsMenu.CameraField, "DropDownMenuButton") - gui.UserSettingsShield.Settings.SettingsStyle.GameSettingsMenu.CameraField.DropDownMenuButton.Changed:connect( - function(prop) - if prop ~= "Text" then - return - end - if buttonRow.Button1.Style == Enum.ButtonStyle.RobloxButtonDefault then -- only change if this is the currently selected panel - if - gui.UserSettingsShield.Settings.SettingsStyle.GameSettingsMenu.CameraField.DropDownMenuButton.Text - == "Classic" - then - image.Image = classicLookScreenUrl - else - image.Image = mouseLockLookScreenUrl - end + return gui.UserSettingsShield.Settings.SettingsStyle.GameSettingsMenu.CameraField.DropDownMenuButton.Changed:connect(function(prop) + if prop ~= "Text" then + return + end + if buttonRow.Button1.Style == Enum.ButtonStyle.RobloxButtonDefault then + if gui.UserSettingsShield.Settings.SettingsStyle.GameSettingsMenu.CameraField.DropDownMenuButton.Text == "Classic" then + image.Image = classicLookScreenUrl + else + image.Image = mouseLockLookScreenUrl end end - ) + end) end) - - local okBtn = Instance.new "TextButton" + local okBtn = Instance.new("TextButton") okBtn.Name = "OkBtn" okBtn.Text = "OK" okBtn.Modal = true @@ -436,57 +349,35 @@ local function createHelpDialog(baseZIndex) okBtn.Style = Enum.ButtonStyle.RobloxButtonDefault okBtn.MouseButton1Click:connect(function() shield.Visible = false - game.GuiService:RemoveCenterDialog(shield) + return game.GuiService:RemoveCenterDialog(shield) end) okBtn.Parent = helpDialog - robloxLock(shield) return shield end - -local function createLeaveConfirmationMenu(baseZIndex, shield) - local frame = Instance.new "Frame" +local createLeaveConfirmationMenu +createLeaveConfirmationMenu = function(baseZIndex, shield) + local frame = Instance.new("Frame") frame.Name = "LeaveConfirmationMenu" frame.BackgroundTransparency = 1 frame.Size = UDim2.new(1, 0, 1, 0) frame.Position = UDim2.new(0, 0, 2, 400) frame.ZIndex = baseZIndex + 4 - - local yesButton = createTextButton( - "Leave", - Enum.ButtonStyle.RobloxButton, - Enum.FontSize.Size24, - UDim2.new(0, 128, 0, 50), - UDim2.new(0, 313, 0.8, 0) - ) + local yesButton = createTextButton("Leave", Enum.ButtonStyle.RobloxButton, Enum.FontSize.Size24, UDim2.new(0, 128, 0, 50), UDim2.new(0, 313, 0.8, 0)) yesButton.Name = "YesButton" yesButton.ZIndex = baseZIndex + 4 yesButton.Parent = frame yesButton.Modal = true - yesButton:SetVerb "Exit" - - local noButton = createTextButton( - "Stay", - Enum.ButtonStyle.RobloxButtonDefault, - Enum.FontSize.Size24, - UDim2.new(0, 128, 0, 50), - UDim2.new(0, 90, 0.8, 0) - ) + yesButton:SetVerb("Exit") + local noButton = createTextButton("Stay", Enum.ButtonStyle.RobloxButtonDefault, Enum.FontSize.Size24, UDim2.new(0, 128, 0, 50), UDim2.new(0, 90, 0.8, 0)) noButton.Name = "NoButton" noButton.Parent = frame noButton.ZIndex = baseZIndex + 4 noButton.MouseButton1Click:connect(function() goToMenu(shield.Settings.SettingsStyle, "GameMainMenu", "down", UDim2.new(0, 525, 0, 430)) - shield.Settings:TweenSize( - UDim2.new(0, 525, 0, 430), - Enum.EasingDirection.InOut, - Enum.EasingStyle.Sine, - tweenTime, - true - ) + return shield.Settings:TweenSize(UDim2.new(0, 525, 0, 430), Enum.EasingDirection.InOut, Enum.EasingStyle.Sine, tweenTime, true) end) - - local leaveText = Instance.new "TextLabel" + local leaveText = Instance.new("TextLabel") leaveText.Name = "LeaveText" leaveText.Text = "Leave this game?" leaveText.Size = UDim2.new(1, 0, 0.8, 0) @@ -497,56 +388,34 @@ local function createLeaveConfirmationMenu(baseZIndex, shield) leaveText.BackgroundTransparency = 1 leaveText.ZIndex = baseZIndex + 4 leaveText.Parent = frame - return frame end - -local function createResetConfirmationMenu(baseZIndex, shield) - local frame = Instance.new "Frame" +local createResetConfirmationMenu +createResetConfirmationMenu = function(baseZIndex, shield) + local frame = Instance.new("Frame") frame.Name = "ResetConfirmationMenu" frame.BackgroundTransparency = 1 frame.Size = UDim2.new(1, 0, 1, 0) frame.Position = UDim2.new(0, 0, 2, 400) frame.ZIndex = baseZIndex + 4 - - local yesButton = createTextButton( - "Reset", - Enum.ButtonStyle.RobloxButtonDefault, - Enum.FontSize.Size24, - UDim2.new(0, 128, 0, 50), - UDim2.new(0, 313, 0, 299) - ) + local yesButton = createTextButton("Reset", Enum.ButtonStyle.RobloxButtonDefault, Enum.FontSize.Size24, UDim2.new(0, 128, 0, 50), UDim2.new(0, 313, 0, 299)) yesButton.Name = "YesButton" yesButton.ZIndex = baseZIndex + 4 yesButton.Parent = frame yesButton.Modal = true yesButton.MouseButton1Click:connect(function() resumeGameFunction(shield) - resetLocalCharacter() + return resetLocalCharacter() end) - - local noButton = createTextButton( - "Cancel", - Enum.ButtonStyle.RobloxButton, - Enum.FontSize.Size24, - UDim2.new(0, 128, 0, 50), - UDim2.new(0, 90, 0, 299) - ) + local noButton = createTextButton("Cancel", Enum.ButtonStyle.RobloxButton, Enum.FontSize.Size24, UDim2.new(0, 128, 0, 50), UDim2.new(0, 90, 0, 299)) noButton.Name = "NoButton" noButton.Parent = frame noButton.ZIndex = baseZIndex + 4 noButton.MouseButton1Click:connect(function() goToMenu(shield.Settings.SettingsStyle, "GameMainMenu", "down", UDim2.new(0, 525, 0, 430)) - shield.Settings:TweenSize( - UDim2.new(0, 525, 0, 430), - Enum.EasingDirection.InOut, - Enum.EasingStyle.Sine, - tweenTime, - true - ) + return shield.Settings:TweenSize(UDim2.new(0, 525, 0, 430), Enum.EasingDirection.InOut, Enum.EasingStyle.Sine, tweenTime, true) end) - - local resetCharacterText = Instance.new "TextLabel" + local resetCharacterText = Instance.new("TextLabel") resetCharacterText.Name = "ResetCharacterText" resetCharacterText.Text = "Are you sure you want to reset your character?" resetCharacterText.Size = UDim2.new(1, 0, 0.8, 0) @@ -557,7 +426,6 @@ local function createResetConfirmationMenu(baseZIndex, shield) resetCharacterText.BackgroundTransparency = 1 resetCharacterText.ZIndex = baseZIndex + 4 resetCharacterText.Parent = frame - local fineResetCharacterText = resetCharacterText:Clone() fineResetCharacterText.Name = "FineResetCharacterText" fineResetCharacterText.Text = "You will be put back on a spawn point" @@ -565,21 +433,17 @@ local function createResetConfirmationMenu(baseZIndex, shield) fineResetCharacterText.Position = UDim2.new(0, 109, 0, 215) fineResetCharacterText.FontSize = Enum.FontSize.Size18 fineResetCharacterText.Parent = frame - return frame end - -local function createGameMainMenu(baseZIndex, shield) - local gameMainMenuFrame = Instance.new "Frame" +local createGameMainMenu +createGameMainMenu = function(baseZIndex, shield) + local gameMainMenuFrame = Instance.new("Frame") gameMainMenuFrame.Name = "GameMainMenu" gameMainMenuFrame.BackgroundTransparency = 1 gameMainMenuFrame.Size = UDim2.new(1, 0, 1, 0) gameMainMenuFrame.ZIndex = baseZIndex + 4 gameMainMenuFrame.Parent = settingsFrame - - -- GameMainMenu Children - - local gameMainMenuTitle = Instance.new "TextLabel" + local gameMainMenuTitle = Instance.new("TextLabel") gameMainMenuTitle.Name = "Title" gameMainMenuTitle.Text = "Game Menu" gameMainMenuTitle.BackgroundTransparency = 1 @@ -591,41 +455,24 @@ local function createGameMainMenu(baseZIndex, shield) gameMainMenuTitle.TextColor3 = Color3.new(1, 1, 1) gameMainMenuTitle.ZIndex = baseZIndex + 4 gameMainMenuTitle.Parent = gameMainMenuFrame - - local robloxHelpButton = createTextButton( - "Help", - Enum.ButtonStyle.RobloxButton, - Enum.FontSize.Size18, - UDim2.new(0, 164, 0, 50), - UDim2.new(0, 82, 0, 256) - ) + local robloxHelpButton = createTextButton("Help", Enum.ButtonStyle.RobloxButton, Enum.FontSize.Size18, UDim2.new(0, 164, 0, 50), UDim2.new(0, 82, 0, 256)) robloxHelpButton.Name = "HelpButton" robloxHelpButton.ZIndex = baseZIndex + 4 robloxHelpButton.Parent = gameMainMenuFrame helpButton = robloxHelpButton - local helpDialog = createHelpDialog(baseZIndex) helpDialog.Parent = gui - helpButton.MouseButton1Click:connect(function() table.insert(centerDialogs, helpDialog) - game.GuiService:AddCenterDialog( - helpDialog, - Enum.CenterDialogType.ModalDialog, - --ShowFunction - function() - helpDialog.Visible = true - mainShield.Visible = false - end, - --HideFunction - function() - helpDialog.Visible = false - end - ) + return game.GuiService:AddCenterDialog(helpDialog, Enum.CenterDialogType.ModalDialog, function() + helpDialog.Visible = true + mainShield.Visible = false + end, function() + helpDialog.Visible = false + end) end) helpButton.Active = true - - local helpShortcut = Instance.new "TextLabel" + local helpShortcut = Instance.new("TextLabel") helpShortcut.Name = "HelpShortcutText" helpShortcut.Text = "F1" helpShortcut.Visible = false @@ -637,151 +484,89 @@ local function createGameMainMenu(baseZIndex, shield) helpShortcut.TextColor3 = Color3.new(0, 1, 0) helpShortcut.ZIndex = baseZIndex + 4 helpShortcut.Parent = robloxHelpButton - - local screenshotButton = createTextButton( - "Screenshot", - Enum.ButtonStyle.RobloxButton, - Enum.FontSize.Size18, - UDim2.new(0, 168, 0, 50), - UDim2.new(0, 254, 0, 256) - ) + local screenshotButton = createTextButton("Screenshot", Enum.ButtonStyle.RobloxButton, Enum.FontSize.Size18, UDim2.new(0, 168, 0, 50), UDim2.new(0, 254, 0, 256)) screenshotButton.Name = "ScreenshotButton" screenshotButton.ZIndex = baseZIndex + 4 screenshotButton.Parent = gameMainMenuFrame screenshotButton.Visible = not macClient - screenshotButton:SetVerb "Screenshot" - + screenshotButton:SetVerb("Screenshot") local screenshotShortcut = helpShortcut:clone() screenshotShortcut.Name = "ScreenshotShortcutText" screenshotShortcut.Text = "PrintSc" screenshotShortcut.Position = UDim2.new(0, 118, 0, 0) screenshotShortcut.Visible = true screenshotShortcut.Parent = screenshotButton - - local recordVideoButton = createTextButton( - "Record Video", - Enum.ButtonStyle.RobloxButton, - Enum.FontSize.Size18, - UDim2.new(0, 168, 0, 50), - UDim2.new(0, 254, 0, 306) - ) + local recordVideoButton = createTextButton("Record Video", Enum.ButtonStyle.RobloxButton, Enum.FontSize.Size18, UDim2.new(0, 168, 0, 50), UDim2.new(0, 254, 0, 306)) recordVideoButton.Name = "RecordVideoButton" recordVideoButton.ZIndex = baseZIndex + 4 recordVideoButton.Parent = gameMainMenuFrame recordVideoButton.Visible = not macClient - recordVideoButton:SetVerb "RecordToggle" - + recordVideoButton:SetVerb("RecordToggle") local recordVideoShortcut = helpShortcut:clone() recordVideoShortcut.Visible = hasGraphicsSlider recordVideoShortcut.Name = "RecordVideoShortcutText" recordVideoShortcut.Text = "F12" recordVideoShortcut.Position = UDim2.new(0, 120, 0, 0) recordVideoShortcut.Parent = recordVideoButton - - local stopRecordButton = Instance.new "ImageButton" + local stopRecordButton = Instance.new("ImageButton") stopRecordButton.Name = "StopRecordButton" stopRecordButton.BackgroundTransparency = 1 stopRecordButton.Image = "rbxasset://textures/ui/RecordStop.png" stopRecordButton.Size = UDim2.new(0, 59, 0, 27) - stopRecordButton:SetVerb "RecordToggle" - + stopRecordButton:SetVerb("RecordToggle") stopRecordButton.MouseButton1Click:connect(function() - recordVideoClick(recordVideoButton, stopRecordButton) + return recordVideoClick(recordVideoButton, stopRecordButton) end) stopRecordButton.Visible = false stopRecordButton.Parent = gui - - local reportAbuseButton = createTextButton( - "Report Abuse", - Enum.ButtonStyle.RobloxButton, - Enum.FontSize.Size18, - UDim2.new(0, 164, 0, 50), - UDim2.new(0, 82, 0, 306) - ) + local reportAbuseButton = createTextButton("Report Abuse", Enum.ButtonStyle.RobloxButton, Enum.FontSize.Size18, UDim2.new(0, 164, 0, 50), UDim2.new(0, 82, 0, 306)) reportAbuseButton.Name = "ReportAbuseButton" reportAbuseButton.ZIndex = baseZIndex + 4 reportAbuseButton.Parent = gameMainMenuFrame - - local leaveGameButton = createTextButton( - "Leave Game", - Enum.ButtonStyle.RobloxButton, - Enum.FontSize.Size24, - UDim2.new(0, 340, 0, 50), - UDim2.new(0, 82, 0, 358) - ) + local leaveGameButton = createTextButton("Leave Game", Enum.ButtonStyle.RobloxButton, Enum.FontSize.Size24, UDim2.new(0, 340, 0, 50), UDim2.new(0, 82, 0, 358)) leaveGameButton.Name = "LeaveGameButton" leaveGameButton.ZIndex = baseZIndex + 4 leaveGameButton.Parent = gameMainMenuFrame - - local resumeGameButton = createTextButton( - "Resume Game", - Enum.ButtonStyle.RobloxButtonDefault, - Enum.FontSize.Size24, - UDim2.new(0, 340, 0, 50), - UDim2.new(0, 82, 0, 54) - ) + local resumeGameButton = createTextButton("Resume Game", Enum.ButtonStyle.RobloxButtonDefault, Enum.FontSize.Size24, UDim2.new(0, 340, 0, 50), UDim2.new(0, 82, 0, 54)) resumeGameButton.Name = "resumeGameButton" resumeGameButton.ZIndex = baseZIndex + 4 resumeGameButton.Parent = gameMainMenuFrame resumeGameButton.Modal = true resumeGameButton.MouseButton1Click:connect(function() - resumeGameFunction(shield) + return resumeGameFunction(shield) end) - - local gameSettingsButton = createTextButton( - "Game Settings", - Enum.ButtonStyle.RobloxButton, - Enum.FontSize.Size24, - UDim2.new(0, 340, 0, 50), - UDim2.new(0, 82, 0, 156) - ) + local gameSettingsButton = createTextButton("Game Settings", Enum.ButtonStyle.RobloxButton, Enum.FontSize.Size24, UDim2.new(0, 340, 0, 50), UDim2.new(0, 82, 0, 156)) gameSettingsButton.Name = "SettingsButton" gameSettingsButton.ZIndex = baseZIndex + 4 gameSettingsButton.Parent = gameMainMenuFrame - - if game:FindFirstChild "LoadingGuiService" and #game.LoadingGuiService:GetChildren() > 0 then - local gameSettingsButton = createTextButton( - "Game Instructions", - Enum.ButtonStyle.RobloxButton, - Enum.FontSize.Size24, - UDim2.new(0, 340, 0, 50), - UDim2.new(0, 82, 0, 207) - ) + if game:FindFirstChild("LoadingGuiService" and #game.LoadingGuiService:GetChildren() > 0) then + gameSettingsButton = createTextButton("Game Instructions", Enum.ButtonStyle.RobloxButton, Enum.FontSize.Size24, UDim2.new(0, 340, 0, 50), UDim2.new(0, 82, 0, 207)) gameSettingsButton.Name = "GameInstructions" gameSettingsButton.ZIndex = baseZIndex + 4 gameSettingsButton.Parent = gameMainMenuFrame gameSettingsButton.MouseButton1Click:connect(function() - if game:FindFirstChild "Players" and game.Players["LocalPlayer"] then - local loadingGui = game.Players.LocalPlayer:FindFirstChild "PlayerLoadingGui" + if game:FindFirstChild("Players" and game.Players["LocalPlayer"]) then + local loadingGui = game.Players.LocalPlayer:FindFirstChild("PlayerLoadingGui") if loadingGui then loadingGui.Visible = true end end end) end - - local resetButton = createTextButton( - "Reset Character", - Enum.ButtonStyle.RobloxButton, - Enum.FontSize.Size24, - UDim2.new(0, 340, 0, 50), - UDim2.new(0, 82, 0, 105) - ) + local resetButton = createTextButton("Reset Character", Enum.ButtonStyle.RobloxButton, Enum.FontSize.Size24, UDim2.new(0, 340, 0, 50), UDim2.new(0, 82, 0, 105)) resetButton.Name = "ResetButton" resetButton.ZIndex = baseZIndex + 4 resetButton.Parent = gameMainMenuFrame - return gameMainMenuFrame end - -local function createGameSettingsMenu(baseZIndex, _) - local gameSettingsMenuFrame = Instance.new "Frame" +local createGameSettingsMenu +createGameSettingsMenu = function(baseZIndex, _) + local gameSettingsMenuFrame = Instance.new("Frame") gameSettingsMenuFrame.Name = "GameSettingsMenu" gameSettingsMenuFrame.BackgroundTransparency = 1 gameSettingsMenuFrame.Size = UDim2.new(1, 0, 1, 0) gameSettingsMenuFrame.ZIndex = baseZIndex + 4 - - local title = Instance.new "TextLabel" + local title = Instance.new("TextLabel") title.Name = "Title" title.Text = "Settings" title.Size = UDim2.new(1, 0, 0, 48) @@ -792,8 +577,7 @@ local function createGameSettingsMenu(baseZIndex, _) title.ZIndex = baseZIndex + 4 title.BackgroundTransparency = 1 title.Parent = gameSettingsMenuFrame - - local fullscreenText = Instance.new "TextLabel" + local fullscreenText = Instance.new("TextLabel") fullscreenText.Name = "FullscreenText" fullscreenText.Text = "Fullscreen Mode" fullscreenText.Size = UDim2.new(0, 124, 0, 18) @@ -804,8 +588,7 @@ local function createGameSettingsMenu(baseZIndex, _) fullscreenText.ZIndex = baseZIndex + 4 fullscreenText.BackgroundTransparency = 1 fullscreenText.Parent = gameSettingsMenuFrame - - local fullscreenShortcut = Instance.new "TextLabel" + local fullscreenShortcut = Instance.new("TextLabel") fullscreenShortcut.Visible = hasGraphicsSlider fullscreenShortcut.Name = "FullscreenShortcutText" fullscreenShortcut.Text = "F11" @@ -817,8 +600,7 @@ local function createGameSettingsMenu(baseZIndex, _) fullscreenShortcut.TextColor3 = Color3.new(0, 1, 0) fullscreenShortcut.ZIndex = baseZIndex + 4 fullscreenShortcut.Parent = gameSettingsMenuFrame - - local studioText = Instance.new "TextLabel" + local studioText = Instance.new("TextLabel") studioText.Visible = false studioText.Name = "StudioText" studioText.Text = "Studio Mode" @@ -830,18 +612,15 @@ local function createGameSettingsMenu(baseZIndex, _) studioText.ZIndex = baseZIndex + 4 studioText.BackgroundTransparency = 1 studioText.Parent = gameSettingsMenuFrame - local studioShortcut = fullscreenShortcut:clone() studioShortcut.Name = "StudioShortcutText" - studioShortcut.Visible = false -- TODO: turn back on when f2 hack is fixed + studioShortcut.Visible = false studioShortcut.Text = "F2" studioShortcut.Position = UDim2.new(0, 154, 0, 175) studioShortcut.Parent = gameSettingsMenuFrame - - local studioCheckbox = nil - + local studioCheckbox if hasGraphicsSlider then - local qualityText = Instance.new "TextLabel" + local qualityText = Instance.new("TextLabel") qualityText.Name = "QualityText" qualityText.Text = "Graphics Quality" qualityText.Size = UDim2.new(0, 128, 0, 18) @@ -853,7 +632,6 @@ local function createGameSettingsMenu(baseZIndex, _) qualityText.BackgroundTransparency = 1 qualityText.Parent = gameSettingsMenuFrame qualityText.Visible = not inStudioMode - local autoText = qualityText:clone() autoText.Name = "AutoText" autoText.Text = "Auto" @@ -862,7 +640,6 @@ local function createGameSettingsMenu(baseZIndex, _) autoText.Size = UDim2.new(0, 34, 0, 18) autoText.Parent = gameSettingsMenuFrame autoText.Visible = not inStudioMode - local fasterText = autoText:clone() fasterText.Name = "FasterText" fasterText.Text = "Faster" @@ -871,14 +648,12 @@ local function createGameSettingsMenu(baseZIndex, _) fasterText.FontSize = Enum.FontSize.Size14 fasterText.Parent = gameSettingsMenuFrame fasterText.Visible = not inStudioMode - local fasterShortcut = fullscreenShortcut:clone() fasterShortcut.Name = "FasterShortcutText" fasterShortcut.Text = "F10 + Shift" fasterShortcut.Position = UDim2.new(0, 185, 0, 283) fasterShortcut.Parent = gameSettingsMenuFrame fasterShortcut.Visible = not inStudioMode - local betterQualityText = autoText:clone() betterQualityText.Name = "BetterQualityText" betterQualityText.Text = "Better Quality" @@ -889,34 +664,24 @@ local function createGameSettingsMenu(baseZIndex, _) betterQualityText.FontSize = Enum.FontSize.Size14 betterQualityText.Parent = gameSettingsMenuFrame betterQualityText.Visible = not inStudioMode - local betterQualityShortcut = fullscreenShortcut:clone() betterQualityShortcut.Name = "BetterQualityShortcut" betterQualityShortcut.Text = "F10" betterQualityShortcut.Position = UDim2.new(0, 394, 0, 288) betterQualityShortcut.Parent = gameSettingsMenuFrame betterQualityShortcut.Visible = not inStudioMode - - local autoGraphicsButton = createTextButton( - "X", - Enum.ButtonStyle.RobloxButton, - Enum.FontSize.Size18, - UDim2.new(0, 25, 0, 25), - UDim2.new(0, 187, 0, 239) - ) + local autoGraphicsButton = createTextButton("X", Enum.ButtonStyle.RobloxButton, Enum.FontSize.Size18, UDim2.new(0, 25, 0, 25), UDim2.new(0, 187, 0, 239)) autoGraphicsButton.Name = "AutoGraphicsButton" autoGraphicsButton.ZIndex = baseZIndex + 4 autoGraphicsButton.Parent = gameSettingsMenuFrame autoGraphicsButton.Visible = not inStudioMode - - local graphicsSlider, graphicsLevel = RbxGui.CreateSlider(GraphicsQualityLevels, 150, UDim2.new(0, 230, 0, 280)) -- graphics - 1 because slider starts at 1 instead of 0 + local graphicsSlider, graphicsLevel = RbxGui.CreateSlider(GraphicsQualityLevels, 150, UDim2.new(0, 230, 0, 280)) graphicsSlider.Parent = gameSettingsMenuFrame graphicsSlider.Bar.ZIndex = baseZIndex + 4 graphicsSlider.Bar.Slider.ZIndex = baseZIndex + 5 graphicsSlider.Visible = not inStudioMode graphicsLevel.Value = math.floor((settings().Rendering:GetMaxQualityLevel() - 1) / 2) - - local graphicsSetter = Instance.new "TextBox" + local graphicsSetter = Instance.new("TextBox") graphicsSetter.Name = "GraphicsSetter" graphicsSetter.BackgroundColor3 = Color3.new(0, 0, 0) graphicsSetter.BorderColor3 = Color3.new(128 / 255, 128 / 255, 128 / 255) @@ -930,17 +695,15 @@ local function createGameSettingsMenu(baseZIndex, _) graphicsSetter.TextWrap = true graphicsSetter.Parent = gameSettingsMenuFrame graphicsSetter.Visible = not inStudioMode - local isAutoGraphics = true if not inStudioMode then isAutoGraphics = (UserSettings().GameSettings.SavedQualityLevel == Enum.SavedQualitySetting.Automatic) else settings().Rendering.EnableFRM = false end - local listenToGraphicsLevelChange = true - - local function setAutoGraphicsGui(active) + local setAutoGraphicsGui + setAutoGraphicsGui = function(active) isAutoGraphics = active if active then autoGraphicsButton.Text = "X" @@ -963,63 +726,56 @@ local function createGameSettingsMenu(baseZIndex, _) graphicsSetter.ZIndex = baseZIndex + 4 end end - - local function goToAutoGraphics() + local goToAutoGraphics + goToAutoGraphics = function() setAutoGraphicsGui(true) - UserSettings().GameSettings.SavedQualityLevel = Enum.SavedQualitySetting.Automatic - settings().Rendering.QualityLevel = Enum.QualityLevel.Automatic end - - local function setGraphicsQualityLevel(newLevel) + local setGraphicsQualityLevel + setGraphicsQualityLevel = function(newLevel) local percentage = newLevel / GraphicsQualityLevels local newSetting = math.floor((settings().Rendering:GetMaxQualityLevel() - 1) * percentage) - if newSetting == 20 then -- Level 20 is the same as level 21, except it doesn't render ambient occlusion + if newSetting == 20 then newSetting = 21 - elseif newLevel == 1 then -- make sure we can go to lowest settings (for terrible computers) + elseif newLevel == 1 then newSetting = 1 elseif newSetting > settings().Rendering:GetMaxQualityLevel() then newSetting = settings().Rendering:GetMaxQualityLevel() - 1 end - UserSettings().GameSettings.SavedQualityLevel = newLevel settings().Rendering.QualityLevel = newSetting end - - local function goToManualGraphics(explicitLevel) + local goToManualGraphics + goToManualGraphics = function(explicitLevel) setAutoGraphicsGui(false) - if explicitLevel then graphicsLevel.Value = explicitLevel else - graphicsLevel.Value = math.floor( - (settings().Rendering.AutoFRMLevel / (settings().Rendering:GetMaxQualityLevel() - 1)) - * GraphicsQualityLevels - ) + graphicsLevel.Value = math.floor((settings().Rendering.AutoFRMLevel / (settings().Rendering:GetMaxQualityLevel() - 1))({ + GraphicsQualityLevels + })) end - - if explicitLevel == graphicsLevel.Value then -- make sure we are actually in right graphics mode + if explicitLevel == graphicsLevel.Value then setGraphicsQualityLevel(graphicsLevel.Value) end - if not explicitLevel then UserSettings().GameSettings.SavedQualityLevel = graphicsLevel.Value end graphicsSetter.Text = tostring(graphicsLevel.Value) end - - local function showAutoGraphics() + local showAutoGraphics + showAutoGraphics = function() autoText.ZIndex = baseZIndex + 4 autoGraphicsButton.ZIndex = baseZIndex + 4 end - - local function hideAutoGraphics() + local hideAutoGraphics + hideAutoGraphics = function() autoText.ZIndex = 1 autoGraphicsButton.ZIndex = 1 end - - local function showManualGraphics() + local showManualGraphics + showManualGraphics = function() graphicsSlider.Bar.ZIndex = baseZIndex + 4 graphicsSlider.Bar.Slider.ZIndex = baseZIndex + 5 betterQualityShortcut.ZIndex = baseZIndex + 4 @@ -1028,8 +784,8 @@ local function createGameSettingsMenu(baseZIndex, _) fasterText.ZIndex = baseZIndex + 4 graphicsSetter.ZIndex = baseZIndex + 4 end - - local function hideManualGraphics() + local hideManualGraphics + hideManualGraphics = function() betterQualityText.ZIndex = 1 betterQualityShortcut.ZIndex = 1 fasterShortcut.ZIndex = 1 @@ -1038,76 +794,70 @@ local function createGameSettingsMenu(baseZIndex, _) graphicsSlider.Bar.Slider.ZIndex = 1 graphicsSetter.ZIndex = 1 end - - local function translateSavedQualityLevelToInt(savedQualityLevel) - if savedQualityLevel == Enum.SavedQualitySetting.Automatic then + local translateSavedQualityLevelToInt + translateSavedQualityLevelToInt = function(savedQualityLevel) + if Enum.SavedQualitySetting.Automatic == savedQualityLevel then return 0 - elseif savedQualityLevel == Enum.SavedQualitySetting.QualityLevel1 then + elseif Enum.SavedQualitySetting.QualityLevel1 == savedQualityLevel then return 1 - elseif savedQualityLevel == Enum.SavedQualitySetting.QualityLevel2 then + elseif Enum.SavedQualitySetting.QualityLevel2 == savedQualityLevel then return 2 - elseif savedQualityLevel == Enum.SavedQualitySetting.QualityLevel3 then + elseif Enum.SavedQualitySetting.QualityLevel3 == savedQualityLevel then return 3 - elseif savedQualityLevel == Enum.SavedQualitySetting.QualityLevel4 then + elseif Enum.SavedQualitySetting.QualityLevel4 == savedQualityLevel then return 4 - elseif savedQualityLevel == Enum.SavedQualitySetting.QualityLevel5 then + elseif Enum.SavedQualitySetting.QualityLevel5 == savedQualityLevel then return 5 - elseif savedQualityLevel == Enum.SavedQualitySetting.QualityLevel6 then + elseif Enum.SavedQualitySetting.QualityLevel6 == savedQualityLevel then return 6 - elseif savedQualityLevel == Enum.SavedQualitySetting.QualityLevel7 then + elseif Enum.SavedQualitySetting.QualityLevel7 == savedQualityLevel then return 7 - elseif savedQualityLevel == Enum.SavedQualitySetting.QualityLevel8 then + elseif Enum.SavedQualitySetting.QualityLevel8 == savedQualityLevel then return 8 - elseif savedQualityLevel == Enum.SavedQualitySetting.QualityLevel9 then + elseif Enum.SavedQualitySetting.QualityLevel9 == savedQualityLevel then return 9 - elseif savedQualityLevel == Enum.SavedQualitySetting.QualityLevel10 then + elseif Enum.SavedQualitySetting.QualityLevel10 == savedQualityLevel then return 10 end end - - local function enableGraphicsWidget() + local enableGraphicsWidget + enableGraphicsWidget = function() settings().Rendering.EnableFRM = true - - isAutoGraphics = (UserSettings().GameSettings.SavedQualityLevel == Enum.SavedQualitySetting.Automatic) + isAutoGraphics = UserSettings().GameSettings.SavedQualityLevel == Enum.SavedQualitySetting.Automatic if isAutoGraphics then showAutoGraphics() - goToAutoGraphics() + return goToAutoGraphics() else showAutoGraphics() showManualGraphics() - goToManualGraphics(translateSavedQualityLevelToInt(UserSettings().GameSettings.SavedQualityLevel)) + return goToManualGraphics(translateSavedQualityLevelToInt(UserSettings().GameSettings.SavedQualityLevel)) end end - - local function disableGraphicsWidget() + local disableGraphicsWidget + disableGraphicsWidget = function() hideManualGraphics() hideAutoGraphics() settings().Rendering.EnableFRM = false end - graphicsSetter.FocusLost:connect(function() if isAutoGraphics then graphicsSetter.Text = tostring(graphicsLevel.Value) return end - local newGraphicsValue = tonumber(graphicsSetter.Text) if newGraphicsValue == nil then graphicsSetter.Text = tostring(graphicsLevel.Value) return end - if newGraphicsValue < 1 then newGraphicsValue = 1 elseif newGraphicsValue >= settings().Rendering:GetMaxQualityLevel() then newGraphicsValue = settings().Rendering:GetMaxQualityLevel() - 1 end - graphicsLevel.Value = newGraphicsValue setGraphicsQualityLevel(graphicsLevel.Value) graphicsSetter.Text = tostring(graphicsLevel.Value) end) - graphicsLevel.Changed:connect(function(_) if isAutoGraphics then return @@ -1115,12 +865,9 @@ local function createGameSettingsMenu(baseZIndex, _) if not listenToGraphicsLevelChange then return end - graphicsSetter.Text = tostring(graphicsLevel.Value) - setGraphicsQualityLevel(graphicsLevel.Value) + return setGraphicsQualityLevel(graphicsLevel.Value) end) - - -- setup our graphic mode on load if inStudioMode or UserSettings().GameSettings.SavedQualityLevel == Enum.SavedQualitySetting.Automatic then if inStudioMode then settings().Rendering.EnableFRM = false @@ -1133,24 +880,20 @@ local function createGameSettingsMenu(baseZIndex, _) settings().Rendering.EnableFRM = true goToManualGraphics(translateSavedQualityLevelToInt(UserSettings().GameSettings.SavedQualityLevel)) end - autoGraphicsButton.MouseButton1Click:connect(function() if inStudioMode and not game.Players.LocalPlayer then return end - if not isAutoGraphics then - goToAutoGraphics() + return goToAutoGraphics() else - goToManualGraphics(graphicsLevel.Value) + return goToManualGraphics(graphicsLevel.Value) end end) - game.GraphicsQualityChangeRequest:connect(function(graphicsIncrease) if isAutoGraphics then return - end -- only can set graphics in manual mode - + end if graphicsIncrease then if (graphicsLevel.Value + 1) > GraphicsQualityLevels then return @@ -1158,14 +901,7 @@ local function createGameSettingsMenu(baseZIndex, _) graphicsLevel.Value = graphicsLevel.Value + 1 graphicsSetter.Text = tostring(graphicsLevel.Value) setGraphicsQualityLevel(graphicsLevel.Value) - - game:GetService("GuiService"):SendNotification( - "Graphics Quality", - "Increased to (" .. graphicsSetter.Text .. ")", - "", - 2, - function() end - ) + return game:GetService("GuiService"):SendNotification("Graphics Quality", "Increased to (" .. tostring(graphicsSetter.Text) .. ")", "", 2, function() end) else if (graphicsLevel.Value - 1) <= 0 then return @@ -1173,41 +909,24 @@ local function createGameSettingsMenu(baseZIndex, _) graphicsLevel.Value = graphicsLevel.Value - 1 graphicsSetter.Text = tostring(graphicsLevel.Value) setGraphicsQualityLevel(graphicsLevel.Value) - - game:GetService("GuiService"):SendNotification( - "Graphics Quality", - "Decreased to (" .. graphicsSetter.Text .. ")", - "", - 2, - function() end - ) + return game:GetService("GuiService"):SendNotification("Graphics Quality", "Decreased to (" .. tostring(graphicsSetter.Text) .. ")", "", 2, function() end) end end) - game.Players.PlayerAdded:connect(function(player) if player == game.Players.LocalPlayer and inStudioMode then - enableGraphicsWidget() + return enableGraphicsWidget() end end) game.Players.PlayerRemoving:connect(function(player) if player == game.Players.LocalPlayer and inStudioMode then - disableGraphicsWidget() + return disableGraphicsWidget() end end) - - studioCheckbox = createTextButton( - "", - Enum.ButtonStyle.RobloxButton, - Enum.FontSize.Size18, - UDim2.new(0, 25, 0, 25), - UDim2.new(0, 30, 0, 176) - ) + studioCheckbox = createTextButton("", Enum.ButtonStyle.RobloxButton, Enum.FontSize.Size18, UDim2.new(0, 25, 0, 25), UDim2.new(0, 30, 0, 176)) studioCheckbox.Name = "StudioCheckbox" studioCheckbox.ZIndex = baseZIndex + 4 - --studioCheckbox.Parent = gameSettingsMenuFrame -- todo: enable when studio h4x aren't an issue anymore - studioCheckbox:SetVerb "TogglePlayMode" - studioCheckbox.Visible = false -- todo: enabled when studio h4x aren't an issue anymore - + studioCheckbox:SetVerb("TogglePlayMode") + studioCheckbox.Visible = false local wasManualGraphics = (settings().Rendering.QualityLevel ~= Enum.QualityLevel.Automatic) if inStudioMode and not game.Players.LocalPlayer then studioCheckbox.Text = "X" @@ -1239,7 +958,6 @@ local function createGameSettingsMenu(baseZIndex, _) if not studioCheckbox.Active then return end - if studioCheckbox.Text == "" then studioCheckbox.Text = "X" else @@ -1248,18 +966,11 @@ local function createGameSettingsMenu(baseZIndex, _) end) end end - - local fullscreenCheckbox = createTextButton( - "", - Enum.ButtonStyle.RobloxButton, - Enum.FontSize.Size18, - UDim2.new(0, 25, 0, 25), - UDim2.new(0, 30, 0, 144) - ) + local fullscreenCheckbox = createTextButton("", Enum.ButtonStyle.RobloxButton, Enum.FontSize.Size18, UDim2.new(0, 25, 0, 25), UDim2.new(0, 30, 0, 144)) fullscreenCheckbox.Name = "FullscreenCheckbox" fullscreenCheckbox.ZIndex = baseZIndex + 4 fullscreenCheckbox.Parent = gameSettingsMenuFrame - fullscreenCheckbox:SetVerb "ToggleFullScreen" + fullscreenCheckbox:SetVerb("ToggleFullScreen") if UserSettings().GameSettings:InFullScreen() then fullscreenCheckbox.Text = "X" end @@ -1280,42 +991,25 @@ local function createGameSettingsMenu(baseZIndex, _) end end) end - - if game:FindFirstChild "NetworkClient" then -- we are playing online + if game:FindFirstChild("NetworkClient") then setDisabledState(studioText) setDisabledState(studioShortcut) setDisabledState(studioCheckbox) end - local backButton if hasGraphicsSlider then - backButton = createTextButton( - "OK", - Enum.ButtonStyle.RobloxButtonDefault, - Enum.FontSize.Size24, - UDim2.new(0, 180, 0, 50), - UDim2.new(0, 170, 0, 330) - ) + backButton = createTextButton("OK", Enum.ButtonStyle.RobloxButtonDefault, Enum.FontSize.Size24, UDim2.new(0, 180, 0, 50), UDim2.new(0, 170, 0, 330)) backButton.Modal = true else - backButton = createTextButton( - "OK", - Enum.ButtonStyle.RobloxButtonDefault, - Enum.FontSize.Size24, - UDim2.new(0, 180, 0, 50), - UDim2.new(0, 170, 0, 270) - ) + backButton = createTextButton("OK", Enum.ButtonStyle.RobloxButtonDefault, Enum.FontSize.Size24, UDim2.new(0, 180, 0, 50), UDim2.new(0, 170, 0, 270)) backButton.Modal = true end - backButton.Name = "BackButton" backButton.ZIndex = baseZIndex + 4 backButton.Parent = gameSettingsMenuFrame - - syncVideoCaptureSetting = nil - + local syncVideoCaptureSetting = nil if not macClient then - local videoCaptureLabel = Instance.new "TextLabel" + local videoCaptureLabel = Instance.new("TextLabel") videoCaptureLabel.Name = "VideoCaptureLabel" videoCaptureLabel.Text = "After Capturing Video" videoCaptureLabel.Font = Enum.Font.Arial @@ -1327,15 +1021,13 @@ local function createGameSettingsMenu(baseZIndex, _) videoCaptureLabel.TextXAlignment = Enum.TextXAlignment.Left videoCaptureLabel.ZIndex = baseZIndex + 4 videoCaptureLabel.Parent = gameSettingsMenuFrame - - local videoNames = {} - local videoNameToItem = {} + local videoNames = { } + local videoNameToItem = { } videoNames[1] = "Just Save to Disk" videoNameToItem[videoNames[1]] = Enum.UploadSetting["Never"] videoNames[2] = "Upload to YouTube" videoNameToItem[videoNames[2]] = Enum.UploadSetting["Ask me first"] - - local videoCaptureDropDown = nil + local videoCaptureDropDown videoCaptureDropDown, updateVideoCaptureDropDownSelection = RbxGui.CreateDropDownMenu(videoNames, function(text) UserSettings().GameSettings.VideoUploadPromptBehavior = videoNameToItem[text] end) @@ -1346,20 +1038,20 @@ local function createGameSettingsMenu(baseZIndex, _) videoCaptureDropDown.Position = UDim2.new(0, 270, 0, 94) videoCaptureDropDown.Size = UDim2.new(0, 200, 0, 32) videoCaptureDropDown.Parent = gameSettingsMenuFrame - syncVideoCaptureSetting = function() - if UserSettings().GameSettings.VideoUploadPromptBehavior == Enum.UploadSetting["Never"] then - updateVideoCaptureDropDownSelection(videoNames[1]) - elseif UserSettings().GameSettings.VideoUploadPromptBehavior == Enum.UploadSetting["Ask me first"] then - updateVideoCaptureDropDownSelection(videoNames[2]) - else - UserSettings().GameSettings.VideoUploadPromptBehavior = Enum.UploadSetting["Ask me first"] - updateVideoCaptureDropDownSelection(videoNames[2]) - end + return updateVideoCaptureDropDownSelection((function() + if UserSettings().GameSettings.VideoUploadPromptBehavior == Enum.UploadSetting["Never"] then + return videoNames[1] + elseif UserSettings().GameSettings.VideoUploadPromptBehavior == Enum.UploadSetting["Ask me first"] then + return videoNames[2] + else + UserSettings().GameSettings.VideoUploadPromptBehavior = Enum.UploadSetting["Ask me first"] + return videoNames[2] + end + end)()) end end - - local cameraLabel = Instance.new "TextLabel" + local cameraLabel = Instance.new("TextLabel") cameraLabel.Name = "CameraLabel" cameraLabel.Text = "Character & Camera Controls" cameraLabel.Font = Enum.Font.Arial @@ -1371,22 +1063,18 @@ local function createGameSettingsMenu(baseZIndex, _) cameraLabel.BackgroundTransparency = 1 cameraLabel.ZIndex = baseZIndex + 4 cameraLabel.Parent = gameSettingsMenuFrame - local mouseLockLabel = game.CoreGui.RobloxGui:FindFirstChild("MouseLockLabel", true) - local enumItems = Enum.ControlMode:GetEnumItems() - local enumNames = {} - local enumNameToItem = {} + local enumNames = { } + local enumNameToItem = { } for i, obj in ipairs(enumItems) do enumNames[i] = obj.Name enumNameToItem[obj.Name] = obj end - local cameraDropDown cameraDropDown, updateCameraDropDownSelection = RbxGui.CreateDropDownMenu(enumNames, function(text) UserSettings().GameSettings.ControlMode = enumNameToItem[text] - - pcall(function() + return pcall(function() if mouseLockLabel and UserSettings().GameSettings.ControlMode == Enum.ControlMode["Mouse Lock Switch"] then mouseLockLabel.Visible = true elseif mouseLockLabel then @@ -1401,20 +1089,18 @@ local function createGameSettingsMenu(baseZIndex, _) cameraDropDown.Position = UDim2.new(0, 270, 0, 52) cameraDropDown.Size = UDim2.new(0, 200, 0, 32) cameraDropDown.Parent = gameSettingsMenuFrame - return gameSettingsMenuFrame end - if LoadLibrary then - RbxGui = LoadLibrary "RbxGui" + local RbxGui = LoadLibrary("RbxGui") local baseZIndex = 0 if UserSettings then - local createSettingsDialog = function() + local createSettingsDialog + createSettingsDialog = function() waitForChild(gui, "BottomLeftControl") - settingsButton = gui.BottomLeftControl:FindFirstChild "SettingsButton" - + local settingsButton = gui.BottomLeftControl:FindFirstChild("SettingsButton") if settingsButton == nil then - settingsButton = Instance.new "ImageButton" + settingsButton = Instance.new("ImageButton") settingsButton.Name = "SettingsButton" settingsButton.Image = "rbxasset://textures/ui/SettingsButton.png" settingsButton.BackgroundTransparency = 1 @@ -1423,8 +1109,7 @@ if LoadLibrary then settingsButton.Position = UDim2.new(0, 2, 0, 50) settingsButton.Parent = gui.BottomLeftControl end - - local shield = Instance.new "TextButton" + local shield = Instance.new("TextButton") shield.Text = "" shield.Name = "UserSettingsShield" shield.Active = true @@ -1436,51 +1121,44 @@ if LoadLibrary then shield.BackgroundTransparency = 0.4 shield.ZIndex = baseZIndex + 2 mainShield = shield - - local frame = Instance.new "Frame" + local frame = Instance.new("Frame") frame.Name = "Settings" frame.Position = UDim2.new(0.5, -262, -0.5, -200) frame.Size = UDim2.new(0, 525, 0, 430) frame.BackgroundTransparency = 1 frame.Active = true frame.Parent = shield - - local settingsFrame = Instance.new "Frame" + local settingsFrame = Instance.new("Frame") settingsFrame.Name = "SettingsStyle" settingsFrame.Size = UDim2.new(1, 0, 1, 0) settingsFrame.Style = Enum.FrameStyle.RobloxRound settingsFrame.Active = true settingsFrame.ZIndex = baseZIndex + 3 settingsFrame.Parent = frame - local gameMainMenu = createGameMainMenu(baseZIndex, shield) gameMainMenu.Parent = settingsFrame - gameMainMenu.ScreenshotButton.MouseButton1Click:connect(function() - backToGame(gameMainMenu.ScreenshotButton, shield, settingsButton) + return backToGame(gameMainMenu.ScreenshotButton, shield, settingsButton) end) - gameMainMenu.RecordVideoButton.MouseButton1Click:connect(function() recordVideoClick(gameMainMenu.RecordVideoButton, gui.StopRecordButton) - backToGame(gameMainMenu.RecordVideoButton, shield, settingsButton) + return backToGame(gameMainMenu.RecordVideoButton, shield, settingsButton) end) - - if settings():FindFirstChild "Game Options" then - pcall(function() - settings():FindFirstChild("Game Options").VideoRecordingChangeRequest:connect(function(recording) + if settings():FindFirstChild("Game Options") then +pcall(function() + return settings():FindFirstChild("Game Options").VideoRecordingChangeRequest:connect(function(recording) recordingVideo = recording - setRecordGui(recording, gui.StopRecordButton, gameMainMenu.RecordVideoButton) + return setRecordGui(recording, gui.StopRecordButton, gameMainMenu.RecordVideoButton) end) end) end - - game.CoreGui.RobloxGui.Changed:connect(function(prop) -- We have stopped recording when we resize + game.CoreGui.RobloxGui.Changed:connect(function(prop) if prop == "AbsoluteSize" and recordingVideo then - recordVideoClick(gameMainMenu.RecordVideoButton, gui.StopRecordButton) + return recordVideoClick(gameMainMenu.RecordVideoButton, gui.StopRecordButton) end end) - - function localPlayerChange() + local localPlayerChange + localPlayerChange = function() gameMainMenu.ResetButton.Visible = game.Players.LocalPlayer if game.Players.LocalPlayer then settings().Rendering.EnableFRM = true @@ -1488,227 +1166,134 @@ if LoadLibrary then settings().Rendering.EnableFRM = false end end - gameMainMenu.ResetButton.Visible = game.Players.LocalPlayer - if game.Players.LocalPlayer ~= nil then + if (game.Players.LocalPlayer ~= nil) then game.Players.LocalPlayer.Changed:connect(function() - localPlayerChange() + return localPlayerChange() end) else delay(0, function() waitForProperty(game.Players, "LocalPlayer") gameMainMenu.ResetButton.Visible = game.Players.LocalPlayer - game.Players.LocalPlayer.Changed:connect(function() - localPlayerChange() + return game.Players.LocalPlayer.Changed:connect(function() + return localPlayerChange() end) end) end - - gameMainMenu.ReportAbuseButton.Visible = game:FindFirstChild "NetworkClient" + gameMainMenu.ReportAbuseButton.Visible = game:FindFirstChild("NetworkClient") if not gameMainMenu.ReportAbuseButton.Visible then game.ChildAdded:connect(function(child) - if child:IsA "NetworkClient" then - gameMainMenu.ReportAbuseButton.Visible = game:FindFirstChild "NetworkClient" + if child:IsA("NetworkClient") then + gameMainMenu.ReportAbuseButton.Visible = game:FindFirstChild("NetworkClient") end end) end - gameMainMenu.ResetButton.MouseButton1Click:connect(function() - goToMenu(settingsFrame, "ResetConfirmationMenu", "up", UDim2.new(0, 525, 0, 370)) + return goToMenu(settingsFrame, "ResetConfirmationMenu", "up", UDim2.new(0, 525, 0, 370)) end) - gameMainMenu.LeaveGameButton.MouseButton1Click:connect(function() - goToMenu(settingsFrame, "LeaveConfirmationMenu", "down", UDim2.new(0, 525, 0, 300)) + return goToMenu(settingsFrame, "LeaveConfirmationMenu", "down", UDim2.new(0, 525, 0, 300)) end) - - if game.CoreGui.Version >= 4 then -- we can use escape! + if game.CoreGui.Version >= 4 then game:GetService("GuiService").EscapeKeyPressed:connect(function() if currentMenuSelection == nil then - game.GuiService:AddCenterDialog( - shield, - Enum.CenterDialogType.ModalDialog, - --showFunction - function() - settingsButton.Active = false - updateCameraDropDownSelection(UserSettings().GameSettings.ControlMode.Name) - - if syncVideoCaptureSetting then - syncVideoCaptureSetting() - end - - goToMenu(settingsFrame, "GameMainMenu", "right", UDim2.new(0, 525, 0, 430)) - shield.Visible = true - shield.Active = true - settingsFrame.Parent:TweenPosition( - UDim2.new(0.5, -262, 0.5, -200), - Enum.EasingDirection.InOut, - Enum.EasingStyle.Sine, - tweenTime, - true - ) - settingsFrame.Parent:TweenSize( - UDim2.new(0, 525, 0, 430), - Enum.EasingDirection.InOut, - Enum.EasingStyle.Sine, - tweenTime, - true - ) - end, - --hideFunction - function() - settingsFrame.Parent:TweenPosition( - UDim2.new(0.5, -262, -0.5, -200), - Enum.EasingDirection.InOut, - Enum.EasingStyle.Sine, - tweenTime, - true - ) - settingsFrame.Parent:TweenSize( - UDim2.new(0, 525, 0, 430), - Enum.EasingDirection.InOut, - Enum.EasingStyle.Sine, - tweenTime, - true - ) - shield.Visible = false - settingsButton.Active = true + return game.GuiService:AddCenterDialog(shield, Enum.CenterDialogType.ModalDialog, function() + settingsButton.Active = false + updateCameraDropDownSelection(UserSettings().GameSettings.ControlMode.Name) + if syncVideoCaptureSetting then + syncVideoCaptureSetting() end - ) + goToMenu(settingsFrame, "GameMainMenu", "right", UDim2.new(0, 525, 0, 430)) + shield.Visible = true + shield.Active = true + settingsFrame.Parent:TweenPosition(UDim2.new(0.5, -262, 0.5, -200), Enum.EasingDirection.InOut, Enum.EasingStyle.Sine, tweenTime, true) + return settingsFrame.Parent:TweenSize(UDim2.new(0, 525, 0, 430), Enum.EasingDirection.InOut, Enum.EasingStyle.Sine, tweenTime, true) + end, function() + settingsFrame.Parent:TweenPosition(UDim2.new(0.5, -262, -0.5, -200), Enum.EasingDirection.InOut, Enum.EasingStyle.Sine, tweenTime, true) + settingsFrame.Parent:TweenSize(UDim2.new(0, 525, 0, 430), Enum.EasingDirection.InOut, Enum.EasingStyle.Sine, tweenTime, true) + shield.Visible = false + settingsButton.Active = true + end) elseif #lastMenuSelection > 0 then if #centerDialogs > 0 then for i = 1, #centerDialogs do game.GuiService:RemoveCenterDialog(centerDialogs[i]) centerDialogs[i].Visible = false end - centerDialogs = {} + centerDialogs = { } end - - goToMenu( - lastMenuSelection[#lastMenuSelection]["container"], - lastMenuSelection[#lastMenuSelection]["name"], - lastMenuSelection[#lastMenuSelection]["direction"], - lastMenuSelection[#lastMenuSelection]["lastSize"] - ) - + goToMenu(lastMenuSelection[#lastMenuSelection]["container"], lastMenuSelection[#lastMenuSelection]["name"], lastMenuSelection[#lastMenuSelection]["direction"], lastMenuSelection[#lastMenuSelection]["lastSize"]) table.remove(lastMenuSelection, #lastMenuSelection) - if #lastMenuSelection == 1 then -- apparently lua can't reduce count to 0... T_T - lastMenuSelection = {} + if #lastMenuSelection == 1 then + lastMenuSelection = { } end else - resumeGameFunction(shield) + return resumeGameFunction(shield) end end) end - local gameSettingsMenu = createGameSettingsMenu(baseZIndex, shield) gameSettingsMenu.Visible = false gameSettingsMenu.Parent = settingsFrame - gameMainMenu.SettingsButton.MouseButton1Click:connect(function() - goToMenu(settingsFrame, "GameSettingsMenu", "left", UDim2.new(0, 525, 0, 350)) + return goToMenu(settingsFrame, "GameSettingsMenu", "left", UDim2.new(0, 525, 0, 350)) end) - gameSettingsMenu.BackButton.MouseButton1Click:connect(function() - goToMenu(settingsFrame, "GameMainMenu", "right", UDim2.new(0, 525, 0, 430)) + return goToMenu(settingsFrame, "GameMainMenu", "right", UDim2.new(0, 525, 0, 430)) end) - local resetConfirmationWindow = createResetConfirmationMenu(baseZIndex, shield) resetConfirmationWindow.Visible = false resetConfirmationWindow.Parent = settingsFrame - local leaveConfirmationWindow = createLeaveConfirmationMenu(baseZIndex, shield) leaveConfirmationWindow.Visible = false leaveConfirmationWindow.Parent = settingsFrame - robloxLock(shield) - settingsButton.MouseButton1Click:connect(function() - game.GuiService:AddCenterDialog( - shield, - Enum.CenterDialogType.ModalDialog, - --showFunction - function() - settingsButton.Active = false - updateCameraDropDownSelection(UserSettings().GameSettings.ControlMode.Name) - - if syncVideoCaptureSetting then - syncVideoCaptureSetting() - end - - goToMenu(settingsFrame, "GameMainMenu", "right", UDim2.new(0, 525, 0, 430)) - shield.Visible = true - settingsFrame.Parent:TweenPosition( - UDim2.new(0.5, -262, 0.5, -200), - Enum.EasingDirection.InOut, - Enum.EasingStyle.Sine, - tweenTime, - true - ) - settingsFrame.Parent:TweenSize( - UDim2.new(0, 525, 0, 430), - Enum.EasingDirection.InOut, - Enum.EasingStyle.Sine, - tweenTime, - true - ) - end, - --hideFunction - function() - settingsFrame.Parent:TweenPosition( - UDim2.new(0.5, -262, -0.5, -200), - Enum.EasingDirection.InOut, - Enum.EasingStyle.Sine, - tweenTime, - true - ) - settingsFrame.Parent:TweenSize( - UDim2.new(0, 525, 0, 430), - Enum.EasingDirection.InOut, - Enum.EasingStyle.Sine, - tweenTime, - true - ) - shield.Visible = false - settingsButton.Active = true + return game.GuiService:AddCenterDialog(shield, Enum.CenterDialogType.ModalDialog, function() + settingsButton.Active = false + updateCameraDropDownSelection(UserSettings().GameSettings.ControlMode.Name) + if syncVideoCaptureSetting then + syncVideoCaptureSetting() end - ) + goToMenu(settingsFrame, "GameMainMenu", "right", UDim2.new(0, 525, 0, 430)) + shield.Visible = true + settingsFrame.Parent:TweenPosition(UDim2.new(0.5, -262, 0.5, -200), Enum.EasingDirection.InOut, Enum.EasingStyle.Sine, tweenTime, true) + return settingsFrame.Parent:TweenSize(UDim2.new(0, 525, 0, 430), Enum.EasingDirection.InOut, Enum.EasingStyle.Sine, tweenTime, true) + end, function() + settingsFrame.Parent:TweenPosition(UDim2.new(0.5, -262, -0.5, -200), Enum.EasingDirection.InOut, Enum.EasingStyle.Sine, tweenTime, true) + settingsFrame.Parent:TweenSize(UDim2.new(0, 525, 0, 430), Enum.EasingDirection.InOut, Enum.EasingStyle.Sine, tweenTime, true) + shield.Visible = false + settingsButton.Active = true + end) end) - return shield end - delay(0, function() createSettingsDialog().Parent = gui - gui.BottomLeftControl.SettingsButton.Active = true gui.BottomLeftControl.SettingsButton.Position = UDim2.new(0, 2, 0, -2) - if mouseLockLabel and UserSettings().GameSettings.ControlMode == Enum.ControlMode["Mouse Lock Switch"] then mouseLockLabel.Visible = true elseif mouseLockLabel then mouseLockLabel.Visible = false end - - -- our script has loaded, get rid of older buttons now - local leaveGameButton = gui.BottomLeftControl:FindFirstChild "Exit" + local leaveGameButton = gui.BottomLeftControl:FindFirstChild("Exit") if leaveGameButton then leaveGameButton:Remove() end - - local topLeft = gui:FindFirstChild "TopLeftControl" + local topLeft = gui:FindFirstChild("TopLeftControl") if topLeft then - leaveGameButton = topLeft:FindFirstChild "Exit" + leaveGameButton = topLeft:FindFirstChild("Exit") if leaveGameButton then leaveGameButton:Remove() end - - topLeft:Remove() + return topLeft:Remove() end end) - end --UserSettings call - - local createSaveDialogs = function() - local shield = Instance.new "TextButton" + end + local createSaveDialogs + createSaveDialogs = function() + local shield = Instance.new("TextButton") shield.Text = "" shield.AutoButtonColor = false shield.Name = "SaveDialogShield" @@ -1719,72 +1304,51 @@ if LoadLibrary then shield.BorderColor3 = Color3I(27, 42, 53) shield.BackgroundTransparency = 0.4 shield.ZIndex = baseZIndex + 1 - - local clearAndResetDialog - local save - local saveLocal - local dontSave - local cancel - - local messageBoxButtons = {} - messageBoxButtons[1] = {} + local clearAndResetDialog, save, saveLocal, dontSave, cancel + local messageBoxButtons = { } + messageBoxButtons[1] = { } messageBoxButtons[1].Text = "Save" messageBoxButtons[1].Style = Enum.ButtonStyle.RobloxButtonDefault messageBoxButtons[1].Function = function() - save() + return save() end - messageBoxButtons[2] = {} + messageBoxButtons[2] = { } messageBoxButtons[2].Text = "Cancel" messageBoxButtons[2].Function = function() - cancel() + return cancel() end - messageBoxButtons[3] = {} + messageBoxButtons[3] = { } messageBoxButtons[3].Text = "Don't Save" messageBoxButtons[3].Function = function() - dontSave() + return dontSave() end - - local saveDialogMessageBox = RbxGui.CreateStyledMessageDialog( - "Unsaved Changes", - "Save your changes to Mercury before leaving?", - "Confirm", - messageBoxButtons - ) + local saveDialogMessageBox = RbxGui.CreateStyledMessageDialog("Unsaved Changes", "Save your changes to Mercury before leaving?", "Confirm", messageBoxButtons) saveDialogMessageBox.Visible = true saveDialogMessageBox.Parent = shield - - local errorBoxButtons = {} - + local errorBoxButtons = { } local buttonOffset = 1 if game.LocalSaveEnabled then - errorBoxButtons[buttonOffset] = {} + errorBoxButtons[buttonOffset] = { } errorBoxButtons[buttonOffset].Text = "Save to Disk" errorBoxButtons[buttonOffset].Function = function() - saveLocal() + return saveLocal() end buttonOffset = buttonOffset + 1 end - errorBoxButtons[buttonOffset] = {} + errorBoxButtons[buttonOffset] = { } errorBoxButtons[buttonOffset].Text = "Keep Playing" errorBoxButtons[buttonOffset].Function = function() - cancel() + return cancel() end - errorBoxButtons[buttonOffset + 1] = {} + errorBoxButtons[buttonOffset + 1] = { } errorBoxButtons[buttonOffset + 1].Text = "Don't Save" errorBoxButtons[buttonOffset + 1].Function = function() - dontSave() + return dontSave() end - - local errorDialogMessageBox = RbxGui.CreateStyledMessageDialog( - "Upload Failed", - "Sorry, we could not save your changes to Mercury.", - "Error", - errorBoxButtons - ) + local errorDialogMessageBox = RbxGui.CreateStyledMessageDialog("Upload Failed", "Sorry, we could not save your changes to Mercury.", "Error", errorBoxButtons) errorDialogMessageBox.Visible = false errorDialogMessageBox.Parent = shield - - local spinnerDialog = Instance.new "Frame" + local spinnerDialog = Instance.new("Frame") spinnerDialog.Name = "SpinnerDialog" spinnerDialog.Style = Enum.FrameStyle.RobloxRound spinnerDialog.Size = UDim2.new(0, 350, 0, 150) @@ -1792,8 +1356,7 @@ if LoadLibrary then spinnerDialog.Visible = false spinnerDialog.Active = true spinnerDialog.Parent = shield - - local waitingLabel = Instance.new "TextLabel" + local waitingLabel = Instance.new("TextLabel") waitingLabel.Name = "WaitingLabel" waitingLabel.Text = "Saving to Mercury..." waitingLabel.Font = Enum.Font.ArialBold @@ -1801,122 +1364,91 @@ if LoadLibrary then waitingLabel.Position = UDim2.new(0.5, 25, 0.5, 0) waitingLabel.TextColor3 = Color3.new(1, 1, 1) waitingLabel.Parent = spinnerDialog - - local spinnerFrame = Instance.new "Frame" + local spinnerFrame = Instance.new("Frame") spinnerFrame.Name = "Spinner" spinnerFrame.Size = UDim2.new(0, 80, 0, 80) spinnerFrame.Position = UDim2.new(0.5, -150, 0.5, -40) spinnerFrame.BackgroundTransparency = 1 spinnerFrame.Parent = spinnerDialog - - local spinnerIcons = {} + local spinnerIcons = { } local spinnerNum = 1 while spinnerNum <= 8 do - local spinnerImage = Instance.new "ImageLabel" + local spinnerImage = Instance.new("ImageLabel") spinnerImage.Name = "Spinner" .. spinnerNum spinnerImage.Size = UDim2.new(0, 16, 0, 16) - spinnerImage.Position = UDim2.new( - 0.5 + 0.3 * math.cos(math.rad(45 * spinnerNum)), - -8, - 0.5 + 0.3 * math.sin(math.rad(45 * spinnerNum)), - -8 - ) + spinnerImage.Position = UDim2.new(0.5 + 0.3 * math.cos(math.rad(45 * spinnerNum)), -8, 0.5 + 0.3 * math.sin(math.rad(45 * spinnerNum)), -8) spinnerImage.BackgroundTransparency = 1 spinnerImage.Image = "http://www.roblox.com/Asset?id=45880710" spinnerImage.Parent = spinnerFrame - spinnerIcons[spinnerNum] = spinnerImage spinnerNum = spinnerNum + 1 end - save = function() saveDialogMessageBox.Visible = false - - --Show the spinner dialog spinnerDialog.Visible = true local spin = true - --Make it spin delay(0, function() local spinPos = 0 while spin do local pos = 0 - while pos < 8 do if pos == spinPos or pos == ((spinPos + 1) % 8) then spinnerIcons[pos + 1].Image = "http://www.roblox.com/Asset?id=45880668" else spinnerIcons[pos + 1].Image = "http://www.roblox.com/Asset?id=45880710" end - pos = pos + 1 end spinPos = (spinPos + 1) % 8 wait(0.2) end end) - - --Do the save while the spinner is going, function will wait local result = game:SaveToRoblox() if not result then - --Try once more result = game:SaveToRoblox() end - - --Hide the spinner dialog spinnerDialog.Visible = false - --And cause the delay thread to stop spin = false - - --Now process the result if result then - --Success, close game:FinishShutdown(false) - clearAndResetDialog() + return clearAndResetDialog() else - --Failure, show the second dialog prompt errorDialogMessageBox.Visible = true end end - saveLocal = function() errorDialogMessageBox.Visible = false game:FinishShutdown(true) - clearAndResetDialog() + return clearAndResetDialog() end - dontSave = function() saveDialogMessageBox.Visible = false errorDialogMessageBox.Visible = false game:FinishShutdown(false) - clearAndResetDialog() + return clearAndResetDialog() end cancel = function() saveDialogMessageBox.Visible = false errorDialogMessageBox.Visible = false - clearAndResetDialog() + return clearAndResetDialog() end - clearAndResetDialog = function() saveDialogMessageBox.Visible = true errorDialogMessageBox.Visible = false spinnerDialog.Visible = false shield.Visible = false - game.GuiService:RemoveCenterDialog(shield) + return game.GuiService:RemoveCenterDialog(shield) end - robloxLock(shield) shield.Visible = false return shield end - - local createReportAbuseDialog = function() - --Only show things if we are a NetworkClient + local createReportAbuseDialog + createReportAbuseDialog = function() waitForChild(game, "NetworkClient") - waitForChild(game, "Players") waitForProperty(game.Players, "LocalPlayer") local localPlayer = game.Players.LocalPlayer - local reportAbuseButton waitForChild(gui, "UserSettingsShield") waitForChild(gui.UserSettingsShield, "Settings") @@ -1924,8 +1456,7 @@ if LoadLibrary then waitForChild(gui.UserSettingsShield.Settings.SettingsStyle, "GameMainMenu") waitForChild(gui.UserSettingsShield.Settings.SettingsStyle.GameMainMenu, "ReportAbuseButton") reportAbuseButton = gui.UserSettingsShield.Settings.SettingsStyle.GameMainMenu.ReportAbuseButton - - local shield = Instance.new "TextButton" + local shield = Instance.new("TextButton") shield.Name = "ReportAbuseShield" shield.Text = "" shield.AutoButtonColor = false @@ -1936,57 +1467,38 @@ if LoadLibrary then shield.BorderColor3 = Color3I(27, 42, 53) shield.BackgroundTransparency = 0.4 shield.ZIndex = baseZIndex + 1 - local closeAndResetDialog - - local messageBoxButtons = {} - messageBoxButtons[1] = {} + local messageBoxButtons = { } + messageBoxButtons[1] = { } messageBoxButtons[1].Text = "Ok" messageBoxButtons[1].Modal = true messageBoxButtons[1].Function = function() - closeAndResetDialog() + return closeAndResetDialog() end - local calmingMessageBox = RbxGui.CreateMessageDialog( - "Thanks for your report!", - "Our moderators will review the chat logs and determine what happened. The other user is probably just trying to make you mad.\n\nIf anyone used swear words, inappropriate language, or threatened you in real life, please report them for Bad Words or Threats", - messageBoxButtons - ) + local calmingMessageBox = RbxGui.CreateMessageDialog("Thanks for your report!", "Our moderators will review the chat logs and determine what happened. The other user is probably just trying to make you mad.\n\nIf anyone used swear words, inappropriate language, or threatened you in real life, please report them for Bad Words or Threats", messageBoxButtons) calmingMessageBox.Visible = false calmingMessageBox.Parent = shield - - local recordedMessageBox = RbxGui.CreateMessageDialog( - "Thanks for your report!", - "We've recorded your report for evaluation.", - messageBoxButtons - ) + local recordedMessageBox = RbxGui.CreateMessageDialog("Thanks for your report!", "We've recorded your report for evaluation.", messageBoxButtons) recordedMessageBox.Visible = false recordedMessageBox.Parent = shield - - local normalMessageBox = RbxGui.CreateMessageDialog( - "Thanks for your report!", - "Our moderators will review the chat logs and determine what happened.", - messageBoxButtons - ) + local normalMessageBox = RbxGui.CreateMessageDialog("Thanks for your report!", "Our moderators will review the chat logs and determine what happened.", messageBoxButtons) normalMessageBox.Visible = false normalMessageBox.Parent = shield - - local frame = Instance.new "Frame" + local frame = Instance.new("Frame") frame.Name = "Settings" frame.Position = UDim2.new(0.5, -250, 0.5, -200) frame.Size = UDim2.new(0, 500, 0, 400) frame.BackgroundTransparency = 1 frame.Active = true frame.Parent = shield - - local settingsFrame = Instance.new "Frame" + local settingsFrame = Instance.new("Frame") settingsFrame.Name = "ReportAbuseStyle" settingsFrame.Size = UDim2.new(1, 0, 1, 0) settingsFrame.Style = Enum.FrameStyle.RobloxRound settingsFrame.Active = true settingsFrame.ZIndex = baseZIndex + 1 settingsFrame.Parent = frame - - local title = Instance.new "TextLabel" + local title = Instance.new("TextLabel") title.Name = "Title" title.Text = "Report Abuse" title.TextColor3 = Color3I(221, 221, 221) @@ -1995,11 +1507,9 @@ if LoadLibrary then title.FontSize = Enum.FontSize.Size36 title.ZIndex = baseZIndex + 2 title.Parent = settingsFrame - - local description = Instance.new "TextLabel" + local description = Instance.new("TextLabel") description.Name = "Description" - description.Text = - "This will send a complete report to a moderator. The moderator will review the chat log and take appropriate action." + description.Text = "This will send a complete report to a moderator. The moderator will review the chat log and take appropriate action." description.TextColor3 = Color3I(221, 221, 221) description.Position = UDim2.new(0, 0, 0, 55) description.Size = UDim2.new(1, 0, 0, 40) @@ -2011,8 +1521,7 @@ if LoadLibrary then description.TextXAlignment = Enum.TextXAlignment.Left description.TextYAlignment = Enum.TextYAlignment.Top description.Parent = settingsFrame - - local playerLabel = Instance.new "TextLabel" + local playerLabel = Instance.new("TextLabel") playerLabel.Name = "PlayerLabel" playerLabel.Text = "Which player?" playerLabel.BackgroundTransparency = 1 @@ -2024,28 +1533,27 @@ if LoadLibrary then playerLabel.TextXAlignment = Enum.TextXAlignment.Left playerLabel.ZIndex = baseZIndex + 2 playerLabel.Parent = settingsFrame - - local abusingPlayer = nil - local abuse = nil - local submitReportButton = nil - - local updatePlayerSelection = nil - local createPlayersDropDown = function() - local players = game:GetService "Players" - local playerNames = {} - local nameToPlayer = {} + local abusingPlayer + local abuse + local submitReportButton + local updatePlayerSelection + local createPlayersDropDown + createPlayersDropDown = function() + local players = game:GetService("Players") + local playerNames = { } + local nameToPlayer = { } local children = players:GetChildren() local pos = 1 if children then for _, player in ipairs(children) do - if player:IsA "Player" and player ~= localPlayer then + if player:IsA("Player") and player ~= localPlayer then playerNames[pos] = player.Name nameToPlayer[player.Name] = player pos = pos + 1 end end end - local playerDropDown = nil + local playerDropDown playerDropDown, updatePlayerSelection = RbxGui.CreateDropDownMenu(playerNames, function(playerName) abusingPlayer = nameToPlayer[playerName] if abuse and abusingPlayer then @@ -2056,11 +1564,9 @@ if LoadLibrary then playerDropDown.ZIndex = baseZIndex + 2 playerDropDown.Position = UDim2.new(0.425, 0, 0, 102) playerDropDown.Size = UDim2.new(0.55, 0, 0, 32) - return playerDropDown end - - local abuseLabel = Instance.new "TextLabel" + local abuseLabel = Instance.new("TextLabel") abuseLabel.Name = "AbuseLabel" abuseLabel.Text = "Type of Abuse:" abuseLabel.Font = Enum.Font.Arial @@ -2072,7 +1578,6 @@ if LoadLibrary then abuseLabel.TextXAlignment = Enum.TextXAlignment.Left abuseLabel.ZIndex = baseZIndex + 2 abuseLabel.Parent = settingsFrame - local abuses = { "Swearing", "Bullying", @@ -2082,7 +1587,7 @@ if LoadLibrary then "Personal Questions", "Offsite Links", "Bad Model or Script", - "Bad Username", + "Bad Username" } local abuseDropDown, updateAbuseSelection = RbxGui.CreateDropDownMenu(abuses, function(abuseText) abuse = abuseText @@ -2095,8 +1600,7 @@ if LoadLibrary then abuseDropDown.Position = UDim2.new(0.425, 0, 0, 142) abuseDropDown.Size = UDim2.new(0.55, 0, 0, 32) abuseDropDown.Parent = settingsFrame - - local shortDescriptionLabel = Instance.new "TextLabel" + local shortDescriptionLabel = Instance.new("TextLabel") shortDescriptionLabel.Name = "ShortDescriptionLabel" shortDescriptionLabel.Text = "Short Description: (optional)" shortDescriptionLabel.Font = Enum.Font.Arial @@ -2108,8 +1612,7 @@ if LoadLibrary then shortDescriptionLabel.BackgroundTransparency = 1 shortDescriptionLabel.ZIndex = baseZIndex + 2 shortDescriptionLabel.Parent = settingsFrame - - local shortDescriptionWrapper = Instance.new "Frame" + local shortDescriptionWrapper = Instance.new("Frame") shortDescriptionWrapper.Name = "ShortDescriptionWrapper" shortDescriptionWrapper.Position = UDim2.new(0.025, 0, 0, 220) shortDescriptionWrapper.Size = UDim2.new(0.95, 0, 1, -310) @@ -2117,8 +1620,7 @@ if LoadLibrary then shortDescriptionWrapper.BorderSizePixel = 0 shortDescriptionWrapper.ZIndex = baseZIndex + 2 shortDescriptionWrapper.Parent = settingsFrame - - local shortDescriptionBox = Instance.new "TextBox" + local shortDescriptionBox = Instance.new("TextBox") shortDescriptionBox.Name = "TextBox" shortDescriptionBox.Text = "" shortDescriptionBox.ClearTextOnFocus = false @@ -2134,8 +1636,7 @@ if LoadLibrary then shortDescriptionBox.BorderSizePixel = 0 shortDescriptionBox.ZIndex = baseZIndex + 2 shortDescriptionBox.Parent = shortDescriptionWrapper - - submitReportButton = Instance.new "TextButton" + submitReportButton = Instance.new("TextButton") submitReportButton.Name = "SubmitReportBtn" submitReportButton.Active = false submitReportButton.Modal = true @@ -2149,7 +1650,6 @@ if LoadLibrary then submitReportButton.TextColor3 = Color3I(255, 255, 255) submitReportButton.ZIndex = baseZIndex + 2 submitReportButton.Parent = settingsFrame - submitReportButton.MouseButton1Click:connect(function() if submitReportButton.Active then if abuse and abusingPlayer then @@ -2163,12 +1663,11 @@ if LoadLibrary then normalMessageBox.Visible = true end else - closeAndResetDialog() + return closeAndResetDialog() end end end) - - local cancelButton = Instance.new "TextButton" + local cancelButton = Instance.new("TextButton") cancelButton.Name = "CancelBtn" cancelButton.Font = Enum.Font.Arial cancelButton.FontSize = Enum.FontSize.Size18 @@ -2180,14 +1679,11 @@ if LoadLibrary then cancelButton.TextColor3 = Color3I(255, 255, 255) cancelButton.ZIndex = baseZIndex + 2 cancelButton.Parent = settingsFrame - closeAndResetDialog = function() - --Delete old player combo box - local oldComboBox = settingsFrame:FindFirstChild "PlayersComboBox" + local oldComboBox = settingsFrame:FindFirstChild("PlayersComboBox") if oldComboBox then oldComboBox.Parent = nil end - abusingPlayer = nil updatePlayerSelection(nil) abuse = nil @@ -2200,150 +1696,40 @@ if LoadLibrary then normalMessageBox.Visible = false shield.Visible = false reportAbuseButton.Active = true - game.GuiService:RemoveCenterDialog(shield) + return game.GuiService:RemoveCenterDialog(shield) end - cancelButton.MouseButton1Click:connect(closeAndResetDialog) - reportAbuseButton.MouseButton1Click:connect(function() createPlayersDropDown().Parent = settingsFrame table.insert(centerDialogs, shield) - game.GuiService:AddCenterDialog( - shield, - Enum.CenterDialogType.ModalDialog, - --ShowFunction - function() - reportAbuseButton.Active = false - shield.Visible = true - mainShield.Visible = false - end, - --HideFunction - function() - reportAbuseButton.Active = true - shield.Visible = false - end - ) + return game.GuiService:AddCenterDialog(shield, Enum.CenterDialogType.ModalDialog, function() + reportAbuseButton.Active = false + shield.Visible = true + mainShield.Visible = false + end, function() + reportAbuseButton.Active = true + shield.Visible = false + end) end) - robloxLock(shield) return shield end - - -- local createChatBar = function() - -- --Only show a chat bar if we are a NetworkClient - -- waitForChild(game, "NetworkClient") - - -- waitForChild(game, "Players") - -- waitForProperty(game.Players, "LocalPlayer") - - -- local chatBar = Instance.new "Frame" - -- chatBar.Name = "ChatBar" - -- chatBar.Size = UDim2.new(1, 0, 0, 22) - -- chatBar.Position = UDim2.new(0, 0, 1, 0) - -- chatBar.BackgroundColor3 = Color3.new(0, 0, 0) - -- chatBar.BorderSizePixel = 0 - - -- local chatBox = Instance.new "TextBox" - -- chatBox.Text = "" - -- chatBox.Visible = false - -- chatBox.Size = UDim2.new(1, -4, 1, 0) - -- chatBox.Position = UDim2.new(0, 2, 0, 0) - -- chatBox.TextXAlignment = Enum.TextXAlignment.Left - -- chatBox.Font = Enum.Font.Arial - -- chatBox.ClearTextOnFocus = false - -- chatBox.FontSize = Enum.FontSize.Size14 - -- chatBox.TextColor3 = Color3.new(1, 1, 1) - -- chatBox.BackgroundTransparency = 1 - -- --chatBox.Parent = chatBar - - -- local chatButton = Instance.new "TextButton" - -- chatButton.Size = UDim2.new(1, -4, 1, 0) - -- chatButton.Position = UDim2.new(0, 2, 0, 0) - -- chatButton.AutoButtonColor = false - -- chatButton.Text = 'To chat click here or press "/" key' - -- chatButton.TextXAlignment = Enum.TextXAlignment.Left - -- chatButton.Font = Enum.Font.Arial - -- chatButton.FontSize = Enum.FontSize.Size14 - -- chatButton.TextColor3 = Color3.new(1, 1, 1) - -- chatButton.BackgroundTransparency = 1 - -- --chatButton.Parent = chatBar - - -- local activateChat = function() - -- if chatBox.Visible then - -- return - -- end - -- chatButton.Visible = false - -- chatBox.Text = "" - -- chatBox.Visible = true - -- chatBox:CaptureFocus() - -- end - - -- chatButton.MouseButton1Click:connect(activateChat) - - -- -- local hotKeyEnabled = true - -- local toggleHotKey = function(_) - -- -- hotKeyEnabled = value - -- end - - -- -- local guiService = game:GetService "GuiService" - -- --[[local newChatMode = ]]pcall(function() - -- --guiService:AddSpecialKey(Enum.SpecialKey.ChatHotkey) - -- --guiService.SpecialKeyPressed:connect(function(key) if key == Enum.SpecialKey.ChatHotkey and hotKeyEnabled then activateChat() end end) - -- end) - -- -- if not newChatMode then - -- --guiService:AddKey("/") - -- --guiService.KeyPressed:connect(function(key) if key == "/" and hotKeyEnabled then activateChat() end end) - -- -- end - - -- chatBox.FocusLost:connect(function(enterPressed) - -- if enterPressed then - -- if chatBox.Text ~= "" then - -- local str = chatBox.Text - -- if string.sub(str, 1, 1) == "%" then - -- game.Players:TeamChat(string.sub(str, 2)) - -- else - -- game.Players:Chat(str) - -- end - -- end - -- end - -- chatBox.Text = "" - -- chatBox.Visible = false - -- chatButton.Visible = true - -- end) - -- robloxLock(chatBar) - -- return chatBar, toggleHotKey - -- end - - --Spawn a thread for the Save dialogs - local isSaveDialogSupported = pcall(function() - -- local var = game.LocalSaveEnabled - end) + local isSaveDialogSupported = pcall(function() end) if isSaveDialogSupported then delay(0, function() local saveDialogs = createSaveDialogs() saveDialogs.Parent = gui - game.RequestShutdown = function() table.insert(centerDialogs, saveDialogs) - game.GuiService:AddCenterDialog( - saveDialogs, - Enum.CenterDialogType.QuitDialog, - --ShowFunction - function() - saveDialogs.Visible = true - end, - --HideFunction - function() - saveDialogs.Visible = false - end - ) - + game.GuiService:AddCenterDialog(saveDialogs, Enum.CenterDialogType.QuitDialog, function() + saveDialogs.Visible = true + end, function() + saveDialogs.Visible = false + end) return true end end) end - - --Spawn a thread for the Report Abuse dialogs delay(0, function() createReportAbuseDialog().Parent = gui waitForChild(gui, "UserSettingsShield") @@ -2353,65 +1739,23 @@ if LoadLibrary then waitForChild(gui.UserSettingsShield.Settings.SettingsStyle.GameMainMenu, "ReportAbuseButton") gui.UserSettingsShield.Settings.SettingsStyle.GameMainMenu.ReportAbuseButton.Active = true end) - - --Spawn a thread for Chat Bar - --[[local success, luaChat = ]] - pcall(function() +pcall(function() return game.GuiService.UseLuaChat end) - -- if success and luaChat then - - --[[delay(0, - function() - waitForChild(game, "Players") - waitForProperty(game.Players, "LocalPlayer") - - local advancedChatBarSupported = game.Players.LocalPlayer.ChatMode - local chatBar, toggleHotKey = createChatBar() - - [if advancedChatBarSupported then - local function toggleChatBar(chatMode) - if chatMode == Enum.ChatMode.Menu then - chatBar.Parent = nil - game.GuiService:SetGlobalSizeOffsetPixel(0,0) - toggleHotKey(false) - elseif chatMode == Enum.ChatMode.TextAndMenu then - --chatBar.Parent = gui - --game.GuiService:SetGlobalSizeOffsetPixel(0,-22) - toggleHotKey(true) - end - end - game.Players.LocalPlayer.Changed:connect( - function(prop) - if prop == "ChatMode" then - toggleChatBar(game.Players.LocalPlayer.ChatMode) - end - end) - toggleChatBar(game.Players.LocalPlayer.ChatMode) - else - --chatBar.Parent = gui - --game.GuiService:SetGlobalSizeOffsetPixel(0,-22) - end - end)]] - -- end - local BurningManPlaceID = 41324860 - -- TODO: remove click to walk completely if testing shows we don't need it - -- Removes click to walk option from Burning Man - delay(0, function() + return delay(0, function() waitForChild(game, "NetworkClient") waitForChild(game, "Players") waitForProperty(game.Players, "LocalPlayer") waitForProperty(game.Players.LocalPlayer, "Character") waitForChild(game.Players.LocalPlayer.Character, "Humanoid") waitForProperty(game, "PlaceId") - if game.PlaceId == BurningManPlaceID then game.Players.LocalPlayer.Character.Humanoid:SetClickToWalkEnabled(false) - game.Players.LocalPlayer.CharacterAdded:connect(function(character) + return game.Players.LocalPlayer.CharacterAdded:connect(function(character) waitForChild(character, "Humanoid") - character.Humanoid:SetClickToWalkEnabled(false) + return character.Humanoid:SetClickToWalkEnabled(false) end) end end) -end --LoadLibrary if +end diff --git a/yue/46295863.yue b/yue/46295863.yue index 6b64762..1d86644 100644 --- a/yue/46295863.yue +++ b/yue/46295863.yue @@ -1,36 +1,12 @@ import "macros" as { $ } $load $FILE --- Heliodex's basic New function (basically a simplified version of melt) -New = (className, name, props) -> - if not props? -- no name was provided - props = name - name = nil - - obj = Instance.new className - obj.Name = name if name - local parent - - for k, v in pairs props - if type(k) == "string" - if k == "Parent" - parent = v - else - obj[k] = v - - elseif type(k) == "number" and type(v) == "userdata" - v.Parent = obj - - obj.Parent = parent - obj --- - waitForChild = (instance, name) -> - while not instance\FindFirstChild name + until instance\FindFirstChild name instance.ChildAdded\wait! waitForProperty = (instance, property) -> - while not instance[property] + until instance[property] instance.Changed\wait! -- A Few Script Globals @@ -39,8 +15,8 @@ gui = if script.Parent\FindFirstChild "ControlFrame" else script.Parent -local syncVideoCaptureSetting -local settingsButton, helpButton, settingsFrame, mouseLockLabel + +local helpButton local updateCameraDropDownSelection local updateVideoCaptureDropDownSelection tweenTime = 0.2 @@ -64,14 +40,12 @@ local mainShield inStudioMode = UserSettings!.GameSettings\InStudioMode! macClient = false -success, isMac = try +local success, isMac = try not game.GuiService.IsWindows macClient = success and isMac -Color3I = (r, g, b) -> - Color3.new r / 255, g / 255, b / 255 - +Color3I = (r, g, b) -> Color3.new r / 255, g / 255, b / 255 robloxLock = (instance) -> instance.RobloxLocked = true @@ -80,7 +54,6 @@ robloxLock = (instance) -> for _, child in ipairs children robloxLock child - resumeGameFunction = (shield) -> shield.Settings\TweenPosition( UDim2.new(0.5, -262, -0.5, -200), @@ -104,20 +77,20 @@ resumeGameFunction = (shield) -> goToMenu = (container, menuName, moveDirection, size, position) -> return if type(menuName) ~= "string" - table.insert lastMenuSelection, currentMenuSelection + table.insert(lastMenuSelection, currentMenuSelection) if menuName == "GameMainMenu" lastMenuSelection = {} - containerChildren = container\GetChildren! for i = 1, #containerChildren if containerChildren[i].Name == menuName containerChildren[i].Visible = true - currentMenuSelection = + currentMenuSelection = container: container name: menuName direction: moveDirection lastSize: size + -- selectedMenu = true if size and position containerChildren[i]\TweenSizeAndPosition( @@ -186,20 +159,23 @@ goToMenu = (container, menuName, moveDirection, size, position) -> resetLocalCharacter = -> player = game.Players.LocalPlayer - if player - if player.Character and player.Character\FindFirstChild "Humanoid" - player.Character.Humanoid.Health = 0 + if player and + player.Character and + player.Character\FindFirstChild "Humanoid" + + player.Character.Humanoid.Health = 0 createTextButton = (text, style, fontSize, buttonSize, buttonPosition) -> - New "TextButton" - Font: Enum.Font.Arial - FontSize: fontSize - Size: buttonSize - Position: buttonPosition - Style: style - TextColor3: Color3.new 1, 1, 1 - Text: text + newTextButton = Instance.new "TextButton" + newTextButton.Font = Enum.Font.Arial + newTextButton.FontSize = fontSize + newTextButton.Size = buttonSize + newTextButton.Position = buttonPosition + newTextButton.Style = style + newTextButton.TextColor3 = Color3.new 1, 1, 1 + newTextButton.Text = text + newTextButton CreateTextButtons = (frame, buttons, yPos, ySize) -> @@ -212,19 +188,21 @@ CreateTextButtons = (frame, buttons, yPos, ySize) -> toggleSelection = (button) -> for _, obj in ipairs buttonObjs - obj.Style = if obj == button - Enum.ButtonStyle.RobloxButtonDefault + if obj == button + obj.Style = Enum.ButtonStyle.RobloxButtonDefault else - Enum.ButtonStyle.RobloxButton + obj.Style = Enum.ButtonStyle.RobloxButton + for _, obj in ipairs buttons - button = New "TextButton", "Button#{buttonNum}" - Font: Enum.Font.Arial - FontSize: Enum.FontSize.Size18 - AutoButtonColor: true - Style: Enum.ButtonStyle.RobloxButton - Text: obj.Text - TextColor3: Color3.new 1, 1, 1 + button = Instance.new "TextButton" + button.Name = "Button" .. buttonNum + button.Font = Enum.Font.Arial + button.FontSize = Enum.FontSize.Size18 + button.AutoButtonColor = true + button.Style = Enum.ButtonStyle.RobloxButton + button.Text = obj.Text + button.TextColor3 = Color3.new 1, 1, 1 button.MouseButton1Click\connect -> toggleSelection button obj.Function! @@ -234,7 +212,8 @@ CreateTextButtons = (frame, buttons, yPos, ySize) -> buttonNum += 1 - toggleSelection buttonObjs[1] + + toggleSelection(buttonObjs[1]) numButtons = buttonNum - 1 @@ -253,7 +232,10 @@ CreateTextButtons = (frame, buttons, yPos, ySize) -> buttonNum = 1 while buttonNum <= numButtons - buttonObjs[buttonNum].Position = UDim2.new spacing * buttonNum + (buttonNum - 1) * buttonSize, 0, yPos.Scale, yPos.Offset + buttonObjs[buttonNum].Position = UDim2.new( + spacing * buttonNum + (buttonNum - 1) * buttonSize, 0, + yPos.Scale, yPos.Offset + ) buttonObjs[buttonNum].Size = UDim2.new buttonSize, 0, ySize.Scale, ySize.Offset buttonNum += 1 @@ -294,66 +276,73 @@ setDisabledState = (guiObject) -> guiObject.Active = false else if guiObject["ClassName"] - print "setDisabledState() got object of unsupported type. object type is ", guiObject.ClassName + print("setDisabledState! got object of unsupported type. object type is ", guiObject.ClassName) createHelpDialog = (baseZIndex) -> - if not helpButton? - if gui\FindFirstChild "TopLeftControl" and gui.TopLeftControl\FindFirstChild "Help" - helpButton = gui.TopLeftControl.Help + if helpButton == nil + helpButton= if gui\FindFirstChild "TopLeftControl" and gui.TopLeftControl\FindFirstChild "Help" + gui.TopLeftControl.Help elseif gui\FindFirstChild "BottomRightControl" and gui.BottomRightControl\FindFirstChild "Help" - helpButton = gui.BottomRightControl.Help + gui.BottomRightControl.Help + shield = Instance.new "Frame" + shield.Name = "HelpDialogShield" + shield.Active = true + shield.Visible = false + shield.Size = UDim2.new 1, 0, 1, 0 + shield.BackgroundColor3 = Color3I 51, 51, 51 + shield.BorderColor3 = Color3I 27, 42, 53 + shield.BackgroundTransparency = 0.4 + shield.ZIndex = baseZIndex + 1 - shield = New "Frame", "HelpDialogShield" - Active: true - Visible: false - Size: UDim2.new 1, 0, 1, 0 - BackgroundColor3: Color3I 51, 51, 51 - BorderColor3: Color3I 27, 42, 53 - BackgroundTransparency: 0.4 - ZIndex: baseZIndex + 1 + helpDialog = Instance.new "Frame" + helpDialog.Name = "HelpDialog" + helpDialog.Style = Enum.FrameStyle.RobloxRound + helpDialog.Position = UDim2.new 0.2, 0, 0.2, 0 + helpDialog.Size = UDim2.new 0.6, 0, 0.6, 0 + helpDialog.Active = true + helpDialog.Parent = shield - helpDialog = New "Frame", "HelpDialog" - Style: Enum.FrameStyle.RobloxRound - Position: UDim2.new 0.2, 0, 0.2, 0 - Size: UDim2.new 0.6, 0, 0.6, 0 - Active: true - Parent: shield + titleLabel = Instance.new "TextLabel" + titleLabel.Name = "Title" + titleLabel.Text = "Keyboard & Mouse Controls" + titleLabel.Font = Enum.Font.ArialBold + titleLabel.FontSize = Enum.FontSize.Size36 + titleLabel.Position = UDim2.new 0, 0, 0.025, 0 + titleLabel.Size = UDim2.new 1, 0, 0, 40 + titleLabel.TextColor3 = Color3.new 1, 1, 1 + titleLabel.BackgroundTransparency = 1 + titleLabel.Parent = helpDialog - * New "TextLabel", "Title" - Text: "Keyboard & Mouse Controls" - Font: Enum.Font.ArialBold - FontSize: Enum.FontSize.Size36 - Position: UDim2.new 0, 0, 0.025, 0 - Size: UDim2.new 1, 0, 0, 40 - TextColor3: Color3.new 1, 1, 1 - BackgroundTransparency: 1 + buttonRow = Instance.new "Frame" + buttonRow.Name = "Buttons" + buttonRow.Position = UDim2.new 0.1, 0, 0.07, 40 + buttonRow.Size = UDim2.new 0.8, 0, 0, 45 + buttonRow.BackgroundTransparency = 1 + buttonRow.Parent = helpDialog - buttonRow = New "Frame", "Buttons" - Position: UDim2.new 0.1, 0, 0.07, 40 - Size: UDim2.new 0.8, 0, 0, 45 - BackgroundTransparency: 1 - Parent: helpDialog + imageFrame = Instance.new "Frame" + imageFrame.Name = "ImageFrame" + imageFrame.Position = UDim2.new 0.05, 0, 0.075, 80 + imageFrame.Size = UDim2.new 0.9, 0, 0.9, -120 + imageFrame.BackgroundTransparency = 1 + imageFrame.Parent = helpDialog - imageFrame = New "Frame", "ImageFrame" - Position: UDim2.new 0.05, 0, 0.075, 80 - Size: UDim2.new 0.9, 0, 0.9, -120 - BackgroundTransparency: 1 - Parent: helpDialog + layoutFrame = Instance.new "Frame" + layoutFrame.Name = "LayoutFrame" + layoutFrame.Position = UDim2.new 0.5, 0, 0, 0 + layoutFrame.Size = UDim2.new 1.5, 0, 1, 0 + layoutFrame.BackgroundTransparency = 1 + layoutFrame.SizeConstraint = Enum.SizeConstraint.RelativeYY + layoutFrame.Parent = imageFrame - layoutFrame = New "Frame", "LayoutFrame" - Position: UDim2.new 0.5, 0, 0, 0 - Size: UDim2.new 1.5, 0, 1, 0 - BackgroundTransparency: 1 - SizeConstraint: Enum.SizeConstraint.RelativeYY - Parent: imageFrame - - image = New "ImageLabel", "Image" - if UserSettings!.GameSettings.ControlMode == Enum.ControlMode["Mouse Lock Switch"] - image.Image = mouseLockLookScreenUrl + image = Instance.new "ImageLabel" + image.Name = "Image" + image.Image = if UserSettings!.GameSettings.ControlMode == Enum.ControlMode["Mouse Lock Switch"] + mouseLockLookScreenUrl else - image.Image = classicLookScreenUrl + classicLookScreenUrl image.Position = UDim2.new -0.5, 0, 0, 0 image.Size = UDim2.new 1, 0, 1, 0 @@ -364,9 +353,7 @@ createHelpDialog = (baseZIndex) -> buttons[1] = {} buttons[1].Text = "Look" buttons[1].Function = -> - image.Image = if UserSettings!.GameSettings.ControlMode == - Enum.ControlMode["Mouse Lock Switch"] - + image.Image = if UserSettings!.GameSettings.ControlMode == Enum.ControlMode["Mouse Lock Switch"] mouseLockLookScreenUrl else classicLookScreenUrl @@ -388,183 +375,195 @@ createHelpDialog = (baseZIndex) -> image.Image = "http://www.roblox.com/Asset?id=45915825" - CreateTextButtons buttonRow, buttons, UDim.new(0, 0), UDim.new 1, 0 + CreateTextButtons(buttonRow, buttons, UDim.new(0, 0), UDim.new(1, 0)) -- set up listeners for type of mouse mode, but keep constructing gui at same time delay 0, -> - waitForChild gui, "UserSettingsShield" - waitForChild gui.UserSettingsShield, "Settings" - waitForChild gui.UserSettingsShield.Settings, "SettingsStyle" - waitForChild gui.UserSettingsShield.Settings.SettingsStyle, "GameSettingsMenu" - waitForChild gui.UserSettingsShield.Settings.SettingsStyle.GameSettingsMenu, "CameraField" - waitForChild gui.UserSettingsShield.Settings.SettingsStyle.GameSettingsMenu.CameraField, "DropDownMenuButton" - gui.UserSettingsShield.Settings.SettingsStyle.GameSettingsMenu.CameraField.DropDownMenuButton.Changed\connect (prop) -> - return if prop ~= "Text" + waitForChild(gui, "UserSettingsShield") + waitForChild(gui.UserSettingsShield, "Settings") + waitForChild(gui.UserSettingsShield.Settings, "SettingsStyle") + waitForChild(gui.UserSettingsShield.Settings.SettingsStyle, "GameSettingsMenu") + waitForChild(gui.UserSettingsShield.Settings.SettingsStyle.GameSettingsMenu, "CameraField") + waitForChild(gui.UserSettingsShield.Settings.SettingsStyle.GameSettingsMenu.CameraField, "DropDownMenuButton") + gui.UserSettingsShield.Settings.SettingsStyle.GameSettingsMenu.CameraField.DropDownMenuButton.Changed + \connect (prop) -> + return if prop ~= "Text" - if buttonRow.Button1.Style == Enum.ButtonStyle.RobloxButtonDefault -- only change if this is the currently selected panel - image.Image = if gui.UserSettingsShield.Settings.SettingsStyle.GameSettingsMenu.CameraField.DropDownMenuButton.Text == - "Classic" + if buttonRow.Button1.Style == Enum.ButtonStyle.RobloxButtonDefault -- only change if this is the currently selected panel + image.Image = if gui.UserSettingsShield.Settings.SettingsStyle.GameSettingsMenu.CameraField.DropDownMenuButton.Text == + "Classic" - classicLookScreenUrl - else - mouseLockLookScreenUrl + classicLookScreenUrl + else + mouseLockLookScreenUrl - okBtn = New "TextButton", "OkBtn" - Text: "OK" - Modal: true - Size: UDim2.new 0.3, 0, 0, 45 - Position: UDim2.new 0.35, 0, 0.975, -50 - Font: Enum.Font.Arial - FontSize: Enum.FontSize.Size18 - BackgroundTransparency: 1 - TextColor3: Color3.new 1, 1, 1 - Style: Enum.ButtonStyle.RobloxButtonDefault - Parent: helpDialog + okBtn = Instance.new "TextButton" + okBtn.Name = "OkBtn" + okBtn.Text = "OK" + okBtn.Modal = true + okBtn.Size = UDim2.new 0.3, 0, 0, 45 + okBtn.Position = UDim2.new 0.35, 0, 0.975, -50 + okBtn.Font = Enum.Font.Arial + okBtn.FontSize = Enum.FontSize.Size18 + okBtn.BackgroundTransparency = 1 + okBtn.TextColor3 = Color3.new 1, 1, 1 + okBtn.Style = Enum.ButtonStyle.RobloxButtonDefault okBtn.MouseButton1Click\connect -> shield.Visible = false game.GuiService\RemoveCenterDialog shield + okBtn.Parent = helpDialog + robloxLock shield shield createLeaveConfirmationMenu = (baseZIndex, shield) -> - frame = New "Frame", "LeaveConfirmationMenu" - BackgroundTransparency: 1 - Size: UDim2.new 1, 0, 1, 0 - Position: UDim2.new 0, 0, 2, 400 - ZIndex: baseZIndex + 4 + frame = Instance.new "Frame" + frame.Name = "LeaveConfirmationMenu" + frame.BackgroundTransparency = 1 + frame.Size = UDim2.new 1, 0, 1, 0 + frame.Position = UDim2.new 0, 0, 2, 400 + frame.ZIndex = baseZIndex + 4 - * New "TextLabel", "LeaveText" - Text: "Leave this game?" - Size: UDim2.new 1, 0, 0.8, 0 - TextWrap: true - TextColor3: Color3.new 1, 1, 1 - Font: Enum.Font.ArialBold - FontSize: Enum.FontSize.Size36 - BackgroundTransparency: 1 - ZIndex: baseZIndex + 4 - - with createTextButton( + yesButton = createTextButton( "Leave", Enum.ButtonStyle.RobloxButton, Enum.FontSize.Size24, UDim2.new(0, 128, 0, 50), - UDim2.new(0, 313, 0.8, 0) + UDim2.new 0, 313, 0.8, 0 ) - .Name = "YesButton" - .ZIndex = baseZIndex + 4 - .Parent = frame - .Modal = true - \SetVerb "Exit" + yesButton.Name = "YesButton" + yesButton.ZIndex = baseZIndex + 4 + yesButton.Parent = frame + yesButton.Modal = true + yesButton\SetVerb "Exit" - with createTextButton( + noButton = createTextButton( "Stay", Enum.ButtonStyle.RobloxButtonDefault, Enum.FontSize.Size24, UDim2.new(0, 128, 0, 50), - UDim2.new(0, 90, 0.8, 0) + UDim2.new 0, 90, 0.8, 0 ) - .Name = "NoButton" - .Parent = frame - .ZIndex = baseZIndex + 4 - .MouseButton1Click\connect -> - goToMenu shield.Settings.SettingsStyle, "GameMainMenu", "down", UDim2.new 0, 525, 0, 430 - shield.Settings\TweenSize( - UDim2.new(0, 525, 0, 430), - Enum.EasingDirection.InOut, - Enum.EasingStyle.Sine, - tweenTime, - true - ) + noButton.Name = "NoButton" + noButton.Parent = frame + noButton.ZIndex = baseZIndex + 4 + noButton.MouseButton1Click\connect -> + goToMenu(shield.Settings.SettingsStyle, "GameMainMenu", "down", UDim2.new(0, 525, 0, 430)) + shield.Settings\TweenSize( + UDim2.new(0, 525, 0, 430), + Enum.EasingDirection.InOut, + Enum.EasingStyle.Sine, + tweenTime, + true + ) + + leaveText = Instance.new "TextLabel" + leaveText.Name = "LeaveText" + leaveText.Text = "Leave this game?" + leaveText.Size = UDim2.new 1, 0, 0.8, 0 + leaveText.TextWrap = true + leaveText.TextColor3 = Color3.new 1, 1, 1 + leaveText.Font = Enum.Font.ArialBold + leaveText.FontSize = Enum.FontSize.Size36 + leaveText.BackgroundTransparency = 1 + leaveText.ZIndex = baseZIndex + 4 + leaveText.Parent = frame frame - createResetConfirmationMenu = (baseZIndex, shield) -> - frame = New "Frame", "ResetConfirmationMenu" - BackgroundTransparency: 1 - Size: UDim2.new 1, 0, 1, 0 - Position: UDim2.new 0, 0, 2, 400 - ZIndex: baseZIndex + 4 + frame = Instance.new "Frame" + frame.Name = "ResetConfirmationMenu" + frame.BackgroundTransparency = 1 + frame.Size = UDim2.new 1, 0, 1, 0 + frame.Position = UDim2.new 0, 0, 2, 400 + frame.ZIndex = baseZIndex + 4 - with createTextButton( + yesButton = createTextButton( "Reset", Enum.ButtonStyle.RobloxButtonDefault, Enum.FontSize.Size24, UDim2.new(0, 128, 0, 50), - UDim2.new(0, 313, 0, 299) + UDim2.new 0, 313, 0, 299 ) - .Name = "YesButton" - .ZIndex = baseZIndex + 4 - .Parent = frame - .Modal = true - .MouseButton1Click\connect -> - resumeGameFunction shield - resetLocalCharacter! + yesButton.Name = "YesButton" + yesButton.ZIndex = baseZIndex + 4 + yesButton.Parent = frame + yesButton.Modal = true + yesButton.MouseButton1Click\connect -> + resumeGameFunction shield + resetLocalCharacter! - with createTextButton( + noButton = createTextButton( "Cancel", Enum.ButtonStyle.RobloxButton, Enum.FontSize.Size24, UDim2.new(0, 128, 0, 50), - UDim2.new(0, 90, 0, 299) + UDim2.new 0, 90, 0, 299 ) - .Name = "NoButton" - .Parent = frame - .ZIndex = baseZIndex + 4 - .MouseButton1Click\connect -> - goToMenu shield.Settings.SettingsStyle, "GameMainMenu", "down", UDim2.new 0, 525, 0, 430 - shield.Settings\TweenSize( - UDim2.new(0, 525, 0, 430), - Enum.EasingDirection.InOut, - Enum.EasingStyle.Sine, - tweenTime, - true - ) + noButton.Name = "NoButton" + noButton.Parent = frame + noButton.ZIndex = baseZIndex + 4 + noButton.MouseButton1Click\connect -> + goToMenu(shield.Settings.SettingsStyle, "GameMainMenu", "down", UDim2.new(0, 525, 0, 430)) + shield.Settings\TweenSize( + UDim2.new(0, 525, 0, 430), + Enum.EasingDirection.InOut, + Enum.EasingStyle.Sine, + tweenTime, + true + ) - resetCharacterText = New "TextLabel", "ResetCharacterText" - Text: "Are you sure you want to reset your character?" - Size: UDim2.new 1, 0, 0.8, 0 - TextWrap: true - TextColor3: Color3.new 1, 1, 1 - Font: Enum.Font.ArialBold - FontSize: Enum.FontSize.Size36 - BackgroundTransparency: 1 - ZIndex: baseZIndex + 4 - Parent: frame + resetCharacterText = Instance.new "TextLabel" + resetCharacterText.Name = "ResetCharacterText" + resetCharacterText.Text = "Are you sure you want to reset your character?" + resetCharacterText.Size = UDim2.new 1, 0, 0.8, 0 + resetCharacterText.TextWrap = true + resetCharacterText.TextColor3 = Color3.new 1, 1, 1 + resetCharacterText.Font = Enum.Font.ArialBold + resetCharacterText.FontSize = Enum.FontSize.Size36 + resetCharacterText.BackgroundTransparency = 1 + resetCharacterText.ZIndex = baseZIndex + 4 + resetCharacterText.Parent = frame - with resetCharacterText\Clone! - .Name = "FineResetCharacterText" - .Text = "You will be put back on a spawn point" - .Size = UDim2.new 0, 303, 0, 18 - .Position = UDim2.new 0, 109, 0, 215 - .FontSize = Enum.FontSize.Size18 - .Parent = frame + fineResetCharacterText = resetCharacterText\Clone! + fineResetCharacterText.Name = "FineResetCharacterText" + fineResetCharacterText.Text = "You will be put back on a spawn point" + fineResetCharacterText.Size = UDim2.new 0, 303, 0, 18 + fineResetCharacterText.Position = UDim2.new 0, 109, 0, 215 + fineResetCharacterText.FontSize = Enum.FontSize.Size18 + fineResetCharacterText.Parent = frame frame createGameMainMenu = (baseZIndex, shield) -> - gameMainMenuFrame = New "Frame", "GameMainMenu" - BackgroundTransparency: 1 - Size: UDim2.new 1, 0, 1, 0 - ZIndex: baseZIndex + 4 - Parent: settingsFrame + gameMainMenuFrame = Instance.new "Frame" + gameMainMenuFrame.Name = "GameMainMenu" + gameMainMenuFrame.BackgroundTransparency = 1 + gameMainMenuFrame.Size = UDim2.new 1, 0, 1, 0 + gameMainMenuFrame.ZIndex = baseZIndex + 4 + gameMainMenuFrame.Parent = settingsFrame - * New "TextLabel", "Title" - Text: "Game Menu" - BackgroundTransparency: 1 - TextStrokeTransparency: 0 - Font: Enum.Font.ArialBold - FontSize: Enum.FontSize.Size36 - Size: UDim2.new 1, 0, 0, 36 - Position: UDim2.new 0, 0, 0, 4 - TextColor3: Color3.new 1, 1, 1 - ZIndex: baseZIndex + 4 + -- GameMainMenu Children + + gameMainMenuTitle = Instance.new "TextLabel" + gameMainMenuTitle.Name = "Title" + gameMainMenuTitle.Text = "Game Menu" + gameMainMenuTitle.BackgroundTransparency = 1 + gameMainMenuTitle.TextStrokeTransparency = 0 + gameMainMenuTitle.Font = Enum.Font.ArialBold + gameMainMenuTitle.FontSize = Enum.FontSize.Size36 + gameMainMenuTitle.Size = UDim2.new 1, 0, 0, 36 + gameMainMenuTitle.Position = UDim2.new 0, 0, 0, 4 + gameMainMenuTitle.TextColor3 = Color3.new 1, 1, 1 + gameMainMenuTitle.ZIndex = baseZIndex + 4 + gameMainMenuTitle.Parent = gameMainMenuFrame robloxHelpButton = createTextButton( "Help", @@ -578,11 +577,11 @@ createGameMainMenu = (baseZIndex, shield) -> robloxHelpButton.Parent = gameMainMenuFrame helpButton = robloxHelpButton - helpDialog = createHelpDialog baseZIndex + helpDialog = createHelpDialog(baseZIndex) helpDialog.Parent = gui helpButton.MouseButton1Click\connect -> - table.insert centerDialogs, helpDialog + table.insert(centerDialogs, helpDialog) game.GuiService\AddCenterDialog( helpDialog, Enum.CenterDialogType.ModalDialog, @@ -598,17 +597,18 @@ createGameMainMenu = (baseZIndex, shield) -> helpButton.Active = true - helpShortcut = New "TextLabel", "HelpShortcutText" - Text: "F1" - Visible: false - BackgroundTransparency: 1 - Font: Enum.Font.Arial - FontSize: Enum.FontSize.Size12 - Position: UDim2.new 0, 85, 0, 0 - Size: UDim2.new 0, 30, 0, 30 - TextColor3: Color3.new 0, 1, 0 - ZIndex: baseZIndex + 4 - Parent: robloxHelpButton + helpShortcut = Instance.new "TextLabel" + helpShortcut.Name = "HelpShortcutText" + helpShortcut.Text = "F1" + helpShortcut.Visible = false + helpShortcut.BackgroundTransparency = 1 + helpShortcut.Font = Enum.Font.Arial + helpShortcut.FontSize = Enum.FontSize.Size12 + helpShortcut.Position = UDim2.new 0, 85, 0, 0 + helpShortcut.Size = UDim2.new 0, 30, 0, 30 + helpShortcut.TextColor3 = Color3.new 0, 1, 0 + helpShortcut.ZIndex = baseZIndex + 4 + helpShortcut.Parent = robloxHelpButton screenshotButton = createTextButton( "Screenshot", @@ -617,19 +617,18 @@ createGameMainMenu = (baseZIndex, shield) -> UDim2.new(0, 168, 0, 50), UDim2.new 0, 254, 0, 256 ) - with screenshotButton - .Name = "ScreenshotButton" - .ZIndex = baseZIndex + 4 - .Parent = gameMainMenuFrame - .Visible = not macClient - \SetVerb "Screenshot" + screenshotButton.Name = "ScreenshotButton" + screenshotButton.ZIndex = baseZIndex + 4 + screenshotButton.Parent = gameMainMenuFrame + screenshotButton.Visible = not macClient + screenshotButton\SetVerb "Screenshot" - with helpShortcut\clone! - .Name = "ScreenshotShortcutText" - .Text = "PrintSc" - .Position = UDim2.new 0, 118, 0, 0 - .Visible = true - .Parent = screenshotButton + screenshotShortcut = helpShortcut\clone! + screenshotShortcut.Name = "ScreenshotShortcutText" + screenshotShortcut.Text = "PrintSc" + screenshotShortcut.Position = UDim2.new 0, 118, 0, 0 + screenshotShortcut.Visible = true + screenshotShortcut.Parent = screenshotButton recordVideoButton = createTextButton( "Record Video", @@ -638,28 +637,28 @@ createGameMainMenu = (baseZIndex, shield) -> UDim2.new(0, 168, 0, 50), UDim2.new 0, 254, 0, 306 ) - with recordVideoButton - .Name = "RecordVideoButton" - .ZIndex = baseZIndex + 4 - .Parent = gameMainMenuFrame - .Visible = not macClient - \SetVerb "RecordToggle" + recordVideoButton.Name = "RecordVideoButton" + recordVideoButton.ZIndex = baseZIndex + 4 + recordVideoButton.Parent = gameMainMenuFrame + recordVideoButton.Visible = not macClient + recordVideoButton\SetVerb "RecordToggle" - with helpShortcut\clone! - .Name = "RecordVideoShortcutText" - .Visible = hasGraphicsSlider - .Text = "F12" - .Position = UDim2.new 0, 120, 0, 0 - .Parent = recordVideoButton + recordVideoShortcut = helpShortcut\clone! + recordVideoShortcut.Visible = hasGraphicsSlider + recordVideoShortcut.Name = "RecordVideoShortcutText" + recordVideoShortcut.Text = "F12" + recordVideoShortcut.Position = UDim2.new 0, 120, 0, 0 + recordVideoShortcut.Parent = recordVideoButton - stopRecordButton = New "ImageButton", "StopRecordButton" - BackgroundTransparency: 1 - Image: "rbxasset://textures/ui/RecordStop.png" - Size: UDim2.new 0, 59, 0, 27 + stopRecordButton = Instance.new "ImageButton" + stopRecordButton.Name = "StopRecordButton" + stopRecordButton.BackgroundTransparency = 1 + stopRecordButton.Image = "rbxasset://textures/ui/RecordStop.png" + stopRecordButton.Size = UDim2.new 0, 59, 0, 27 stopRecordButton\SetVerb "RecordToggle" stopRecordButton.MouseButton1Click\connect -> - recordVideoClick recordVideoButton, stopRecordButton + recordVideoClick(recordVideoButton, stopRecordButton) stopRecordButton.Visible = false stopRecordButton.Parent = gui @@ -675,30 +674,30 @@ createGameMainMenu = (baseZIndex, shield) -> reportAbuseButton.ZIndex = baseZIndex + 4 reportAbuseButton.Parent = gameMainMenuFrame - with createTextButton( + leaveGameButton = createTextButton( "Leave Game", Enum.ButtonStyle.RobloxButton, Enum.FontSize.Size24, UDim2.new(0, 340, 0, 50), UDim2.new 0, 82, 0, 358 ) - .Name = "LeaveGameButton" - .ZIndex = baseZIndex + 4 - .Parent = gameMainMenuFrame + leaveGameButton.Name = "LeaveGameButton" + leaveGameButton.ZIndex = baseZIndex + 4 + leaveGameButton.Parent = gameMainMenuFrame - with createTextButton( + resumeGameButton = createTextButton( "Resume Game", Enum.ButtonStyle.RobloxButtonDefault, Enum.FontSize.Size24, UDim2.new(0, 340, 0, 50), UDim2.new 0, 82, 0, 54 ) - .Name = "resumeGameButton" - .ZIndex = baseZIndex + 4 - .Parent = gameMainMenuFrame - .Modal = true - .MouseButton1Click\connect -> - resumeGameFunction shield + resumeGameButton.Name = "resumeGameButton" + resumeGameButton.ZIndex = baseZIndex + 4 + resumeGameButton.Parent = gameMainMenuFrame + resumeGameButton.Modal = true + resumeGameButton.MouseButton1Click\connect -> + resumeGameFunction(shield) gameSettingsButton = createTextButton( @@ -745,124 +744,127 @@ createGameMainMenu = (baseZIndex, shield) -> createGameSettingsMenu = (baseZIndex, _) -> - gameSettingsMenuFrame = New "Frame", "GameSettingsMenu" - BackgroundTransparency: 1 - Size: UDim2.new 1, 0, 1, 0 - ZIndex: baseZIndex + 4 + gameSettingsMenuFrame = Instance.new "Frame" + gameSettingsMenuFrame.Name = "GameSettingsMenu" + gameSettingsMenuFrame.BackgroundTransparency = 1 + gameSettingsMenuFrame.Size = UDim2.new 1, 0, 1, 0 + gameSettingsMenuFrame.ZIndex = baseZIndex + 4 - * New "TextLabel", "Title" - Text: "Settings" - Size: UDim2.new 1, 0, 0, 48 - Position: UDim2.new 0, 9, 0, -9 - Font: Enum.Font.ArialBold - FontSize: Enum.FontSize.Size36 - TextColor3: Color3.new 1, 1, 1 - ZIndex: baseZIndex + 4 - BackgroundTransparency: 1 + title = Instance.new "TextLabel" + title.Name = "Title" + title.Text = "Settings" + title.Size = UDim2.new 1, 0, 0, 48 + title.Position = UDim2.new 0, 9, 0, -9 + title.Font = Enum.Font.ArialBold + title.FontSize = Enum.FontSize.Size36 + title.TextColor3 = Color3.new 1, 1, 1 + title.ZIndex = baseZIndex + 4 + title.BackgroundTransparency = 1 + title.Parent = gameSettingsMenuFrame - * New "TextLabel", "FullscreenText" - Text: "Fullscreen Mode" - Size: UDim2.new 0, 124, 0, 18 - Position: UDim2.new 0, 62, 0, 145 - Font: Enum.Font.Arial - FontSize: Enum.FontSize.Size18 - TextColor3: Color3.new 1, 1, 1 - ZIndex: baseZIndex + 4 - BackgroundTransparency: 1 + fullscreenText = Instance.new "TextLabel" + fullscreenText.Name = "FullscreenText" + fullscreenText.Text = "Fullscreen Mode" + fullscreenText.Size = UDim2.new 0, 124, 0, 18 + fullscreenText.Position = UDim2.new 0, 62, 0, 145 + fullscreenText.Font = Enum.Font.Arial + fullscreenText.FontSize = Enum.FontSize.Size18 + fullscreenText.TextColor3 = Color3.new 1, 1, 1 + fullscreenText.ZIndex = baseZIndex + 4 + fullscreenText.BackgroundTransparency = 1 + fullscreenText.Parent = gameSettingsMenuFrame - fullscreenShortcut = New "TextLabel", "FullscreenShortcutText" - Visible: hasGraphicsSlider - Text: "F11" - BackgroundTransparency: 1 - Font: Enum.Font.Arial - FontSize: Enum.FontSize.Size12 - Position: UDim2.new 0, 186, 0, 141 - Size: UDim2.new 0, 30, 0, 30 - TextColor3: Color3.new 0, 1, 0 - ZIndex: baseZIndex + 4 - Parent: gameSettingsMenuFrame + fullscreenShortcut = Instance.new "TextLabel" + fullscreenShortcut.Visible = hasGraphicsSlider + fullscreenShortcut.Name = "FullscreenShortcutText" + fullscreenShortcut.Text = "F11" + fullscreenShortcut.BackgroundTransparency = 1 + fullscreenShortcut.Font = Enum.Font.Arial + fullscreenShortcut.FontSize = Enum.FontSize.Size12 + fullscreenShortcut.Position = UDim2.new 0, 186, 0, 141 + fullscreenShortcut.Size = UDim2.new 0, 30, 0, 30 + fullscreenShortcut.TextColor3 = Color3.new 0, 1, 0 + fullscreenShortcut.ZIndex = baseZIndex + 4 + fullscreenShortcut.Parent = gameSettingsMenuFrame - studioText = New "TextLabel", "StudioText" - Visible: false - Text: "Studio Mode" - Size: UDim2.new 0, 95, 0, 18 - Position: UDim2.new 0, 62, 0, 179 - Font: Enum.Font.Arial - FontSize: Enum.FontSize.Size18 - TextColor3: Color3.new 1, 1, 1 - ZIndex: baseZIndex + 4 - BackgroundTransparency: 1 - Parent: gameSettingsMenuFrame + studioText = Instance.new "TextLabel" + studioText.Visible = false + studioText.Name = "StudioText" + studioText.Text = "Studio Mode" + studioText.Size = UDim2.new 0, 95, 0, 18 + studioText.Position = UDim2.new 0, 62, 0, 179 + studioText.Font = Enum.Font.Arial + studioText.FontSize = Enum.FontSize.Size18 + studioText.TextColor3 = Color3.new 1, 1, 1 + studioText.ZIndex = baseZIndex + 4 + studioText.BackgroundTransparency = 1 + studioText.Parent = gameSettingsMenuFrame studioShortcut = fullscreenShortcut\clone! - with studioShortcut - .Name = "StudioShortcutText" - .Visible = false -- TODO: turn back on when f2 hack is fixed - .Text = "F2" - .Position = UDim2.new 0, 154, 0, 175 - .Parent = gameSettingsMenuFrame + studioShortcut.Name = "StudioShortcutText" + studioShortcut.Visible = false -- TODO: turn back on when f2 hack is fixed + studioShortcut.Text = "F2" + studioShortcut.Position = UDim2.new 0, 154, 0, 175 + studioShortcut.Parent = gameSettingsMenuFrame local studioCheckbox if hasGraphicsSlider - qualityText = New "TextLabel", "QualityText" - Text: "Graphics Quality" - Size: UDim2.new 0, 128, 0, 18 - Position: UDim2.new 0, 30, 0, 239 - Font: Enum.Font.Arial - FontSize: Enum.FontSize.Size18 - TextColor3: Color3.new 1, 1, 1 - ZIndex: baseZIndex + 4 - BackgroundTransparency: 1 - Parent: gameSettingsMenuFrame - Visible: not inStudioMode + qualityText = Instance.new "TextLabel" + qualityText.Name = "QualityText" + qualityText.Text = "Graphics Quality" + qualityText.Size = UDim2.new 0, 128, 0, 18 + qualityText.Position = UDim2.new 0, 30, 0, 239 + qualityText.Font = Enum.Font.Arial + qualityText.FontSize = Enum.FontSize.Size18 + qualityText.TextColor3 = Color3.new 1, 1, 1 + qualityText.ZIndex = baseZIndex + 4 + qualityText.BackgroundTransparency = 1 + qualityText.Parent = gameSettingsMenuFrame + qualityText.Visible = not inStudioMode autoText = qualityText\clone! - with autoText - .Name = "AutoText" - .Text = "Auto" - .Position = UDim2.new 0, 183, 0, 214 - .TextColor3 = Color3.new 0.5, 0.5, 0.5 - .Size = UDim2.new 0, 34, 0, 18 - .Parent = gameSettingsMenuFrame - .Visible = not inStudioMode + autoText.Name = "AutoText" + autoText.Text = "Auto" + autoText.Position = UDim2.new 0, 183, 0, 214 + autoText.TextColor3 = Color3.new 128 / 255, 128 / 255, 128 / 255 + autoText.Size = UDim2.new 0, 34, 0, 18 + autoText.Parent = gameSettingsMenuFrame + autoText.Visible = not inStudioMode fasterText = autoText\clone! - with fasterText - .Name = "FasterText" - .Text = "Faster" - .Position = UDim2.new 0, 185, 0, 274 - .TextColor3 = Color3.new 95, 95, 95 - .FontSize = Enum.FontSize.Size14 - .Parent = gameSettingsMenuFrame - .Visible = not inStudioMode + fasterText.Name = "FasterText" + fasterText.Text = "Faster" + fasterText.Position = UDim2.new 0, 185, 0, 274 + fasterText.TextColor3 = Color3.new 95, 95, 95 + fasterText.FontSize = Enum.FontSize.Size14 + fasterText.Parent = gameSettingsMenuFrame + fasterText.Visible = not inStudioMode fasterShortcut = fullscreenShortcut\clone! - with fasterShortcut - .Name = "FasterShortcutText" - .Text = "F10 + Shift" - .Position = UDim2.new 0, 185, 0, 283 - .Parent = gameSettingsMenuFrame - .Visible = not inStudioMode + fasterShortcut.Name = "FasterShortcutText" + fasterShortcut.Text = "F10 + Shift" + fasterShortcut.Position = UDim2.new 0, 185, 0, 283 + fasterShortcut.Parent = gameSettingsMenuFrame + fasterShortcut.Visible = not inStudioMode betterQualityText = autoText\clone! - with betterQualityText - .Name = "BetterQualityText" - .Text = "Better Quality" - .TextWrap = true - .Size = UDim2.new 0, 41, 0, 28 - .Position = UDim2.new 0, 390, 0, 269 - .TextColor3 = Color3.new 95, 95, 95 - .FontSize = Enum.FontSize.Size14 - .Parent = gameSettingsMenuFrame - .Visible = not inStudioMode + betterQualityText.Name = "BetterQualityText" + betterQualityText.Text = "Better Quality" + betterQualityText.TextWrap = true + betterQualityText.Size = UDim2.new 0, 41, 0, 28 + betterQualityText.Position = UDim2.new 0, 390, 0, 269 + betterQualityText.TextColor3 = Color3.new 95, 95, 95 + betterQualityText.FontSize = Enum.FontSize.Size14 + betterQualityText.Parent = gameSettingsMenuFrame + betterQualityText.Visible = not inStudioMode betterQualityShortcut = fullscreenShortcut\clone! - Name: "BetterQualityShortcut" - Text: "F10" - Position: UDim2.new 0, 394, 0, 288 - Parent: gameSettingsMenuFrame - Visible: not inStudioMode + betterQualityShortcut.Name = "BetterQualityShortcut" + betterQualityShortcut.Text = "F10" + betterQualityShortcut.Position = UDim2.new 0, 394, 0, 288 + betterQualityShortcut.Parent = gameSettingsMenuFrame + betterQualityShortcut.Visible = not inStudioMode autoGraphicsButton = createTextButton( "X", @@ -871,37 +873,36 @@ createGameSettingsMenu = (baseZIndex, _) -> UDim2.new(0, 25, 0, 25), UDim2.new 0, 187, 0, 239 ) - with autoGraphicsButton - .Name = "AutoGraphicsButton" - .ZIndex = baseZIndex + 4 - .Parent = gameSettingsMenuFrame - .Visible = not inStudioMode + autoGraphicsButton.Name = "AutoGraphicsButton" + autoGraphicsButton.ZIndex = baseZIndex + 4 + autoGraphicsButton.Parent = gameSettingsMenuFrame + autoGraphicsButton.Visible = not inStudioMode - local graphicsSlider, graphicsLevel = RbxGui.CreateSlider GraphicsQualityLevels, 150, UDim2.new 0, 230, 0, 280 -- graphics - 1 because slider starts at 1 instead of 0 - with graphicsSlider - .Parent = gameSettingsMenuFrame - .Bar.ZIndex = baseZIndex + 4 - .Bar.Slider.ZIndex = baseZIndex + 5 - .Visible = not inStudioMode - graphicsLevel.Value = math.floor (settings!.Rendering\GetMaxQualityLevel! - 1) / 2 + graphicsSlider, graphicsLevel = RbxGui.CreateSlider GraphicsQualityLevels, 150, UDim2.new 0, 230, 0, 280 -- graphics - 1 because slider starts at 1 instead of 0 + graphicsSlider.Parent = gameSettingsMenuFrame + graphicsSlider.Bar.ZIndex = baseZIndex + 4 + graphicsSlider.Bar.Slider.ZIndex = baseZIndex + 5 + graphicsSlider.Visible = not inStudioMode + graphicsLevel.Value = math.floor((settings!.Rendering\GetMaxQualityLevel! - 1) / 2) - graphicsSetter = New "TextBox", "GraphicsSetter" - BackgroundColor3: Color3.new 0, 0, 0 - BorderColor3: Color3.new 0.5, 0.5, 0.5 - Size: UDim2.new 0, 50, 0, 25 - Position: UDim2.new 0, 450, 0, 269 - TextColor3: Color3.new 1, 1, 1 - Font: Enum.Font.Arial - FontSize: Enum.FontSize.Size18 - Text: "Auto" - ZIndex: 1 - TextWrap: true - Parent: gameSettingsMenuFrame - Visible: not inStudioMode + graphicsSetter = Instance.new "TextBox" + graphicsSetter.Name = "GraphicsSetter" + graphicsSetter.BackgroundColor3 = Color3.new 0, 0, 0 + graphicsSetter.BorderColor3 = Color3.new 128 / 255, 128 / 255, 128 / 255 + graphicsSetter.Size = UDim2.new 0, 50, 0, 25 + graphicsSetter.Position = UDim2.new 0, 450, 0, 269 + graphicsSetter.TextColor3 = Color3.new 1, 1, 1 + graphicsSetter.Font = Enum.Font.Arial + graphicsSetter.FontSize = Enum.FontSize.Size18 + graphicsSetter.Text = "Auto" + graphicsSetter.ZIndex = 1 + graphicsSetter.TextWrap = true + graphicsSetter.Parent = gameSettingsMenuFrame + graphicsSetter.Visible = not inStudioMode isAutoGraphics = true if not inStudioMode - isAutoGraphics = UserSettings!.GameSettings.SavedQualityLevel == Enum.SavedQualitySetting.Automatic + isAutoGraphics = (UserSettings!.GameSettings.SavedQualityLevel == Enum.SavedQualitySetting.Automatic) else settings!.Rendering.EnableFRM = false @@ -932,7 +933,7 @@ createGameSettingsMenu = (baseZIndex, _) -> goToAutoGraphics = -> - setAutoGraphicsGui true + setAutoGraphicsGui(true) UserSettings!.GameSettings.SavedQualityLevel = Enum.SavedQualitySetting.Automatic @@ -941,13 +942,13 @@ createGameSettingsMenu = (baseZIndex, _) -> setGraphicsQualityLevel = (newLevel) -> percentage = newLevel / GraphicsQualityLevels - newSetting = math.floor (settings!.Rendering\GetMaxQualityLevel! - 1) * percentage - newSetting = if newSetting == 20 -- Level 20 is the same as level 21, except it doesn't render ambient occlusion - 21 + newSetting = math.floor((settings!.Rendering\GetMaxQualityLevel! - 1) * percentage) + if newSetting == 20 -- Level 20 is the same as level 21, except it doesn't render ambient occlusion + newSetting = 21 elseif newLevel == 1 -- make sure we can go to lowest settings (for terrible computers) - 1 + newSetting = 1 elseif newSetting > settings!.Rendering\GetMaxQualityLevel! - settings!.Rendering\GetMaxQualityLevel! - 1 + newSetting = settings!.Rendering\GetMaxQualityLevel! - 1 UserSettings!.GameSettings.SavedQualityLevel = newLevel @@ -955,7 +956,7 @@ createGameSettingsMenu = (baseZIndex, _) -> goToManualGraphics = (explicitLevel) -> - setAutoGraphicsGui false + setAutoGraphicsGui(false) if explicitLevel graphicsLevel.Value = explicitLevel @@ -967,7 +968,7 @@ createGameSettingsMenu = (baseZIndex, _) -> if explicitLevel == graphicsLevel.Value -- make sure we are actually in right graphics mode - setGraphicsQualityLevel graphicsLevel.Value + setGraphicsQualityLevel(graphicsLevel.Value) if not explicitLevel @@ -1024,14 +1025,14 @@ createGameSettingsMenu = (baseZIndex, _) -> enableGraphicsWidget = -> settings!.Rendering.EnableFRM = true - isAutoGraphics = (UserSettings!.GameSettings.SavedQualityLevel == Enum.SavedQualitySetting.Automatic) + isAutoGraphics = UserSettings!.GameSettings.SavedQualityLevel == Enum.SavedQualitySetting.Automatic if isAutoGraphics showAutoGraphics! goToAutoGraphics! else showAutoGraphics! showManualGraphics! - goToManualGraphics(translateSavedQualityLevelToInt(UserSettings!.GameSettings.SavedQualityLevel)) + goToManualGraphics translateSavedQualityLevelToInt UserSettings!.GameSettings.SavedQualityLevel disableGraphicsWidget = -> @@ -1046,8 +1047,8 @@ createGameSettingsMenu = (baseZIndex, _) -> return - newGraphicsValue = tonumber(graphicsSetter.Text) - if not newGraphicsValue? + newGraphicsValue = tonumber graphicsSetter.Text + if newGraphicsValue == nil graphicsSetter.Text = "#{graphicsLevel.Value}" return @@ -1082,7 +1083,7 @@ createGameSettingsMenu = (baseZIndex, _) -> else settings!.Rendering.EnableFRM = true - goToManualGraphics(translateSavedQualityLevelToInt(UserSettings!.GameSettings.SavedQualityLevel)) + goToManualGraphics translateSavedQualityLevelToInt UserSettings!.GameSettings.SavedQualityLevel autoGraphicsButton.MouseButton1Click\connect -> @@ -1096,7 +1097,6 @@ createGameSettingsMenu = (baseZIndex, _) -> game.GraphicsQualityChangeRequest\connect (graphicsIncrease) -> return if isAutoGraphics - -- only can set graphics in manual mode if graphicsIncrease @@ -1114,8 +1114,7 @@ createGameSettingsMenu = (baseZIndex, _) -> -> ) else - if (graphicsLevel.Value - 1) <= 0 - return + return if (graphicsLevel.Value - 1) <= 0 graphicsLevel.Value = graphicsLevel.Value - 1 graphicsSetter.Text = "#{graphicsLevel.Value}" @@ -1178,17 +1177,14 @@ createGameSettingsMenu = (baseZIndex, _) -> autoGraphicsButton.ZIndex = baseZIndex + 4 autoText.ZIndex = baseZIndex + 4 - else studioCheckbox.MouseButton1Click\connect -> - if not studioCheckbox.Active - return + return if not studioCheckbox.Active - - if studioCheckbox.Text == "" - studioCheckbox.Text = "X" + studioCheckbox.Text = if studioCheckbox.Text == "" + "X" else - studioCheckbox.Text = "" + "" fullscreenCheckbox = createTextButton( @@ -1196,7 +1192,7 @@ createGameSettingsMenu = (baseZIndex, _) -> Enum.ButtonStyle.RobloxButton, Enum.FontSize.Size18, UDim2.new(0, 25, 0, 25), - UDim2.new(0, 30, 0, 144) + UDim2.new 0, 30, 0, 144 ) fullscreenCheckbox.Name = "FullscreenCheckbox" fullscreenCheckbox.ZIndex = baseZIndex + 4 @@ -1250,18 +1246,21 @@ createGameSettingsMenu = (baseZIndex, _) -> backButton.ZIndex = baseZIndex + 4 backButton.Parent = gameSettingsMenuFrame + syncVideoCaptureSetting = nil + if not macClient - New "TextLabel", "VideoCaptureLabel" - Text: "After Capturing Video" - Font: Enum.Font.Arial - FontSize: Enum.FontSize.Size18 - Position: UDim2.new 0, 32, 0, 100 - Size: UDim2.new 0, 164, 0, 18 - BackgroundTransparency: 1 - TextColor3: Color3I 255, 255, 255 - TextXAlignment: Enum.TextXAlignment.Left - ZIndex: baseZIndex + 4 - Parent: gameSettingsMenuFrame + videoCaptureLabel = Instance.new "TextLabel" + videoCaptureLabel.Name = "VideoCaptureLabel" + videoCaptureLabel.Text = "After Capturing Video" + videoCaptureLabel.Font = Enum.Font.Arial + videoCaptureLabel.FontSize = Enum.FontSize.Size18 + videoCaptureLabel.Position = UDim2.new 0, 32, 0, 100 + videoCaptureLabel.Size = UDim2.new 0, 164, 0, 18 + videoCaptureLabel.BackgroundTransparency = 1 + videoCaptureLabel.TextColor3 = Color3I 255, 255, 255 + videoCaptureLabel.TextXAlignment = Enum.TextXAlignment.Left + videoCaptureLabel.ZIndex = baseZIndex + 4 + videoCaptureLabel.Parent = gameSettingsMenuFrame videoNames = {} videoNameToItem = {} @@ -1274,14 +1273,13 @@ createGameSettingsMenu = (baseZIndex, _) -> videoCaptureDropDown, updateVideoCaptureDropDownSelection = RbxGui.CreateDropDownMenu videoNames, (text) -> UserSettings!.GameSettings.VideoUploadPromptBehavior = videoNameToItem[text] - with videoCaptureDropDown - .Name = "VideoCaptureField" - .ZIndex = baseZIndex + 4 - .DropDownMenuButton.ZIndex = baseZIndex + 4 - .DropDownMenuButton.Icon.ZIndex = baseZIndex + 4 - .Position = UDim2.new 0, 270, 0, 94 - .Size = UDim2.new 0, 200, 0, 32 - .Parent = gameSettingsMenuFrame + videoCaptureDropDown.Name = "VideoCaptureField" + videoCaptureDropDown.ZIndex = baseZIndex + 4 + videoCaptureDropDown.DropDownMenuButton.ZIndex = baseZIndex + 4 + videoCaptureDropDown.DropDownMenuButton.Icon.ZIndex = baseZIndex + 4 + videoCaptureDropDown.Position = UDim2.new 0, 270, 0, 94 + videoCaptureDropDown.Size = UDim2.new 0, 200, 0, 32 + videoCaptureDropDown.Parent = gameSettingsMenuFrame syncVideoCaptureSetting = -> updateVideoCaptureDropDownSelection if UserSettings!.GameSettings.VideoUploadPromptBehavior == Enum.UploadSetting["Never"] @@ -1293,17 +1291,18 @@ createGameSettingsMenu = (baseZIndex, _) -> videoNames[2] - New "TextLabel", "CameraLabel" - Text: "Character & Camera Controls" - Font: Enum.Font.Arial - FontSize: Enum.FontSize.Size18 - Position: UDim2.new 0, 31, 0, 58 - Size: UDim2.new 0, 224, 0, 18 - TextColor3: Color3I 255, 255, 255 - TextXAlignment: Enum.TextXAlignment.Left - BackgroundTransparency: 1 - ZIndex: baseZIndex + 4 - Parent: gameSettingsMenuFrame + cameraLabel = Instance.new "TextLabel" + cameraLabel.Name = "CameraLabel" + cameraLabel.Text = "Character & Camera Controls" + cameraLabel.Font = Enum.Font.Arial + cameraLabel.FontSize = Enum.FontSize.Size18 + cameraLabel.Position = UDim2.new 0, 31, 0, 58 + cameraLabel.Size = UDim2.new 0, 224, 0, 18 + cameraLabel.TextColor3 = Color3I 255, 255, 255 + cameraLabel.TextXAlignment = Enum.TextXAlignment.Left + cameraLabel.BackgroundTransparency = 1 + cameraLabel.ZIndex = baseZIndex + 4 + cameraLabel.Parent = gameSettingsMenuFrame mouseLockLabel = game.CoreGui.RobloxGui\FindFirstChild "MouseLockLabel", true @@ -1320,66 +1319,68 @@ createGameSettingsMenu = (baseZIndex, _) -> UserSettings!.GameSettings.ControlMode = enumNameToItem[text] try - if mouseLockLabel and UserSettings!.GameSettings.ControlMode == Enum.ControlMode["Mouse Lock Switch"] - mouseLockLabel.Visible = true + mouseLockLabel.Visible = if mouseLockLabel and UserSettings!.GameSettings.ControlMode == Enum.ControlMode["Mouse Lock Switch"] + true elseif mouseLockLabel - mouseLockLabel.Visible = false + false - - with cameraDropDown - .Name = "CameraField" - .ZIndex = baseZIndex + 4 - .DropDownMenuButton.ZIndex = baseZIndex + 4 - .DropDownMenuButton.Icon.ZIndex = baseZIndex + 4 - .Position = UDim2.new 0, 270, 0, 52 - .Size = UDim2.new 0, 200, 0, 32 - .Parent = gameSettingsMenuFrame + cameraDropDown.Name = "CameraField" + cameraDropDown.ZIndex = baseZIndex + 4 + cameraDropDown.DropDownMenuButton.ZIndex = baseZIndex + 4 + cameraDropDown.DropDownMenuButton.Icon.ZIndex = baseZIndex + 4 + cameraDropDown.Position = UDim2.new 0, 270, 0, 52 + cameraDropDown.Size = UDim2.new 0, 200, 0, 32 + cameraDropDown.Parent = gameSettingsMenuFrame gameSettingsMenuFrame - if LoadLibrary - global RbxGui = LoadLibrary "RbxGui" + RbxGui = LoadLibrary "RbxGui" baseZIndex = 0 if UserSettings createSettingsDialog = -> waitForChild gui, "BottomLeftControl" settingsButton = gui.BottomLeftControl\FindFirstChild "SettingsButton" - if not settingsButton? - settingsButton = New "ImageButton", "SettingsButton" - Image: "rbxasset://textures/ui/SettingsButton.png" - BackgroundTransparency: 1 - Active: false - Size: UDim2.new 0, 54, 0, 46 - Position: UDim2.new 0, 2, 0, 50 - Parent: gui.BottomLeftControl + if settingsButton == nil + settingsButton = Instance.new "ImageButton" + settingsButton.Name = "SettingsButton" + settingsButton.Image = "rbxasset://textures/ui/SettingsButton.png" + settingsButton.BackgroundTransparency = 1 + settingsButton.Active = false + settingsButton.Size = UDim2.new 0, 54, 0, 46 + settingsButton.Position = UDim2.new 0, 2, 0, 50 + settingsButton.Parent = gui.BottomLeftControl - shield = New "TextButton", "UserSettingsShield" - Text: "" - Active: true - AutoButtonColor: false - Visible: false - Size: UDim2.new 1, 0, 1, 0 - BackgroundColor3: Color3I 51, 51, 51 - BorderColor3: Color3I 27, 42, 53 - BackgroundTransparency: 0.4 - ZIndex: baseZIndex + 2 + + shield = Instance.new "TextButton" + shield.Text = "" + shield.Name = "UserSettingsShield" + shield.Active = true + shield.AutoButtonColor = false + shield.Visible = false + shield.Size = UDim2.new 1, 0, 1, 0 + shield.BackgroundColor3 = Color3I 51, 51, 51 + shield.BorderColor3 = Color3I 27, 42, 53 + shield.BackgroundTransparency = 0.4 + shield.ZIndex = baseZIndex + 2 mainShield = shield - frame = New "Frame", "Settings" - Position: UDim2.new 0.5, -262, -0.5, -200 - Size: UDim2.new 0, 525, 0, 430 - BackgroundTransparency: 1 - Active: true - Parent: shield + frame = Instance.new "Frame" + frame.Name = "Settings" + frame.Position = UDim2.new 0.5, -262, -0.5, -200 + frame.Size = UDim2.new 0, 525, 0, 430 + frame.BackgroundTransparency = 1 + frame.Active = true + frame.Parent = shield - settingsFrame = New "Frame", "SettingsStyle" - Size: UDim2.new 1, 0, 1, 0 - Style: Enum.FrameStyle.RobloxRound - Active: true - ZIndex: baseZIndex + 3 - Parent: frame + settingsFrame = Instance.new "Frame" + settingsFrame.Name = "SettingsStyle" + settingsFrame.Size = UDim2.new 1, 0, 1, 0 + settingsFrame.Style = Enum.FrameStyle.RobloxRound + settingsFrame.Active = true + settingsFrame.ZIndex = baseZIndex + 3 + settingsFrame.Parent = frame gameMainMenu = createGameMainMenu baseZIndex, shield gameMainMenu.Parent = settingsFrame @@ -1405,6 +1406,7 @@ if LoadLibrary recordVideoClick gameMainMenu.RecordVideoButton, gui.StopRecordButton + localPlayerChange = -> gameMainMenu.ResetButton.Visible = game.Players.LocalPlayer if game.Players.LocalPlayer @@ -1413,6 +1415,7 @@ if LoadLibrary settings!.Rendering.EnableFRM = false + gameMainMenu.ResetButton.Visible = game.Players.LocalPlayer if game.Players.LocalPlayer? game.Players.LocalPlayer.Changed\connect -> @@ -1420,41 +1423,39 @@ if LoadLibrary else delay 0, -> - waitForProperty game.Players, "LocalPlayer" + waitForProperty game.Players, "LocalPlayer" gameMainMenu.ResetButton.Visible = game.Players.LocalPlayer game.Players.LocalPlayer.Changed\connect -> localPlayerChange! - gameMainMenu.ReportAbuseButton.Visible = game\FindFirstChild "NetworkClient" if not gameMainMenu.ReportAbuseButton.Visible game.ChildAdded\connect (child) -> if child\IsA "NetworkClient" gameMainMenu.ReportAbuseButton.Visible = game\FindFirstChild "NetworkClient" - gameMainMenu.ResetButton.MouseButton1Click\connect -> goToMenu settingsFrame, "ResetConfirmationMenu", "up", UDim2.new 0, 525, 0, 370 - gameMainMenu.LeaveGameButton.MouseButton1Click\connect -> goToMenu settingsFrame, "LeaveConfirmationMenu", "down", UDim2.new 0, 525, 0, 300 - - if game.CoreGui.Version >= 4 -- we can use escape! + if game.CoreGui.Version >= 4 then -- we can use escape! game\GetService"GuiService".EscapeKeyPressed\connect -> - if not currentMenuSelection? + if currentMenuSelection == nil game.GuiService\AddCenterDialog( shield, Enum.CenterDialogType.ModalDialog, --showFunction -> settingsButton.Active = false - updateCameraDropDownSelection UserSettings!.GameSettings.ControlMode.Name - syncVideoCaptureSetting?! + updateCameraDropDownSelection(UserSettings!.GameSettings.ControlMode.Name) + + if syncVideoCaptureSetting + syncVideoCaptureSetting! - goToMenu settingsFrame, "GameMainMenu", "right", UDim2.new 0, 525, 0, 430 + goToMenu(settingsFrame, "GameMainMenu", "right", UDim2.new(0, 525, 0, 430)) shield.Visible = true shield.Active = true settingsFrame.Parent\TweenPosition( @@ -1471,7 +1472,6 @@ if LoadLibrary tweenTime, true ) - --hideFunction -> settingsFrame.Parent\TweenPosition( @@ -1508,31 +1508,33 @@ if LoadLibrary lastMenuSelection[#lastMenuSelection]["lastSize"] ) - table.remove lastMenuSelection, #lastMenuSelection - if #lastMenuSelection == 1 -- apparently lua can't reduce count to 0... T_T + table.remove(lastMenuSelection, #lastMenuSelection) + if #lastMenuSelection == 1 then -- apparently lua can't reduce count to 0... T_T lastMenuSelection = {} else - resumeGameFunction shield + resumeGameFunction(shield) - gameSettingsMenu = createGameSettingsMenu baseZIndex, shield + + + gameSettingsMenu = createGameSettingsMenu(baseZIndex, shield) gameSettingsMenu.Visible = false gameSettingsMenu.Parent = settingsFrame gameMainMenu.SettingsButton.MouseButton1Click\connect -> - goToMenu settingsFrame, "GameSettingsMenu", "left", UDim2.new 0, 525, 0, 350 + goToMenu(settingsFrame, "GameSettingsMenu", "left", UDim2.new(0, 525, 0, 350)) gameSettingsMenu.BackButton.MouseButton1Click\connect -> - goToMenu settingsFrame, "GameMainMenu", "right", UDim2.new 0, 525, 0, 430 + goToMenu(settingsFrame, "GameMainMenu", "right", UDim2.new(0, 525, 0, 430)) - resetConfirmationWindow = createResetConfirmationMenu baseZIndex, shield + resetConfirmationWindow = createResetConfirmationMenu(baseZIndex, shield) resetConfirmationWindow.Visible = false resetConfirmationWindow.Parent = settingsFrame - leaveConfirmationWindow = createLeaveConfirmationMenu baseZIndex, shield + leaveConfirmationWindow = createLeaveConfirmationMenu(baseZIndex, shield) leaveConfirmationWindow.Visible = false leaveConfirmationWindow.Parent = settingsFrame @@ -1545,11 +1547,13 @@ if LoadLibrary --showFunction -> settingsButton.Active = false - updateCameraDropDownSelection UserSettings!.GameSettings.ControlMode.Name - syncVideoCaptureSetting?! + updateCameraDropDownSelection(UserSettings!.GameSettings.ControlMode.Name) + + if syncVideoCaptureSetting + syncVideoCaptureSetting! - goToMenu settingsFrame, "GameMainMenu", "right", UDim2.new 0, 525, 0, 430 + goToMenu(settingsFrame, "GameMainMenu", "right", UDim2.new(0, 525, 0, 430)) shield.Visible = true settingsFrame.Parent\TweenPosition( UDim2.new(0.5, -262, 0.5, -200), @@ -1565,7 +1569,6 @@ if LoadLibrary tweenTime, true ) - --hideFunction -> settingsFrame.Parent\TweenPosition( @@ -1587,7 +1590,8 @@ if LoadLibrary ) - shield + + return shield delay 0, -> @@ -1596,12 +1600,10 @@ if LoadLibrary gui.BottomLeftControl.SettingsButton.Active = true gui.BottomLeftControl.SettingsButton.Position = UDim2.new 0, 2, 0, -2 - mouseLockLabel.Visible = if mouseLockLabel and - UserSettings!.GameSettings.ControlMode == Enum.ControlMode["Mouse Lock Switch"] - - true + if mouseLockLabel and UserSettings!.GameSettings.ControlMode == Enum.ControlMode["Mouse Lock Switch"] + mouseLockLabel.Visible = true elseif mouseLockLabel - false + mouseLockLabel.Visible = false -- our script has loaded, get rid of older buttons now @@ -1616,20 +1618,23 @@ if LoadLibrary if leaveGameButton leaveGameButton\Remove! + topLeft\Remove! + --UserSettings call createSaveDialogs = -> - shield = New "TextButton", "SaveDialogShield" - Text: "" - AutoButtonColor: false - Active: true - Visible: false - Size: UDim2.new 1, 0, 1, 0 - BackgroundColor3: Color3I 51, 51, 51 - BorderColor3: Color3I 27, 42, 53 - BackgroundTransparency: 0.4 - ZIndex: baseZIndex + 1 + shield = Instance.new "TextButton" + shield.Text = "" + shield.AutoButtonColor = false + shield.Name = "SaveDialogShield" + shield.Active = true + shield.Visible = false + shield.Size = UDim2.new 1, 0, 1, 0 + shield.BackgroundColor3 = Color3I 51, 51, 51 + shield.BorderColor3 = Color3I 27, 42, 53 + shield.BackgroundTransparency = 0.4 + shield.ZIndex = baseZIndex + 1 local clearAndResetDialog, save, saveLocal, dontSave, cancel @@ -1691,41 +1696,46 @@ if LoadLibrary errorDialogMessageBox.Visible = false errorDialogMessageBox.Parent = shield - spinnerDialog = New "Frame", "SpinnerDialog" - Style: Enum.FrameStyle.RobloxRound - Size: UDim2.new 0, 350, 0, 150 - Position: UDim2.new 0.5, -175, 0.5, -75 - Visible: false - Active: true - Parent: shield + spinnerDialog = Instance.new "Frame" + spinnerDialog.Name = "SpinnerDialog" + spinnerDialog.Style = Enum.FrameStyle.RobloxRound + spinnerDialog.Size = UDim2.new 0, 350, 0, 150 + spinnerDialog.Position = UDim2.new 0.5, -175, 0.5, -75 + spinnerDialog.Visible = false + spinnerDialog.Active = true + spinnerDialog.Parent = shield - * New "TextLabel", "WaitingLabel" - Text: "Saving to Mercury..." - Font: Enum.Font.ArialBold - FontSize: Enum.FontSize.Size18 - Position: UDim2.new 0.5, 25, 0.5, 0 - TextColor3: Color3.new 1, 1, 1 + waitingLabel = Instance.new "TextLabel" + waitingLabel.Name = "WaitingLabel" + waitingLabel.Text = "Saving to Mercury..." + waitingLabel.Font = Enum.Font.ArialBold + waitingLabel.FontSize = Enum.FontSize.Size18 + waitingLabel.Position = UDim2.new 0.5, 25, 0.5, 0 + waitingLabel.TextColor3 = Color3.new 1, 1, 1 + waitingLabel.Parent = spinnerDialog - spinnerFrame = New "Frame", "Spinner" - Size: UDim2.new 0, 80, 0, 80 - Position: UDim2.new 0.5, -150, 0.5, -40 - BackgroundTransparency: 1 - Parent: spinnerDialog + spinnerFrame = Instance.new "Frame" + spinnerFrame.Name = "Spinner" + spinnerFrame.Size = UDim2.new 0, 80, 0, 80 + spinnerFrame.Position = UDim2.new 0.5, -150, 0.5, -40 + spinnerFrame.BackgroundTransparency = 1 + spinnerFrame.Parent = spinnerDialog spinnerIcons = {} spinnerNum = 1 while spinnerNum <= 8 - spinnerImage = New "ImageLabel", "Spinner#{spinnerNum}" - Size: UDim2.new 0, 16, 0, 16 - Position: UDim2.new( - 0.5 + 0.3 * math.cos(math.rad(45 * spinnerNum)), - -8, - 0.5 + 0.3 * math.sin(math.rad(45 * spinnerNum)), - -8 - ) - BackgroundTransparency: 1 - Image: "http://www.roblox.com/Asset?id=45880710" - Parent: spinnerFrame + spinnerImage = Instance.new "ImageLabel" + spinnerImage.Name = "Spinner" .. spinnerNum + spinnerImage.Size = UDim2.new 0, 16, 0, 16 + spinnerImage.Position = UDim2.new( + 0.5 + 0.3 * math.cos(math.rad(45 * spinnerNum)), + -8, + 0.5 + 0.3 * math.sin(math.rad(45 * spinnerNum)), + -8 + ) + spinnerImage.BackgroundTransparency = 1 + spinnerImage.Image = "http://www.roblox.com/Asset?id=45880710" + spinnerImage.Parent = spinnerFrame spinnerIcons[spinnerNum] = spinnerImage spinnerNum += 1 @@ -1744,17 +1754,15 @@ if LoadLibrary pos = 0 while pos < 8 - spinnerIcons[pos + 1].Image = "http://www.roblox.com/Asset?id=" .. - if pos == spinPos or pos == ((spinPos + 1) % 8) - 45880668 + spinnerIcons[pos + 1].Image = if pos == spinPos or pos == ((spinPos + 1) % 8) + "http://www.roblox.com/Asset?id=45880668" else - 45880710 - + "http://www.roblox.com/Asset?id=45880710" pos += 1 spinPos = (spinPos + 1) % 8 - wait(0.2) + wait 0.2 --Do the save while the spinner is going, function will wait @@ -1772,7 +1780,7 @@ if LoadLibrary --Now process the result if result --Success, close - game\FinishShutdown false + game\FinishShutdown(false) clearAndResetDialog! else --Failure, show the second dialog prompt @@ -1781,13 +1789,14 @@ if LoadLibrary saveLocal = -> errorDialogMessageBox.Visible = false - game\FinishShutdown true + game\FinishShutdown(true) clearAndResetDialog! + dontSave = -> saveDialogMessageBox.Visible = false errorDialogMessageBox.Visible = false - game\FinishShutdown false + game\FinishShutdown(false) clearAndResetDialog! cancel = -> @@ -1795,43 +1804,47 @@ if LoadLibrary errorDialogMessageBox.Visible = false clearAndResetDialog! + clearAndResetDialog = -> saveDialogMessageBox.Visible = true errorDialogMessageBox.Visible = false spinnerDialog.Visible = false shield.Visible = false - game.GuiService\RemoveCenterDialog shield + game.GuiService\RemoveCenterDialog(shield) - robloxLock shield + + robloxLock(shield) shield.Visible = false - shield + return shield + createReportAbuseDialog = -> --Only show things if we are a NetworkClient - waitForChild game, "NetworkClient" + waitForChild(game, "NetworkClient") - waitForChild game, "Players" - waitForProperty game.Players, "LocalPlayer" + waitForChild(game, "Players") + waitForProperty(game.Players, "LocalPlayer") localPlayer = game.Players.LocalPlayer local reportAbuseButton - waitForChild gui, "UserSettingsShield" - waitForChild gui.UserSettingsShield, "Settings" - waitForChild gui.UserSettingsShield.Settings, "SettingsStyle" - waitForChild gui.UserSettingsShield.Settings.SettingsStyle, "GameMainMenu" - waitForChild gui.UserSettingsShield.Settings.SettingsStyle.GameMainMenu, "ReportAbuseButton" + waitForChild(gui, "UserSettingsShield") + waitForChild(gui.UserSettingsShield, "Settings") + waitForChild(gui.UserSettingsShield.Settings, "SettingsStyle") + waitForChild(gui.UserSettingsShield.Settings.SettingsStyle, "GameMainMenu") + waitForChild(gui.UserSettingsShield.Settings.SettingsStyle.GameMainMenu, "ReportAbuseButton") reportAbuseButton = gui.UserSettingsShield.Settings.SettingsStyle.GameMainMenu.ReportAbuseButton - shield = New "TextButton", "ReportAbuseShield" - Text: "" - AutoButtonColor: false - Active: true - Visible: false - Size: UDim2.new 1, 0, 1, 0 - BackgroundColor3: Color3I 51, 51, 51 - BorderColor3: Color3I 27, 42, 53 - BackgroundTransparency: 0.4 - ZIndex: baseZIndex + 1 + shield = Instance.new "TextButton" + shield.Name = "ReportAbuseShield" + shield.Text = "" + shield.AutoButtonColor = false + shield.Active = true + shield.Visible = false + shield.Size = UDim2.new 1, 0, 1, 0 + shield.BackgroundColor3 = Color3I 51, 51, 51 + shield.BorderColor3 = Color3I 27, 42, 53 + shield.BackgroundTransparency = 0.4 + shield.ZIndex = baseZIndex + 1 local closeAndResetDialog @@ -1844,7 +1857,7 @@ if LoadLibrary calmingMessageBox = RbxGui.CreateMessageDialog( "Thanks for your report!", - "Our moderators will review the chat logs and determine what happened. The other user is probably just trying to make you mad.\n\nIf anyone used swear words, inappropriate language, or threatened you in real life, please report them for Bad Words or Threats", + "Our moderators will review the chat logs and determine what happened. The other user is probably just trying to make you mad.\n\nIf anyone used swear words, inappropriate language, or threatened you in real life, please report them for Bad Words or Threats", messageBoxButtons ) calmingMessageBox.Visible = false @@ -1866,64 +1879,64 @@ if LoadLibrary normalMessageBox.Visible = false normalMessageBox.Parent = shield - frame = New "Frame", "Settings" - Position: UDim2.new 0.5, -250, 0.5, -200 - Size: UDim2.new 0, 500, 0, 400 - BackgroundTransparency: 1 - Active: true - Parent: shield + frame = Instance.new "Frame" + frame.Name = "Settings" + frame.Position = UDim2.new 0.5, -250, 0.5, -200 + frame.Size = UDim2.new 0, 500, 0, 400 + frame.BackgroundTransparency = 1 + frame.Active = true + frame.Parent = shield - settingsFrame = New "Frame", "ReportAbuseStyle" - Size: UDim2.new 1, 0, 1, 0 - Style: Enum.FrameStyle.RobloxRound - Active: true - ZIndex: baseZIndex + 1 - Parent: frame + settingsFrame = Instance.new "Frame" + settingsFrame.Name = "ReportAbuseStyle" + settingsFrame.Size = UDim2.new 1, 0, 1, 0 + settingsFrame.Style = Enum.FrameStyle.RobloxRound + settingsFrame.Active = true + settingsFrame.ZIndex = baseZIndex + 1 + settingsFrame.Parent = frame - * New "TextLabel", "Title" - Text: "Report Abuse" - TextColor3: Color3I 221, 221, 221 - Position: UDim2.new 0.5, 0, 0, 30 - Font: Enum.Font.ArialBold - FontSize: Enum.FontSize.Size36 - ZIndex: baseZIndex + 2 + title = Instance.new "TextLabel" + title.Name = "Title" + title.Text = "Report Abuse" + title.TextColor3 = Color3I 221, 221, 221 + title.Position = UDim2.new 0.5, 0, 0, 30 + title.Font = Enum.Font.ArialBold + title.FontSize = Enum.FontSize.Size36 + title.ZIndex = baseZIndex + 2 + title.Parent = settingsFrame - * New "TextLabel", "Description" - Text: "This will send a complete report to a moderator. The moderator will review the chat log and take appropriate action." - TextColor3: Color3I 221, 221, 221 - Position: UDim2.new 0, 0, 0, 55 - Size: UDim2.new 1, 0, 0, 40 - BackgroundTransparency: 1 - Font: Enum.Font.Arial - FontSize: Enum.FontSize.Size18 - TextWrap: true - ZIndex: baseZIndex + 2 - TextXAlignment: Enum.TextXAlignment.Left - TextYAlignment: Enum.TextYAlignment.Top + description = Instance.new "TextLabel" + description.Name = "Description" + description.Text = "This will send a complete report to a moderator. The moderator will review the chat log and take appropriate action." + description.TextColor3 = Color3I 221, 221, 221 + description.Position = UDim2.new 0, 0, 0, 55 + description.Size = UDim2.new 1, 0, 0, 40 + description.BackgroundTransparency = 1 + description.Font = Enum.Font.Arial + description.FontSize = Enum.FontSize.Size18 + description.TextWrap = true + description.ZIndex = baseZIndex + 2 + description.TextXAlignment = Enum.TextXAlignment.Left + description.TextYAlignment = Enum.TextYAlignment.Top + description.Parent = settingsFrame - * New "TextLabel", "PlayerLabel" - Text: "Which player?" - BackgroundTransparency: 1 - Font: Enum.Font.Arial - FontSize: Enum.FontSize.Size18 - Position: UDim2.new 0.025, 0, 0, 100 - Size: UDim2.new 0.4, 0, 0, 36 - TextColor3: Color3I 255, 255, 255 - TextXAlignment: Enum.TextXAlignment.Left - ZIndex: baseZIndex + 2 + playerLabel = Instance.new "TextLabel" + playerLabel.Name = "PlayerLabel" + playerLabel.Text = "Which player?" + playerLabel.BackgroundTransparency = 1 + playerLabel.Font = Enum.Font.Arial + playerLabel.FontSize = Enum.FontSize.Size18 + playerLabel.Position = UDim2.new 0.025, 0, 0, 100 + playerLabel.Size = UDim2.new 0.4, 0, 0, 36 + playerLabel.TextColor3 = Color3I 255, 255, 255 + playerLabel.TextXAlignment = Enum.TextXAlignment.Left + playerLabel.ZIndex = baseZIndex + 2 + playerLabel.Parent = settingsFrame - * New "TextLabel", "AbuseLabel" - Text: "Type of Abuse:" - Font: Enum.Font.Arial - BackgroundTransparency: 1 - FontSize: Enum.FontSize.Size18 - Position: UDim2.new 0.025, 0, 0, 140 - Size: UDim2.new 0.4, 0, 0, 36 - TextColor3: Color3I 255, 255, 255 - TextXAlignment: Enum.TextXAlignment.Left - ZIndex: baseZIndex + 2 + local abusingPlayer + local abuse + local submitReportButton - local abusingPlayer, abuse, submitReportButton local updatePlayerSelection createPlayersDropDown = -> players = game\GetService "Players" @@ -1945,11 +1958,26 @@ if LoadLibrary if abuse and abusingPlayer submitReportButton.Active = true - with playerDropDown - .Name = "PlayersComboBox" - .ZIndex = baseZIndex + 2 - .Position = UDim2.new 0.425, 0, 0, 102 - .Size = UDim2.new 0.55, 0, 0, 32 + + playerDropDown.Name = "PlayersComboBox" + playerDropDown.ZIndex = baseZIndex + 2 + playerDropDown.Position = UDim2.new 0.425, 0, 0, 102 + playerDropDown.Size = UDim2.new 0.55, 0, 0, 32 + playerDropDown + + + abuseLabel = Instance.new "TextLabel" + abuseLabel.Name = "AbuseLabel" + abuseLabel.Text = "Type of Abuse:" + abuseLabel.Font = Enum.Font.Arial + abuseLabel.BackgroundTransparency = 1 + abuseLabel.FontSize = Enum.FontSize.Size18 + abuseLabel.Position = UDim2.new 0.025, 0, 0, 140 + abuseLabel.Size = UDim2.new 0.4, 0, 0, 36 + abuseLabel.TextColor3 = Color3I 255, 255, 255 + abuseLabel.TextXAlignment = Enum.TextXAlignment.Left + abuseLabel.ZIndex = baseZIndex + 2 + abuseLabel.Parent = settingsFrame abuses = * "Swearing" @@ -1962,68 +1990,71 @@ if LoadLibrary * "Bad Model or Script" * "Bad Username" - local abuseDropDown, updateAbuseSelection = RbxGui.CreateDropDownMenu(abuses, (abuseText) -> + abuseDropDown, updateAbuseSelection = RbxGui.CreateDropDownMenu(abuses, (abuseText) -> abuse = abuseText if abuse and abusingPlayer submitReportButton.Active = true + true) + abuseDropDown.Name = "AbuseComboBox" + abuseDropDown.ZIndex = baseZIndex + 2 + abuseDropDown.Position = UDim2.new 0.425, 0, 0, 142 + abuseDropDown.Size = UDim2.new 0.55, 0, 0, 32 + abuseDropDown.Parent = settingsFrame - with abuseDropDown - .Name = "AbuseComboBox" - .ZIndex = baseZIndex + 2 - .Position = UDim2.new 0.425, 0, 0, 142 - .Size = UDim2.new 0.55, 0, 0, 32 - .Parent = settingsFrame + shortDescriptionLabel = Instance.new "TextLabel" + shortDescriptionLabel.Name = "ShortDescriptionLabel" + shortDescriptionLabel.Text = "Short Description: (optional)" + shortDescriptionLabel.Font = Enum.Font.Arial + shortDescriptionLabel.FontSize = Enum.FontSize.Size18 + shortDescriptionLabel.Position = UDim2.new 0.025, 0, 0, 180 + shortDescriptionLabel.Size = UDim2.new 0.95, 0, 0, 36 + shortDescriptionLabel.TextColor3 = Color3I 255, 255, 255 + shortDescriptionLabel.TextXAlignment = Enum.TextXAlignment.Left + shortDescriptionLabel.BackgroundTransparency = 1 + shortDescriptionLabel.ZIndex = baseZIndex + 2 + shortDescriptionLabel.Parent = settingsFrame - New "TextLabel", "ShortDescriptionLabel" - Text: "Short Description: (optional)" - Font: Enum.Font.Arial - FontSize: Enum.FontSize.Size18 - Position: UDim2.new 0.025, 0, 0, 180 - Size: UDim2.new 0.95, 0, 0, 36 - TextColor3: Color3I 255, 255, 255 - TextXAlignment: Enum.TextXAlignment.Left - BackgroundTransparency: 1 - ZIndex: baseZIndex + 2 - Parent: settingsFrame + shortDescriptionWrapper = Instance.new "Frame" + shortDescriptionWrapper.Name = "ShortDescriptionWrapper" + shortDescriptionWrapper.Position = UDim2.new 0.025, 0, 0, 220 + shortDescriptionWrapper.Size = UDim2.new 0.95, 0, 1, -310 + shortDescriptionWrapper.BackgroundColor3 = Color3I 0, 0, 0 + shortDescriptionWrapper.BorderSizePixel = 0 + shortDescriptionWrapper.ZIndex = baseZIndex + 2 + shortDescriptionWrapper.Parent = settingsFrame - shortDescriptionWrapper = New "Frame", "ShortDescriptionWrapper" - Position: UDim2.new 0.025, 0, 0, 220 - Size: UDim2.new 0.95, 0, 1, -310 - BackgroundColor3: Color3I 0, 0, 0 - BorderSizePixel: 0 - ZIndex: baseZIndex + 2 - Parent: settingsFrame + shortDescriptionBox = Instance.new "TextBox" + shortDescriptionBox.Name = "TextBox" + shortDescriptionBox.Text = "" + shortDescriptionBox.ClearTextOnFocus = false + shortDescriptionBox.Font = Enum.Font.Arial + shortDescriptionBox.FontSize = Enum.FontSize.Size18 + shortDescriptionBox.Position = UDim2.new 0, 3, 0, 3 + shortDescriptionBox.Size = UDim2.new 1, -6, 1, -6 + shortDescriptionBox.TextColor3 = Color3I 255, 255, 255 + shortDescriptionBox.TextXAlignment = Enum.TextXAlignment.Left + shortDescriptionBox.TextYAlignment = Enum.TextYAlignment.Top + shortDescriptionBox.TextWrap = true + shortDescriptionBox.BackgroundColor3 = Color3I 0, 0, 0 + shortDescriptionBox.BorderSizePixel = 0 + shortDescriptionBox.ZIndex = baseZIndex + 2 + shortDescriptionBox.Parent = shortDescriptionWrapper - shortDescriptionBox = New "TextBox", "TextBox" - Text: "" - ClearTextOnFocus: false - Font: Enum.Font.Arial - FontSize: Enum.FontSize.Size18 - Position: UDim2.new 0, 3, 0, 3 - Size: UDim2.new 1, -6, 1, -6 - TextColor3: Color3I 255, 255, 255 - TextXAlignment: Enum.TextXAlignment.Left - TextYAlignment: Enum.TextYAlignment.Top - TextWrap: true - BackgroundColor3: Color3I 0, 0, 0 - BorderSizePixel: 0 - ZIndex: baseZIndex + 2 - Parent: shortDescriptionWrapper - - submitReportButton = New "TextButton", "SubmitReportBtn" - Active: false - Modal: true - Font: Enum.Font.Arial - FontSize: Enum.FontSize.Size18 - Position: UDim2.new 0.1, 0, 1, -80 - Size: UDim2.new 0.35, 0, 0, 50 - AutoButtonColor: true - Style: Enum.ButtonStyle.RobloxButtonDefault - Text: "Submit Report" - TextColor3: Color3I 255, 255, 255 - ZIndex: baseZIndex + 2 - Parent: settingsFrame + submitReportButton = Instance.new "TextButton" + submitReportButton.Name = "SubmitReportBtn" + submitReportButton.Active = false + submitReportButton.Modal = true + submitReportButton.Font = Enum.Font.Arial + submitReportButton.FontSize = Enum.FontSize.Size18 + submitReportButton.Position = UDim2.new 0.1, 0, 1, -80 + submitReportButton.Size = UDim2.new 0.35, 0, 0, 50 + submitReportButton.AutoButtonColor = true + submitReportButton.Style = Enum.ButtonStyle.RobloxButtonDefault + submitReportButton.Text = "Submit Report" + submitReportButton.TextColor3 = Color3I 255, 255, 255 + submitReportButton.ZIndex = baseZIndex + 2 + submitReportButton.Parent = settingsFrame submitReportButton.MouseButton1Click\connect -> if submitReportButton.Active @@ -2040,18 +2071,18 @@ if LoadLibrary else closeAndResetDialog! - - cancelButton = New "TextButton", "CancelBtn" - Font: Enum.Font.Arial - FontSize: Enum.FontSize.Size18 - Position: UDim2.new 0.55, 0, 1, -80 - Size: UDim2.new 0.35, 0, 0, 50 - AutoButtonColor: true - Style: Enum.ButtonStyle.RobloxButtonDefault - Text: "Cancel" - TextColor3: Color3I 255, 255, 255 - ZIndex: baseZIndex + 2 - Parent: settingsFrame + cancelButton = Instance.new "TextButton" + cancelButton.Name = "CancelBtn" + cancelButton.Font = Enum.Font.Arial + cancelButton.FontSize = Enum.FontSize.Size18 + cancelButton.Position = UDim2.new 0.55, 0, 1, -80 + cancelButton.Size = UDim2.new 0.35, 0, 0, 50 + cancelButton.AutoButtonColor = true + cancelButton.Style = Enum.ButtonStyle.RobloxButtonDefault + cancelButton.Text = "Cancel" + cancelButton.TextColor3 = Color3I 255, 255, 255 + cancelButton.ZIndex = baseZIndex + 2 + cancelButton.Parent = settingsFrame closeAndResetDialog = -> --Delete old player combo box @@ -2061,9 +2092,9 @@ if LoadLibrary abusingPlayer = nil - updatePlayerSelection nil + updatePlayerSelection(nil) abuse = nil - updateAbuseSelection nil + updateAbuseSelection(nil) submitReportButton.Active = false shortDescriptionBox.Text = "" frame.Visible = true @@ -2072,14 +2103,14 @@ if LoadLibrary normalMessageBox.Visible = false shield.Visible = false reportAbuseButton.Active = true - game.GuiService\RemoveCenterDialog shield + game.GuiService\RemoveCenterDialog(shield) - cancelButton.MouseButton1Click\connect closeAndResetDialog + cancelButton.MouseButton1Click\connect(closeAndResetDialog) reportAbuseButton.MouseButton1Click\connect -> createPlayersDropDown!.Parent = settingsFrame - table.insert centerDialogs, shield + table.insert(centerDialogs, shield) game.GuiService\AddCenterDialog( shield, Enum.CenterDialogType.ModalDialog, @@ -2088,7 +2119,6 @@ if LoadLibrary reportAbuseButton.Active = false shield.Visible = true mainShield.Visible = false - --HideFunction -> reportAbuseButton.Active = true @@ -2098,87 +2128,85 @@ if LoadLibrary robloxLock shield - shield + -- createChatBar = -> -- --Only show a chat bar if we are a NetworkClient - -- waitForChild game, "NetworkClient" + -- waitForChild(game, "NetworkClient") - -- waitForChild game, "Players" - -- waitForProperty game.Players, "LocalPlayer" + -- waitForChild(game, "Players") + -- waitForProperty(game.Players, "LocalPlayer") - -- chatBar = New "Frame", "ChatBar" - -- Size: UDim2.new 1, 0, 0, 22 - -- Position: UDim2.new 0, 0, 1, 0 - -- BackgroundColor3: Color3.new 0, 0, 0 - -- BorderSizePixel: 0 + -- chatBar = Instance.new "Frame" + -- chatBar.Name = "ChatBar" + -- chatBar.Size = UDim2.new 1, 0, 0, 22 + -- chatBar.Position = UDim2.new 0, 0, 1, 0 + -- chatBar.BackgroundColor3 = Color3.new 0, 0, 0 + -- chatBar.BorderSizePixel = 0 - -- chatBox = New "TextBox" - -- Text: "" - -- Visible: false - -- Size: UDim2.new 1, -4, 1, 0 - -- Position: UDim2.new 0, 2, 0, 0 - -- TextXAlignment: Enum.TextXAlignment.Left - -- Font: Enum.Font.Arial - -- ClearTextOnFocus: false - -- FontSize: Enum.FontSize.Size14 - -- TextColor3: Color3.new 1, 1, 1 - -- BackgroundTransparency: 1 - -- --chatBox.Parent: chatBar + -- chatBox = Instance.new "TextBox" + -- chatBox.Text = "" + -- chatBox.Visible = false + -- chatBox.Size = UDim2.new 1, -4, 1, 0 + -- chatBox.Position = UDim2.new 0, 2, 0, 0 + -- chatBox.TextXAlignment = Enum.TextXAlignment.Left + -- chatBox.Font = Enum.Font.Arial + -- chatBox.ClearTextOnFocus = false + -- chatBox.FontSize = Enum.FontSize.Size14 + -- chatBox.TextColor3 = Color3.new 1, 1, 1 + -- chatBox.BackgroundTransparency = 1 + -- --chatBox.Parent = chatBar - -- chatButton = New "TextButton" - -- Size: UDim2.new 1, -4, 1, 0 - -- Position: UDim2.new 0, 2, 0, 0 - -- AutoButtonColor: false - -- Text: 'To chat click here or press "/" key' - -- TextXAlignment: Enum.TextXAlignment.Left - -- Font: Enum.Font.Arial - -- FontSize: Enum.FontSize.Size14 - -- TextColor3: Color3.new 1, 1, 1 - -- BackgroundTransparency: 1 - -- --chatButton.Parent: chatBar + -- chatButton = Instance.new "TextButton" + -- chatButton.Size = UDim2.new 1, -4, 1, 0 + -- chatButton.Position = UDim2.new 0, 2, 0, 0 + -- chatButton.AutoButtonColor = false + -- chatButton.Text = 'To chat click here or press "/" key' + -- chatButton.TextXAlignment = Enum.TextXAlignment.Left + -- chatButton.Font = Enum.Font.Arial + -- chatButton.FontSize = Enum.FontSize.Size14 + -- chatButton.TextColor3 = Color3.new 1, 1, 1 + -- chatButton.BackgroundTransparency = 1 + -- --chatButton.Parent = chatBar -- activateChat = -> - -- return if chatBox.Visible - + -- if chatBox.Visible + -- return + -- end -- chatButton.Visible = false -- chatBox.Text = "" -- chatBox.Visible = true -- chatBox\CaptureFocus! - -- chatButton.MouseButton1Click\connect activateChat + -- chatButton.MouseButton1Click\connect(activateChat) -- -- hotKeyEnabled = true - -- toggleHotKey = (_) -> + -- toggleHotKey = function(_) -- -- hotKeyEnabled = value - -- -- guiService = game\GetService "GuiService" -- --[[newChatMode = ]]try -- --guiService\AddSpecialKey(Enum.SpecialKey.ChatHotkey) - -- --guiService.SpecialKeyPressed\connect (key) -> if key == Enum.SpecialKey.ChatHotkey and hotKeyEnabled then activateChat! end end) - + -- --guiService.SpecialKeyPressed\connect (key) -> if key == Enum.SpecialKey.ChatHotkey and hotKeyEnabled then activateChat! + -- end) -- -- if not newChatMode -- --guiService\AddKey("/") - -- --guiService.KeyPressed\connect (key) -> if key == "/" and hotKeyEnabled then activateChat! end end) - -- -- end + -- --guiService.KeyPressed\connect (key) -> if key == "/" and hotKeyEnabled then activateChat! -- chatBox.FocusLost\connect (enterPressed) -> -- if enterPressed -- if chatBox.Text ~= "" -- str = chatBox.Text -- if string.sub(str, 1, 1) == "%" - -- game.Players\TeamChat string.substr, 2 + -- game.Players\TeamChat(string.sub(str, 2)) -- else - -- game.Players\Chat str - + -- game.Players\Chat(str) -- chatBox.Text = "" -- chatBox.Visible = false -- chatButton.Visible = true - - -- robloxLock chatBar - -- chatBar, toggleHotKey + -- robloxLock(chatBar) + -- return chatBar, toggleHotKey --Spawn a thread for the Save dialogs isSaveDialogSupported = try @@ -2190,20 +2218,19 @@ if LoadLibrary saveDialogs.Parent = gui game.RequestShutdown = -> - table.insert(centerDialogs, saveDialogs) + table.insert centerDialogs, saveDialogs game.GuiService\AddCenterDialog( saveDialogs, Enum.CenterDialogType.QuitDialog, --ShowFunction - -> - saveDialogs.Visible = true + -> saveDialogs.Visible = true --HideFunction - -> - saveDialogs.Visible = false - + -> saveDialogs.Visible = false ) - true + return true + + --Spawn a thread for the Report Abuse dialogs @@ -2216,7 +2243,6 @@ if LoadLibrary waitForChild gui.UserSettingsShield.Settings.SettingsStyle.GameMainMenu, "ReportAbuseButton" gui.UserSettingsShield.Settings.SettingsStyle.GameMainMenu.ReportAbuseButton.Active = true - --Spawn a thread for Chat Bar --[[local success, luaChat = ]] try @@ -2224,8 +2250,7 @@ if LoadLibrary -- if success and luaChat - --[[delay 0, - -> + --[[delay 0, -> waitForChild(game, "Players") waitForProperty(game.Players, "LocalPlayer") @@ -2254,9 +2279,7 @@ if LoadLibrary else --chatBar.Parent = gui --game.GuiService\SetGlobalSizeOffsetPixel(0,-22) - - end)]] - -- end + ]] BurningManPlaceID = 41324860 -- TODO: remove click to walk completely if testing shows we don't need it @@ -2274,4 +2297,3 @@ if LoadLibrary game.Players.LocalPlayer.CharacterAdded\connect (character) -> waitForChild character, "Humanoid" character.Humanoid\SetClickToWalkEnabled false ---LoadLibrary if