Improve formatting and add compound assignment, which will be removed by Darklua

This commit is contained in:
Lewin Kelly 2023-08-14 19:43:38 +01:00
parent a94af66013
commit b56129fc7b
19 changed files with 513 additions and 557 deletions

View File

@ -1,3 +1,3 @@
# Corescripts
After installing Aftman and running `aftman install`, run `./compile.sh` to compile the corescripts from ./yue/\*.yue to ./processed/\*.lua.
After installing Aftman and running `aftman install`, run `./compile.sh` to compile the corescripts from ./lua/\*.lua to ./processed/\*.lua.

View File

@ -3,6 +3,7 @@
rules: [
"remove_comments",
"remove_spaces",
"remove_compound_assignment",
"group_local_assignment",
// "compute_expression",
"remove_unused_if_branch",

View File

@ -145,7 +145,7 @@ function userPurchaseActionsEnded(isSuccess)
local newPurchasedSucceededText = string.gsub(
purchaseSucceededText,
"itemName",
tostring(currentProductInfo["Name"])
tostring(currentProductInfo.Name)
)
purchaseDialog.BodyFrame.ItemPreview.ItemDescription.Text =
newPurchasedSucceededText
@ -181,26 +181,26 @@ function updatePurchasePromptData(_)
-- id to use when we request a purchase
if not currentProductId then
currentProductId = currentProductInfo["ProductId"]
currentProductId = currentProductInfo.ProductId
end
if isFreeItem() then
newItemDescription = string.gsub(
freeItemPurchaseText,
"itemName",
tostring(currentProductInfo["Name"])
tostring(currentProductInfo.Name)
)
newItemDescription = string.gsub(
newItemDescription,
"assetType",
tostring(assetTypeToString(currentProductInfo["AssetTypeId"]))
tostring(assetTypeToString(currentProductInfo.AssetTypeId))
)
setHeaderText(takeHeaderText)
else -- otherwise item costs something, so different prompt
newItemDescription = string.gsub(
productPurchaseText,
"itemName",
tostring(currentProductInfo["Name"])
tostring(currentProductInfo.Name)
)
newItemDescription = string.gsub(
newItemDescription,
@ -221,7 +221,7 @@ function updatePurchasePromptData(_)
if purchasingConsumable then
purchaseDialog.BodyFrame.ItemPreview.Image = baseUrl
.. "thumbs/asset.ashx?assetid="
.. tostring(currentProductInfo["IconImageAssetId"])
.. tostring(currentProductInfo.IconImageAssetId)
.. "&x=100&y=100&format=png"
else
purchaseDialog.BodyFrame.ItemPreview.Image = baseUrl
@ -244,7 +244,7 @@ function doPlayerFundsCheck(checkIndefinitely)
do
wait(1 / 10)
canPurchase, insufficientFunds = canPurchaseItem()
retries = retries - 1
retries -= 1
end
end
if canPurchase and not insufficientFunds then
@ -372,7 +372,7 @@ end
function purchaseFailed(inGamePurchasesDisabled)
local name = "Item"
if currentProductInfo then
name = currentProductInfo["Name"]
name = currentProductInfo.Name
end
local newPurchasedFailedText =
@ -467,14 +467,14 @@ function doAcceptPurchase(_)
response = getRbxUtility().DecodeJSON(response)
if response then
if response["success"] == false then
if response["status"] ~= "AlreadyOwned" then
if response.success == false then
if response.status ~= "AlreadyOwned" then
print(
"web return response of fail on purchase of",
currentAssetId,
currentProductId
)
purchaseFailed((response["status"] == "EconomyDisabled"))
purchaseFailed((response.status == "EconomyDisabled"))
return
end
end
@ -492,7 +492,7 @@ function doAcceptPurchase(_)
currentEquipOnPurchase
and success
and currentAssetId
and tonumber(currentProductInfo["AssetTypeId"]) == 19
and tonumber(currentProductInfo.AssetTypeId) == 19
then
local tool = getToolAssetID(tonumber(currentAssetId))
if tool then
@ -501,7 +501,7 @@ function doAcceptPurchase(_)
end
if purchasingConsumable then
if not response["receipt"] then
if not response.receipt then
print(
"tried to buy productId, but no receipt returned. productId was",
currentProductId
@ -510,7 +510,7 @@ function doAcceptPurchase(_)
return
end
Game:GetService("MarketplaceService"):SignalClientPurchaseSuccess(
tostring(response["receipt"]),
tostring(response.receipt),
game.Players.LocalPlayer.userId,
currentProductId
)
@ -746,8 +746,8 @@ end
function isFreeItem()
-- if both of these are true, then the item is free, just prompt user if they want to take one
return currentProductInfo
and currentProductInfo["IsForSale"] == true
and currentProductInfo["IsPublicDomain"] == true
and currentProductInfo.IsForSale == true
and currentProductInfo.IsPublicDomain == true
end
---------------------------------------------- End Currency Functions ---------------------------------------------
@ -847,8 +847,8 @@ function canPurchaseItem()
end
if
currentProductInfo["IsForSale"] == false
and currentProductInfo["IsPublicDomain"] == false
currentProductInfo.IsForSale == false
and currentProductInfo.IsPublicDomain == false
then
descText = "This item is no longer for sale."
return true, nil, nil, true, descText
@ -857,8 +857,8 @@ function canPurchaseItem()
-- now we start talking money, making sure we are going to be able to purchase this
if
not setCurrencyAmountAndType(
tonumber(currentProductInfo["PriceInRobux"]),
tonumber(currentProductInfo["PriceInTickets"])
tonumber(currentProductInfo.PriceInRobux),
tonumber(currentProductInfo.PriceInTickets)
)
then
descText =
@ -873,7 +873,7 @@ function canPurchaseItem()
end
if
tonumber(currentProductInfo["MinimumMembershipLevel"])
tonumber(currentProductInfo.MinimumMembershipLevel)
> membershipTypeToNumber(game.Players.LocalPlayer.MembershipType)
then
notRightBc = true
@ -887,7 +887,7 @@ function canPurchaseItem()
return true, insufficientFunds, notRightBc, false
end
if currentProductInfo["ContentRatingTypeId"] == 1 then
if currentProductInfo.ContentRatingTypeId == 1 then
if game.Players.LocalPlayer:GetUnder13() then
descText =
"Your account is under 13 so purchase of this item is not allowed."
@ -897,13 +897,13 @@ function canPurchaseItem()
if
(
currentProductInfo["IsLimited"] == true
or currentProductInfo["IsLimitedUnique"] == true
currentProductInfo.IsLimited == true
or currentProductInfo.IsLimitedUnique == true
)
and (
currentProductInfo["Remaining"] == ""
or currentProductInfo["Remaining"] == 0
or currentProductInfo["Remaining"] == nil
currentProductInfo.Remaining == ""
or currentProductInfo.Remaining == 0
or currentProductInfo.Remaining == nil
)
then
descText =
@ -960,7 +960,7 @@ function startSpinner()
"http://banland.xyz/Asset/?id=45880710"
end
pos = pos + 1
pos += 1
end
spinPos = (spinPos + 1) % 8
wait(1 / 15)
@ -1019,7 +1019,7 @@ function createSpinner(size, position, parent)
spinnerImage.Parent = spinnerFrame
spinnerIcons[spinnerNum] = spinnerImage
spinnerNum = spinnerNum + 1
spinnerNum += 1
end
end
@ -1351,7 +1351,7 @@ function userPurchaseProductActionsEnded(userIsClosingDialog)
if currentServerResponseTable then
local isPurchased = false
if
tostring(currentServerResponseTable["isValid"]):lower()
tostring(currentServerResponseTable.isValid):lower()
== "true"
then
isPurchased = true
@ -1359,8 +1359,8 @@ function userPurchaseProductActionsEnded(userIsClosingDialog)
Game:GetService("MarketplaceService")
:SignalPromptProductPurchaseFinished(
tonumber(currentServerResponseTable["playerId"]),
tonumber(currentServerResponseTable["productId"]),
tonumber(currentServerResponseTable.playerId),
tonumber(currentServerResponseTable.productId),
isPurchased
)
else
@ -1371,7 +1371,7 @@ function userPurchaseProductActionsEnded(userIsClosingDialog)
local newPurchasedSucceededText = string.gsub(
purchaseSucceededText,
"itemName",
tostring(currentProductInfo["Name"])
tostring(currentProductInfo.Name)
)
purchaseDialog.BodyFrame.ItemPreview.ItemDescription.Text =
newPurchasedSucceededText
@ -1388,8 +1388,8 @@ function doProcessServerPurchaseResponse(serverResponseTable)
end
if
serverResponseTable["playerId"]
and tonumber(serverResponseTable["playerId"])
serverResponseTable.playerId
and tonumber(serverResponseTable.playerId)
== game.Players.LocalPlayer.userId
then
currentServerResponseTable = serverResponseTable

View File

@ -9,8 +9,7 @@ local contextActionService = Game:GetService "ContextActionService"
local isTouchDevice = Game:GetService("UserInputService").TouchEnabled
local functionTable = {}
local buttonVector = {}
local buttonScreenGui
local buttonFrame
local buttonScreenGui, buttonFrame
local ContextDownImage = "http://www.banland.xyz/asset/?id=97166756"
local ContextUpImage = "http://www.banland.xyz/asset/?id=97166444"
@ -169,10 +168,10 @@ function createNewButton(actionName, functionInfoTable)
actionIcon.Size = UDim2.new(0.65, 0, 0.65, 0)
actionIcon.BackgroundTransparency = 1
if
functionInfoTable["image"]
and type(functionInfoTable["image"]) == "string"
functionInfoTable.image
and type(functionInfoTable.image) == "string"
then
actionIcon.Image = functionInfoTable["image"]
actionIcon.Image = functionInfoTable.image
end
actionIcon.Parent = contextButton
@ -187,10 +186,10 @@ function createNewButton(actionName, functionInfoTable)
actionTitle.TextWrapped = true
actionTitle.Text = ""
if
functionInfoTable["title"]
and type(functionInfoTable["title"]) == "string"
functionInfoTable.title
and type(functionInfoTable.title) == "string"
then
actionTitle.Text = functionInfoTable["title"]
actionTitle.Text = functionInfoTable.title
end
actionTitle.Parent = contextButton
@ -303,5 +302,5 @@ end)
-- make sure any bound data before we setup connections is handled
local boundActions = contextActionService:GetAllBoundActionInfo()
for actionName, actionData in pairs(boundActions) do
addAction(actionName, actionData["createTouchButton"], actionData)
addAction(actionName, actionData.createTouchButton, actionData)
end

View File

@ -406,7 +406,7 @@ function constructThumbstick(
end
function setupCharacterMovement(parentFrame)
local lastMovementVector, lastMaxMovement = nil
local lastMovementVector, lastMaxMovement
local moveCharacterFunc = localPlayer.MoveCharacter
local moveCharacterFunction = function(movementVector, maxMovement)
if localPlayer then

View File

@ -524,9 +524,9 @@ function initializeDeveloperConsole()
repeat
if optionsHidden then
frameNumber = frameNumber - 1
frameNumber -= 1
else
frameNumber = frameNumber + 1
frameNumber += 1
end
local x = frameNumber / 5
@ -554,9 +554,9 @@ function initializeDeveloperConsole()
function changeOffset(value)
if currentConsole == LOCAL_CONSOLE then
localOffset = localOffset + value
localOffset += value
elseif currentConsole == SERVER_CONSOLE then
serverOffset = serverOffset + value
serverOffset += value
end
repositionList()
@ -622,7 +622,7 @@ function initializeDeveloperConsole()
message.Size = UDim2.new(0.98, 0, 0, message.TextBounds.Y)
message.Position = UDim2.new(0, 5, 0, posOffset)
message.Parent = Dev_TextHolder
posOffset = posOffset + message.TextBounds.Y
posOffset += message.TextBounds.Y
if movePosition then
if
@ -680,12 +680,12 @@ function initializeDeveloperConsole()
end
scrollUpIsDown = true
wait(0.6)
inside = inside + 1
inside += 1
while scrollUpIsDown and inside < 2 do
wait()
changeOffset(12)
end
inside = inside - 1
inside -= 1
end
function holdingDownButton()
@ -694,12 +694,12 @@ function initializeDeveloperConsole()
end
scrollDownIsDown = true
wait(0.6)
inside = inside + 1
inside += 1
while scrollDownIsDown and inside < 2 do
wait()
changeOffset(-12)
end
inside = inside - 1
inside -= 1
end
Dev_Container.Body.ScrollBar.Up.MouseButton1Click:connect(function()
@ -864,10 +864,10 @@ function initializeDeveloperConsole()
local hour = math.floor(dayTime / 3600)
dayTime = dayTime - (hour * 3600)
dayTime -= (hour * 3600)
local minute = math.floor(dayTime / 60)
dayTime = dayTime - (minute * 60)
dayTime -= (minute * 60)
local h = numberWithZero(hour)
local m = numberWithZero(minute)
@ -957,9 +957,7 @@ function initializeDeveloperConsole()
localConsole.BackgroundTransparency = 0.6
serverConsole.BackgroundTransparency = 0.8
if
game:FindFirstChild "Players" and game.Players["LocalPlayer"]
then
if game:FindFirstChild "Players" and game.Players.LocalPlayer then
local mouse = game.Players.LocalPlayer:GetMouse()
refreshConsolePosition(mouse.X, mouse.Y)
refreshConsoleSize(mouse.X, mouse.Y)
@ -993,9 +991,7 @@ function initializeDeveloperConsole()
serverConsole.BackgroundTransparency = 0.6
localConsole.BackgroundTransparency = 0.8
if
game:FindFirstChild "Players" and game.Players["LocalPlayer"]
then
if game:FindFirstChild "Players" and game.Players.LocalPlayer then
local mouse = game.Players.LocalPlayer:GetMouse()
refreshConsolePosition(mouse.X, mouse.Y)
refreshConsoleSize(mouse.X, mouse.Y)
@ -1012,7 +1008,7 @@ function initializeDeveloperConsole()
clean()
end)
if game:FindFirstChild "Players" and game.Players["LocalPlayer"] then
if game:FindFirstChild "Players" and game.Players.LocalPlayer then
local LocalMouse = game.Players.LocalPlayer:GetMouse()
LocalMouse.Move:connect(function()
if not Dev_Container.Visible then

View File

@ -28,8 +28,7 @@ inCharTag.Name = "InCharTag"
local hider = Instance.new "BoolValue"
hider.Name = "RobloxBuildTool"
local currentChildren
local backpackTools
local currentChildren, backpackTools
if config == nil then
config = Instance.new "Configuration"
@ -132,7 +131,7 @@ while true do
local fire = config:FindFirstChild "Fire"
local stun = config:FindFirstChild "Stun"
if regen then
delta = delta + regen.Value.X
delta += regen.Value.X
if regen.Value.Y >= 0 then
regen.Value = Vector3.new(
regen.Value.X + regen.Value.Z,
@ -150,7 +149,7 @@ while true do
end -- infinity is -1
end
if poison then
delta = delta - poison.Value.X
delta -= poison.Value.X
if poison.Value.Y >= 0 then
poison.Value = Vector3.new(
poison.Value.X + poison.Value.Z,
@ -170,7 +169,7 @@ while true do
if ice then
--print("IN ICE")
delta = delta - ice.Value.X
delta -= ice.Value.X
if ice.Value.Y >= 0 then
ice.Value =
Vector3.new(ice.Value.X, ice.Value.Y - s, ice.Value.Z)
@ -182,7 +181,7 @@ while true do
if fire then
fireEffect.Enabled = true
fireEffect.Parent = Figure.Torso
delta = delta - fire.Value.X
delta -= fire.Value.X
if fire.Value.Y >= 0 then
fire.Value = Vector3.new(
fire.Value.X,
@ -224,7 +223,7 @@ while true do
backpackTools[i].Parent =
game.Players:GetPlayerFromCharacter(script.Parent).Backpack
end
stun.Value = stun.Value - s
stun.Value -= s
else
Torso.Anchored = false
for i = 1, #backpackTools do
@ -256,9 +255,9 @@ while true do
if delta ~= 0 then
coroutine.resume(coroutine.create(billboardHealthChange), delta)
end
--delta = delta * .01
--delta *= .01
end
--health = health + delta * s * Humanoid.MaxHealth
--health += delta * s * Humanoid.MaxHealth
health = Humanoid.Health + delta * s
if health * 1.01 < Humanoid.MaxHealth then

View File

@ -15,9 +15,7 @@ local mainFrame
local choices = {}
local lastChoice
local choiceMap = {}
local currentConversationDialog
local currentConversationPartner
local currentAbortDialogScript
local currentConversationDialog, currentConversationPartner, currentAbortDialogScript
local tooFarAwayMessage = "You are too far away to chat!"
local tooFarAwaySize = 300
@ -26,11 +24,7 @@ local characterWanderedOffSize = 350
local conversationTimedOut = "Chat ended because you didn't reply"
local conversationTimedOutSize = 350
local player
local chatNotificationGui
local messageDialog
local timeoutScript
local reenableDialogScript
local player, chatNotificationGui, messageDialog, timeoutScript, reenableDialogScript
local dialogMap = {}
local dialogConnections = {}
@ -409,8 +403,8 @@ function presentDialogChoices(talkingPart, dialogChoices)
choiceMap[choices[pos]] = obj
yPosition = yPosition + height
pos = pos + 1
yPosition += height
pos += 1
end
end

View File

@ -59,7 +59,7 @@ local function CreateButtons(frame, buttons, yPos, ySize)
button.FontSize = Enum.FontSize.Size18
button.AutoButtonColor = true
button.Modal = true
if obj["Style"] then
if obj.Style then
button.Style = obj.Style
else
button.Style = Enum.ButtonStyle.RobloxButton
@ -70,7 +70,7 @@ local function CreateButtons(frame, buttons, yPos, ySize)
button.Parent = frame
buttonObjs[buttonNum] = button
buttonNum = buttonNum + 1
buttonNum += 1
end
local numButtons = buttonNum - 1
@ -97,7 +97,7 @@ local function CreateButtons(frame, buttons, yPos, ySize)
)
buttonObjs[buttonNum].Size =
UDim2.new(buttonSize, 0, ySize.Scale, ySize.Offset)
buttonNum = buttonNum + 1
buttonNum += 1
end
end
end
@ -110,7 +110,7 @@ local function setSliderPos(newAbsPosX, slider, sliderPosition, bar, steps)
)
local wholeNum, remainder = math.modf(relativePosX * newStep)
if remainder > 0.5 then
wholeNum = wholeNum + 1
wholeNum += 1
end
relativePosX = wholeNum / newStep
@ -382,7 +382,7 @@ t.CreateDropDownMenu = function(items, onSelect, forRoblox)
obj.TextColor3 = Color3.new(1, 1, 1)
obj.BackgroundTransparency = 1
childNum = childNum + 1
childNum += 1
end
end
end
@ -417,7 +417,7 @@ t.CreateDropDownMenu = function(items, onSelect, forRoblox)
else
obj.Font = Enum.Font.Arial
end
childNum = childNum + 1
childNum += 1
end
end
end
@ -439,7 +439,7 @@ t.CreateDropDownMenu = function(items, onSelect, forRoblox)
local function scrollDown()
if scrollBarPosition + dropDownItemCount <= itemCount then
scrollBarPosition = scrollBarPosition + 1
scrollBarPosition += 1
updateScroll()
return true
end
@ -447,7 +447,7 @@ t.CreateDropDownMenu = function(items, onSelect, forRoblox)
end
local function scrollUp()
if scrollBarPosition > 1 then
scrollBarPosition = scrollBarPosition - 1
scrollBarPosition -= 1
updateScroll()
return true
end
@ -464,13 +464,13 @@ t.CreateDropDownMenu = function(items, onSelect, forRoblox)
scrollUpButton.Position =
UDim2.new(1, -11, (1 * 0.8) / ((dropDownItemCount + 1) * 0.8), 0)
scrollUpButton.MouseButton1Click:connect(function()
scrollMouseCount = scrollMouseCount + 1
scrollMouseCount += 1
end)
scrollUpButton.MouseLeave:connect(function()
scrollMouseCount = scrollMouseCount + 1
scrollMouseCount += 1
end)
scrollUpButton.MouseButton1Down:connect(function()
scrollMouseCount = scrollMouseCount + 1
scrollMouseCount += 1
scrollUp()
local val = scrollMouseCount
@ -493,13 +493,13 @@ t.CreateDropDownMenu = function(items, onSelect, forRoblox)
scrollDownButton.Position = UDim2.new(1, -11, 1, -11)
scrollDownButton.Parent = droppedDownMenu
scrollDownButton.MouseButton1Click:connect(function()
scrollMouseCount = scrollMouseCount + 1
scrollMouseCount += 1
end)
scrollDownButton.MouseLeave:connect(function()
scrollMouseCount = scrollMouseCount + 1
scrollMouseCount += 1
end)
scrollDownButton.MouseButton1Down:connect(function()
scrollMouseCount = scrollMouseCount + 1
scrollMouseCount += 1
scrollDown()
local val = scrollMouseCount
@ -670,10 +670,10 @@ local function layoutGuiObjectsHelper(frame, guiObjects, settingsTable)
local isLabel = child:IsA "TextLabel"
if isLabel then
pixelsRemaining = pixelsRemaining
- settingsTable["TextLabelPositionPadY"]
- settingsTable.TextLabelPositionPadY
else
pixelsRemaining = pixelsRemaining
- settingsTable["TextButtonPositionPadY"]
- settingsTable.TextButtonPositionPadY
end
child.Position = UDim2.new(
child.Position.X.Scale,
@ -695,14 +695,14 @@ local function layoutGuiObjectsHelper(frame, guiObjects, settingsTable)
child.Size.X.Scale,
child.Size.X.Offset,
0,
child.TextBounds.Y + settingsTable["TextLabelSizePadY"]
child.TextBounds.Y + settingsTable.TextLabelSizePadY
)
else
child.Size = UDim2.new(
child.Size.X.Scale,
child.Size.X.Offset,
0,
child.TextBounds.Y + settingsTable["TextButtonSizePadY"]
child.TextBounds.Y + settingsTable.TextButtonSizePadY
)
end
@ -714,14 +714,14 @@ local function layoutGuiObjectsHelper(frame, guiObjects, settingsTable)
child.AbsoluteSize.Y + 1
)
end
pixelsRemaining = pixelsRemaining - child.AbsoluteSize.Y
pixelsRemaining -= child.AbsoluteSize.Y
if isLabel then
pixelsRemaining = pixelsRemaining
- settingsTable["TextLabelPositionPadY"]
- settingsTable.TextLabelPositionPadY
else
pixelsRemaining = pixelsRemaining
- settingsTable["TextButtonPositionPadY"]
- settingsTable.TextButtonPositionPadY
end
else
child.Visible = false
@ -735,7 +735,7 @@ local function layoutGuiObjectsHelper(frame, guiObjects, settingsTable)
0,
totalPixels - pixelsRemaining
)
pixelsRemaining = pixelsRemaining - child.AbsoluteSize.Y
pixelsRemaining -= child.AbsoluteSize.Y
child.Visible = (pixelsRemaining >= 0)
end
end
@ -755,17 +755,17 @@ t.LayoutGuiObjects = function(frame, guiObjects, settingsTable)
settingsTable = {}
end
if not settingsTable["TextLabelSizePadY"] then
settingsTable["TextLabelSizePadY"] = 0
if not settingsTable.TextLabelSizePadY then
settingsTable.TextLabelSizePadY = 0
end
if not settingsTable["TextLabelPositionPadY"] then
settingsTable["TextLabelPositionPadY"] = 0
if not settingsTable.TextLabelPositionPadY then
settingsTable.TextLabelPositionPadY = 0
end
if not settingsTable["TextButtonSizePadY"] then
settingsTable["TextButtonSizePadY"] = 12
if not settingsTable.TextButtonSizePadY then
settingsTable.TextButtonSizePadY = 12
end
if not settingsTable["TextButtonPositionPadY"] then
settingsTable["TextButtonPositionPadY"] = 2
if not settingsTable.TextButtonPositionPadY then
settingsTable.TextButtonPositionPadY = 2
end
--Wrapper frame takes care of styled objects
@ -843,12 +843,12 @@ t.CreateSlider = function(steps, width, position)
bar.Parent = sliderGui
if
position["X"]
and position["X"]["Scale"]
and position["X"]["Offset"]
and position["Y"]
and position["Y"]["Scale"]
and position["Y"]["Offset"]
position.X
and position.X.Scale
and position.X.Offset
and position.Y
and position.Y.Scale
and position.Y.Offset
then
bar.Position = position
end
@ -1609,20 +1609,20 @@ t.CreateScrollingFrame = function(orderList, scrollStyle)
pos = scrollPosition
--count up from current scroll position to fill out grid
while pos <= #guiObjects and pixelsBelowScrollbar < totalPixelsY do
xCounter = xCounter + guiObjects[pos].AbsoluteSize.X
xCounter += guiObjects[pos].AbsoluteSize.X
--previous pos was the end of a row
if xCounter >= totalPixelsX then
pixelsBelowScrollbar = pixelsBelowScrollbar + currentRowY
pixelsBelowScrollbar += currentRowY
currentRowY = 0
xCounter = guiObjects[pos].AbsoluteSize.X
end
if guiObjects[pos].AbsoluteSize.Y > currentRowY then
currentRowY = guiObjects[pos].AbsoluteSize.Y
end
pos = pos + 1
pos += 1
end
--Count wherever current row left off
pixelsBelowScrollbar = pixelsBelowScrollbar + currentRowY
pixelsBelowScrollbar += currentRowY
currentRowY = 0
pos = scrollPosition - 1
@ -1633,20 +1633,20 @@ t.CreateScrollingFrame = function(orderList, scrollStyle)
--count backwards from current scrollPosition to see if we can add more rows
while pixelsBelowScrollbar + currentRowY < totalPixelsY and pos >= 1 do
xCounter = xCounter + guiObjects[pos].AbsoluteSize.X
rowSizeCounter = rowSizeCounter + 1
xCounter += guiObjects[pos].AbsoluteSize.X
rowSizeCounter += 1
if xCounter >= totalPixelsX then
rowSize = rowSizeCounter - 1
rowSizeCounter = 0
xCounter = guiObjects[pos].AbsoluteSize.X
if pixelsBelowScrollbar + currentRowY <= totalPixelsY then
--It fits, so back up our scroll position
pixelsBelowScrollbar = pixelsBelowScrollbar + currentRowY
pixelsBelowScrollbar += currentRowY
if scrollPosition <= rowSize then
scrollPosition = 1
break
else
scrollPosition = scrollPosition - rowSize
scrollPosition -= rowSize
end
currentRowY = 0
else
@ -1658,7 +1658,7 @@ t.CreateScrollingFrame = function(orderList, scrollStyle)
currentRowY = guiObjects[pos].AbsoluteSize.Y
end
pos = pos - 1
pos -= 1
end
--Do check last time if pos = 0
@ -1700,7 +1700,7 @@ t.CreateScrollingFrame = function(orderList, scrollStyle)
--print("Laying out " .. child.Name)
--GuiObject
if setRowSize then
rowSizeCounter = rowSizeCounter + 1
rowSizeCounter += 1
end
if xCounter + child.AbsoluteSize.X >= totalPixelsX then
if setRowSize then
@ -1717,12 +1717,12 @@ t.CreateScrollingFrame = function(orderList, scrollStyle)
0,
totalPixelsY - pixelsRemainingY + yOffset
)
xCounter = xCounter + child.AbsoluteSize.X
xCounter += child.AbsoluteSize.X
child.Visible = (
(pixelsRemainingY - child.AbsoluteSize.Y) >= 0
)
if child.Visible then
howManyDisplayed = howManyDisplayed + 1
howManyDisplayed += 1
end
lastChildSize = child.AbsoluteSize
end
@ -1793,13 +1793,13 @@ t.CreateScrollingFrame = function(orderList, scrollStyle)
break
else
--local ("Backing up ScrollPosition from -- " ..scrollPosition)
scrollPosition = scrollPosition - 1
scrollPosition -= 1
end
else
break
end
end
pos = pos - 1
pos -= 1
end
pos = scrollPosition
@ -1820,10 +1820,10 @@ t.CreateScrollingFrame = function(orderList, scrollStyle)
0,
totalPixels - pixelsRemaining
)
pixelsRemaining = pixelsRemaining - child.AbsoluteSize.Y
pixelsRemaining -= child.AbsoluteSize.Y
if pixelsRemaining >= 0 then
child.Visible = true
howManyDisplayed = howManyDisplayed + 1
howManyDisplayed += 1
else
child.Visible = false
end
@ -1842,7 +1842,7 @@ t.CreateScrollingFrame = function(orderList, scrollStyle)
if children then
for _, child in ipairs(children) do
if child:IsA "GuiObject" then
guiObjects = guiObjects + 1
guiObjects += 1
end
end
end
@ -1892,7 +1892,7 @@ t.CreateScrollingFrame = function(orderList, scrollStyle)
end
reentrancyGuard = true
wait()
local success, err = nil
local success, err
if style == "grid" then
success, err = pcall(function()
layoutGridScrollBar()
@ -1910,7 +1910,7 @@ t.CreateScrollingFrame = function(orderList, scrollStyle)
end
local doScrollUp = function()
scrollPosition = scrollPosition - rowSize
scrollPosition -= rowSize
if scrollPosition < 1 then
scrollPosition = 1
end
@ -1918,7 +1918,7 @@ t.CreateScrollingFrame = function(orderList, scrollStyle)
end
local doScrollDown = function()
scrollPosition = scrollPosition + rowSize
scrollPosition += rowSize
recalculate(nil)
end
@ -2005,18 +2005,18 @@ t.CreateScrollingFrame = function(orderList, scrollStyle)
local dragAbsSize = scrollDrag.AbsoluteSize.y
local barAbsOne = barAbsPos + barAbsSize - dragAbsSize
y = y - mouseOffset
y -= mouseOffset
y = y < barAbsPos and barAbsPos
or y > barAbsOne and barAbsOne
or y
y = y - barAbsPos
y -= barAbsPos
local guiObjects = 0
local children = frame:GetChildren()
if children then
for _, child in ipairs(children) do
if child:IsA "GuiObject" then
guiObjects = guiObjects + 1
guiObjects += 1
end
end
end
@ -2609,7 +2609,7 @@ t.CreateImageTutorialPage = function(
imageLabel.Position = UDim2.new(0.5 - (x / y) / 2, 0, 0, 0)
end
end
size = size + 50
size += 50
frame.Size = UDim2.new(0, size, 0, size)
frame.Position = UDim2.new(0.5, -size / 2, 0.5, -size / 2)
end
@ -2733,7 +2733,7 @@ t.CreateSetPanel = function(
-- used for water selections
local waterForceDirection = "NegX"
local waterForce = "None"
local waterGui, waterTypeChangedEvent = nil
local waterGui, waterTypeChangedEvent
local Data = {}
Data.CurrentCategory = nil
@ -3023,7 +3023,7 @@ t.CreateSetPanel = function(
local numSkipped = 0
for i = 1, #sets do
if not showAdminCategories and sets[i].Name == "Beta" then
numSkipped = numSkipped + 1
numSkipped += 1
else
setButtons[i - numSkipped] = buildSetButton(
sets[i].Name,
@ -3254,10 +3254,10 @@ t.CreateSetPanel = function(
for i = 1, #insertButtons do
insertButtons[i].Position =
UDim2.new(0, buttonWidth * x, 0, buttonHeight * y)
x = x + 1
x += 1
if x >= columns then
x = 0
y = y + 1
y += 1
end
end
end
@ -3321,7 +3321,7 @@ t.CreateSetPanel = function(
insertButtons[arrayPosition], buttonCon = buildInsertButton()
table.insert(insertButtonCons, buttonCon)
insertButtons[arrayPosition].Parent = setGui.SetPanel.ItemsFrame
arrayPosition = arrayPosition + 1
arrayPosition += 1
end
realignButtonGrid(columns)
@ -3495,7 +3495,7 @@ t.CreateSetPanel = function(
)
end)
currRow = currRow + 1
currRow += 1
end
local buttons = setGui.SetPanel.Sets.SetsLists:GetChildren()
@ -4293,7 +4293,7 @@ t.CreatePluginFrame = function(name, size, position, scrollable, parent)
widgetContainer.Position = position + UDim2.new(0, 0, 0, 20)
end
local frame, control, verticalDragger = nil
local frame, control, verticalDragger
if scrollable then
--frame for widgets
frame, control = t.CreateTrueScrollingFrame()

View File

@ -19,9 +19,7 @@ else
gui = script.Parent
end
local helpButton
local updateCameraDropDownSelection
local updateVideoCaptureDropDownSelection
local helpButton, updateCameraDropDownSelection, updateVideoCaptureDropDownSelection
local tweenTime = 0.2
local mouseLockLookScreenUrl = "http://banland.xyz/asset?id=54071825"
@ -233,7 +231,7 @@ local function CreateTextButtons(frame, buttons, yPos, ySize)
button.Parent = frame
buttonObjs[buttonNum] = button
buttonNum = buttonNum + 1
buttonNum += 1
end
toggleSelection(buttonObjs[1])
@ -263,7 +261,7 @@ local function CreateTextButtons(frame, buttons, yPos, ySize)
)
buttonObjs[buttonNum].Size =
UDim2.new(buttonSize, 0, ySize.Scale, ySize.Offset)
buttonNum = buttonNum + 1
buttonNum += 1
end
end
end
@ -306,7 +304,7 @@ function setDisabledState(guiObject)
guiObject.TextTransparency = 0.9
guiObject.Active = false
else
if guiObject["ClassName"] then
if guiObject.ClassName then
print(
"setDisabledState() got object of unsupported type. object type is ",
guiObject.ClassName
@ -807,9 +805,7 @@ local function createGameMainMenu(baseZIndex, shield)
gameSettingsButton.ZIndex = baseZIndex + 4
gameSettingsButton.Parent = gameMainMenuFrame
gameSettingsButton.MouseButton1Click:connect(function()
if
game:FindFirstChild "Players" and game.Players["LocalPlayer"]
then
if game:FindFirstChild "Players" and game.Players.LocalPlayer then
local loadingGui =
game.Players.LocalPlayer:FindFirstChild "PlayerLoadingGui"
if loadingGui then
@ -1266,7 +1262,7 @@ local function createGameSettingsMenu(baseZIndex, _)
if (graphicsLevel.Value + 1) > GraphicsQualityLevels then
return
end
graphicsLevel.Value = graphicsLevel.Value + 1
graphicsLevel.Value += 1
graphicsSetter.Text = tostring(graphicsLevel.Value)
setGraphicsQualityLevel(graphicsLevel.Value)
@ -1281,7 +1277,7 @@ local function createGameSettingsMenu(baseZIndex, _)
if (graphicsLevel.Value - 1) <= 0 then
return
end
graphicsLevel.Value = graphicsLevel.Value - 1
graphicsLevel.Value -= 1
graphicsSetter.Text = tostring(graphicsLevel.Value)
setGraphicsQualityLevel(graphicsLevel.Value)
@ -1451,7 +1447,7 @@ local function createGameSettingsMenu(baseZIndex, _)
local videoNames = {}
local videoNameToItem = {}
videoNames[1] = "Just Save to Disk"
videoNameToItem[videoNames[1]] = Enum.UploadSetting["Never"]
videoNameToItem[videoNames[1]] = Enum.UploadSetting.Never
videoNames[2] = "Upload to YouTube"
videoNameToItem[videoNames[2]] = Enum.UploadSetting["Ask me first"]
@ -1474,7 +1470,7 @@ local function createGameSettingsMenu(baseZIndex, _)
syncVideoCaptureSetting = function()
if
UserSettings().GameSettings.VideoUploadPromptBehavior
== Enum.UploadSetting["Never"]
== Enum.UploadSetting.Never
then
updateVideoCaptureDropDownSelection(videoNames[1])
elseif
@ -1972,7 +1968,7 @@ if LoadLibrary then
errorBoxButtons[buttonOffset].Function = function()
saveLocal()
end
buttonOffset = buttonOffset + 1
buttonOffset += 1
end
errorBoxButtons[buttonOffset] = {}
errorBoxButtons[buttonOffset].Text = "Keep Playing"
@ -2036,7 +2032,7 @@ if LoadLibrary then
spinnerImage.Parent = spinnerFrame
spinnerIcons[spinnerNum] = spinnerImage
spinnerNum = spinnerNum + 1
spinnerNum += 1
end
save = function()
@ -2060,7 +2056,7 @@ if LoadLibrary then
"http://banland.xyz/Asset?id=45880710"
end
pos = pos + 1
pos += 1
end
spinPos = (spinPos + 1) % 8
wait(0.2)
@ -2260,7 +2256,7 @@ if LoadLibrary then
if player:IsA "Player" and player ~= localPlayer then
playerNames[pos] = player.Name
nameToPlayer[player.Name] = player
pos = pos + 1
pos += 1
end
end
end

File diff suppressed because it is too large Load Diff

View File

@ -42,15 +42,15 @@ end
local function moveHealthBar(pGui)
waitForChild(pGui, "HealthGUI")
waitForChild(pGui["HealthGUI"], "tray")
local tray = pGui["HealthGUI"]["tray"]
waitForChild(pGui.HealthGUI, "tray")
local tray = pGui.HealthGUI.tray
tray.Position = UDim2.new(0.5, -85, 1, -26)
end
local function setHealthBarVisible(pGui, visible)
waitForChild(pGui, "HealthGUI")
waitForChild(pGui["HealthGUI"], "tray")
local tray = pGui["HealthGUI"]["tray"]
waitForChild(pGui.HealthGUI, "tray")
local tray = pGui.HealthGUI.tray
tray.Visible = visible
end
@ -92,8 +92,7 @@ if robloxGui.AbsoluteSize.Y <= 320 then
maxNumLoadoutItems = 4
end
local characterChildAddedCon
local backpackChildCon
local characterChildAddedCon, backpackChildCon
local debounce = false
@ -147,8 +146,8 @@ function unregisterNumberKeys()
end
function characterInWorkspace()
if game.Players["LocalPlayer"] then
if game.Players.LocalPlayer["Character"] then
if game.Players.LocalPlayer then
if game.Players.LocalPlayer.Character then
if game.Players.LocalPlayer.Character ~= nil then
if game.Players.LocalPlayer.Character.Parent ~= nil then
return true
@ -751,7 +750,7 @@ local addingPlayerChild = function(
gearClone.MouseEnter:connect(function()
if
gearClone.GearReference
and gearClone.GearReference.Value["ToolTip"]
and gearClone.GearReference.Value.ToolTip
and gearClone.GearReference.Value.ToolTip ~= ""
then
showToolTip(gearClone, gearClone.GearReference.Value.ToolTip)
@ -761,7 +760,7 @@ local addingPlayerChild = function(
gearClone.MouseLeave:connect(function()
if
gearClone.GearReference
and gearClone.GearReference.Value["ToolTip"]
and gearClone.GearReference.Value.ToolTip
and gearClone.GearReference.Value.ToolTip ~= ""
then
hideToolTip(gearClone, gearClone.GearReference.Value.ToolTip)

View File

@ -200,7 +200,7 @@ function StringReader:Peek()
end
function StringReader:Next()
self.i = self.i + 1
self.i += 1
if self.i <= #self.s then
return string.sub(self.s, self.i, self.i)
end
@ -629,7 +629,7 @@ t.SelectTerrainRegion = function(
-- helper function to update tag
function incrementAliveCounter()
aliveCounter = aliveCounter + 1
aliveCounter += 1
if aliveCounter > 1000000 then
aliveCounter = 0
end

View File

@ -8,7 +8,7 @@ local sc = game:GetService "ScriptContext"
local tries = 0
while not sc and tries < 3 do
tries = tries + 1
tries += 1
sc = game:GetService "ScriptContext"
wait(0.2)
end

View File

@ -363,8 +363,8 @@ local function getBoundingBox2(partOrModel)
4 * math.ceil(actualBox.z / 4)
)
local adjustment = containingGridBox - actualBox
minVec = minVec - 0.5 * adjustment * justify
maxVec = maxVec + 0.5 * adjustment * (two - justify)
minVec -= 0.5 * adjustment * justify
maxVec += 0.5 * adjustment * (two - justify)
end
return minVec, maxVec
@ -510,7 +510,7 @@ local function findConfigAtMouseTarget(Mouse, stampData)
error "findConfigAtMouseTarget: stampData is nil"
return nil
end
if not stampData["CurrentParts"] then
if not stampData.CurrentParts then
return nil
end
@ -658,10 +658,8 @@ local function findConfigAtMouseTarget(Mouse, stampData)
clampToSurface = Vector3.new(1, 1, 0)
end
targetRefPointInTarget = targetRefPointInTarget * (0.5 * diagBBTarget)
+ 0.5 * (maxBBTarget + minBBTarget)
insertRefPointInInsert = insertRefPointInInsert * (0.5 * diagBB)
+ 0.5 * (maxBB + minBB)
targetRefPointInTarget *= (0.5 * diagBBTarget) + 0.5 * (maxBBTarget + minBBTarget)
insertRefPointInInsert *= (0.5 * diagBB) + 0.5 * (maxBB + minBB)
-- To Do: For cases that are not aligned to the world grid, account for the minimal rotation
-- needed to bring the Insert part(s) into alignment with the Target Part
@ -673,7 +671,7 @@ local function findConfigAtMouseTarget(Mouse, stampData)
grid * math.modf(delta.y / grid),
grid * math.modf(delta.z / grid)
)
deltaClamped = deltaClamped * clampToSurface
deltaClamped *= clampToSurface
local targetTouchInTarget = deltaClamped + targetRefPointInTarget
local TargetTouchRelToWorld =
@ -903,7 +901,7 @@ t.GetStampModel = function(assetId, terrainShape, useAssetVersionId)
while loading and totalTime < maxWait do
lastGameTime = tick()
wait(1)
totalTime = totalTime + tick() - lastGameTime
totalTime += tick() - lastGameTime
end
loading = false
@ -1163,7 +1161,7 @@ t.SetupStamperDragger = function(
line2 = HighScalabilityLine.End - HighScalabilityLine.MorePoints[1]
-- take out any component of line2 along line1, so you get perpendicular to line1 component
line2 = line2 - line.unit * line.unit:Dot(line2)
line2 -= line.unit * line.unit:Dot(line2)
tempCFrame = CFrame.new(
HighScalabilityLine.Start,
@ -1178,9 +1176,9 @@ t.SetupStamperDragger = function(
local yComp = yAxis:Dot(line2)
if math.abs(yComp) > math.abs(xComp) then
line2 = line2 - xAxis * xComp
line2 -= xAxis * xComp
else
line2 = line2 - yAxis * yComp
line2 -= yAxis * yComp
end
HighScalabilityLine.InternalLine = line2
@ -1190,8 +1188,8 @@ t.SetupStamperDragger = function(
line3 = HighScalabilityLine.End - HighScalabilityLine.MorePoints[2]
-- zero out all components of previous lines
line3 = line3 - line.unit * line.unit:Dot(line3)
line3 = line3 - line2.unit * line2.unit:Dot(line3)
line3 -= line.unit * line.unit:Dot(line3)
line3 -= line2.unit * line2.unit:Dot(line3)
HighScalabilityLine.InternalLine = line3
end
@ -1225,7 +1223,7 @@ t.SetupStamperDragger = function(
-- make player able to see this ish
local gui
if game.Players["LocalPlayer"] then
if game.Players.LocalPlayer then
gui = game.Players.LocalPlayer:FindFirstChild "PlayerGui"
if gui and gui:IsA "PlayerGui" then
if
@ -1309,7 +1307,7 @@ t.SetupStamperDragger = function(
end
local ry = math.pi / 2
gInitial90DegreeRotations = gInitial90DegreeRotations + numRotations
gInitial90DegreeRotations += numRotations
if
stampData.CurrentParts:IsA "Model"
or stampData.CurrentParts:IsA "Tool"
@ -1336,8 +1334,8 @@ t.SetupStamperDragger = function(
currModelCFrame = stampData.CurrentParts.CFrame
end
minBB = minBB + targetCFrame.p - currModelCFrame.p
maxBB = maxBB + targetCFrame.p - currModelCFrame.p
minBB += targetCFrame.p - currModelCFrame.p
maxBB += targetCFrame.p - currModelCFrame.p
-- don't drag into terrain
if
@ -1521,13 +1519,13 @@ t.SetupStamperDragger = function(
end
local function setupKeyListener(key, Mouse)
if control and control["Paused"] then
if control and control.Paused then
return
end -- don't do this if we have no stamp
key = string.lower(key)
if key == "r" and not autoAlignToFace(stampData.CurrentParts) then -- rotate the model
gInitial90DegreeRotations = gInitial90DegreeRotations + 1
gInitial90DegreeRotations += 1
-- Update orientation value if this is a fake terrain part
local clusterValues =
@ -1600,13 +1598,13 @@ t.SetupStamperDragger = function(
local function flashRedBox()
local gui = game.CoreGui
if game:FindFirstChild "Players" then
if game.Players["LocalPlayer"] then
if game.Players.LocalPlayer then
if game.Players.LocalPlayer:FindFirstChild "PlayerGui" then
gui = game.Players.LocalPlayer.PlayerGui
end
end
end
if not stampData["ErrorBox"] then
if not stampData.ErrorBox then
return
end
@ -1619,16 +1617,16 @@ t.SetupStamperDragger = function(
delay(0, function()
for _ = 1, 3 do
if stampData["ErrorBox"] then
if stampData.ErrorBox then
stampData.ErrorBox.Visible = true
end
wait(0.13)
if stampData["ErrorBox"] then
if stampData.ErrorBox then
stampData.ErrorBox.Visible = false
end
wait(0.13)
end
if stampData["ErrorBox"] then
if stampData.ErrorBox then
stampData.ErrorBox.Adornee = nil
stampData.ErrorBox.Parent = Tool
end
@ -1778,7 +1776,7 @@ t.SetupStamperDragger = function(
* (gStaticTrans - gDesiredTrans)
)
if
stampData["TransparencyTable"]
stampData.TransparencyTable
and stampData.TransparencyTable[part]
then
part.Transparency = newTrans
@ -1790,7 +1788,7 @@ t.SetupStamperDragger = function(
end
if part and part:IsA "BasePart" then
if
stampData["TransparencyTable"]
stampData.TransparencyTable
and stampData.TransparencyTable[part]
then
part.Transparency = gDesiredTrans
@ -2163,7 +2161,7 @@ t.SetupStamperDragger = function(
end
end
end
stepVect[1] = stepVect[1] + incrementVect[1]
stepVect[1] += incrementVect[1]
end
if incrementVect[2] then
while
@ -2173,7 +2171,7 @@ t.SetupStamperDragger = function(
)
== 0
do
innerStepVectIndex = innerStepVectIndex + 1
innerStepVectIndex += 1
end
if innerStepVectIndex < 4 then
stepVect[2] = stepVect[2]
@ -2182,7 +2180,7 @@ t.SetupStamperDragger = function(
incrementVect[2]
)
end
innerStepVectIndex = innerStepVectIndex + 1
innerStepVectIndex += 1
else
stepVect[2] = Vector3.new(1, 0, 0)
innerStepVectIndex = 4 -- skip all remaining loops
@ -2202,7 +2200,7 @@ t.SetupStamperDragger = function(
)
== 0
do
outerStepVectIndex = outerStepVectIndex + 1
outerStepVectIndex += 1
end
if outerStepVectIndex < 4 then
stepVect[3] = stepVect[3]
@ -2211,7 +2209,7 @@ t.SetupStamperDragger = function(
incrementVect[3]
)
end
outerStepVectIndex = outerStepVectIndex + 1
outerStepVectIndex += 1
else -- skip all remaining loops
stepVect[3] = Vector3.new(1, 0, 0)
outerStepVectIndex = 4
@ -2395,8 +2393,8 @@ t.SetupStamperDragger = function(
-- something will be stamped! so set the "StampedSomething" toggle to true
if game:FindFirstChild "Players" then
if game.Players["LocalPlayer"] then
if game.Players.LocalPlayer["Character"] then
if game.Players.LocalPlayer then
if game.Players.LocalPlayer.Character then
local localChar = game.Players.LocalPlayer.Character
local stampTracker = localChar:FindFirstChild "StampTracker"
if stampTracker and not stampTracker.Value then
@ -2545,7 +2543,7 @@ t.SetupStamperDragger = function(
local function getPlayer()
if game:FindFirstChild "Players" then
if game.Players["LocalPlayer"] then
if game.Players.LocalPlayer then
return game.Players.LocalPlayer
end
end
@ -2584,7 +2582,7 @@ t.SetupStamperDragger = function(
if playerNameTag ~= nil then
if
game:FindFirstChild "Players"
and game.Players["LocalPlayer"]
and game.Players.LocalPlayer
then
tempPlayerValue = game.Players.LocalPlayer
if tempPlayerValue ~= nil then
@ -2717,8 +2715,8 @@ t.SetupStamperDragger = function(
{ Vector3.new(1, 0, 0), Vector3.new(0, 1, 0), Vector3.new(0, 0, 1) } -- maybe last one is negative? TODO: check this!
local isPositive = 1
if whichSurface < 0 then
isPositive = isPositive * -1
whichSurface = whichSurface * -1
isPositive *= -1
whichSurface *= -1
end
local surfaceNormal = isPositive
* modelCFrame:vectorToWorldSpace(AXIS_VECTORS[whichSurface])
@ -2967,14 +2965,14 @@ t.SetupStamperDragger = function(
errorBox:Destroy()
end
if stampData then
if stampData["Dragger"] then
if stampData.Dragger then
stampData.Dragger:Destroy()
end
if stampData.CurrentParts then
stampData.CurrentParts:Destroy()
end
end
if control and control["Stamped"] then
if control and control.Stamped then
control.Stamped:Destroy()
end
control = nil

View File

@ -49,9 +49,7 @@ local browsingMenu = false
local mouseEnterCons = {}
local mouseClickCons = {}
local characterChildAddedCon
local characterChildRemovedCon
local backpackAddCon
local characterChildAddedCon, characterChildRemovedCon, backpackAddCon
local playerBackpack = waitForChild(player, "Backpack")
@ -346,13 +344,13 @@ function resizeGrid()
local beginPos
buttonClone.DragBegin:connect(function(value)
waitForChild(buttonClone, "Background")
buttonClone["Background"].ZIndex = 10
buttonClone.Background.ZIndex = 10
buttonClone.ZIndex = 10
beginPos = value
end)
buttonClone.DragStopped:connect(function(x, y)
waitForChild(buttonClone, "Background")
buttonClone["Background"].ZIndex = 1
buttonClone.Background.ZIndex = 1
buttonClone.ZIndex = 2
if beginPos ~= buttonClone.Position then
if not checkForSwap(buttonClone, x, y) then
@ -994,7 +992,7 @@ if not backpack.Visible then
end
-- make sure that inventory is listening to gear reparenting
if characterChildAddedCon == nil and game.Players.LocalPlayer["Character"] then
if characterChildAddedCon == nil and game.Players.LocalPlayer.Character then
setupCharacterConnections()
end
if not backpackAddCon then

View File

@ -221,7 +221,7 @@ function toggleBackpack()
if not game.Players.LocalPlayer then
return
end
if not game.Players.LocalPlayer["Character"] then
if not game.Players.LocalPlayer.Character then
return
end
if not canToggle then
@ -477,7 +477,7 @@ backpackButton.MouseButton1Click:connect(function()
toggleBackpack()
end)
if game.Players.LocalPlayer["Character"] then
if game.Players.LocalPlayer.Character then
activateBackpack()
end

View File

@ -921,12 +921,12 @@ local function GetNameValue(pName)
local cValue = string.byte(string.sub(pName, index, index))
local reverseIndex = #pName - index + 1
if #pName % 2 == 1 then
reverseIndex = reverseIndex - 1
reverseIndex -= 1
end
if reverseIndex % 4 >= 2 then
cValue = -cValue
end
value = value + cValue
value += cValue
end
return value % 8
end
@ -994,9 +994,9 @@ end
-- local next = self.MessageQueue[i].Next
-- local previous = self.MessageQueue[i].Previous
-- if label and label:IsA('TextLabel') or label:IsA('TextButton') then
-- if value > 0 and previous and previous['Message'] then
-- if value > 0 and previous and previous.Message then
-- label.Position = previous['Message'].Position
-- elseif value < 1 and next['Message'] then
-- elseif value < 1 and next.Message then
-- label.Position = previous['Message'].Position
-- end
-- end
@ -1026,7 +1026,7 @@ function Chat:UpdateQueue(field, diff)
self.Configuration.XScale,
0,
label.Position.Y.Scale
- field["Message"].Size.Y.Scale,
- field.Message.Size.Y.Scale,
0
)
-- Just to show up popping effect for the latest message in chat
@ -1037,7 +1037,7 @@ function Chat:UpdateQueue(field, diff)
- 0.2
wait(0.03)
end
if label == field["Message"] then
if label == field.Message then
label.TextStrokeTransparency = 0.8
else
label.TextStrokeTransparency = 1
@ -1048,7 +1048,7 @@ function Chat:UpdateQueue(field, diff)
self.Configuration.XScale,
0,
label.Position.Y.Scale
- field["Message"].Size.Y.Scale,
- field.Message.Size.Y.Scale,
0
)
end
@ -1141,7 +1141,7 @@ function Chat:UpdateChat(cPlayer, message)
Chat.MessageThread = coroutine.create(function()
for i = 1, #Chat.Messages_List do
local field = Chat.Messages_List[i]
Chat:CreateMessage(field["Player"], field["Message"])
Chat:CreateMessage(field.Player, field.Message)
end
Chat.Messages_List = {}
end)
@ -1306,9 +1306,9 @@ function Chat:CreateMessage(cPlayer, message)
pLabel.Size = mLabel.Size
local queueField = {}
queueField["Player"] = pLabel
queueField["Message"] = mLabel
queueField["SpawnTime"] = tick() -- Used for identifying when to make the message invisible
queueField.Player = pLabel
queueField.Message = mLabel
queueField.SpawnTime = tick() -- Used for identifying when to make the message invisible
table.insert(self.MessageQueue, 1, queueField)
Chat:UpdateQueue(queueField)
@ -1317,7 +1317,7 @@ end
function Chat:ScreenSizeChanged()
wait()
while self.Frame.AbsoluteSize.Y > 120 do
self.Frame.Size = self.Frame.Size - UDim2.new(0, 0, 0.005, 0)
self.Frame.Size -= UDim2.new(0, 0, 0.005, 0)
end
Chat:RecalculateSpacing()
end
@ -1374,7 +1374,7 @@ function Chat:CreateSafeChatOptions(list, rootButton)
),
}
count = count + 1
count += 1
if type(list[msg]) == "table" then
text_List[rootButton][chatText] =
@ -1438,7 +1438,7 @@ function Chat:FocusOnChatBar()
end
self.GotFocus = true
if self.Frame["Background"] then
if self.Frame.Background then
self.Frame.Background.Visible = false
end
self.ChatBar:CaptureFocus()
@ -1675,12 +1675,12 @@ function Input:OnMouseScroll()
while Input.Speed ~= 0 do
if Input.Speed > 1 then
while Input.Speed > 0 do
Input.Speed = Input.Speed - 1
Input.Speed -= 1
wait(0.25)
end
elseif Input.Speed < 0 then
while Input.Speed < 0 do
Input.Speed = Input.Speed + 1
Input.Speed += 1
wait(0.25)
end
end
@ -1694,7 +1694,7 @@ function Input:OnMouseScroll()
end
function Input:ApplySpeed(value)
Input.Speed = Input.Speed + value
Input.Speed += value
if not self.Simulating then
Input:OnMouseScroll()
end
@ -1770,14 +1770,14 @@ function Chat:CullThread()
if #self.MessageQueue > 0 then
for _, field in pairs(self.MessageQueue) do
if
field["SpawnTime"]
and field["Player"]
and field["Message"]
and tick() - field["SpawnTime"]
field.SpawnTime
and field.Player
and field.Message
and tick() - field.SpawnTime
> self.Configuration.LifeTime
then
field["Player"].Visible = false
field["Message"].Visible = false
field.Player.Visible = false
field.Message.Visible = false
end
end
end

View File

@ -181,8 +181,8 @@ settings().Diagnostics.LuaRamLimit = 0
--settings().Network.SendRate = 35
--settings().Network.PhysicsSend = 0 -- 1==RoundRobin
--shared["__time"] = 0
--game:GetService("RunService").Stepped:connect(function (time) shared["__time"] = time end)
--shared.__time = 0
--game:GetService("RunService").Stepped:connect(function (time) shared.__time = time end)
if placeId ~= nil and killID ~= nil and deathID ~= nil and url ~= nil then
-- listen for the death of a Player