Improve corescript formatting

This commit is contained in:
Lewin Kelly 2023-04-22 08:20:30 +01:00
parent a060a0001e
commit 21b2c8dd99
24 changed files with 325 additions and 350 deletions

View File

@ -74,7 +74,7 @@ function UpdateGUI(health)
local lastX = tray.bar.Position.X.Scale
local x = 0.019 + (maxWidth - width)
local y = 0.1
tray.bar.Position = UDim2.new(x ,0, y, 0)
tray.bar.Size = UDim2.new(width, 0, height, 0)
-- If more than 1/4 health, bar = green. Else, bar = red.
@ -85,7 +85,7 @@ function UpdateGUI(health)
tray.barRed.Size = tray.bar.Size
tray.bar.Size = UDim2.new(0, 0, 0, 0)
end
if ( (lastHealth - health) > (humanoid.MaxHealth / 10) ) then
lastHealth = health
@ -135,7 +135,7 @@ function AnimateBars(x, y, lastX, height)
tray.bar2.BackgroundTransparency = tray.bar2.BackgroundTransparency + 0.1
end
tray.bar2.BackgroundColor3 = Color3.new(1, GBchannels, GBchannels)
wait(0.02)
end
end
@ -144,11 +144,11 @@ function AnimateHurtOverlay()
-- Start:
-- overlay.Position = UDim2.new(0, 0, 0, -22)
-- overlay.Size = UDim2.new(1, 0, 1.15, 30)
-- Finish:
-- overlay.Position = UDim2.new(-2, 0, -2, -22)
-- overlay.Size = UDim2.new(4.5, 0, 4.65, 30)
overlay = HealthGUI_prototype.hurtOverlay
overlay.Position = UDim2.new(-2, 0, -2, -22)
overlay.Size = UDim2.new(4.5, 0, 4.65, 30)
@ -161,11 +161,11 @@ function AnimateHurtOverlay()
overlay.Size = UDim2.new( (4.5 - (3.5 * (i/i_total)) + wiggle_total), 0, (4.65 - (3.5 * (i/i_total)) + wiggle_total), 30 )
wait(0.01)
end
i_total = 30
wait(0.03)
-- Animate Out, slow
for i=1,i_total do
if( math.abs(wiggle_total) > (wiggle_i * 3) ) then
@ -176,7 +176,7 @@ function AnimateHurtOverlay()
overlay.Size = UDim2.new( (1 + (3.5 * (i/i_total)) + wiggle_total), 0, (1.15 + (3.5 * (i/i_total)) + wiggle_total), 30 )
wait(0.01)
end
-- Hide after we're done
overlay.Position = UDim2.new(10, 0, 0, 0)
end

View File

@ -1152,7 +1152,7 @@ end
function cutSizeInHalfRecursive(_)
-- todo: change the gui size based on how much space we have
--[[changeSize(instance,0.5)
local children = instance:GetChildren()
for i = 1, #children do
cutSizeInHalfRecursive(children[i])
@ -1162,7 +1162,7 @@ end
function doubleSizeRecursive(_)
-- todo: change the gui size based on how much space we have
--[[changeSize(instance,2)
local children = instance:GetChildren()
for i = 1, #children do
doubleSizeRecursive(children[i])

View File

@ -2368,7 +2368,7 @@ if LoadLibrary then
local advancedChatBarSupported = game.Players.LocalPlayer.ChatMode
local chatBar, toggleHotKey = createChatBar()
[if advancedChatBarSupported then
local function toggleChatBar(chatMode)
if chatMode == Enum.ChatMode.Menu then

View File

@ -1477,7 +1477,7 @@ function GetScoreValue(score)
end
end
--[[
--]]
function MakeScoreEntry(entry, scoreval, panel)
if not panel:FindFirstChild "PlayerScore" then
@ -2617,7 +2617,7 @@ end
consider adding lock with wait for performance
sorts each of the team's player lists induvidually, adds up the team scores.
@Args:
tentries table of team entries
tentries table of team entries
--]]
function SortTeams(tentries)
for _, val in ipairs(tentries) do
@ -2880,7 +2880,7 @@ function RemoveNeutralTeam()
end
--[[
--]]
function TeamScoreChanged(entry, nscore)
WaitForChild(entry["Frame"], "PlayerScore").Text = tostring(nscore)

View File

@ -854,7 +854,7 @@ An example using the event syntax:
local part = Create'Part'{
[Create.E'Touched'] = function(part)
print("I was touched by "..part.Name)
end,
end,
}

View File

@ -1092,15 +1092,15 @@ end
function Chat:RecalculateSpacing()
--[[for i = 1, #self.MessageQueue do
local pLabel = self.MessageQueue[i]['Player']
local mLabel = self.MessageQueue[i]['Message']
local mLabel = self.MessageQueue[i]['Message']
local prevYScale = mLabel.Size.Y.Scale
local prevText = mLabel.Text
mLabel.Text = prevText
local heightField = mLabel.TextBounds.Y
local heightField = mLabel.TextBounds.Y
mLabel.Size = UDim2.new(1, 0, heightField/self.RenderFrame.AbsoluteSize.Y, 0)
mLabel.Size = UDim2.new(1, 0, heightField/self.RenderFrame.AbsoluteSize.Y, 0)
pLabel.Size = mLabel.Size
local diff = mLabel.Size.Y.Scale - prevYScale
@ -1151,14 +1151,14 @@ function Chat:CreateMessage(cPlayer, message)
nString = Chat:ComputeSpaceString(pLabel)
else
nString = self.CachedSpaceStrings_List[pName]
end
end
mLabel.Text = ""
mLabel.Name = pName .. " - message"
mLabel.Text = nString .. message;
mLabel.Parent = nil
mLabel.Parent = self.RenderFrame
mLabel.Parent = self.RenderFrame
mLabel.Position = UDim2.new(0, 0, 1, 0);
pLabel.Position = UDim2.new(0, 0, 1, 0);]]

View File

@ -74,7 +74,7 @@ function UpdateGUI(health)
local lastX = tray.bar.Position.X.Scale
local x = 0.019 + (maxWidth - width)
local y = 0.1
tray.bar.Position = UDim2.new(x,0,y, 0)
tray.bar.Size = UDim2.new(width, 0, height, 0)
-- If more than 1/4 health, bar = green. Else, bar = red.
@ -85,7 +85,7 @@ function UpdateGUI(health)
tray.barRed.Size = tray.bar.Size
tray.bar.Size = UDim2.new(0, 0, 0, 0)
end
if ( (lastHealth - health) > (humanoid.MaxHealth / 10) ) then
lastHealth = health
@ -135,7 +135,7 @@ function AnimateBars(x, y, lastX, height)
tray.bar2.BackgroundTransparency = tray.bar2.BackgroundTransparency + 0.1
end
tray.bar2.BackgroundColor3 = Color3.new(1, GBchannels, GBchannels)
wait(0.02)
end
end
@ -144,11 +144,11 @@ function AnimateHurtOverlay()
-- Start:
-- overlay.Position = UDim2.new(0, 0, 0, -22)
-- overlay.Size = UDim2.new(1, 0, 1.15, 30)
-- Finish:
-- overlay.Position = UDim2.new(-2, 0, -2, -22)
-- overlay.Size = UDim2.new(4.5, 0, 4.65, 30)
overlay = HealthGUI_prototype.hurtOverlay
overlay.Position = UDim2.new(-2, 0, -2, -22)
overlay.Size = UDim2.new(4.5, 0, 4.65, 30)
@ -161,11 +161,11 @@ function AnimateHurtOverlay()
overlay.Size = UDim2.new( (4.5 - (3.5 * (i/i_total)) + wiggle_total), 0, (4.65 - (3.5 * (i/i_total)) + wiggle_total), 30 )
wait(0.01)
end
i_total = 30
wait(0.03)
-- Animate Out, slow
for i=1,i_total do
if( math.abs(wiggle_total) > (wiggle_i * 3) ) then
@ -176,7 +176,7 @@ function AnimateHurtOverlay()
overlay.Size = UDim2.new( (1 + (3.5 * (i/i_total)) + wiggle_total), 0, (1.15 + (3.5 * (i/i_total)) + wiggle_total), 30 )
wait(0.01)
end
-- Hide after we're done
overlay.Position = UDim2.new(10, 0, 0, 0)
end

View File

@ -178,7 +178,7 @@ userPurchaseActionsEnded = (isSuccess) ->
if isSuccess -- show the user we bought the item successfully, when they close this dialog we will call signalPromptEnded
newPurchasedSucceededText = string.gsub(
purchaseSucceededText, "itemName",
purchaseSucceededText, "itemName",
"#{currentProductInfo["Name"]}"
)
purchaseDialog.BodyFrame.ItemPreview.ItemDescription.Text = newPurchasedSucceededText
@ -251,14 +251,14 @@ updatePurchasePromptData = (_) ->
if isFreeItem!
newItemDescription = string.gsub freeItemPurchaseText, "itemName", "#{currentProductInfo["Name"]}"
newItemDescription = string.gsub(
newItemDescription, "assetType",
newItemDescription, "assetType",
"#{assetTypeToString currentProductInfo["AssetTypeId"]}"
)
setHeaderText takeHeaderText
else -- otherwise item costs something, so different prompt
newItemDescription = string.gsub productPurchaseText, "itemName", "#{currentProductInfo["Name"]}"
newItemDescription = string.gsub(
newItemDescription, "currencyType",
newItemDescription, "currencyType",
"#{currencyTypeToString currentCurrencyType}"
)
newItemDescription = string.gsub newItemDescription, "currencyAmount", "#{currentCurrencyAmount}"
@ -466,7 +466,7 @@ canPurchaseItem = ->
if tonumber(currentProductInfo["MinimumMembershipLevel"]) >
membershipTypeToNumber game.Players.LocalPlayer.MembershipType
membershipTypeToNumber game.Players.LocalPlayer.MembershipType
notRightBc = true
@ -563,7 +563,7 @@ showPurchasePrompt = ->
"You require an upgrade to your Builders Club membership to purchase this item. Click here to upgrade."
openBCUpSellWindow!
setButtonsVisible(
.BodyFrame.BuyDisabledButton,
@ -632,7 +632,7 @@ purchaseFailed = (inGamePurchasesDisabled) ->
newPurchasedFailedText = string.gsub(purchaseFailedText, "itemName", "#{name}")
if inGamePurchasesDisabled
newPurchasedFailedText = string.gsub(
newPurchasedFailedText, "errorReason",
newPurchasedFailedText, "errorReason",
"#{errorPurchasesDisabledText}"
)
else
@ -703,7 +703,7 @@ doAcceptPurchase = (_) ->
"&purchasePrice=#{currentCurrencyAmount}" ..
"&locationType=Game" ..
"&locationId=#{Game.PlaceId}"
local success, reason = try
@ -852,7 +852,7 @@ userPurchaseProductActionsEnded = (userIsClosingDialog) ->
removeCurrentPurchaseInfo!
else
newPurchasedSucceededText = string.gsub(
purchaseSucceededText, "itemName",
purchaseSucceededText, "itemName",
"#{currentProductInfo["Name"]}"
)
purchaseDialog.BodyFrame.ItemPreview.ItemDescription.Text = newPurchasedSucceededText
@ -1049,16 +1049,17 @@ 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
cutSizeInHalfRecursive = (_) ->
-- todo: change the gui size based on how much space we have
--[[changeSize(instance,0.5)
children = instance\GetChildren!
for i = 1, #children
cutSizeInHalfRecursive(children[i])
@ -1068,7 +1069,7 @@ cutSizeInHalfRecursive = (_) ->
doubleSizeRecursive = (_) ->
-- todo: change the gui size based on how much space we have
--[[changeSize(instance,2)
children = instance\GetChildren!
for i = 1, #children
doubleSizeRecursive(children[i])
@ -1121,16 +1122,16 @@ preloadAssets!
game\GetService"MarketplaceService".PromptProductPurchaseRequested
\connect (player, productId, equipIfPurchased, currencyType) ->
doPurchasePrompt player, nil, equipIfPurchased, currencyType, productId
doPurchasePrompt player, nil, equipIfPurchased, currencyType, productId
Game\GetService"MarketplaceService".PromptPurchaseRequested
\connect (player, assetId, equipIfPurchased, currencyType) ->
doPurchasePrompt player, assetId, equipIfPurchased, currencyType, nil
doPurchasePrompt player, assetId, equipIfPurchased, currencyType, nil
Game\GetService"MarketplaceService".ServerPurchaseVerification\connect (serverResponseTable) ->
doProcessServerPurchaseResponse serverResponseTable
doProcessServerPurchaseResponse serverResponseTable
if enableBrowserWindowClosedEvent

View File

@ -116,7 +116,7 @@ createNewButton = (actionName, functionInfoTable) ->
Game\GetService"UserInputService".InputEnded\connect (inputObject) ->
oldTouches[inputObject] = nil
contextButton.InputBegan\connect (inputObject) ->
return if oldTouches[inputObject]
@ -160,7 +160,7 @@ createNewButton = (actionName, functionInfoTable) ->
if functionInfoTable["title"] and type(functionInfoTable["title"]) == "string"
actionTitle.Text = functionInfoTable["title"]
actionTitle.Parent = contextButton
contextButton
@ -209,7 +209,7 @@ removeAction = (actionName) ->
addAction = (actionName, createTouchButton, functionInfoTable) ->
if functionTable[actionName]
removeAction actionName
functionTable[actionName] = { functionInfoTable }
if createTouchButton and isTouchDevice
createContextActionGui!

View File

@ -494,7 +494,7 @@ setupCameraControl = (parentFrame, refreshCharacterMoveFunc) ->
pinchGestureReceivedTouch = (inputObject) ->
if #pinchTouches < 1
table.insert pinchTouches, inputObject
table.insert pinchTouches, inputObject
pinchTime = tick!
shouldPinch = false
elseif #pinchTouches == 1
@ -517,14 +517,14 @@ setupCameraControl = (parentFrame, refreshCharacterMoveFunc) ->
if not cameraTouch? and not usedByThumbstick
cameraTouch = inputObject
lastPos = Vector2.new cameraTouch.Position.x, cameraTouch.Position.y
lastPos = Vector2.new cameraTouch.Position.x, cameraTouch.Position.y
-- lastTick = tick!
userInputService.InputChanged\connect (inputObject) ->
return if inputObject.UserInputType ~= Enum.UserInputType.Touch
return if cameraTouch ~= inputObject
newPos = Vector2.new cameraTouch.Position.x, cameraTouch.Position.y
newPos = Vector2.new cameraTouch.Position.x, cameraTouch.Position.y
touchDiff = (lastPos - newPos) * CameraRotateSensitivity
-- first time rotating outside deadzone, just setup for next changed event

View File

@ -58,7 +58,7 @@ initializeDeveloperConsole = ->
BackgroundTransparency: 0.5
Position: UDim2.new 0, 0, 0, 21
Size: UDim2.new 1, 0, 1, -25
Dev_OptionsHolder = Create"Frame"
Name: "OptionsHolder"
Parent: Dev_Body
@ -67,7 +67,7 @@ initializeDeveloperConsole = ->
Position: UDim2.new 0, 220, 0, 0
Size: UDim2.new 1, -255, 0, 24
ClipsDescendants: true
Dev_OptionsBar = Create"Frame"
Name: "OptionsBar"
Parent: Dev_OptionsHolder
@ -75,7 +75,7 @@ initializeDeveloperConsole = ->
BackgroundTransparency: 1
Position: UDim2.new 0, -250, 0, 4
Size: UDim2.new 0, 234, 0, 18
Dev_ErrorToggleFilter = Create"TextButton"
Name: "ErrorToggleButton"
Parent: Dev_OptionsBar
@ -87,7 +87,7 @@ initializeDeveloperConsole = ->
FontSize: Enum.FontSize.Size14
Text: ""
TextColor3: Color3.new 1, 0, 0
Create"Frame"
Name: "CheckFrame"
Parent: Dev_ErrorToggleFilter
@ -95,7 +95,7 @@ initializeDeveloperConsole = ->
BorderColor3: Color3.new 1, 0, 0
Position: UDim2.new 0, 4, 0, 4
Size: UDim2.new 0, 10, 0, 10
Dev_InfoToggleFilter = Create"TextButton"
Name: "InfoToggleButton"
Parent: Dev_OptionsBar
@ -107,7 +107,7 @@ initializeDeveloperConsole = ->
FontSize: Enum.FontSize.Size14
Text: ""
TextColor3: Color3.new 0.4, 0.5, 1.0
Create"Frame"
Name: "CheckFrame"
Parent: Dev_InfoToggleFilter
@ -115,7 +115,7 @@ initializeDeveloperConsole = ->
BorderColor3: Color3.new 0.4, 0.5, 1.0
Position: UDim2.new 0, 4, 0, 4
Size: UDim2.new 0, 10, 0, 10
Dev_OutputToggleFilter = Create"TextButton"
Name: "OutputToggleButton"
Parent: Dev_OptionsBar
@ -127,7 +127,7 @@ initializeDeveloperConsole = ->
FontSize: Enum.FontSize.Size14
Text: ""
TextColor3: Color3.new 1, 1, 1.0
Create"Frame"
Name: "CheckFrame"
Parent: Dev_OutputToggleFilter
@ -135,7 +135,7 @@ initializeDeveloperConsole = ->
BorderColor3: Color3.new 1, 1, 1.0
Position: UDim2.new 0, 4, 0, 4
Size: UDim2.new 0, 10, 0, 10
Dev_WarningToggleFilter = Create"TextButton"
Name: "WarningToggleButton"
Parent: Dev_OptionsBar
@ -147,7 +147,7 @@ initializeDeveloperConsole = ->
FontSize: Enum.FontSize.Size14
Text: ""
TextColor3: Color3.new 1, 0.6, 0.4
Create"Frame"
Name: "CheckFrame"
Parent: Dev_WarningToggleFilter
@ -155,7 +155,7 @@ initializeDeveloperConsole = ->
BorderColor3: Color3.new 1, 0.6, 0.4
Position: UDim2.new 0, 4, 0, 4
Size: UDim2.new 0, 10, 0, 10
Dev_WordWrapToggle = Create"TextButton"
Name: "WordWrapToggleButton"
Parent: Dev_OptionsBar
@ -167,7 +167,7 @@ initializeDeveloperConsole = ->
FontSize: Enum.FontSize.Size14
Text: ""
TextColor3: Color3.new 0.8, 0.8, 0.8
Create"Frame"
Name: "CheckFrame"
Parent: Dev_WordWrapToggle
@ -176,7 +176,7 @@ initializeDeveloperConsole = ->
Position: UDim2.new 0, 4, 0, 4
Size: UDim2.new 0, 10, 0, 10
Visible: false
Create"TextLabel"
Name: "Filter"
Parent: Dev_OptionsBar
@ -187,7 +187,7 @@ initializeDeveloperConsole = ->
FontSize: Enum.FontSize.Size14
Text: "Filter"
TextColor3: Color3.new 1, 1, 1
Create"TextLabel"
Name: "WordWrap"
Parent: Dev_OptionsBar
@ -207,14 +207,14 @@ initializeDeveloperConsole = ->
Position: UDim2.new 1, -20, 0, 26
Size: UDim2.new 0, 20, 1, -50
Visible: false
Dev_ScrollArea = Create"Frame"
Name: "ScrollArea"
Parent: Dev_ScrollBar
BackgroundTransparency: 1
Position: UDim2.new 0, 0, 0, 23
Size: UDim2.new 1, 0, 1, -46
Dev_Handle = Create"ImageButton"
Name: "Handle"
Parent: Dev_ScrollArea
@ -222,7 +222,7 @@ initializeDeveloperConsole = ->
BackgroundTransparency: 0.5
Position: UDim2.new 0, 0, 0.2, 0
Size: UDim2.new 0, 20, 0, 40
Create"ImageLabel"
Name: "ImageLabel"
Parent: Dev_Handle
@ -231,7 +231,7 @@ initializeDeveloperConsole = ->
Rotation: 180
Size: UDim2.new 1, 0, 0, 16
Image: "http://www.roblox.com/Asset?id=151205881"
Dev_DownButton = Create"ImageButton"
Name: "Down"
Parent: Dev_ScrollBar
@ -239,7 +239,7 @@ initializeDeveloperConsole = ->
BackgroundTransparency: 0.5
Position: UDim2.new 0, 0, 1, -20
Size: UDim2.new 0, 20, 0, 20
Create"ImageLabel"
Name: "ImageLabel"
Parent: Dev_DownButton
@ -248,7 +248,7 @@ initializeDeveloperConsole = ->
Size: UDim2.new 0, 14, 0, 14
Rotation: 180
Image: "http://www.roblox.com/Asset?id=151205813"
Dev_UpButton = Create"ImageButton"
Name: "Up"
Parent: Dev_ScrollBar
@ -256,7 +256,7 @@ initializeDeveloperConsole = ->
BackgroundTransparency: 0.5
Position: UDim2.new 0, 0, 0, 0
Size: UDim2.new 0, 20, 0, 20
Create"ImageLabel"
Name: "ImageLabel"
Parent: Dev_UpButton
@ -264,7 +264,7 @@ initializeDeveloperConsole = ->
Position: UDim2.new 0, 3, 0, 3
Size: UDim2.new 0, 14, 0, 14
Image: "http://www.roblox.com/Asset?id=151205813"
Dev_TextBox = Create"Frame"
Name: "TextBox"
Parent: Dev_Body
@ -273,14 +273,14 @@ initializeDeveloperConsole = ->
Position: UDim2.new 0, 2, 0, 26
Size: UDim2.new 1, -4, 1, -28
ClipsDescendants: true
Dev_TextHolder = Create"Frame"
Name: "TextHolder"
Parent: Dev_TextBox
BackgroundTransparency: 1
Position: UDim2.new 0, 0, 0, 0
Size: UDim2.new 1, 0, 1, 0
Dev_OptionsButton = Create"ImageButton"
Name: "OptionsButton"
Parent: Dev_Body
@ -288,7 +288,7 @@ initializeDeveloperConsole = ->
BackgroundTransparency: 1
Position: UDim2.new 0, 200, 0, 2
Size: UDim2.new 0, 20, 0, 20
Create"ImageLabel"
Name: "ImageLabel"
Parent: Dev_OptionsButton
@ -297,7 +297,7 @@ initializeDeveloperConsole = ->
Size: UDim2.new 1, 0, 1, 0
Rotation: 0
Image: "http://www.roblox.com/Asset?id=152093917"
Dev_ResizeButton = Create"ImageButton"
Name: "ResizeButton"
Parent: Dev_Body
@ -305,7 +305,7 @@ initializeDeveloperConsole = ->
BackgroundTransparency: 0.5
Position: UDim2.new 1, -20, 1, -20
Size: UDim2.new 0, 20, 0, 20
Create"ImageLabel"
Name: "ImageLabel"
Parent: Dev_ResizeButton
@ -314,7 +314,7 @@ initializeDeveloperConsole = ->
Size: UDim2.new 0.8, 0, 0.8, 0
Rotation: 135
Image: "http://www.roblox.com/Asset?id=151205813"
Create"TextButton"
Name: "LocalConsole"
Parent: Dev_Body
@ -327,7 +327,7 @@ initializeDeveloperConsole = ->
Text: "Local Console"
TextColor3: Color3.new 1, 1, 1
TextYAlignment: Enum.TextYAlignment.Center
Create"TextButton"
Name: "ServerConsole"
Parent: Dev_Body
@ -340,7 +340,7 @@ initializeDeveloperConsole = ->
Text: "Server Console"
TextColor3: Color3.new 1, 1, 1
TextYAlignment: Enum.TextYAlignment.Center
Dev_TitleBar = Create"Frame"
Name: "TitleBar"
Parent: Dev_Container
@ -348,7 +348,7 @@ initializeDeveloperConsole = ->
BackgroundTransparency: 0.5
Position: UDim2.new 0, 0, 0, 0
Size: UDim2.new 1, 0, 0, 20
Dev_CloseButton = Create"ImageButton"
Name: "CloseButton"
Parent: Dev_TitleBar
@ -356,7 +356,7 @@ initializeDeveloperConsole = ->
BackgroundTransparency: 0.5
Position: UDim2.new 1, -20, 0, 0
Size: UDim2.new 0, 20, 0, 20
Create"ImageLabel"
Parent: Dev_CloseButton
BackgroundColor3: Color3.new 0, 0, 0
@ -364,7 +364,7 @@ initializeDeveloperConsole = ->
Position: UDim2.new 0, 3, 0, 3
Size: UDim2.new 0, 14, 0, 14
Image: "http://www.roblox.com/Asset?id=151205852"
Create"TextButton"
Name: "TextButton"
Parent: Dev_TitleBar
@ -373,7 +373,7 @@ initializeDeveloperConsole = ->
Position: UDim2.new 0, 0, 0, 0
Size: UDim2.new 1, -23, 1, 0
Text: ""
Create"TextLabel"
Name: "TitleText"
Parent: Dev_TitleBar
@ -511,9 +511,9 @@ initializeDeveloperConsole = ->
offsetRatio = serverOffset / Dev_TextHolder.AbsoluteSize.Y
topRatio = math.max 0, backRatio - offsetRatio
topRatio = math.max 0, backRatio - offsetRatio
scrollHandleSize = math.max Dev_ScrollArea.AbsoluteSize.Y * ratio, 21
scrollHandleSize = math.max Dev_ScrollArea.AbsoluteSize.Y * ratio, 21
scrollRatio = scrollHandleSize / Dev_ScrollArea.AbsoluteSize.Y
ratioConversion = (1 - scrollRatio) / (1 - ratio)
@ -599,7 +599,7 @@ initializeDeveloperConsole = ->
if (currentConsole == LOCAL_CONSOLE and localOffset > 0) or
(currentConsole == SERVER_CONSOLE and serverOffset > 0)
changeOffset message.TextBounds.Y
changeOffset message.TextBounds.Y
message.Visible = true
@ -654,7 +654,7 @@ initializeDeveloperConsole = ->
inside += 1
while scrollDownIsDown and inside < 2
wait!
changeOffset -12
changeOffset -12
inside -= 1
@ -714,7 +714,7 @@ initializeDeveloperConsole = ->
-- Easy, fast, and working nicely
numberWithZero = (num) ->
numberWithZero = (num) ->
if num < 10
"0#{num}"
else
@ -730,7 +730,7 @@ initializeDeveloperConsole = ->
hour = math.floor dayTime / 3600
dayTime -= hour * 3600
minute = math.floor dayTime / 60
minute = math.floor dayTime / 60
dayTime -= minute * 60
@ -901,7 +901,7 @@ initializeDeveloperConsole = ->
with game\GetService"LogService"
.MessageOut\connect (message, messageType) ->
AddLocalMessage message, messageType, os.time!
AddLocalMessage message, messageType, os.time!
.ServerMessageOut\connect AddServerMessage
currentlyToggling = false

View File

@ -57,7 +57,7 @@ setUpListeners = (frameToListen) ->
frameToListen.BackgroundTransparency -= fadeSpeed
frameToListen.TextTransparency -= fadeSpeed
wait!
killTip = (killFrame) ->
killFrame.inside.Value = false
killFrame.BackgroundTransparency = 1
@ -73,7 +73,7 @@ createSettingsButtonTip = (parent) ->
if not parent?
parent = bottomLeftControl\FindFirstChild "SettingsButton"
with toolTip = frameTip\clone!
.RobloxLocked = true
.Text = "Settings/Leave Game"
@ -90,7 +90,7 @@ bottomLeftChildren = bottomLeftControl\GetChildren!
for i = 1, #bottomLeftChildren
if bottomLeftChildren[i].Name == "Exit"
with exitTip = frameTip\clone!
.RobloxLocked = true
.Text = "Leave Place"
@ -116,7 +116,7 @@ for i = 1, #bottomRightChildren
UDim2.new -1, 0, -1.5
else
UDim2.new 0, 0, -1.5, 0
.Size = UDim2.new 2, 0, 1.25, 0
.Parent = bottomRightChildren[i]
setUpListeners cameraTip

View File

@ -54,7 +54,7 @@ else
if screenGui.AbsoluteSize.Y >= 600
-- New Player List
scriptContext\AddCoreScript 48488235, screenGui, "CoreScripts/PlayerListScript"
if game.CoreGui.Version >= 3 and game.PlaceId ~= 130815926 --todo: remove placeid hack for halloween
-- Backpack Builder, creates most of the backpack gui
scriptContext\AddCoreScript 53878047, screenGui, "CoreScripts/BackpackScripts/BackpackBuilder"

View File

@ -242,7 +242,7 @@ presentDialogChoices = (talkingPart, dialogChoices) ->
for _, obj in pairs dialogChoices
if obj\IsA "DialogChoice"
table.insert sortedDialogChoices, obj
table.sort sortedDialogChoices, (a, b) -> a.Name < b.Name
if #sortedDialogChoices == 0
@ -296,7 +296,7 @@ selectChoice = (choice) ->
sanitizeMessage(dialogChoice.UserDialog),
getChatColor currentTone!
)
wait 1
currentConversationDialog\SignalDialogChoiceSelected player, dialogChoice
game.Chat\Chat(

View File

@ -2528,7 +2528,7 @@ t.CreateSetPanel = (userIdsForSets, objectSelected, dialogClosed, size, position
delay 0, ->
game\GetService"ContentProvider"\Preload(SmallThumbnailUrl .. assetId)
insertFrame.Button.ButtonImage.Image = SmallThumbnailUrl .. assetId
table.insert(
insertButtonCons,
insertFrame.Button.MouseButton1Click\connect ->
@ -2862,11 +2862,11 @@ t.CreateTerrainMaterialSelector = (size, position) ->
when "Concrete" then 67532059
when "Water" then 81407474
else 66887593}"
-- fill in the rest here!!
scrollFrame, scrollUp, scrollDown, recalculateScroll = t.CreateScrollingFrame nil, "grid"
with scrollFrame
.Size = UDim2.new 0.85, 0, 1, 0
.Position = UDim2.new 0, 0, 0, 0
@ -3032,7 +3032,7 @@ t.CreateLoadingFrame = (name, size, position) ->
true, ->
if newSize.X.Scale < 0
loadingGreenBar.Visible = false
else
loadingGreenBar.Size = newSize
loadingGreenBar.Visible = newSize.X.Scale > 0

View File

@ -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()

View File

@ -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
@ -1092,7 +1094,7 @@ createGameSettingsMenu = (baseZIndex, _) ->
game.GraphicsQualityChangeRequest\connect (graphicsIncrease) ->
return if isAutoGraphics
-- only can set graphics in manual mode
if graphicsIncrease
@ -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
@ -2109,71 +2096,67 @@ if LoadLibrary
robloxLock shield
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 = 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

View File

@ -1699,7 +1699,7 @@ UpdateMaximize = ->
BaseScreenXSize * 0.9,
entry["Frame"].TitleFrame.Size.Y.Scale,
0
)
)
for _, entry in ipairs PlayerFrames
WaitForChild(entry["Frame"], "TitleFrame").Size = UDim2.new(
@ -1707,13 +1707,13 @@ UpdateMaximize = ->
BaseScreenXSize * 0.9,
entry["Frame"].TitleFrame.Size.Y.Scale,
0
)
)
ExpandNames = ->
if #ScoreNames ~= 0
for _, i in pairs StatTitles\GetChildren!
Spawn ->
TweenProperty i, "TextTransparency", i.TextTransparency, 0, BASE_TWEEN
TweenProperty i, "TextTransparency", i.TextTransparency, 0, BASE_TWEEN
HeaderFrameHeight = 0.09
@ -1743,7 +1743,7 @@ CloseNames = ->
if not IsMaximized.Value
for _, i in pairs StatTitles\GetChildren!
Spawn ->
TweenProperty i, "TextTransparency", i.TextTransparency, 1, BASE_TWEEN
TweenProperty i, "TextTransparency", i.TextTransparency, 1, BASE_TWEEN
@ -1845,7 +1845,7 @@ UpdateScrollPosition = ->
maxPos = GetMaxScroll!
scrollLength = maxPos - minPos
yscrollpos = math.max math.min(ListFrame.Position.Y.Scale, maxPos), minPos
yscrollpos = math.max math.min(ListFrame.Position.Y.Scale, maxPos), minPos
ListFrame.Position = UDim2.new ListFrame.Position.X.Scale, ListFrame.Position.X.Offset, yscrollpos, ListFrame.Position.Y.Offset
adjustedLength = 1 - ScrollBar.Size.Y.Scale

View File

@ -75,7 +75,7 @@ makeFriend = (fromPlayer, toPlayer) ->
toPlayer\RevokeFriendship fromPlayer
friendRequestBlacklist[fromPlayer] = true
print "pop up blacklist"
yesCon?\disconnect!
noCon?\disconnect!
@ -290,5 +290,5 @@ if teleportEnabled
popup.AcceptButton.Text = "Leave"
popup.DeclineButton.Text = "Stay"
popup\TweenSize UDim2.new(0, 330, 0, 350), Enum.EasingDirection.Out, Enum.EasingStyle.Quart, 1, true
true

View File

@ -851,7 +851,7 @@ makeStyledButton("LeftLeg", UDim2.new(0.19, 0, 0.31, 0), UDim2.new(0.525, 0, 0.6
script\Destroy!
-- I could probably make this entire thing into one massive
-- fuckoff instance tree like the Typing Tester codebase,
-- fuckoff instance tree like the Typing Tester codebase,
-- but it would probably break a lot of things
-- Heliodex

View File

@ -89,7 +89,7 @@ local characterChildAddedCon, backpackChildCon
debounce = false
enlargeFactor = 1.18
buttonSizeEnlarge = UDim2.new 1 * enlargeFactor, 0, 1 * enlargeFactor, 0
buttonSizeEnlarge = UDim2.new 1 * enlargeFactor, 0, 1 * enlargeFactor, 0
buttonSizeNormal = UDim2.new 1, 0, 1, 0
enlargeOverride = true
guiTweenSpeed = 0.5
@ -135,7 +135,7 @@ characterInWorkspace = ->
game.Players.LocalPlayer["Character"] and
game.Players.LocalPlayer.Character? and
game.Players.LocalPlayer.Character.Parent?
return true
false
@ -464,12 +464,12 @@ swapGear = (gearClone, toFrame) ->
toFrameChildren[1].SlotNumberDownShadow.Text = gearClone.SlotNumber.Text
toFrameChildren[1].SlotNumberUpShadow.Text = gearClone.SlotNumber.Text
subString = string.sub toFrame.Name, 5
subString = string.sub toFrame.Name, 5
gearClone.SlotNumber.Text = subString
gearClone.SlotNumberDownShadow.Text = subString
gearClone.SlotNumberUpShadow.Text = subString
gearClone.Position = UDim2.new gearClone.Position.X.Scale, 0, gearClone.Position.Y.Scale, 0
gearClone.Position = UDim2.new gearClone.Position.X.Scale, 0, gearClone.Position.Y.Scale, 0
toFrameChildren[1].Position = UDim2.new(
toFrameChildren[1].Position.X.Scale, 0,
toFrameChildren[1].Position.Y.Scale, 0
@ -485,7 +485,7 @@ swapGear = (gearClone, toFrame) ->
gearSlots[slotNum] = "empty" -- reset this gear slot
subString = string.sub toFrame.Name, 5
subString = string.sub toFrame.Name, 5
gearClone.SlotNumber.Text = subString
gearClone.SlotNumberDownShadow.Text = subString
gearClone.SlotNumberUpShadow.Text = subString
@ -506,7 +506,7 @@ resolveDrag = (gearClone, x, y) ->
frames = frame.Parent\GetChildren!
for i = 1, #frames
if frames[i]\IsA"Frame" and
if frames[i]\IsA"Frame" and
pointInRectangle mousePoint, frames[i].AbsolutePosition, frames[i].AbsoluteSize
swapGear gearClone, frames[i]
@ -597,7 +597,7 @@ addingPlayerChild = (child, equipped, addToSlot, inventoryGearButton) ->
gearClone.GearReference.Value["ToolTip"] and
gearClone.GearReference.Value.ToolTip ~= ""
showToolTip gearClone, gearClone.GearReference.Value.ToolTip
showToolTip gearClone, gearClone.GearReference.Value.ToolTip
gearClone.MouseLeave\connect ->
@ -605,7 +605,7 @@ addingPlayerChild = (child, equipped, addToSlot, inventoryGearButton) ->
gearClone.GearReference.Value["ToolTip"] and
gearClone.GearReference.Value.ToolTip ~= ""
hideToolTip gearClone, gearClone.GearReference.Value.ToolTip
hideToolTip gearClone, gearClone.GearReference.Value.ToolTip
gearClone.RobloxLocked = true
@ -716,8 +716,8 @@ addingPlayerChild = (child, equipped, addToSlot, inventoryGearButton) ->
return if gearClone.Parent and gearClone.Parent.Parent == currentLoadout
clickCon?\disconnect!
buttonDeleteCon?\disconnect!
mouseEnterCon?\disconnect!
buttonDeleteCon?\disconnect!
mouseEnterCon?\disconnect!
mouseLeaveCon?\disconnect!
dragStop?\disconnect!
dragBegin?\disconnect!
@ -727,7 +727,7 @@ addingPlayerChild = (child, equipped, addToSlot, inventoryGearButton) ->
local childChangeCon
childCon = child.AncestryChanged\connect (newChild, parent) ->
if not checkToolAncestry newChild, parent
childCon?\disconnect!
childChangeCon?\disconnect!
@ -936,13 +936,13 @@ waitForProperty player, "Character"
-- not sure why this had no delay but the player.CharacterAdded one had one... this type of error would be easier to avoid with function reusage
delay 1, ->
backpackChildren = player.Backpack\GetChildren!
size = math.min 10, #backpackChildren
size = math.min 10, #backpackChildren
for i = 1, size
if backpackEnabled
backpackButton.Visible = true
clBackground.Visible = true
addingPlayerChild backpackChildren[i], false
addingPlayerChild backpackChildren[i], false
setupBackpackListener!
@ -1034,8 +1034,8 @@ player.CharacterAdded\connect ->
backpackChildCon = nil
waitForChild player, "PlayerGui"
moveHealthBar player.PlayerGui
waitForChild player, "PlayerGui"
moveHealthBar player.PlayerGui
delay 2, ->
--while true
if (not backpackWasOpened) and
@ -1071,7 +1071,7 @@ game\GetService"GuiService".KeyPressed\connect (key) ->
activateGear key
backpackOpenEvent.Event\connect editLoadout
backpackCloseEvent.Event\connect centerGear
backpackOpenEvent.Event\connect editLoadout
backpackCloseEvent.Event\connect centerGear
tabClickedEvent.Event\connect (tabName) ->
tabHandler tabName == StaticTabName

View File

@ -115,7 +115,7 @@ JsonWriter.ParseString = (s) =>
JsonWriter.IsArray = (t) =>
count = 0
isindex = (k) ->
if type(k) == "number" and
if type(k) == "number" and
k > 0 and
math.floor(k) == k
@ -255,11 +255,11 @@ JsonReader.TestReservedWord = (t) =>
JsonReader.ReadNumber ==>
result = @\Next!
peek = @\Peek!
while peek? and string.find peek, "[%+%-%d%.eE]"
while peek? and string.find peek, "[%+%-%d%.eE]"
result ..= @\Next!
peek = @\Peek!
result = tonumber result
result = tonumber result
if not result?
error string.format "Invalid number: '%s'", result
else
@ -303,7 +303,7 @@ JsonReader.ReadBlockComment ==>
done = true
if not done and ch == "/" and @\Peek! == "*"
error string.format "Invalid comment: %s, '/*' illegal.", @\All!
error string.format "Invalid comment: %s, '/*' illegal.", @\All!
@\Next!
@ -389,12 +389,12 @@ JsonReader.All ==> @reader\All!
Encode = (o) ->
with JsonWriter\New!
\Write o
\Write o
\ToString!
Decode = (s) ->
with JsonReader\New s
with JsonReader\New s
\Read!
-------------------- End JSON Parser ------------------------
@ -569,7 +569,7 @@ t.SelectTerrainRegion = (regionToSelect, color, selectEmptyCells, selectionParen
SelectionPart: selectionPart
SelectionBox: selectionBox
KeepAlive: currentKeepAliveTag
adornments[cellPos] = adornTable
cleanUpAdornments!
@ -777,7 +777,7 @@ An example using the event syntax:
local part = Create'Part'{
[Create.E'Touched'] = function(part)
print("I was touched by "..part.Name)
end,
end,
}

View File

@ -187,8 +187,8 @@ inLoadout = (gear) ->
for i = 1, #children
if children[i]\IsA "Frame"
button = children[i]\GetChildren!
if #button > 0 and
button[1].GearReference.Value and
if #button > 0 and
button[1].GearReference.Value and
button[1].GearReference.Value == gear
return true
@ -280,7 +280,7 @@ getGearContextMenu = ->
BackgroundColor3: Color3.new 0, 0, 0
BorderSizePixel: 0
TextXAlignment: Enum.TextXAlignment.Left
Text: " #{contextElement.Text}"
Text: " #{contextElement.Text}"
Font: Enum.Font.Arial
FontSize: Enum.FontSize.Size14
Size: UDim2.new 1, 8, 0, elementHeight
@ -473,7 +473,7 @@ resizeGrid = ->
buttonClick buttonClone
clickTime = newClickTime
recalculateScroll!
resize = ->
@ -491,7 +491,7 @@ resize = ->
addToGrid = (child) ->
return if not child\IsA"Tool" and
return if not child\IsA"Tool" and
not child\IsA "HopperBin"
return if child\FindFirstChild "RobloxBuildTool"
@ -689,7 +689,7 @@ splitByWhitespace = (text) ->
showSearchGear = (searchTerms) ->
return if not backpack.Gear.Visible
-- currently not active tab
searchTermTable = splitByWhitespace searchTerms
@ -757,7 +757,7 @@ currentLoadout.DescendantAdded\connect (descendant) ->
currentLoadout.DescendantRemoving\connect (descendant) ->
if not backpack.Visible and (descendant\IsA"ImageButton" or descendant\IsA "TextButton")
wait!
centerGear currentLoadout\GetChildren!
centerGear currentLoadout\GetChildren!
grid.MouseEnter\connect -> clearPreview!

View File

@ -82,9 +82,9 @@ CreateEnum = (enumName) ->
Enum: e
[EnumName]: enumName
<call>: (@, value) ->
<call>: (@, value) ->
value == @ or value == @Name or value == @Value
<tostring>: (@) ->
<tostring>: (@) ->
"Enum.#{@[EnumName]}.#{@Name}"
e[i] = e[name] = e[item] = item
@ -103,7 +103,7 @@ CreateEnum = (enumName) ->
table.sort t, (a, b) -> a.Value < b.Value
t
__tostring: (@) ->
__tostring: (@) ->
"Enum.#{@[EnumName]}"
---------------------------------------------------
@ -181,23 +181,23 @@ Chat =
* "tako"
SafeChat_List:
"Use the Chat menu to talk to me.":
"Use the Chat menu to talk to me.":
* "/sc0"
* true
"I can only see menu chats.":
"I can only see menu chats.":
* "/sc1"
* true
Hello:
Hi:
* "/sc2_0"
* true
"Hi there!": true
"Hi everyone": true
* "/sc2_0"
* true
"Hi there!": true
"Hi everyone": true
Howdy:
* "/sc2_1"
* true
"Howdy partner!": true
* true
"Howdy partner!": true
Greetings:
* "/sc2_2"
@ -287,7 +287,7 @@ Chat =
* "/sc3_3"
* true
"I have to go":
* "/sc3_4"
* "/sc3_4"
* true
Farewell:
@ -300,9 +300,9 @@ Chat =
Peace:
* "/sc3_6"
* true
"Peace out!": true
"Peace dudes!": true
* true
"Peace out!": true
"Peace dudes!": true
"Rest in pieces!": true
Silly:
@ -514,14 +514,14 @@ Chat =
Retriever: true
Horses:
Ponies: true
Stallions: true
Ponies: true
Stallions: true
Pwnyz: true
Reptiles:
Dinosaurs: true
Lizards: true
Snakes: true
Dinosaurs: true
Lizards: true
Snakes: true
"Turtles!": true
Hamster: true
@ -592,8 +592,8 @@ Chat =
Tennis: true
"Sports team practice": true
Watersports:
Surfing: true
Swimming: true
Surfing: true
Swimming: true
"Water Polo": true
"Winter sports":
@ -767,7 +767,7 @@ Chat =
Wales: true
"Northern Ireland": true
Asia:
China: true
India: true
@ -777,11 +777,11 @@ Chat =
Vietnam: true
"South America":
Argentina: true
Argentina: true
Brazil: true
Africa:
Eygpt: true
Eygpt: true
Swaziland: true
Australia: true
@ -821,7 +821,7 @@ Chat =
* "/sc6_13"
* true
"I don't want to say boy or girl. Don't ask.":
* "/sc6_14"
* "/sc6_14"
* true
* "/sc6"
@ -1123,29 +1123,29 @@ Chat.UpdateChat = (cPlayer, message) =>
if coroutine.status(Chat.MessageThread) == "dead"
--Chat.Messages_List = {}
table.insert Chat.Messages_List, messageField
table.insert Chat.Messages_List, messageField
Chat.MessageThread = coroutine.create ->
for i = 1, #Chat.Messages_List
field = Chat.Messages_List[i]
Chat\CreateMessage field["Player"], field["Message"]
Chat\CreateMessage field["Player"], field["Message"]
Chat.Messages_List = {}
coroutine.resume Chat.MessageThread
coroutine.resume Chat.MessageThread
else
table.insert Chat.Messages_List, messageField
table.insert Chat.Messages_List, messageField
-- Chat.RecalculateSpacing ==>
--[[for i = 1, #@MessageQueue
pLabel = @MessageQueue[i]['Player']
mLabel = @MessageQueue[i]['Message']
mLabel = @MessageQueue[i]['Message']
prevYScale = mLabel.Size.Y.Scale
prevText = mLabel.Text
mLabel.Text = prevText
heightField = mLabel.TextBounds.Y
heightField = mLabel.TextBounds.Y
mLabel.Size = UDim2.new(1, 0, heightField/@RenderFrame.AbsoluteSize.Y, 0)
mLabel.Size = UDim2.new(1, 0, heightField/@RenderFrame.AbsoluteSize.Y, 0)
pLabel.Size = mLabel.Size
diff = mLabel.Size.Y.Scale - prevYScale
@ -1191,14 +1191,14 @@ Chat.CreateMessage = (cPlayer, message) =>
nString = Chat\ComputeSpaceString(pLabel)
else
nString = @CachedSpaceStrings_List[pName]
end
end
mLabel.Text = ""
mLabel.Name = pName .. " - message"
mLabel.Text = nString .. message;
mLabel.Parent = nil
mLabel.Parent = @RenderFrame
mLabel.Parent = @RenderFrame
mLabel.Position = UDim2.new 0, 0, 1, 0;
pLabel.Position = UDim2.new 0, 0, 1, 0;]]
@ -1589,7 +1589,7 @@ Chat.FindMessageInSafeChat = (message, list) =>
if msg == message
return true
if type(list[msg]) == "table"
foundMessage = Chat\FindMessageInSafeChat message, list[msg]
foundMessage = Chat\FindMessageInSafeChat message, list[msg]
if foundMessage
return true
foundMessage
@ -1613,7 +1613,7 @@ Chat.PlayerChatted = (...) =>
(Player.ChatMode == Enum.ChatMode.Menu and string.sub(message, 1, 3) == "/sc") or
Chat\FindMessageInSafeChat message, @SafeChat_List
Chat\UpdateChat player, message
Chat\UpdateChat player, message
-- After Chat.Configuration.Lifetime seconds of existence, the labels become invisible
-- Runs only every 5 seconds and has to loop through 50 values
@ -1657,9 +1657,9 @@ Chat.Initialize ==>
Chat\CreateGui!
try
Chat\CoreGuiChanged Enum.CoreGuiType.Chat, Game.StarterGui\GetCoreGuiEnabled Enum.CoreGuiType.Chat
Chat\CoreGuiChanged Enum.CoreGuiType.Chat, Game.StarterGui\GetCoreGuiEnabled Enum.CoreGuiType.Chat
Game.StarterGui.CoreGuiChangedSignal\connect (coreGuiType, enabled) ->
Chat\CoreGuiChanged coreGuiType, enabled
Chat\CoreGuiChanged coreGuiType, enabled
@EventListener = PlayersService.PlayerChatted\connect (...) ->
-- This event has 4 callback arguments