Improve corescript formatting
This commit is contained in:
parent
a060a0001e
commit
21b2c8dd99
|
|
@ -1049,9 +1049,10 @@ createPurchasePromptGui = ->
|
|||
Parent: purchaseDialog
|
||||
|
||||
purchasingLabel = createTextObject "PurchasingLabel", "Purchasing...", "TextLabel", Enum.FontSize.Size48
|
||||
purchasingLabel.Size = UDim2.new 1, 0, 1, 0
|
||||
purchasingLabel.ZIndex = 10
|
||||
purchasingLabel.Parent = purchasingFrame
|
||||
with purchasingLabel
|
||||
.Size = UDim2.new 1, 0, 1, 0
|
||||
.ZIndex = 10
|
||||
.Parent = purchasingFrame
|
||||
|
||||
createSpinner UDim2.new(0, 50, 0, 50), UDim2.new(0.5, -25, 0.5, 30), purchasingLabel
|
||||
|
||||
|
|
|
|||
|
|
@ -322,7 +322,7 @@ createHelpDialog = function(baseZIndex)
|
|||
if UserSettings().GameSettings.ControlMode == Enum.ControlMode["Mouse Lock Switch"] then
|
||||
image.Image = mouseLockLookScreenUrl
|
||||
else
|
||||
image.Image = classicLookScreenUrl
|
||||
image.Image = imageclassicLookScreenUrl
|
||||
end
|
||||
end
|
||||
buttons[2] = { }
|
||||
|
|
@ -675,7 +675,7 @@ createGameSettingsMenu = function(baseZIndex, _)
|
|||
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.TextColor3 = Color3.new(0.5, 0.5, 0.5)
|
||||
autoText.Size = UDim2.new(0, 34, 0, 18)
|
||||
autoText.Parent = gameSettingsMenuFrame
|
||||
autoText.Visible = not inStudioMode
|
||||
|
|
@ -724,7 +724,7 @@ createGameSettingsMenu = function(baseZIndex, _)
|
|||
graphicsLevel.Value = math.floor((settings().Rendering:GetMaxQualityLevel() - 1) / 2)
|
||||
local graphicsSetter = New("TextBox", "GraphicsSetter", {
|
||||
BackgroundColor3 = Color3.new(0, 0, 0),
|
||||
BorderColor3 = Color3.new(128 / 255, 128 / 255, 128 / 255),
|
||||
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),
|
||||
|
|
@ -1333,22 +1333,18 @@ pcall(function()
|
|||
end
|
||||
local createSaveDialogs
|
||||
createSaveDialogs = function()
|
||||
local 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
|
||||
local save
|
||||
local saveLocal
|
||||
local dontSave
|
||||
local cancel
|
||||
local 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
|
||||
})
|
||||
local clearAndResetDialog, save, saveLocal, dontSave, cancel
|
||||
local messageBoxButtons = { }
|
||||
messageBoxButtons[1] = { }
|
||||
messageBoxButtons[1].Text = "Save"
|
||||
|
|
@ -1586,9 +1582,7 @@ pcall(function()
|
|||
ZIndex = baseZIndex + 2
|
||||
})
|
||||
})
|
||||
local abusingPlayer
|
||||
local abuse
|
||||
local submitReportButton
|
||||
local abusingPlayer, abuse, submitReportButton
|
||||
local updatePlayerSelection
|
||||
local createPlayersDropDown
|
||||
createPlayersDropDown = function()
|
||||
|
|
|
|||
266
yue/46295863.yue
266
yue/46295863.yue
|
|
@ -68,7 +68,7 @@ success, isMac = try
|
|||
macClient = success and isMac
|
||||
|
||||
Color3I = (r, g, b) ->
|
||||
Color3.new(r / 255, g / 255, b / 255)
|
||||
Color3.new r / 255, g / 255, b / 255
|
||||
|
||||
|
||||
robloxLock = (instance) ->
|
||||
|
|
@ -215,7 +215,6 @@ CreateTextButtons = (frame, buttons, yPos, ySize) ->
|
|||
else
|
||||
Enum.ButtonStyle.RobloxButton
|
||||
|
||||
|
||||
for _, obj in ipairs buttons
|
||||
button = New "TextButton", "Button#{buttonNum}"
|
||||
Font: Enum.Font.Arial
|
||||
|
|
@ -268,18 +267,18 @@ setRecordGui = (recording, stopRecordButton, recordVideoButton) ->
|
|||
|
||||
recordVideoClick = (recordVideoButton, stopRecordButton) ->
|
||||
recordingVideo = not recordingVideo
|
||||
setRecordGui(recordingVideo, stopRecordButton, recordVideoButton)
|
||||
setRecordGui recordingVideo, stopRecordButton, recordVideoButton
|
||||
|
||||
|
||||
backToGame = (buttonClicked, shield, settingsButton) ->
|
||||
buttonClicked.Parent.Parent.Parent.Parent.Visible = false
|
||||
shield.Visible = false
|
||||
for i = 1, #centerDialogs
|
||||
game.GuiService\RemoveCenterDialog(centerDialogs[i])
|
||||
game.GuiService\RemoveCenterDialog centerDialogs[i]
|
||||
centerDialogs[i].Visible = false
|
||||
|
||||
centerDialogs = {}
|
||||
game.GuiService\RemoveCenterDialog(shield)
|
||||
game.GuiService\RemoveCenterDialog shield
|
||||
settingsButton.Active = true
|
||||
|
||||
|
||||
|
|
@ -363,10 +362,12 @@ createHelpDialog = (baseZIndex) ->
|
|||
buttons[1] = {}
|
||||
buttons[1].Text = "Look"
|
||||
buttons[1].Function = ->
|
||||
if UserSettings!.GameSettings.ControlMode == Enum.ControlMode["Mouse Lock Switch"]
|
||||
image.Image = mouseLockLookScreenUrl
|
||||
image.Image = if UserSettings!.GameSettings.ControlMode ==
|
||||
Enum.ControlMode["Mouse Lock Switch"]
|
||||
|
||||
mouseLockLookScreenUrl
|
||||
else
|
||||
image.Image = classicLookScreenUrl
|
||||
imageclassicLookScreenUrl
|
||||
|
||||
|
||||
buttons[2] = {}
|
||||
|
|
@ -385,7 +386,7 @@ 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, ->
|
||||
|
|
@ -792,11 +793,12 @@ createGameSettingsMenu = (baseZIndex, _) ->
|
|||
Parent: gameSettingsMenuFrame
|
||||
|
||||
studioShortcut = fullscreenShortcut\clone!
|
||||
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
|
||||
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
|
||||
|
||||
local studioCheckbox
|
||||
|
||||
|
|
@ -818,7 +820,7 @@ createGameSettingsMenu = (baseZIndex, _) ->
|
|||
.Name = "AutoText"
|
||||
.Text = "Auto"
|
||||
.Position = UDim2.new 0, 183, 0, 214
|
||||
.TextColor3 = Color3.new 128 / 255, 128 / 255, 128 / 255
|
||||
.TextColor3 = Color3.new 0.5, 0.5, 0.5
|
||||
.Size = UDim2.new 0, 34, 0, 18
|
||||
.Parent = gameSettingsMenuFrame
|
||||
.Visible = not inStudioMode
|
||||
|
|
@ -883,7 +885,7 @@ createGameSettingsMenu = (baseZIndex, _) ->
|
|||
|
||||
graphicsSetter = New "TextBox", "GraphicsSetter"
|
||||
BackgroundColor3: Color3.new 0, 0, 0
|
||||
BorderColor3: Color3.new 128 / 255, 128 / 255, 128 / 255
|
||||
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
|
||||
|
|
@ -1203,19 +1205,17 @@ createGameSettingsMenu = (baseZIndex, _) ->
|
|||
|
||||
if hasGraphicsSlider
|
||||
UserSettings!.GameSettings.FullscreenChanged\connect (isFullscreen) ->
|
||||
if isFullscreen
|
||||
fullscreenCheckbox.Text = "X"
|
||||
fullscreenCheckbox.Text = if isFullscreen
|
||||
"X"
|
||||
else
|
||||
fullscreenCheckbox.Text = ""
|
||||
|
||||
""
|
||||
|
||||
else
|
||||
fullscreenCheckbox.MouseButton1Click\connect ->
|
||||
if fullscreenCheckbox.Text == ""
|
||||
fullscreenCheckbox.Text = "X"
|
||||
fullscreenCheckbox.Text = if fullscreenCheckbox.Text == ""
|
||||
"X"
|
||||
else
|
||||
fullscreenCheckbox.Text = ""
|
||||
|
||||
""
|
||||
|
||||
if game\FindFirstChild "NetworkClient" -- we are playing online
|
||||
setDisabledState studioText
|
||||
|
|
@ -1230,7 +1230,7 @@ createGameSettingsMenu = (baseZIndex, _) ->
|
|||
Enum.ButtonStyle.RobloxButtonDefault,
|
||||
Enum.FontSize.Size24,
|
||||
UDim2.new(0, 180, 0, 50),
|
||||
UDim2.new(0, 170, 0, 330)
|
||||
UDim2.new 0, 170, 0, 330
|
||||
)
|
||||
backButton.Modal = true
|
||||
else
|
||||
|
|
@ -1239,7 +1239,7 @@ createGameSettingsMenu = (baseZIndex, _) ->
|
|||
Enum.ButtonStyle.RobloxButtonDefault,
|
||||
Enum.FontSize.Size24,
|
||||
UDim2.new(0, 180, 0, 50),
|
||||
UDim2.new(0, 170, 0, 270)
|
||||
UDim2.new 0, 170, 0, 270
|
||||
)
|
||||
backButton.Modal = true
|
||||
|
||||
|
|
@ -1324,13 +1324,14 @@ createGameSettingsMenu = (baseZIndex, _) ->
|
|||
mouseLockLabel.Visible = false
|
||||
|
||||
|
||||
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
|
||||
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
|
||||
|
||||
gameSettingsMenuFrame
|
||||
|
||||
|
|
@ -1340,7 +1341,7 @@ if LoadLibrary
|
|||
baseZIndex = 0
|
||||
if UserSettings
|
||||
createSettingsDialog = ->
|
||||
waitForChild(gui, "BottomLeftControl")
|
||||
waitForChild gui, "BottomLeftControl"
|
||||
settingsButton = gui.BottomLeftControl\FindFirstChild "SettingsButton"
|
||||
|
||||
if not settingsButton?
|
||||
|
|
@ -1352,7 +1353,6 @@ if LoadLibrary
|
|||
Position: UDim2.new 0, 2, 0, 50
|
||||
Parent: gui.BottomLeftControl
|
||||
|
||||
|
||||
shield = New "TextButton", "UserSettingsShield"
|
||||
Text: ""
|
||||
Active: true
|
||||
|
|
@ -1418,7 +1418,7 @@ 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!
|
||||
|
|
@ -1448,11 +1448,11 @@ if LoadLibrary
|
|||
--showFunction
|
||||
->
|
||||
settingsButton.Active = false
|
||||
updateCameraDropDownSelection(UserSettings!.GameSettings.ControlMode.Name)
|
||||
updateCameraDropDownSelection UserSettings!.GameSettings.ControlMode.Name
|
||||
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(
|
||||
|
|
@ -1506,31 +1506,31 @@ if LoadLibrary
|
|||
lastMenuSelection[#lastMenuSelection]["lastSize"]
|
||||
)
|
||||
|
||||
table.remove(lastMenuSelection, #lastMenuSelection)
|
||||
table.remove lastMenuSelection, #lastMenuSelection
|
||||
if #lastMenuSelection == 1 -- 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
|
||||
|
||||
|
|
@ -1543,11 +1543,11 @@ if LoadLibrary
|
|||
--showFunction
|
||||
->
|
||||
settingsButton.Active = false
|
||||
updateCameraDropDownSelection(UserSettings!.GameSettings.ControlMode.Name)
|
||||
updateCameraDropDownSelection UserSettings!.GameSettings.ControlMode.Name
|
||||
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),
|
||||
|
|
@ -1585,8 +1585,7 @@ if LoadLibrary
|
|||
|
||||
)
|
||||
|
||||
|
||||
return shield
|
||||
shield
|
||||
|
||||
|
||||
delay 0, ->
|
||||
|
|
@ -1595,10 +1594,12 @@ if LoadLibrary
|
|||
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"]
|
||||
mouseLockLabel.Visible = true
|
||||
mouseLockLabel.Visible = if mouseLockLabel and
|
||||
UserSettings!.GameSettings.ControlMode == Enum.ControlMode["Mouse Lock Switch"]
|
||||
|
||||
true
|
||||
elseif mouseLockLabel
|
||||
mouseLockLabel.Visible = false
|
||||
false
|
||||
|
||||
|
||||
-- our script has loaded, get rid of older buttons now
|
||||
|
|
@ -1613,28 +1614,22 @@ if LoadLibrary
|
|||
if leaveGameButton
|
||||
leaveGameButton\Remove!
|
||||
|
||||
|
||||
topLeft\Remove!
|
||||
--UserSettings call
|
||||
|
||||
createSaveDialogs = ->
|
||||
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
|
||||
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
|
||||
|
||||
local clearAndResetDialog
|
||||
local save
|
||||
local saveLocal
|
||||
local dontSave
|
||||
local cancel
|
||||
local clearAndResetDialog, save, saveLocal, dontSave, cancel
|
||||
|
||||
messageBoxButtons = {}
|
||||
messageBoxButtons[1] = {}
|
||||
|
|
@ -1787,7 +1782,6 @@ if LoadLibrary
|
|||
game\FinishShutdown true
|
||||
clearAndResetDialog!
|
||||
|
||||
|
||||
dontSave = ->
|
||||
saveDialogMessageBox.Visible = false
|
||||
errorDialogMessageBox.Visible = false
|
||||
|
|
@ -1799,7 +1793,6 @@ if LoadLibrary
|
|||
errorDialogMessageBox.Visible = false
|
||||
clearAndResetDialog!
|
||||
|
||||
|
||||
clearAndResetDialog = ->
|
||||
saveDialogMessageBox.Visible = true
|
||||
errorDialogMessageBox.Visible = false
|
||||
|
|
@ -1807,12 +1800,10 @@ if LoadLibrary
|
|||
shield.Visible = false
|
||||
game.GuiService\RemoveCenterDialog shield
|
||||
|
||||
|
||||
robloxLock shield
|
||||
shield.Visible = false
|
||||
shield
|
||||
|
||||
|
||||
createReportAbuseDialog = ->
|
||||
--Only show things if we are a NetworkClient
|
||||
waitForChild game, "NetworkClient"
|
||||
|
|
@ -1930,10 +1921,7 @@ if LoadLibrary
|
|||
TextXAlignment: Enum.TextXAlignment.Left
|
||||
ZIndex: baseZIndex + 2
|
||||
|
||||
local abusingPlayer
|
||||
local abuse
|
||||
local submitReportButton
|
||||
|
||||
local abusingPlayer, abuse, submitReportButton
|
||||
local updatePlayerSelection
|
||||
createPlayersDropDown = ->
|
||||
players = game\GetService "Players"
|
||||
|
|
@ -1955,24 +1943,23 @@ 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
|
||||
abuses =
|
||||
* "Swearing"
|
||||
* "Bullying"
|
||||
* "Scamming"
|
||||
* "Dating"
|
||||
* "Cheating/Exploiting"
|
||||
* "Personal Questions"
|
||||
* "Offsite Links"
|
||||
* "Bad Model or Script"
|
||||
* "Bad Username"
|
||||
|
||||
abuses = {
|
||||
"Swearing",
|
||||
"Bullying",
|
||||
"Scamming",
|
||||
"Dating",
|
||||
"Cheating/Exploiting",
|
||||
"Personal Questions",
|
||||
"Offsite Links",
|
||||
"Bad Model or Script",
|
||||
"Bad Username",
|
||||
}
|
||||
local abuseDropDown, updateAbuseSelection = RbxGui.CreateDropDownMenu(abuses, (abuseText) ->
|
||||
abuse = abuseText
|
||||
if abuse and abusingPlayer
|
||||
|
|
@ -2112,68 +2099,64 @@ if LoadLibrary
|
|||
|
||||
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 = 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
|
||||
-- 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
|
||||
|
||||
-- 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
|
||||
-- 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
|
||||
|
||||
-- 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
|
||||
-- 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
|
||||
|
||||
-- activateChat = ->
|
||||
-- if chatBox.Visible
|
||||
-- return
|
||||
-- end
|
||||
-- return if chatBox.Visible
|
||||
|
||||
-- chatButton.Visible = false
|
||||
-- chatBox.Text = ""
|
||||
-- chatBox.Visible = true
|
||||
-- chatBox\CaptureFocus!
|
||||
-- end
|
||||
|
||||
-- chatButton.MouseButton1Click\connect(activateChat)
|
||||
-- chatButton.MouseButton1Click\connect activateChat
|
||||
|
||||
-- -- hotKeyEnabled = true
|
||||
-- toggleHotKey = function(_)
|
||||
-- toggleHotKey = (_) ->
|
||||
-- -- hotKeyEnabled = value
|
||||
-- end
|
||||
|
||||
|
||||
-- -- 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)
|
||||
-- end)
|
||||
|
||||
-- -- if not newChatMode
|
||||
-- --guiService\AddKey("/")
|
||||
-- --guiService.KeyPressed\connect (key) -> if key == "/" and hotKeyEnabled then activateChat! end end)
|
||||
|
|
@ -2184,19 +2167,16 @@ if LoadLibrary
|
|||
-- if chatBox.Text ~= ""
|
||||
-- str = chatBox.Text
|
||||
-- if string.sub(str, 1, 1) == "%"
|
||||
-- game.Players\TeamChat(string.sub(str, 2))
|
||||
-- game.Players\TeamChat string.substr, 2
|
||||
-- else
|
||||
-- game.Players\Chat(str)
|
||||
-- end
|
||||
-- end
|
||||
-- end
|
||||
-- game.Players\Chat str
|
||||
|
||||
-- chatBox.Text = ""
|
||||
-- chatBox.Visible = false
|
||||
-- chatButton.Visible = true
|
||||
-- end)
|
||||
-- robloxLock(chatBar)
|
||||
-- return chatBar, toggleHotKey
|
||||
-- end
|
||||
|
||||
-- robloxLock chatBar
|
||||
-- chatBar, toggleHotKey
|
||||
|
||||
--Spawn a thread for the Save dialogs
|
||||
isSaveDialogSupported = try
|
||||
|
|
|
|||
Loading…
Reference in New Issue