Improve formatting and add compound assignment, which will be removed by Darklua
This commit is contained in:
parent
a94af66013
commit
b56129fc7b
|
|
@ -1,3 +1,3 @@
|
||||||
# Corescripts
|
# 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.
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
rules: [
|
rules: [
|
||||||
"remove_comments",
|
"remove_comments",
|
||||||
"remove_spaces",
|
"remove_spaces",
|
||||||
|
"remove_compound_assignment",
|
||||||
"group_local_assignment",
|
"group_local_assignment",
|
||||||
// "compute_expression",
|
// "compute_expression",
|
||||||
"remove_unused_if_branch",
|
"remove_unused_if_branch",
|
||||||
|
|
|
||||||
|
|
@ -145,7 +145,7 @@ function userPurchaseActionsEnded(isSuccess)
|
||||||
local newPurchasedSucceededText = string.gsub(
|
local newPurchasedSucceededText = string.gsub(
|
||||||
purchaseSucceededText,
|
purchaseSucceededText,
|
||||||
"itemName",
|
"itemName",
|
||||||
tostring(currentProductInfo["Name"])
|
tostring(currentProductInfo.Name)
|
||||||
)
|
)
|
||||||
purchaseDialog.BodyFrame.ItemPreview.ItemDescription.Text =
|
purchaseDialog.BodyFrame.ItemPreview.ItemDescription.Text =
|
||||||
newPurchasedSucceededText
|
newPurchasedSucceededText
|
||||||
|
|
@ -181,26 +181,26 @@ function updatePurchasePromptData(_)
|
||||||
|
|
||||||
-- id to use when we request a purchase
|
-- id to use when we request a purchase
|
||||||
if not currentProductId then
|
if not currentProductId then
|
||||||
currentProductId = currentProductInfo["ProductId"]
|
currentProductId = currentProductInfo.ProductId
|
||||||
end
|
end
|
||||||
|
|
||||||
if isFreeItem() then
|
if isFreeItem() then
|
||||||
newItemDescription = string.gsub(
|
newItemDescription = string.gsub(
|
||||||
freeItemPurchaseText,
|
freeItemPurchaseText,
|
||||||
"itemName",
|
"itemName",
|
||||||
tostring(currentProductInfo["Name"])
|
tostring(currentProductInfo.Name)
|
||||||
)
|
)
|
||||||
newItemDescription = string.gsub(
|
newItemDescription = string.gsub(
|
||||||
newItemDescription,
|
newItemDescription,
|
||||||
"assetType",
|
"assetType",
|
||||||
tostring(assetTypeToString(currentProductInfo["AssetTypeId"]))
|
tostring(assetTypeToString(currentProductInfo.AssetTypeId))
|
||||||
)
|
)
|
||||||
setHeaderText(takeHeaderText)
|
setHeaderText(takeHeaderText)
|
||||||
else -- otherwise item costs something, so different prompt
|
else -- otherwise item costs something, so different prompt
|
||||||
newItemDescription = string.gsub(
|
newItemDescription = string.gsub(
|
||||||
productPurchaseText,
|
productPurchaseText,
|
||||||
"itemName",
|
"itemName",
|
||||||
tostring(currentProductInfo["Name"])
|
tostring(currentProductInfo.Name)
|
||||||
)
|
)
|
||||||
newItemDescription = string.gsub(
|
newItemDescription = string.gsub(
|
||||||
newItemDescription,
|
newItemDescription,
|
||||||
|
|
@ -221,7 +221,7 @@ function updatePurchasePromptData(_)
|
||||||
if purchasingConsumable then
|
if purchasingConsumable then
|
||||||
purchaseDialog.BodyFrame.ItemPreview.Image = baseUrl
|
purchaseDialog.BodyFrame.ItemPreview.Image = baseUrl
|
||||||
.. "thumbs/asset.ashx?assetid="
|
.. "thumbs/asset.ashx?assetid="
|
||||||
.. tostring(currentProductInfo["IconImageAssetId"])
|
.. tostring(currentProductInfo.IconImageAssetId)
|
||||||
.. "&x=100&y=100&format=png"
|
.. "&x=100&y=100&format=png"
|
||||||
else
|
else
|
||||||
purchaseDialog.BodyFrame.ItemPreview.Image = baseUrl
|
purchaseDialog.BodyFrame.ItemPreview.Image = baseUrl
|
||||||
|
|
@ -244,7 +244,7 @@ function doPlayerFundsCheck(checkIndefinitely)
|
||||||
do
|
do
|
||||||
wait(1 / 10)
|
wait(1 / 10)
|
||||||
canPurchase, insufficientFunds = canPurchaseItem()
|
canPurchase, insufficientFunds = canPurchaseItem()
|
||||||
retries = retries - 1
|
retries -= 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if canPurchase and not insufficientFunds then
|
if canPurchase and not insufficientFunds then
|
||||||
|
|
@ -372,7 +372,7 @@ end
|
||||||
function purchaseFailed(inGamePurchasesDisabled)
|
function purchaseFailed(inGamePurchasesDisabled)
|
||||||
local name = "Item"
|
local name = "Item"
|
||||||
if currentProductInfo then
|
if currentProductInfo then
|
||||||
name = currentProductInfo["Name"]
|
name = currentProductInfo.Name
|
||||||
end
|
end
|
||||||
|
|
||||||
local newPurchasedFailedText =
|
local newPurchasedFailedText =
|
||||||
|
|
@ -467,14 +467,14 @@ function doAcceptPurchase(_)
|
||||||
response = getRbxUtility().DecodeJSON(response)
|
response = getRbxUtility().DecodeJSON(response)
|
||||||
|
|
||||||
if response then
|
if response then
|
||||||
if response["success"] == false then
|
if response.success == false then
|
||||||
if response["status"] ~= "AlreadyOwned" then
|
if response.status ~= "AlreadyOwned" then
|
||||||
print(
|
print(
|
||||||
"web return response of fail on purchase of",
|
"web return response of fail on purchase of",
|
||||||
currentAssetId,
|
currentAssetId,
|
||||||
currentProductId
|
currentProductId
|
||||||
)
|
)
|
||||||
purchaseFailed((response["status"] == "EconomyDisabled"))
|
purchaseFailed((response.status == "EconomyDisabled"))
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -492,7 +492,7 @@ function doAcceptPurchase(_)
|
||||||
currentEquipOnPurchase
|
currentEquipOnPurchase
|
||||||
and success
|
and success
|
||||||
and currentAssetId
|
and currentAssetId
|
||||||
and tonumber(currentProductInfo["AssetTypeId"]) == 19
|
and tonumber(currentProductInfo.AssetTypeId) == 19
|
||||||
then
|
then
|
||||||
local tool = getToolAssetID(tonumber(currentAssetId))
|
local tool = getToolAssetID(tonumber(currentAssetId))
|
||||||
if tool then
|
if tool then
|
||||||
|
|
@ -501,7 +501,7 @@ function doAcceptPurchase(_)
|
||||||
end
|
end
|
||||||
|
|
||||||
if purchasingConsumable then
|
if purchasingConsumable then
|
||||||
if not response["receipt"] then
|
if not response.receipt then
|
||||||
print(
|
print(
|
||||||
"tried to buy productId, but no receipt returned. productId was",
|
"tried to buy productId, but no receipt returned. productId was",
|
||||||
currentProductId
|
currentProductId
|
||||||
|
|
@ -510,7 +510,7 @@ function doAcceptPurchase(_)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
Game:GetService("MarketplaceService"):SignalClientPurchaseSuccess(
|
Game:GetService("MarketplaceService"):SignalClientPurchaseSuccess(
|
||||||
tostring(response["receipt"]),
|
tostring(response.receipt),
|
||||||
game.Players.LocalPlayer.userId,
|
game.Players.LocalPlayer.userId,
|
||||||
currentProductId
|
currentProductId
|
||||||
)
|
)
|
||||||
|
|
@ -746,8 +746,8 @@ end
|
||||||
function isFreeItem()
|
function isFreeItem()
|
||||||
-- if both of these are true, then the item is free, just prompt user if they want to take one
|
-- if both of these are true, then the item is free, just prompt user if they want to take one
|
||||||
return currentProductInfo
|
return currentProductInfo
|
||||||
and currentProductInfo["IsForSale"] == true
|
and currentProductInfo.IsForSale == true
|
||||||
and currentProductInfo["IsPublicDomain"] == true
|
and currentProductInfo.IsPublicDomain == true
|
||||||
end
|
end
|
||||||
---------------------------------------------- End Currency Functions ---------------------------------------------
|
---------------------------------------------- End Currency Functions ---------------------------------------------
|
||||||
|
|
||||||
|
|
@ -847,8 +847,8 @@ function canPurchaseItem()
|
||||||
end
|
end
|
||||||
|
|
||||||
if
|
if
|
||||||
currentProductInfo["IsForSale"] == false
|
currentProductInfo.IsForSale == false
|
||||||
and currentProductInfo["IsPublicDomain"] == false
|
and currentProductInfo.IsPublicDomain == false
|
||||||
then
|
then
|
||||||
descText = "This item is no longer for sale."
|
descText = "This item is no longer for sale."
|
||||||
return true, nil, nil, true, descText
|
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
|
-- now we start talking money, making sure we are going to be able to purchase this
|
||||||
if
|
if
|
||||||
not setCurrencyAmountAndType(
|
not setCurrencyAmountAndType(
|
||||||
tonumber(currentProductInfo["PriceInRobux"]),
|
tonumber(currentProductInfo.PriceInRobux),
|
||||||
tonumber(currentProductInfo["PriceInTickets"])
|
tonumber(currentProductInfo.PriceInTickets)
|
||||||
)
|
)
|
||||||
then
|
then
|
||||||
descText =
|
descText =
|
||||||
|
|
@ -873,7 +873,7 @@ function canPurchaseItem()
|
||||||
end
|
end
|
||||||
|
|
||||||
if
|
if
|
||||||
tonumber(currentProductInfo["MinimumMembershipLevel"])
|
tonumber(currentProductInfo.MinimumMembershipLevel)
|
||||||
> membershipTypeToNumber(game.Players.LocalPlayer.MembershipType)
|
> membershipTypeToNumber(game.Players.LocalPlayer.MembershipType)
|
||||||
then
|
then
|
||||||
notRightBc = true
|
notRightBc = true
|
||||||
|
|
@ -887,7 +887,7 @@ function canPurchaseItem()
|
||||||
return true, insufficientFunds, notRightBc, false
|
return true, insufficientFunds, notRightBc, false
|
||||||
end
|
end
|
||||||
|
|
||||||
if currentProductInfo["ContentRatingTypeId"] == 1 then
|
if currentProductInfo.ContentRatingTypeId == 1 then
|
||||||
if game.Players.LocalPlayer:GetUnder13() then
|
if game.Players.LocalPlayer:GetUnder13() then
|
||||||
descText =
|
descText =
|
||||||
"Your account is under 13 so purchase of this item is not allowed."
|
"Your account is under 13 so purchase of this item is not allowed."
|
||||||
|
|
@ -897,13 +897,13 @@ function canPurchaseItem()
|
||||||
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
currentProductInfo["IsLimited"] == true
|
currentProductInfo.IsLimited == true
|
||||||
or currentProductInfo["IsLimitedUnique"] == true
|
or currentProductInfo.IsLimitedUnique == true
|
||||||
)
|
)
|
||||||
and (
|
and (
|
||||||
currentProductInfo["Remaining"] == ""
|
currentProductInfo.Remaining == ""
|
||||||
or currentProductInfo["Remaining"] == 0
|
or currentProductInfo.Remaining == 0
|
||||||
or currentProductInfo["Remaining"] == nil
|
or currentProductInfo.Remaining == nil
|
||||||
)
|
)
|
||||||
then
|
then
|
||||||
descText =
|
descText =
|
||||||
|
|
@ -960,7 +960,7 @@ function startSpinner()
|
||||||
"http://banland.xyz/Asset/?id=45880710"
|
"http://banland.xyz/Asset/?id=45880710"
|
||||||
end
|
end
|
||||||
|
|
||||||
pos = pos + 1
|
pos += 1
|
||||||
end
|
end
|
||||||
spinPos = (spinPos + 1) % 8
|
spinPos = (spinPos + 1) % 8
|
||||||
wait(1 / 15)
|
wait(1 / 15)
|
||||||
|
|
@ -1019,7 +1019,7 @@ function createSpinner(size, position, parent)
|
||||||
spinnerImage.Parent = spinnerFrame
|
spinnerImage.Parent = spinnerFrame
|
||||||
|
|
||||||
spinnerIcons[spinnerNum] = spinnerImage
|
spinnerIcons[spinnerNum] = spinnerImage
|
||||||
spinnerNum = spinnerNum + 1
|
spinnerNum += 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -1351,7 +1351,7 @@ function userPurchaseProductActionsEnded(userIsClosingDialog)
|
||||||
if currentServerResponseTable then
|
if currentServerResponseTable then
|
||||||
local isPurchased = false
|
local isPurchased = false
|
||||||
if
|
if
|
||||||
tostring(currentServerResponseTable["isValid"]):lower()
|
tostring(currentServerResponseTable.isValid):lower()
|
||||||
== "true"
|
== "true"
|
||||||
then
|
then
|
||||||
isPurchased = true
|
isPurchased = true
|
||||||
|
|
@ -1359,8 +1359,8 @@ function userPurchaseProductActionsEnded(userIsClosingDialog)
|
||||||
|
|
||||||
Game:GetService("MarketplaceService")
|
Game:GetService("MarketplaceService")
|
||||||
:SignalPromptProductPurchaseFinished(
|
:SignalPromptProductPurchaseFinished(
|
||||||
tonumber(currentServerResponseTable["playerId"]),
|
tonumber(currentServerResponseTable.playerId),
|
||||||
tonumber(currentServerResponseTable["productId"]),
|
tonumber(currentServerResponseTable.productId),
|
||||||
isPurchased
|
isPurchased
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
|
|
@ -1371,7 +1371,7 @@ function userPurchaseProductActionsEnded(userIsClosingDialog)
|
||||||
local newPurchasedSucceededText = string.gsub(
|
local newPurchasedSucceededText = string.gsub(
|
||||||
purchaseSucceededText,
|
purchaseSucceededText,
|
||||||
"itemName",
|
"itemName",
|
||||||
tostring(currentProductInfo["Name"])
|
tostring(currentProductInfo.Name)
|
||||||
)
|
)
|
||||||
purchaseDialog.BodyFrame.ItemPreview.ItemDescription.Text =
|
purchaseDialog.BodyFrame.ItemPreview.ItemDescription.Text =
|
||||||
newPurchasedSucceededText
|
newPurchasedSucceededText
|
||||||
|
|
@ -1388,8 +1388,8 @@ function doProcessServerPurchaseResponse(serverResponseTable)
|
||||||
end
|
end
|
||||||
|
|
||||||
if
|
if
|
||||||
serverResponseTable["playerId"]
|
serverResponseTable.playerId
|
||||||
and tonumber(serverResponseTable["playerId"])
|
and tonumber(serverResponseTable.playerId)
|
||||||
== game.Players.LocalPlayer.userId
|
== game.Players.LocalPlayer.userId
|
||||||
then
|
then
|
||||||
currentServerResponseTable = serverResponseTable
|
currentServerResponseTable = serverResponseTable
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,7 @@ local contextActionService = Game:GetService "ContextActionService"
|
||||||
local isTouchDevice = Game:GetService("UserInputService").TouchEnabled
|
local isTouchDevice = Game:GetService("UserInputService").TouchEnabled
|
||||||
local functionTable = {}
|
local functionTable = {}
|
||||||
local buttonVector = {}
|
local buttonVector = {}
|
||||||
local buttonScreenGui
|
local buttonScreenGui, buttonFrame
|
||||||
local buttonFrame
|
|
||||||
|
|
||||||
local ContextDownImage = "http://www.banland.xyz/asset/?id=97166756"
|
local ContextDownImage = "http://www.banland.xyz/asset/?id=97166756"
|
||||||
local ContextUpImage = "http://www.banland.xyz/asset/?id=97166444"
|
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.Size = UDim2.new(0.65, 0, 0.65, 0)
|
||||||
actionIcon.BackgroundTransparency = 1
|
actionIcon.BackgroundTransparency = 1
|
||||||
if
|
if
|
||||||
functionInfoTable["image"]
|
functionInfoTable.image
|
||||||
and type(functionInfoTable["image"]) == "string"
|
and type(functionInfoTable.image) == "string"
|
||||||
then
|
then
|
||||||
actionIcon.Image = functionInfoTable["image"]
|
actionIcon.Image = functionInfoTable.image
|
||||||
end
|
end
|
||||||
actionIcon.Parent = contextButton
|
actionIcon.Parent = contextButton
|
||||||
|
|
||||||
|
|
@ -187,10 +186,10 @@ function createNewButton(actionName, functionInfoTable)
|
||||||
actionTitle.TextWrapped = true
|
actionTitle.TextWrapped = true
|
||||||
actionTitle.Text = ""
|
actionTitle.Text = ""
|
||||||
if
|
if
|
||||||
functionInfoTable["title"]
|
functionInfoTable.title
|
||||||
and type(functionInfoTable["title"]) == "string"
|
and type(functionInfoTable.title) == "string"
|
||||||
then
|
then
|
||||||
actionTitle.Text = functionInfoTable["title"]
|
actionTitle.Text = functionInfoTable.title
|
||||||
end
|
end
|
||||||
actionTitle.Parent = contextButton
|
actionTitle.Parent = contextButton
|
||||||
|
|
||||||
|
|
@ -303,5 +302,5 @@ end)
|
||||||
-- make sure any bound data before we setup connections is handled
|
-- make sure any bound data before we setup connections is handled
|
||||||
local boundActions = contextActionService:GetAllBoundActionInfo()
|
local boundActions = contextActionService:GetAllBoundActionInfo()
|
||||||
for actionName, actionData in pairs(boundActions) do
|
for actionName, actionData in pairs(boundActions) do
|
||||||
addAction(actionName, actionData["createTouchButton"], actionData)
|
addAction(actionName, actionData.createTouchButton, actionData)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -406,7 +406,7 @@ function constructThumbstick(
|
||||||
end
|
end
|
||||||
|
|
||||||
function setupCharacterMovement(parentFrame)
|
function setupCharacterMovement(parentFrame)
|
||||||
local lastMovementVector, lastMaxMovement = nil
|
local lastMovementVector, lastMaxMovement
|
||||||
local moveCharacterFunc = localPlayer.MoveCharacter
|
local moveCharacterFunc = localPlayer.MoveCharacter
|
||||||
local moveCharacterFunction = function(movementVector, maxMovement)
|
local moveCharacterFunction = function(movementVector, maxMovement)
|
||||||
if localPlayer then
|
if localPlayer then
|
||||||
|
|
|
||||||
|
|
@ -524,9 +524,9 @@ function initializeDeveloperConsole()
|
||||||
|
|
||||||
repeat
|
repeat
|
||||||
if optionsHidden then
|
if optionsHidden then
|
||||||
frameNumber = frameNumber - 1
|
frameNumber -= 1
|
||||||
else
|
else
|
||||||
frameNumber = frameNumber + 1
|
frameNumber += 1
|
||||||
end
|
end
|
||||||
|
|
||||||
local x = frameNumber / 5
|
local x = frameNumber / 5
|
||||||
|
|
@ -554,9 +554,9 @@ function initializeDeveloperConsole()
|
||||||
|
|
||||||
function changeOffset(value)
|
function changeOffset(value)
|
||||||
if currentConsole == LOCAL_CONSOLE then
|
if currentConsole == LOCAL_CONSOLE then
|
||||||
localOffset = localOffset + value
|
localOffset += value
|
||||||
elseif currentConsole == SERVER_CONSOLE then
|
elseif currentConsole == SERVER_CONSOLE then
|
||||||
serverOffset = serverOffset + value
|
serverOffset += value
|
||||||
end
|
end
|
||||||
|
|
||||||
repositionList()
|
repositionList()
|
||||||
|
|
@ -622,7 +622,7 @@ function initializeDeveloperConsole()
|
||||||
message.Size = UDim2.new(0.98, 0, 0, message.TextBounds.Y)
|
message.Size = UDim2.new(0.98, 0, 0, message.TextBounds.Y)
|
||||||
message.Position = UDim2.new(0, 5, 0, posOffset)
|
message.Position = UDim2.new(0, 5, 0, posOffset)
|
||||||
message.Parent = Dev_TextHolder
|
message.Parent = Dev_TextHolder
|
||||||
posOffset = posOffset + message.TextBounds.Y
|
posOffset += message.TextBounds.Y
|
||||||
|
|
||||||
if movePosition then
|
if movePosition then
|
||||||
if
|
if
|
||||||
|
|
@ -680,12 +680,12 @@ function initializeDeveloperConsole()
|
||||||
end
|
end
|
||||||
scrollUpIsDown = true
|
scrollUpIsDown = true
|
||||||
wait(0.6)
|
wait(0.6)
|
||||||
inside = inside + 1
|
inside += 1
|
||||||
while scrollUpIsDown and inside < 2 do
|
while scrollUpIsDown and inside < 2 do
|
||||||
wait()
|
wait()
|
||||||
changeOffset(12)
|
changeOffset(12)
|
||||||
end
|
end
|
||||||
inside = inside - 1
|
inside -= 1
|
||||||
end
|
end
|
||||||
|
|
||||||
function holdingDownButton()
|
function holdingDownButton()
|
||||||
|
|
@ -694,12 +694,12 @@ function initializeDeveloperConsole()
|
||||||
end
|
end
|
||||||
scrollDownIsDown = true
|
scrollDownIsDown = true
|
||||||
wait(0.6)
|
wait(0.6)
|
||||||
inside = inside + 1
|
inside += 1
|
||||||
while scrollDownIsDown and inside < 2 do
|
while scrollDownIsDown and inside < 2 do
|
||||||
wait()
|
wait()
|
||||||
changeOffset(-12)
|
changeOffset(-12)
|
||||||
end
|
end
|
||||||
inside = inside - 1
|
inside -= 1
|
||||||
end
|
end
|
||||||
|
|
||||||
Dev_Container.Body.ScrollBar.Up.MouseButton1Click:connect(function()
|
Dev_Container.Body.ScrollBar.Up.MouseButton1Click:connect(function()
|
||||||
|
|
@ -864,10 +864,10 @@ function initializeDeveloperConsole()
|
||||||
|
|
||||||
local hour = math.floor(dayTime / 3600)
|
local hour = math.floor(dayTime / 3600)
|
||||||
|
|
||||||
dayTime = dayTime - (hour * 3600)
|
dayTime -= (hour * 3600)
|
||||||
local minute = math.floor(dayTime / 60)
|
local minute = math.floor(dayTime / 60)
|
||||||
|
|
||||||
dayTime = dayTime - (minute * 60)
|
dayTime -= (minute * 60)
|
||||||
|
|
||||||
local h = numberWithZero(hour)
|
local h = numberWithZero(hour)
|
||||||
local m = numberWithZero(minute)
|
local m = numberWithZero(minute)
|
||||||
|
|
@ -957,9 +957,7 @@ function initializeDeveloperConsole()
|
||||||
localConsole.BackgroundTransparency = 0.6
|
localConsole.BackgroundTransparency = 0.6
|
||||||
serverConsole.BackgroundTransparency = 0.8
|
serverConsole.BackgroundTransparency = 0.8
|
||||||
|
|
||||||
if
|
if game:FindFirstChild "Players" and game.Players.LocalPlayer then
|
||||||
game:FindFirstChild "Players" and game.Players["LocalPlayer"]
|
|
||||||
then
|
|
||||||
local mouse = game.Players.LocalPlayer:GetMouse()
|
local mouse = game.Players.LocalPlayer:GetMouse()
|
||||||
refreshConsolePosition(mouse.X, mouse.Y)
|
refreshConsolePosition(mouse.X, mouse.Y)
|
||||||
refreshConsoleSize(mouse.X, mouse.Y)
|
refreshConsoleSize(mouse.X, mouse.Y)
|
||||||
|
|
@ -993,9 +991,7 @@ function initializeDeveloperConsole()
|
||||||
serverConsole.BackgroundTransparency = 0.6
|
serverConsole.BackgroundTransparency = 0.6
|
||||||
localConsole.BackgroundTransparency = 0.8
|
localConsole.BackgroundTransparency = 0.8
|
||||||
|
|
||||||
if
|
if game:FindFirstChild "Players" and game.Players.LocalPlayer then
|
||||||
game:FindFirstChild "Players" and game.Players["LocalPlayer"]
|
|
||||||
then
|
|
||||||
local mouse = game.Players.LocalPlayer:GetMouse()
|
local mouse = game.Players.LocalPlayer:GetMouse()
|
||||||
refreshConsolePosition(mouse.X, mouse.Y)
|
refreshConsolePosition(mouse.X, mouse.Y)
|
||||||
refreshConsoleSize(mouse.X, mouse.Y)
|
refreshConsoleSize(mouse.X, mouse.Y)
|
||||||
|
|
@ -1012,7 +1008,7 @@ function initializeDeveloperConsole()
|
||||||
clean()
|
clean()
|
||||||
end)
|
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()
|
local LocalMouse = game.Players.LocalPlayer:GetMouse()
|
||||||
LocalMouse.Move:connect(function()
|
LocalMouse.Move:connect(function()
|
||||||
if not Dev_Container.Visible then
|
if not Dev_Container.Visible then
|
||||||
|
|
|
||||||
|
|
@ -28,8 +28,7 @@ inCharTag.Name = "InCharTag"
|
||||||
local hider = Instance.new "BoolValue"
|
local hider = Instance.new "BoolValue"
|
||||||
hider.Name = "RobloxBuildTool"
|
hider.Name = "RobloxBuildTool"
|
||||||
|
|
||||||
local currentChildren
|
local currentChildren, backpackTools
|
||||||
local backpackTools
|
|
||||||
|
|
||||||
if config == nil then
|
if config == nil then
|
||||||
config = Instance.new "Configuration"
|
config = Instance.new "Configuration"
|
||||||
|
|
@ -132,7 +131,7 @@ while true do
|
||||||
local fire = config:FindFirstChild "Fire"
|
local fire = config:FindFirstChild "Fire"
|
||||||
local stun = config:FindFirstChild "Stun"
|
local stun = config:FindFirstChild "Stun"
|
||||||
if regen then
|
if regen then
|
||||||
delta = delta + regen.Value.X
|
delta += regen.Value.X
|
||||||
if regen.Value.Y >= 0 then
|
if regen.Value.Y >= 0 then
|
||||||
regen.Value = Vector3.new(
|
regen.Value = Vector3.new(
|
||||||
regen.Value.X + regen.Value.Z,
|
regen.Value.X + regen.Value.Z,
|
||||||
|
|
@ -150,7 +149,7 @@ while true do
|
||||||
end -- infinity is -1
|
end -- infinity is -1
|
||||||
end
|
end
|
||||||
if poison then
|
if poison then
|
||||||
delta = delta - poison.Value.X
|
delta -= poison.Value.X
|
||||||
if poison.Value.Y >= 0 then
|
if poison.Value.Y >= 0 then
|
||||||
poison.Value = Vector3.new(
|
poison.Value = Vector3.new(
|
||||||
poison.Value.X + poison.Value.Z,
|
poison.Value.X + poison.Value.Z,
|
||||||
|
|
@ -170,7 +169,7 @@ while true do
|
||||||
|
|
||||||
if ice then
|
if ice then
|
||||||
--print("IN ICE")
|
--print("IN ICE")
|
||||||
delta = delta - ice.Value.X
|
delta -= ice.Value.X
|
||||||
if ice.Value.Y >= 0 then
|
if ice.Value.Y >= 0 then
|
||||||
ice.Value =
|
ice.Value =
|
||||||
Vector3.new(ice.Value.X, ice.Value.Y - s, ice.Value.Z)
|
Vector3.new(ice.Value.X, ice.Value.Y - s, ice.Value.Z)
|
||||||
|
|
@ -182,7 +181,7 @@ while true do
|
||||||
if fire then
|
if fire then
|
||||||
fireEffect.Enabled = true
|
fireEffect.Enabled = true
|
||||||
fireEffect.Parent = Figure.Torso
|
fireEffect.Parent = Figure.Torso
|
||||||
delta = delta - fire.Value.X
|
delta -= fire.Value.X
|
||||||
if fire.Value.Y >= 0 then
|
if fire.Value.Y >= 0 then
|
||||||
fire.Value = Vector3.new(
|
fire.Value = Vector3.new(
|
||||||
fire.Value.X,
|
fire.Value.X,
|
||||||
|
|
@ -224,7 +223,7 @@ while true do
|
||||||
backpackTools[i].Parent =
|
backpackTools[i].Parent =
|
||||||
game.Players:GetPlayerFromCharacter(script.Parent).Backpack
|
game.Players:GetPlayerFromCharacter(script.Parent).Backpack
|
||||||
end
|
end
|
||||||
stun.Value = stun.Value - s
|
stun.Value -= s
|
||||||
else
|
else
|
||||||
Torso.Anchored = false
|
Torso.Anchored = false
|
||||||
for i = 1, #backpackTools do
|
for i = 1, #backpackTools do
|
||||||
|
|
@ -256,9 +255,9 @@ while true do
|
||||||
if delta ~= 0 then
|
if delta ~= 0 then
|
||||||
coroutine.resume(coroutine.create(billboardHealthChange), delta)
|
coroutine.resume(coroutine.create(billboardHealthChange), delta)
|
||||||
end
|
end
|
||||||
--delta = delta * .01
|
--delta *= .01
|
||||||
end
|
end
|
||||||
--health = health + delta * s * Humanoid.MaxHealth
|
--health += delta * s * Humanoid.MaxHealth
|
||||||
|
|
||||||
health = Humanoid.Health + delta * s
|
health = Humanoid.Health + delta * s
|
||||||
if health * 1.01 < Humanoid.MaxHealth then
|
if health * 1.01 < Humanoid.MaxHealth then
|
||||||
|
|
|
||||||
|
|
@ -15,9 +15,7 @@ local mainFrame
|
||||||
local choices = {}
|
local choices = {}
|
||||||
local lastChoice
|
local lastChoice
|
||||||
local choiceMap = {}
|
local choiceMap = {}
|
||||||
local currentConversationDialog
|
local currentConversationDialog, currentConversationPartner, currentAbortDialogScript
|
||||||
local currentConversationPartner
|
|
||||||
local currentAbortDialogScript
|
|
||||||
|
|
||||||
local tooFarAwayMessage = "You are too far away to chat!"
|
local tooFarAwayMessage = "You are too far away to chat!"
|
||||||
local tooFarAwaySize = 300
|
local tooFarAwaySize = 300
|
||||||
|
|
@ -26,11 +24,7 @@ local characterWanderedOffSize = 350
|
||||||
local conversationTimedOut = "Chat ended because you didn't reply"
|
local conversationTimedOut = "Chat ended because you didn't reply"
|
||||||
local conversationTimedOutSize = 350
|
local conversationTimedOutSize = 350
|
||||||
|
|
||||||
local player
|
local player, chatNotificationGui, messageDialog, timeoutScript, reenableDialogScript
|
||||||
local chatNotificationGui
|
|
||||||
local messageDialog
|
|
||||||
local timeoutScript
|
|
||||||
local reenableDialogScript
|
|
||||||
local dialogMap = {}
|
local dialogMap = {}
|
||||||
local dialogConnections = {}
|
local dialogConnections = {}
|
||||||
|
|
||||||
|
|
@ -409,8 +403,8 @@ function presentDialogChoices(talkingPart, dialogChoices)
|
||||||
|
|
||||||
choiceMap[choices[pos]] = obj
|
choiceMap[choices[pos]] = obj
|
||||||
|
|
||||||
yPosition = yPosition + height
|
yPosition += height
|
||||||
pos = pos + 1
|
pos += 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
134
lua/45284430.lua
134
lua/45284430.lua
|
|
@ -59,7 +59,7 @@ local function CreateButtons(frame, buttons, yPos, ySize)
|
||||||
button.FontSize = Enum.FontSize.Size18
|
button.FontSize = Enum.FontSize.Size18
|
||||||
button.AutoButtonColor = true
|
button.AutoButtonColor = true
|
||||||
button.Modal = true
|
button.Modal = true
|
||||||
if obj["Style"] then
|
if obj.Style then
|
||||||
button.Style = obj.Style
|
button.Style = obj.Style
|
||||||
else
|
else
|
||||||
button.Style = Enum.ButtonStyle.RobloxButton
|
button.Style = Enum.ButtonStyle.RobloxButton
|
||||||
|
|
@ -70,7 +70,7 @@ local function CreateButtons(frame, buttons, yPos, ySize)
|
||||||
button.Parent = frame
|
button.Parent = frame
|
||||||
buttonObjs[buttonNum] = button
|
buttonObjs[buttonNum] = button
|
||||||
|
|
||||||
buttonNum = buttonNum + 1
|
buttonNum += 1
|
||||||
end
|
end
|
||||||
local numButtons = buttonNum - 1
|
local numButtons = buttonNum - 1
|
||||||
|
|
||||||
|
|
@ -97,7 +97,7 @@ local function CreateButtons(frame, buttons, yPos, ySize)
|
||||||
)
|
)
|
||||||
buttonObjs[buttonNum].Size =
|
buttonObjs[buttonNum].Size =
|
||||||
UDim2.new(buttonSize, 0, ySize.Scale, ySize.Offset)
|
UDim2.new(buttonSize, 0, ySize.Scale, ySize.Offset)
|
||||||
buttonNum = buttonNum + 1
|
buttonNum += 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -110,7 +110,7 @@ local function setSliderPos(newAbsPosX, slider, sliderPosition, bar, steps)
|
||||||
)
|
)
|
||||||
local wholeNum, remainder = math.modf(relativePosX * newStep)
|
local wholeNum, remainder = math.modf(relativePosX * newStep)
|
||||||
if remainder > 0.5 then
|
if remainder > 0.5 then
|
||||||
wholeNum = wholeNum + 1
|
wholeNum += 1
|
||||||
end
|
end
|
||||||
relativePosX = wholeNum / newStep
|
relativePosX = wholeNum / newStep
|
||||||
|
|
||||||
|
|
@ -382,7 +382,7 @@ t.CreateDropDownMenu = function(items, onSelect, forRoblox)
|
||||||
obj.TextColor3 = Color3.new(1, 1, 1)
|
obj.TextColor3 = Color3.new(1, 1, 1)
|
||||||
obj.BackgroundTransparency = 1
|
obj.BackgroundTransparency = 1
|
||||||
|
|
||||||
childNum = childNum + 1
|
childNum += 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -417,7 +417,7 @@ t.CreateDropDownMenu = function(items, onSelect, forRoblox)
|
||||||
else
|
else
|
||||||
obj.Font = Enum.Font.Arial
|
obj.Font = Enum.Font.Arial
|
||||||
end
|
end
|
||||||
childNum = childNum + 1
|
childNum += 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -439,7 +439,7 @@ t.CreateDropDownMenu = function(items, onSelect, forRoblox)
|
||||||
|
|
||||||
local function scrollDown()
|
local function scrollDown()
|
||||||
if scrollBarPosition + dropDownItemCount <= itemCount then
|
if scrollBarPosition + dropDownItemCount <= itemCount then
|
||||||
scrollBarPosition = scrollBarPosition + 1
|
scrollBarPosition += 1
|
||||||
updateScroll()
|
updateScroll()
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
@ -447,7 +447,7 @@ t.CreateDropDownMenu = function(items, onSelect, forRoblox)
|
||||||
end
|
end
|
||||||
local function scrollUp()
|
local function scrollUp()
|
||||||
if scrollBarPosition > 1 then
|
if scrollBarPosition > 1 then
|
||||||
scrollBarPosition = scrollBarPosition - 1
|
scrollBarPosition -= 1
|
||||||
updateScroll()
|
updateScroll()
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
@ -464,13 +464,13 @@ t.CreateDropDownMenu = function(items, onSelect, forRoblox)
|
||||||
scrollUpButton.Position =
|
scrollUpButton.Position =
|
||||||
UDim2.new(1, -11, (1 * 0.8) / ((dropDownItemCount + 1) * 0.8), 0)
|
UDim2.new(1, -11, (1 * 0.8) / ((dropDownItemCount + 1) * 0.8), 0)
|
||||||
scrollUpButton.MouseButton1Click:connect(function()
|
scrollUpButton.MouseButton1Click:connect(function()
|
||||||
scrollMouseCount = scrollMouseCount + 1
|
scrollMouseCount += 1
|
||||||
end)
|
end)
|
||||||
scrollUpButton.MouseLeave:connect(function()
|
scrollUpButton.MouseLeave:connect(function()
|
||||||
scrollMouseCount = scrollMouseCount + 1
|
scrollMouseCount += 1
|
||||||
end)
|
end)
|
||||||
scrollUpButton.MouseButton1Down:connect(function()
|
scrollUpButton.MouseButton1Down:connect(function()
|
||||||
scrollMouseCount = scrollMouseCount + 1
|
scrollMouseCount += 1
|
||||||
|
|
||||||
scrollUp()
|
scrollUp()
|
||||||
local val = scrollMouseCount
|
local val = scrollMouseCount
|
||||||
|
|
@ -493,13 +493,13 @@ t.CreateDropDownMenu = function(items, onSelect, forRoblox)
|
||||||
scrollDownButton.Position = UDim2.new(1, -11, 1, -11)
|
scrollDownButton.Position = UDim2.new(1, -11, 1, -11)
|
||||||
scrollDownButton.Parent = droppedDownMenu
|
scrollDownButton.Parent = droppedDownMenu
|
||||||
scrollDownButton.MouseButton1Click:connect(function()
|
scrollDownButton.MouseButton1Click:connect(function()
|
||||||
scrollMouseCount = scrollMouseCount + 1
|
scrollMouseCount += 1
|
||||||
end)
|
end)
|
||||||
scrollDownButton.MouseLeave:connect(function()
|
scrollDownButton.MouseLeave:connect(function()
|
||||||
scrollMouseCount = scrollMouseCount + 1
|
scrollMouseCount += 1
|
||||||
end)
|
end)
|
||||||
scrollDownButton.MouseButton1Down:connect(function()
|
scrollDownButton.MouseButton1Down:connect(function()
|
||||||
scrollMouseCount = scrollMouseCount + 1
|
scrollMouseCount += 1
|
||||||
|
|
||||||
scrollDown()
|
scrollDown()
|
||||||
local val = scrollMouseCount
|
local val = scrollMouseCount
|
||||||
|
|
@ -670,10 +670,10 @@ local function layoutGuiObjectsHelper(frame, guiObjects, settingsTable)
|
||||||
local isLabel = child:IsA "TextLabel"
|
local isLabel = child:IsA "TextLabel"
|
||||||
if isLabel then
|
if isLabel then
|
||||||
pixelsRemaining = pixelsRemaining
|
pixelsRemaining = pixelsRemaining
|
||||||
- settingsTable["TextLabelPositionPadY"]
|
- settingsTable.TextLabelPositionPadY
|
||||||
else
|
else
|
||||||
pixelsRemaining = pixelsRemaining
|
pixelsRemaining = pixelsRemaining
|
||||||
- settingsTable["TextButtonPositionPadY"]
|
- settingsTable.TextButtonPositionPadY
|
||||||
end
|
end
|
||||||
child.Position = UDim2.new(
|
child.Position = UDim2.new(
|
||||||
child.Position.X.Scale,
|
child.Position.X.Scale,
|
||||||
|
|
@ -695,14 +695,14 @@ local function layoutGuiObjectsHelper(frame, guiObjects, settingsTable)
|
||||||
child.Size.X.Scale,
|
child.Size.X.Scale,
|
||||||
child.Size.X.Offset,
|
child.Size.X.Offset,
|
||||||
0,
|
0,
|
||||||
child.TextBounds.Y + settingsTable["TextLabelSizePadY"]
|
child.TextBounds.Y + settingsTable.TextLabelSizePadY
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
child.Size = UDim2.new(
|
child.Size = UDim2.new(
|
||||||
child.Size.X.Scale,
|
child.Size.X.Scale,
|
||||||
child.Size.X.Offset,
|
child.Size.X.Offset,
|
||||||
0,
|
0,
|
||||||
child.TextBounds.Y + settingsTable["TextButtonSizePadY"]
|
child.TextBounds.Y + settingsTable.TextButtonSizePadY
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -714,14 +714,14 @@ local function layoutGuiObjectsHelper(frame, guiObjects, settingsTable)
|
||||||
child.AbsoluteSize.Y + 1
|
child.AbsoluteSize.Y + 1
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
pixelsRemaining = pixelsRemaining - child.AbsoluteSize.Y
|
pixelsRemaining -= child.AbsoluteSize.Y
|
||||||
|
|
||||||
if isLabel then
|
if isLabel then
|
||||||
pixelsRemaining = pixelsRemaining
|
pixelsRemaining = pixelsRemaining
|
||||||
- settingsTable["TextLabelPositionPadY"]
|
- settingsTable.TextLabelPositionPadY
|
||||||
else
|
else
|
||||||
pixelsRemaining = pixelsRemaining
|
pixelsRemaining = pixelsRemaining
|
||||||
- settingsTable["TextButtonPositionPadY"]
|
- settingsTable.TextButtonPositionPadY
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
child.Visible = false
|
child.Visible = false
|
||||||
|
|
@ -735,7 +735,7 @@ local function layoutGuiObjectsHelper(frame, guiObjects, settingsTable)
|
||||||
0,
|
0,
|
||||||
totalPixels - pixelsRemaining
|
totalPixels - pixelsRemaining
|
||||||
)
|
)
|
||||||
pixelsRemaining = pixelsRemaining - child.AbsoluteSize.Y
|
pixelsRemaining -= child.AbsoluteSize.Y
|
||||||
child.Visible = (pixelsRemaining >= 0)
|
child.Visible = (pixelsRemaining >= 0)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -755,17 +755,17 @@ t.LayoutGuiObjects = function(frame, guiObjects, settingsTable)
|
||||||
settingsTable = {}
|
settingsTable = {}
|
||||||
end
|
end
|
||||||
|
|
||||||
if not settingsTable["TextLabelSizePadY"] then
|
if not settingsTable.TextLabelSizePadY then
|
||||||
settingsTable["TextLabelSizePadY"] = 0
|
settingsTable.TextLabelSizePadY = 0
|
||||||
end
|
end
|
||||||
if not settingsTable["TextLabelPositionPadY"] then
|
if not settingsTable.TextLabelPositionPadY then
|
||||||
settingsTable["TextLabelPositionPadY"] = 0
|
settingsTable.TextLabelPositionPadY = 0
|
||||||
end
|
end
|
||||||
if not settingsTable["TextButtonSizePadY"] then
|
if not settingsTable.TextButtonSizePadY then
|
||||||
settingsTable["TextButtonSizePadY"] = 12
|
settingsTable.TextButtonSizePadY = 12
|
||||||
end
|
end
|
||||||
if not settingsTable["TextButtonPositionPadY"] then
|
if not settingsTable.TextButtonPositionPadY then
|
||||||
settingsTable["TextButtonPositionPadY"] = 2
|
settingsTable.TextButtonPositionPadY = 2
|
||||||
end
|
end
|
||||||
|
|
||||||
--Wrapper frame takes care of styled objects
|
--Wrapper frame takes care of styled objects
|
||||||
|
|
@ -843,12 +843,12 @@ t.CreateSlider = function(steps, width, position)
|
||||||
bar.Parent = sliderGui
|
bar.Parent = sliderGui
|
||||||
|
|
||||||
if
|
if
|
||||||
position["X"]
|
position.X
|
||||||
and position["X"]["Scale"]
|
and position.X.Scale
|
||||||
and position["X"]["Offset"]
|
and position.X.Offset
|
||||||
and position["Y"]
|
and position.Y
|
||||||
and position["Y"]["Scale"]
|
and position.Y.Scale
|
||||||
and position["Y"]["Offset"]
|
and position.Y.Offset
|
||||||
then
|
then
|
||||||
bar.Position = position
|
bar.Position = position
|
||||||
end
|
end
|
||||||
|
|
@ -1609,20 +1609,20 @@ t.CreateScrollingFrame = function(orderList, scrollStyle)
|
||||||
pos = scrollPosition
|
pos = scrollPosition
|
||||||
--count up from current scroll position to fill out grid
|
--count up from current scroll position to fill out grid
|
||||||
while pos <= #guiObjects and pixelsBelowScrollbar < totalPixelsY do
|
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
|
--previous pos was the end of a row
|
||||||
if xCounter >= totalPixelsX then
|
if xCounter >= totalPixelsX then
|
||||||
pixelsBelowScrollbar = pixelsBelowScrollbar + currentRowY
|
pixelsBelowScrollbar += currentRowY
|
||||||
currentRowY = 0
|
currentRowY = 0
|
||||||
xCounter = guiObjects[pos].AbsoluteSize.X
|
xCounter = guiObjects[pos].AbsoluteSize.X
|
||||||
end
|
end
|
||||||
if guiObjects[pos].AbsoluteSize.Y > currentRowY then
|
if guiObjects[pos].AbsoluteSize.Y > currentRowY then
|
||||||
currentRowY = guiObjects[pos].AbsoluteSize.Y
|
currentRowY = guiObjects[pos].AbsoluteSize.Y
|
||||||
end
|
end
|
||||||
pos = pos + 1
|
pos += 1
|
||||||
end
|
end
|
||||||
--Count wherever current row left off
|
--Count wherever current row left off
|
||||||
pixelsBelowScrollbar = pixelsBelowScrollbar + currentRowY
|
pixelsBelowScrollbar += currentRowY
|
||||||
currentRowY = 0
|
currentRowY = 0
|
||||||
|
|
||||||
pos = scrollPosition - 1
|
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
|
--count backwards from current scrollPosition to see if we can add more rows
|
||||||
while pixelsBelowScrollbar + currentRowY < totalPixelsY and pos >= 1 do
|
while pixelsBelowScrollbar + currentRowY < totalPixelsY and pos >= 1 do
|
||||||
xCounter = xCounter + guiObjects[pos].AbsoluteSize.X
|
xCounter += guiObjects[pos].AbsoluteSize.X
|
||||||
rowSizeCounter = rowSizeCounter + 1
|
rowSizeCounter += 1
|
||||||
if xCounter >= totalPixelsX then
|
if xCounter >= totalPixelsX then
|
||||||
rowSize = rowSizeCounter - 1
|
rowSize = rowSizeCounter - 1
|
||||||
rowSizeCounter = 0
|
rowSizeCounter = 0
|
||||||
xCounter = guiObjects[pos].AbsoluteSize.X
|
xCounter = guiObjects[pos].AbsoluteSize.X
|
||||||
if pixelsBelowScrollbar + currentRowY <= totalPixelsY then
|
if pixelsBelowScrollbar + currentRowY <= totalPixelsY then
|
||||||
--It fits, so back up our scroll position
|
--It fits, so back up our scroll position
|
||||||
pixelsBelowScrollbar = pixelsBelowScrollbar + currentRowY
|
pixelsBelowScrollbar += currentRowY
|
||||||
if scrollPosition <= rowSize then
|
if scrollPosition <= rowSize then
|
||||||
scrollPosition = 1
|
scrollPosition = 1
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
scrollPosition = scrollPosition - rowSize
|
scrollPosition -= rowSize
|
||||||
end
|
end
|
||||||
currentRowY = 0
|
currentRowY = 0
|
||||||
else
|
else
|
||||||
|
|
@ -1658,7 +1658,7 @@ t.CreateScrollingFrame = function(orderList, scrollStyle)
|
||||||
currentRowY = guiObjects[pos].AbsoluteSize.Y
|
currentRowY = guiObjects[pos].AbsoluteSize.Y
|
||||||
end
|
end
|
||||||
|
|
||||||
pos = pos - 1
|
pos -= 1
|
||||||
end
|
end
|
||||||
|
|
||||||
--Do check last time if pos = 0
|
--Do check last time if pos = 0
|
||||||
|
|
@ -1700,7 +1700,7 @@ t.CreateScrollingFrame = function(orderList, scrollStyle)
|
||||||
--print("Laying out " .. child.Name)
|
--print("Laying out " .. child.Name)
|
||||||
--GuiObject
|
--GuiObject
|
||||||
if setRowSize then
|
if setRowSize then
|
||||||
rowSizeCounter = rowSizeCounter + 1
|
rowSizeCounter += 1
|
||||||
end
|
end
|
||||||
if xCounter + child.AbsoluteSize.X >= totalPixelsX then
|
if xCounter + child.AbsoluteSize.X >= totalPixelsX then
|
||||||
if setRowSize then
|
if setRowSize then
|
||||||
|
|
@ -1717,12 +1717,12 @@ t.CreateScrollingFrame = function(orderList, scrollStyle)
|
||||||
0,
|
0,
|
||||||
totalPixelsY - pixelsRemainingY + yOffset
|
totalPixelsY - pixelsRemainingY + yOffset
|
||||||
)
|
)
|
||||||
xCounter = xCounter + child.AbsoluteSize.X
|
xCounter += child.AbsoluteSize.X
|
||||||
child.Visible = (
|
child.Visible = (
|
||||||
(pixelsRemainingY - child.AbsoluteSize.Y) >= 0
|
(pixelsRemainingY - child.AbsoluteSize.Y) >= 0
|
||||||
)
|
)
|
||||||
if child.Visible then
|
if child.Visible then
|
||||||
howManyDisplayed = howManyDisplayed + 1
|
howManyDisplayed += 1
|
||||||
end
|
end
|
||||||
lastChildSize = child.AbsoluteSize
|
lastChildSize = child.AbsoluteSize
|
||||||
end
|
end
|
||||||
|
|
@ -1793,13 +1793,13 @@ t.CreateScrollingFrame = function(orderList, scrollStyle)
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
--local ("Backing up ScrollPosition from -- " ..scrollPosition)
|
--local ("Backing up ScrollPosition from -- " ..scrollPosition)
|
||||||
scrollPosition = scrollPosition - 1
|
scrollPosition -= 1
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
pos = pos - 1
|
pos -= 1
|
||||||
end
|
end
|
||||||
|
|
||||||
pos = scrollPosition
|
pos = scrollPosition
|
||||||
|
|
@ -1820,10 +1820,10 @@ t.CreateScrollingFrame = function(orderList, scrollStyle)
|
||||||
0,
|
0,
|
||||||
totalPixels - pixelsRemaining
|
totalPixels - pixelsRemaining
|
||||||
)
|
)
|
||||||
pixelsRemaining = pixelsRemaining - child.AbsoluteSize.Y
|
pixelsRemaining -= child.AbsoluteSize.Y
|
||||||
if pixelsRemaining >= 0 then
|
if pixelsRemaining >= 0 then
|
||||||
child.Visible = true
|
child.Visible = true
|
||||||
howManyDisplayed = howManyDisplayed + 1
|
howManyDisplayed += 1
|
||||||
else
|
else
|
||||||
child.Visible = false
|
child.Visible = false
|
||||||
end
|
end
|
||||||
|
|
@ -1842,7 +1842,7 @@ t.CreateScrollingFrame = function(orderList, scrollStyle)
|
||||||
if children then
|
if children then
|
||||||
for _, child in ipairs(children) do
|
for _, child in ipairs(children) do
|
||||||
if child:IsA "GuiObject" then
|
if child:IsA "GuiObject" then
|
||||||
guiObjects = guiObjects + 1
|
guiObjects += 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -1892,7 +1892,7 @@ t.CreateScrollingFrame = function(orderList, scrollStyle)
|
||||||
end
|
end
|
||||||
reentrancyGuard = true
|
reentrancyGuard = true
|
||||||
wait()
|
wait()
|
||||||
local success, err = nil
|
local success, err
|
||||||
if style == "grid" then
|
if style == "grid" then
|
||||||
success, err = pcall(function()
|
success, err = pcall(function()
|
||||||
layoutGridScrollBar()
|
layoutGridScrollBar()
|
||||||
|
|
@ -1910,7 +1910,7 @@ t.CreateScrollingFrame = function(orderList, scrollStyle)
|
||||||
end
|
end
|
||||||
|
|
||||||
local doScrollUp = function()
|
local doScrollUp = function()
|
||||||
scrollPosition = scrollPosition - rowSize
|
scrollPosition -= rowSize
|
||||||
if scrollPosition < 1 then
|
if scrollPosition < 1 then
|
||||||
scrollPosition = 1
|
scrollPosition = 1
|
||||||
end
|
end
|
||||||
|
|
@ -1918,7 +1918,7 @@ t.CreateScrollingFrame = function(orderList, scrollStyle)
|
||||||
end
|
end
|
||||||
|
|
||||||
local doScrollDown = function()
|
local doScrollDown = function()
|
||||||
scrollPosition = scrollPosition + rowSize
|
scrollPosition += rowSize
|
||||||
recalculate(nil)
|
recalculate(nil)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -2005,18 +2005,18 @@ t.CreateScrollingFrame = function(orderList, scrollStyle)
|
||||||
|
|
||||||
local dragAbsSize = scrollDrag.AbsoluteSize.y
|
local dragAbsSize = scrollDrag.AbsoluteSize.y
|
||||||
local barAbsOne = barAbsPos + barAbsSize - dragAbsSize
|
local barAbsOne = barAbsPos + barAbsSize - dragAbsSize
|
||||||
y = y - mouseOffset
|
y -= mouseOffset
|
||||||
y = y < barAbsPos and barAbsPos
|
y = y < barAbsPos and barAbsPos
|
||||||
or y > barAbsOne and barAbsOne
|
or y > barAbsOne and barAbsOne
|
||||||
or y
|
or y
|
||||||
y = y - barAbsPos
|
y -= barAbsPos
|
||||||
|
|
||||||
local guiObjects = 0
|
local guiObjects = 0
|
||||||
local children = frame:GetChildren()
|
local children = frame:GetChildren()
|
||||||
if children then
|
if children then
|
||||||
for _, child in ipairs(children) do
|
for _, child in ipairs(children) do
|
||||||
if child:IsA "GuiObject" then
|
if child:IsA "GuiObject" then
|
||||||
guiObjects = guiObjects + 1
|
guiObjects += 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -2609,7 +2609,7 @@ t.CreateImageTutorialPage = function(
|
||||||
imageLabel.Position = UDim2.new(0.5 - (x / y) / 2, 0, 0, 0)
|
imageLabel.Position = UDim2.new(0.5 - (x / y) / 2, 0, 0, 0)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
size = size + 50
|
size += 50
|
||||||
frame.Size = UDim2.new(0, size, 0, size)
|
frame.Size = UDim2.new(0, size, 0, size)
|
||||||
frame.Position = UDim2.new(0.5, -size / 2, 0.5, -size / 2)
|
frame.Position = UDim2.new(0.5, -size / 2, 0.5, -size / 2)
|
||||||
end
|
end
|
||||||
|
|
@ -2733,7 +2733,7 @@ t.CreateSetPanel = function(
|
||||||
-- used for water selections
|
-- used for water selections
|
||||||
local waterForceDirection = "NegX"
|
local waterForceDirection = "NegX"
|
||||||
local waterForce = "None"
|
local waterForce = "None"
|
||||||
local waterGui, waterTypeChangedEvent = nil
|
local waterGui, waterTypeChangedEvent
|
||||||
|
|
||||||
local Data = {}
|
local Data = {}
|
||||||
Data.CurrentCategory = nil
|
Data.CurrentCategory = nil
|
||||||
|
|
@ -3023,7 +3023,7 @@ t.CreateSetPanel = function(
|
||||||
local numSkipped = 0
|
local numSkipped = 0
|
||||||
for i = 1, #sets do
|
for i = 1, #sets do
|
||||||
if not showAdminCategories and sets[i].Name == "Beta" then
|
if not showAdminCategories and sets[i].Name == "Beta" then
|
||||||
numSkipped = numSkipped + 1
|
numSkipped += 1
|
||||||
else
|
else
|
||||||
setButtons[i - numSkipped] = buildSetButton(
|
setButtons[i - numSkipped] = buildSetButton(
|
||||||
sets[i].Name,
|
sets[i].Name,
|
||||||
|
|
@ -3254,10 +3254,10 @@ t.CreateSetPanel = function(
|
||||||
for i = 1, #insertButtons do
|
for i = 1, #insertButtons do
|
||||||
insertButtons[i].Position =
|
insertButtons[i].Position =
|
||||||
UDim2.new(0, buttonWidth * x, 0, buttonHeight * y)
|
UDim2.new(0, buttonWidth * x, 0, buttonHeight * y)
|
||||||
x = x + 1
|
x += 1
|
||||||
if x >= columns then
|
if x >= columns then
|
||||||
x = 0
|
x = 0
|
||||||
y = y + 1
|
y += 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -3321,7 +3321,7 @@ t.CreateSetPanel = function(
|
||||||
insertButtons[arrayPosition], buttonCon = buildInsertButton()
|
insertButtons[arrayPosition], buttonCon = buildInsertButton()
|
||||||
table.insert(insertButtonCons, buttonCon)
|
table.insert(insertButtonCons, buttonCon)
|
||||||
insertButtons[arrayPosition].Parent = setGui.SetPanel.ItemsFrame
|
insertButtons[arrayPosition].Parent = setGui.SetPanel.ItemsFrame
|
||||||
arrayPosition = arrayPosition + 1
|
arrayPosition += 1
|
||||||
end
|
end
|
||||||
realignButtonGrid(columns)
|
realignButtonGrid(columns)
|
||||||
|
|
||||||
|
|
@ -3495,7 +3495,7 @@ t.CreateSetPanel = function(
|
||||||
)
|
)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
currRow = currRow + 1
|
currRow += 1
|
||||||
end
|
end
|
||||||
|
|
||||||
local buttons = setGui.SetPanel.Sets.SetsLists:GetChildren()
|
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)
|
widgetContainer.Position = position + UDim2.new(0, 0, 0, 20)
|
||||||
end
|
end
|
||||||
|
|
||||||
local frame, control, verticalDragger = nil
|
local frame, control, verticalDragger
|
||||||
if scrollable then
|
if scrollable then
|
||||||
--frame for widgets
|
--frame for widgets
|
||||||
frame, control = t.CreateTrueScrollingFrame()
|
frame, control = t.CreateTrueScrollingFrame()
|
||||||
|
|
|
||||||
|
|
@ -19,9 +19,7 @@ else
|
||||||
gui = script.Parent
|
gui = script.Parent
|
||||||
end
|
end
|
||||||
|
|
||||||
local helpButton
|
local helpButton, updateCameraDropDownSelection, updateVideoCaptureDropDownSelection
|
||||||
local updateCameraDropDownSelection
|
|
||||||
local updateVideoCaptureDropDownSelection
|
|
||||||
local tweenTime = 0.2
|
local tweenTime = 0.2
|
||||||
|
|
||||||
local mouseLockLookScreenUrl = "http://banland.xyz/asset?id=54071825"
|
local mouseLockLookScreenUrl = "http://banland.xyz/asset?id=54071825"
|
||||||
|
|
@ -233,7 +231,7 @@ local function CreateTextButtons(frame, buttons, yPos, ySize)
|
||||||
button.Parent = frame
|
button.Parent = frame
|
||||||
buttonObjs[buttonNum] = button
|
buttonObjs[buttonNum] = button
|
||||||
|
|
||||||
buttonNum = buttonNum + 1
|
buttonNum += 1
|
||||||
end
|
end
|
||||||
|
|
||||||
toggleSelection(buttonObjs[1])
|
toggleSelection(buttonObjs[1])
|
||||||
|
|
@ -263,7 +261,7 @@ local function CreateTextButtons(frame, buttons, yPos, ySize)
|
||||||
)
|
)
|
||||||
buttonObjs[buttonNum].Size =
|
buttonObjs[buttonNum].Size =
|
||||||
UDim2.new(buttonSize, 0, ySize.Scale, ySize.Offset)
|
UDim2.new(buttonSize, 0, ySize.Scale, ySize.Offset)
|
||||||
buttonNum = buttonNum + 1
|
buttonNum += 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -306,7 +304,7 @@ function setDisabledState(guiObject)
|
||||||
guiObject.TextTransparency = 0.9
|
guiObject.TextTransparency = 0.9
|
||||||
guiObject.Active = false
|
guiObject.Active = false
|
||||||
else
|
else
|
||||||
if guiObject["ClassName"] then
|
if guiObject.ClassName then
|
||||||
print(
|
print(
|
||||||
"setDisabledState() got object of unsupported type. object type is ",
|
"setDisabledState() got object of unsupported type. object type is ",
|
||||||
guiObject.ClassName
|
guiObject.ClassName
|
||||||
|
|
@ -807,9 +805,7 @@ local function createGameMainMenu(baseZIndex, shield)
|
||||||
gameSettingsButton.ZIndex = baseZIndex + 4
|
gameSettingsButton.ZIndex = baseZIndex + 4
|
||||||
gameSettingsButton.Parent = gameMainMenuFrame
|
gameSettingsButton.Parent = gameMainMenuFrame
|
||||||
gameSettingsButton.MouseButton1Click:connect(function()
|
gameSettingsButton.MouseButton1Click:connect(function()
|
||||||
if
|
if game:FindFirstChild "Players" and game.Players.LocalPlayer then
|
||||||
game:FindFirstChild "Players" and game.Players["LocalPlayer"]
|
|
||||||
then
|
|
||||||
local loadingGui =
|
local loadingGui =
|
||||||
game.Players.LocalPlayer:FindFirstChild "PlayerLoadingGui"
|
game.Players.LocalPlayer:FindFirstChild "PlayerLoadingGui"
|
||||||
if loadingGui then
|
if loadingGui then
|
||||||
|
|
@ -1266,7 +1262,7 @@ local function createGameSettingsMenu(baseZIndex, _)
|
||||||
if (graphicsLevel.Value + 1) > GraphicsQualityLevels then
|
if (graphicsLevel.Value + 1) > GraphicsQualityLevels then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
graphicsLevel.Value = graphicsLevel.Value + 1
|
graphicsLevel.Value += 1
|
||||||
graphicsSetter.Text = tostring(graphicsLevel.Value)
|
graphicsSetter.Text = tostring(graphicsLevel.Value)
|
||||||
setGraphicsQualityLevel(graphicsLevel.Value)
|
setGraphicsQualityLevel(graphicsLevel.Value)
|
||||||
|
|
||||||
|
|
@ -1281,7 +1277,7 @@ local function createGameSettingsMenu(baseZIndex, _)
|
||||||
if (graphicsLevel.Value - 1) <= 0 then
|
if (graphicsLevel.Value - 1) <= 0 then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
graphicsLevel.Value = graphicsLevel.Value - 1
|
graphicsLevel.Value -= 1
|
||||||
graphicsSetter.Text = tostring(graphicsLevel.Value)
|
graphicsSetter.Text = tostring(graphicsLevel.Value)
|
||||||
setGraphicsQualityLevel(graphicsLevel.Value)
|
setGraphicsQualityLevel(graphicsLevel.Value)
|
||||||
|
|
||||||
|
|
@ -1451,7 +1447,7 @@ local function createGameSettingsMenu(baseZIndex, _)
|
||||||
local videoNames = {}
|
local videoNames = {}
|
||||||
local videoNameToItem = {}
|
local videoNameToItem = {}
|
||||||
videoNames[1] = "Just Save to Disk"
|
videoNames[1] = "Just Save to Disk"
|
||||||
videoNameToItem[videoNames[1]] = Enum.UploadSetting["Never"]
|
videoNameToItem[videoNames[1]] = Enum.UploadSetting.Never
|
||||||
videoNames[2] = "Upload to YouTube"
|
videoNames[2] = "Upload to YouTube"
|
||||||
videoNameToItem[videoNames[2]] = Enum.UploadSetting["Ask me first"]
|
videoNameToItem[videoNames[2]] = Enum.UploadSetting["Ask me first"]
|
||||||
|
|
||||||
|
|
@ -1474,7 +1470,7 @@ local function createGameSettingsMenu(baseZIndex, _)
|
||||||
syncVideoCaptureSetting = function()
|
syncVideoCaptureSetting = function()
|
||||||
if
|
if
|
||||||
UserSettings().GameSettings.VideoUploadPromptBehavior
|
UserSettings().GameSettings.VideoUploadPromptBehavior
|
||||||
== Enum.UploadSetting["Never"]
|
== Enum.UploadSetting.Never
|
||||||
then
|
then
|
||||||
updateVideoCaptureDropDownSelection(videoNames[1])
|
updateVideoCaptureDropDownSelection(videoNames[1])
|
||||||
elseif
|
elseif
|
||||||
|
|
@ -1972,7 +1968,7 @@ if LoadLibrary then
|
||||||
errorBoxButtons[buttonOffset].Function = function()
|
errorBoxButtons[buttonOffset].Function = function()
|
||||||
saveLocal()
|
saveLocal()
|
||||||
end
|
end
|
||||||
buttonOffset = buttonOffset + 1
|
buttonOffset += 1
|
||||||
end
|
end
|
||||||
errorBoxButtons[buttonOffset] = {}
|
errorBoxButtons[buttonOffset] = {}
|
||||||
errorBoxButtons[buttonOffset].Text = "Keep Playing"
|
errorBoxButtons[buttonOffset].Text = "Keep Playing"
|
||||||
|
|
@ -2036,7 +2032,7 @@ if LoadLibrary then
|
||||||
spinnerImage.Parent = spinnerFrame
|
spinnerImage.Parent = spinnerFrame
|
||||||
|
|
||||||
spinnerIcons[spinnerNum] = spinnerImage
|
spinnerIcons[spinnerNum] = spinnerImage
|
||||||
spinnerNum = spinnerNum + 1
|
spinnerNum += 1
|
||||||
end
|
end
|
||||||
|
|
||||||
save = function()
|
save = function()
|
||||||
|
|
@ -2060,7 +2056,7 @@ if LoadLibrary then
|
||||||
"http://banland.xyz/Asset?id=45880710"
|
"http://banland.xyz/Asset?id=45880710"
|
||||||
end
|
end
|
||||||
|
|
||||||
pos = pos + 1
|
pos += 1
|
||||||
end
|
end
|
||||||
spinPos = (spinPos + 1) % 8
|
spinPos = (spinPos + 1) % 8
|
||||||
wait(0.2)
|
wait(0.2)
|
||||||
|
|
@ -2260,7 +2256,7 @@ if LoadLibrary then
|
||||||
if player:IsA "Player" and player ~= localPlayer then
|
if player:IsA "Player" and player ~= localPlayer then
|
||||||
playerNames[pos] = player.Name
|
playerNames[pos] = player.Name
|
||||||
nameToPlayer[player.Name] = player
|
nameToPlayer[player.Name] = player
|
||||||
pos = pos + 1
|
pos += 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
584
lua/48488235.lua
584
lua/48488235.lua
File diff suppressed because it is too large
Load Diff
|
|
@ -42,15 +42,15 @@ end
|
||||||
|
|
||||||
local function moveHealthBar(pGui)
|
local function moveHealthBar(pGui)
|
||||||
waitForChild(pGui, "HealthGUI")
|
waitForChild(pGui, "HealthGUI")
|
||||||
waitForChild(pGui["HealthGUI"], "tray")
|
waitForChild(pGui.HealthGUI, "tray")
|
||||||
local tray = pGui["HealthGUI"]["tray"]
|
local tray = pGui.HealthGUI.tray
|
||||||
tray.Position = UDim2.new(0.5, -85, 1, -26)
|
tray.Position = UDim2.new(0.5, -85, 1, -26)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function setHealthBarVisible(pGui, visible)
|
local function setHealthBarVisible(pGui, visible)
|
||||||
waitForChild(pGui, "HealthGUI")
|
waitForChild(pGui, "HealthGUI")
|
||||||
waitForChild(pGui["HealthGUI"], "tray")
|
waitForChild(pGui.HealthGUI, "tray")
|
||||||
local tray = pGui["HealthGUI"]["tray"]
|
local tray = pGui.HealthGUI.tray
|
||||||
tray.Visible = visible
|
tray.Visible = visible
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -92,8 +92,7 @@ if robloxGui.AbsoluteSize.Y <= 320 then
|
||||||
maxNumLoadoutItems = 4
|
maxNumLoadoutItems = 4
|
||||||
end
|
end
|
||||||
|
|
||||||
local characterChildAddedCon
|
local characterChildAddedCon, backpackChildCon
|
||||||
local backpackChildCon
|
|
||||||
|
|
||||||
local debounce = false
|
local debounce = false
|
||||||
|
|
||||||
|
|
@ -147,8 +146,8 @@ function unregisterNumberKeys()
|
||||||
end
|
end
|
||||||
|
|
||||||
function characterInWorkspace()
|
function characterInWorkspace()
|
||||||
if game.Players["LocalPlayer"] then
|
if game.Players.LocalPlayer then
|
||||||
if game.Players.LocalPlayer["Character"] then
|
if game.Players.LocalPlayer.Character then
|
||||||
if game.Players.LocalPlayer.Character ~= nil then
|
if game.Players.LocalPlayer.Character ~= nil then
|
||||||
if game.Players.LocalPlayer.Character.Parent ~= nil then
|
if game.Players.LocalPlayer.Character.Parent ~= nil then
|
||||||
return true
|
return true
|
||||||
|
|
@ -751,7 +750,7 @@ local addingPlayerChild = function(
|
||||||
gearClone.MouseEnter:connect(function()
|
gearClone.MouseEnter:connect(function()
|
||||||
if
|
if
|
||||||
gearClone.GearReference
|
gearClone.GearReference
|
||||||
and gearClone.GearReference.Value["ToolTip"]
|
and gearClone.GearReference.Value.ToolTip
|
||||||
and gearClone.GearReference.Value.ToolTip ~= ""
|
and gearClone.GearReference.Value.ToolTip ~= ""
|
||||||
then
|
then
|
||||||
showToolTip(gearClone, gearClone.GearReference.Value.ToolTip)
|
showToolTip(gearClone, gearClone.GearReference.Value.ToolTip)
|
||||||
|
|
@ -761,7 +760,7 @@ local addingPlayerChild = function(
|
||||||
gearClone.MouseLeave:connect(function()
|
gearClone.MouseLeave:connect(function()
|
||||||
if
|
if
|
||||||
gearClone.GearReference
|
gearClone.GearReference
|
||||||
and gearClone.GearReference.Value["ToolTip"]
|
and gearClone.GearReference.Value.ToolTip
|
||||||
and gearClone.GearReference.Value.ToolTip ~= ""
|
and gearClone.GearReference.Value.ToolTip ~= ""
|
||||||
then
|
then
|
||||||
hideToolTip(gearClone, gearClone.GearReference.Value.ToolTip)
|
hideToolTip(gearClone, gearClone.GearReference.Value.ToolTip)
|
||||||
|
|
|
||||||
|
|
@ -200,7 +200,7 @@ function StringReader:Peek()
|
||||||
end
|
end
|
||||||
|
|
||||||
function StringReader:Next()
|
function StringReader:Next()
|
||||||
self.i = self.i + 1
|
self.i += 1
|
||||||
if self.i <= #self.s then
|
if self.i <= #self.s then
|
||||||
return string.sub(self.s, self.i, self.i)
|
return string.sub(self.s, self.i, self.i)
|
||||||
end
|
end
|
||||||
|
|
@ -629,7 +629,7 @@ t.SelectTerrainRegion = function(
|
||||||
|
|
||||||
-- helper function to update tag
|
-- helper function to update tag
|
||||||
function incrementAliveCounter()
|
function incrementAliveCounter()
|
||||||
aliveCounter = aliveCounter + 1
|
aliveCounter += 1
|
||||||
if aliveCounter > 1000000 then
|
if aliveCounter > 1000000 then
|
||||||
aliveCounter = 0
|
aliveCounter = 0
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ local sc = game:GetService "ScriptContext"
|
||||||
local tries = 0
|
local tries = 0
|
||||||
|
|
||||||
while not sc and tries < 3 do
|
while not sc and tries < 3 do
|
||||||
tries = tries + 1
|
tries += 1
|
||||||
sc = game:GetService "ScriptContext"
|
sc = game:GetService "ScriptContext"
|
||||||
wait(0.2)
|
wait(0.2)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -363,8 +363,8 @@ local function getBoundingBox2(partOrModel)
|
||||||
4 * math.ceil(actualBox.z / 4)
|
4 * math.ceil(actualBox.z / 4)
|
||||||
)
|
)
|
||||||
local adjustment = containingGridBox - actualBox
|
local adjustment = containingGridBox - actualBox
|
||||||
minVec = minVec - 0.5 * adjustment * justify
|
minVec -= 0.5 * adjustment * justify
|
||||||
maxVec = maxVec + 0.5 * adjustment * (two - justify)
|
maxVec += 0.5 * adjustment * (two - justify)
|
||||||
end
|
end
|
||||||
|
|
||||||
return minVec, maxVec
|
return minVec, maxVec
|
||||||
|
|
@ -510,7 +510,7 @@ local function findConfigAtMouseTarget(Mouse, stampData)
|
||||||
error "findConfigAtMouseTarget: stampData is nil"
|
error "findConfigAtMouseTarget: stampData is nil"
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
if not stampData["CurrentParts"] then
|
if not stampData.CurrentParts then
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -658,10 +658,8 @@ local function findConfigAtMouseTarget(Mouse, stampData)
|
||||||
clampToSurface = Vector3.new(1, 1, 0)
|
clampToSurface = Vector3.new(1, 1, 0)
|
||||||
end
|
end
|
||||||
|
|
||||||
targetRefPointInTarget = targetRefPointInTarget * (0.5 * diagBBTarget)
|
targetRefPointInTarget *= (0.5 * diagBBTarget) + 0.5 * (maxBBTarget + minBBTarget)
|
||||||
+ 0.5 * (maxBBTarget + minBBTarget)
|
insertRefPointInInsert *= (0.5 * diagBB) + 0.5 * (maxBB + minBB)
|
||||||
insertRefPointInInsert = 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
|
-- 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
|
-- 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.y / grid),
|
||||||
grid * math.modf(delta.z / grid)
|
grid * math.modf(delta.z / grid)
|
||||||
)
|
)
|
||||||
deltaClamped = deltaClamped * clampToSurface
|
deltaClamped *= clampToSurface
|
||||||
local targetTouchInTarget = deltaClamped + targetRefPointInTarget
|
local targetTouchInTarget = deltaClamped + targetRefPointInTarget
|
||||||
|
|
||||||
local TargetTouchRelToWorld =
|
local TargetTouchRelToWorld =
|
||||||
|
|
@ -903,7 +901,7 @@ t.GetStampModel = function(assetId, terrainShape, useAssetVersionId)
|
||||||
while loading and totalTime < maxWait do
|
while loading and totalTime < maxWait do
|
||||||
lastGameTime = tick()
|
lastGameTime = tick()
|
||||||
wait(1)
|
wait(1)
|
||||||
totalTime = totalTime + tick() - lastGameTime
|
totalTime += tick() - lastGameTime
|
||||||
end
|
end
|
||||||
loading = false
|
loading = false
|
||||||
|
|
||||||
|
|
@ -1163,7 +1161,7 @@ t.SetupStamperDragger = function(
|
||||||
line2 = HighScalabilityLine.End - HighScalabilityLine.MorePoints[1]
|
line2 = HighScalabilityLine.End - HighScalabilityLine.MorePoints[1]
|
||||||
|
|
||||||
-- take out any component of line2 along line1, so you get perpendicular to line1 component
|
-- 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(
|
tempCFrame = CFrame.new(
|
||||||
HighScalabilityLine.Start,
|
HighScalabilityLine.Start,
|
||||||
|
|
@ -1178,9 +1176,9 @@ t.SetupStamperDragger = function(
|
||||||
local yComp = yAxis:Dot(line2)
|
local yComp = yAxis:Dot(line2)
|
||||||
|
|
||||||
if math.abs(yComp) > math.abs(xComp) then
|
if math.abs(yComp) > math.abs(xComp) then
|
||||||
line2 = line2 - xAxis * xComp
|
line2 -= xAxis * xComp
|
||||||
else
|
else
|
||||||
line2 = line2 - yAxis * yComp
|
line2 -= yAxis * yComp
|
||||||
end
|
end
|
||||||
|
|
||||||
HighScalabilityLine.InternalLine = line2
|
HighScalabilityLine.InternalLine = line2
|
||||||
|
|
@ -1190,8 +1188,8 @@ t.SetupStamperDragger = function(
|
||||||
line3 = HighScalabilityLine.End - HighScalabilityLine.MorePoints[2]
|
line3 = HighScalabilityLine.End - HighScalabilityLine.MorePoints[2]
|
||||||
|
|
||||||
-- zero out all components of previous lines
|
-- zero out all components of previous lines
|
||||||
line3 = line3 - line.unit * line.unit:Dot(line3)
|
line3 -= line.unit * line.unit:Dot(line3)
|
||||||
line3 = line3 - line2.unit * line2.unit:Dot(line3)
|
line3 -= line2.unit * line2.unit:Dot(line3)
|
||||||
|
|
||||||
HighScalabilityLine.InternalLine = line3
|
HighScalabilityLine.InternalLine = line3
|
||||||
end
|
end
|
||||||
|
|
@ -1225,7 +1223,7 @@ t.SetupStamperDragger = function(
|
||||||
-- make player able to see this ish
|
-- make player able to see this ish
|
||||||
|
|
||||||
local gui
|
local gui
|
||||||
if game.Players["LocalPlayer"] then
|
if game.Players.LocalPlayer then
|
||||||
gui = game.Players.LocalPlayer:FindFirstChild "PlayerGui"
|
gui = game.Players.LocalPlayer:FindFirstChild "PlayerGui"
|
||||||
if gui and gui:IsA "PlayerGui" then
|
if gui and gui:IsA "PlayerGui" then
|
||||||
if
|
if
|
||||||
|
|
@ -1309,7 +1307,7 @@ t.SetupStamperDragger = function(
|
||||||
end
|
end
|
||||||
|
|
||||||
local ry = math.pi / 2
|
local ry = math.pi / 2
|
||||||
gInitial90DegreeRotations = gInitial90DegreeRotations + numRotations
|
gInitial90DegreeRotations += numRotations
|
||||||
if
|
if
|
||||||
stampData.CurrentParts:IsA "Model"
|
stampData.CurrentParts:IsA "Model"
|
||||||
or stampData.CurrentParts:IsA "Tool"
|
or stampData.CurrentParts:IsA "Tool"
|
||||||
|
|
@ -1336,8 +1334,8 @@ t.SetupStamperDragger = function(
|
||||||
currModelCFrame = stampData.CurrentParts.CFrame
|
currModelCFrame = stampData.CurrentParts.CFrame
|
||||||
end
|
end
|
||||||
|
|
||||||
minBB = minBB + targetCFrame.p - currModelCFrame.p
|
minBB += targetCFrame.p - currModelCFrame.p
|
||||||
maxBB = maxBB + targetCFrame.p - currModelCFrame.p
|
maxBB += targetCFrame.p - currModelCFrame.p
|
||||||
|
|
||||||
-- don't drag into terrain
|
-- don't drag into terrain
|
||||||
if
|
if
|
||||||
|
|
@ -1521,13 +1519,13 @@ t.SetupStamperDragger = function(
|
||||||
end
|
end
|
||||||
|
|
||||||
local function setupKeyListener(key, Mouse)
|
local function setupKeyListener(key, Mouse)
|
||||||
if control and control["Paused"] then
|
if control and control.Paused then
|
||||||
return
|
return
|
||||||
end -- don't do this if we have no stamp
|
end -- don't do this if we have no stamp
|
||||||
|
|
||||||
key = string.lower(key)
|
key = string.lower(key)
|
||||||
if key == "r" and not autoAlignToFace(stampData.CurrentParts) then -- rotate the model
|
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
|
-- Update orientation value if this is a fake terrain part
|
||||||
local clusterValues =
|
local clusterValues =
|
||||||
|
|
@ -1600,13 +1598,13 @@ t.SetupStamperDragger = function(
|
||||||
local function flashRedBox()
|
local function flashRedBox()
|
||||||
local gui = game.CoreGui
|
local gui = game.CoreGui
|
||||||
if game:FindFirstChild "Players" then
|
if game:FindFirstChild "Players" then
|
||||||
if game.Players["LocalPlayer"] then
|
if game.Players.LocalPlayer then
|
||||||
if game.Players.LocalPlayer:FindFirstChild "PlayerGui" then
|
if game.Players.LocalPlayer:FindFirstChild "PlayerGui" then
|
||||||
gui = game.Players.LocalPlayer.PlayerGui
|
gui = game.Players.LocalPlayer.PlayerGui
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if not stampData["ErrorBox"] then
|
if not stampData.ErrorBox then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -1619,16 +1617,16 @@ t.SetupStamperDragger = function(
|
||||||
|
|
||||||
delay(0, function()
|
delay(0, function()
|
||||||
for _ = 1, 3 do
|
for _ = 1, 3 do
|
||||||
if stampData["ErrorBox"] then
|
if stampData.ErrorBox then
|
||||||
stampData.ErrorBox.Visible = true
|
stampData.ErrorBox.Visible = true
|
||||||
end
|
end
|
||||||
wait(0.13)
|
wait(0.13)
|
||||||
if stampData["ErrorBox"] then
|
if stampData.ErrorBox then
|
||||||
stampData.ErrorBox.Visible = false
|
stampData.ErrorBox.Visible = false
|
||||||
end
|
end
|
||||||
wait(0.13)
|
wait(0.13)
|
||||||
end
|
end
|
||||||
if stampData["ErrorBox"] then
|
if stampData.ErrorBox then
|
||||||
stampData.ErrorBox.Adornee = nil
|
stampData.ErrorBox.Adornee = nil
|
||||||
stampData.ErrorBox.Parent = Tool
|
stampData.ErrorBox.Parent = Tool
|
||||||
end
|
end
|
||||||
|
|
@ -1778,7 +1776,7 @@ t.SetupStamperDragger = function(
|
||||||
* (gStaticTrans - gDesiredTrans)
|
* (gStaticTrans - gDesiredTrans)
|
||||||
)
|
)
|
||||||
if
|
if
|
||||||
stampData["TransparencyTable"]
|
stampData.TransparencyTable
|
||||||
and stampData.TransparencyTable[part]
|
and stampData.TransparencyTable[part]
|
||||||
then
|
then
|
||||||
part.Transparency = newTrans
|
part.Transparency = newTrans
|
||||||
|
|
@ -1790,7 +1788,7 @@ t.SetupStamperDragger = function(
|
||||||
end
|
end
|
||||||
if part and part:IsA "BasePart" then
|
if part and part:IsA "BasePart" then
|
||||||
if
|
if
|
||||||
stampData["TransparencyTable"]
|
stampData.TransparencyTable
|
||||||
and stampData.TransparencyTable[part]
|
and stampData.TransparencyTable[part]
|
||||||
then
|
then
|
||||||
part.Transparency = gDesiredTrans
|
part.Transparency = gDesiredTrans
|
||||||
|
|
@ -2163,7 +2161,7 @@ t.SetupStamperDragger = function(
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
stepVect[1] = stepVect[1] + incrementVect[1]
|
stepVect[1] += incrementVect[1]
|
||||||
end
|
end
|
||||||
if incrementVect[2] then
|
if incrementVect[2] then
|
||||||
while
|
while
|
||||||
|
|
@ -2173,7 +2171,7 @@ t.SetupStamperDragger = function(
|
||||||
)
|
)
|
||||||
== 0
|
== 0
|
||||||
do
|
do
|
||||||
innerStepVectIndex = innerStepVectIndex + 1
|
innerStepVectIndex += 1
|
||||||
end
|
end
|
||||||
if innerStepVectIndex < 4 then
|
if innerStepVectIndex < 4 then
|
||||||
stepVect[2] = stepVect[2]
|
stepVect[2] = stepVect[2]
|
||||||
|
|
@ -2182,7 +2180,7 @@ t.SetupStamperDragger = function(
|
||||||
incrementVect[2]
|
incrementVect[2]
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
innerStepVectIndex = innerStepVectIndex + 1
|
innerStepVectIndex += 1
|
||||||
else
|
else
|
||||||
stepVect[2] = Vector3.new(1, 0, 0)
|
stepVect[2] = Vector3.new(1, 0, 0)
|
||||||
innerStepVectIndex = 4 -- skip all remaining loops
|
innerStepVectIndex = 4 -- skip all remaining loops
|
||||||
|
|
@ -2202,7 +2200,7 @@ t.SetupStamperDragger = function(
|
||||||
)
|
)
|
||||||
== 0
|
== 0
|
||||||
do
|
do
|
||||||
outerStepVectIndex = outerStepVectIndex + 1
|
outerStepVectIndex += 1
|
||||||
end
|
end
|
||||||
if outerStepVectIndex < 4 then
|
if outerStepVectIndex < 4 then
|
||||||
stepVect[3] = stepVect[3]
|
stepVect[3] = stepVect[3]
|
||||||
|
|
@ -2211,7 +2209,7 @@ t.SetupStamperDragger = function(
|
||||||
incrementVect[3]
|
incrementVect[3]
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
outerStepVectIndex = outerStepVectIndex + 1
|
outerStepVectIndex += 1
|
||||||
else -- skip all remaining loops
|
else -- skip all remaining loops
|
||||||
stepVect[3] = Vector3.new(1, 0, 0)
|
stepVect[3] = Vector3.new(1, 0, 0)
|
||||||
outerStepVectIndex = 4
|
outerStepVectIndex = 4
|
||||||
|
|
@ -2395,8 +2393,8 @@ t.SetupStamperDragger = function(
|
||||||
|
|
||||||
-- something will be stamped! so set the "StampedSomething" toggle to true
|
-- something will be stamped! so set the "StampedSomething" toggle to true
|
||||||
if game:FindFirstChild "Players" then
|
if game:FindFirstChild "Players" then
|
||||||
if game.Players["LocalPlayer"] then
|
if game.Players.LocalPlayer then
|
||||||
if game.Players.LocalPlayer["Character"] then
|
if game.Players.LocalPlayer.Character then
|
||||||
local localChar = game.Players.LocalPlayer.Character
|
local localChar = game.Players.LocalPlayer.Character
|
||||||
local stampTracker = localChar:FindFirstChild "StampTracker"
|
local stampTracker = localChar:FindFirstChild "StampTracker"
|
||||||
if stampTracker and not stampTracker.Value then
|
if stampTracker and not stampTracker.Value then
|
||||||
|
|
@ -2545,7 +2543,7 @@ t.SetupStamperDragger = function(
|
||||||
|
|
||||||
local function getPlayer()
|
local function getPlayer()
|
||||||
if game:FindFirstChild "Players" then
|
if game:FindFirstChild "Players" then
|
||||||
if game.Players["LocalPlayer"] then
|
if game.Players.LocalPlayer then
|
||||||
return game.Players.LocalPlayer
|
return game.Players.LocalPlayer
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -2584,7 +2582,7 @@ t.SetupStamperDragger = function(
|
||||||
if playerNameTag ~= nil then
|
if playerNameTag ~= nil then
|
||||||
if
|
if
|
||||||
game:FindFirstChild "Players"
|
game:FindFirstChild "Players"
|
||||||
and game.Players["LocalPlayer"]
|
and game.Players.LocalPlayer
|
||||||
then
|
then
|
||||||
tempPlayerValue = game.Players.LocalPlayer
|
tempPlayerValue = game.Players.LocalPlayer
|
||||||
if tempPlayerValue ~= nil then
|
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!
|
{ 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
|
local isPositive = 1
|
||||||
if whichSurface < 0 then
|
if whichSurface < 0 then
|
||||||
isPositive = isPositive * -1
|
isPositive *= -1
|
||||||
whichSurface = whichSurface * -1
|
whichSurface *= -1
|
||||||
end
|
end
|
||||||
local surfaceNormal = isPositive
|
local surfaceNormal = isPositive
|
||||||
* modelCFrame:vectorToWorldSpace(AXIS_VECTORS[whichSurface])
|
* modelCFrame:vectorToWorldSpace(AXIS_VECTORS[whichSurface])
|
||||||
|
|
@ -2967,14 +2965,14 @@ t.SetupStamperDragger = function(
|
||||||
errorBox:Destroy()
|
errorBox:Destroy()
|
||||||
end
|
end
|
||||||
if stampData then
|
if stampData then
|
||||||
if stampData["Dragger"] then
|
if stampData.Dragger then
|
||||||
stampData.Dragger:Destroy()
|
stampData.Dragger:Destroy()
|
||||||
end
|
end
|
||||||
if stampData.CurrentParts then
|
if stampData.CurrentParts then
|
||||||
stampData.CurrentParts:Destroy()
|
stampData.CurrentParts:Destroy()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if control and control["Stamped"] then
|
if control and control.Stamped then
|
||||||
control.Stamped:Destroy()
|
control.Stamped:Destroy()
|
||||||
end
|
end
|
||||||
control = nil
|
control = nil
|
||||||
|
|
|
||||||
|
|
@ -49,9 +49,7 @@ local browsingMenu = false
|
||||||
local mouseEnterCons = {}
|
local mouseEnterCons = {}
|
||||||
local mouseClickCons = {}
|
local mouseClickCons = {}
|
||||||
|
|
||||||
local characterChildAddedCon
|
local characterChildAddedCon, characterChildRemovedCon, backpackAddCon
|
||||||
local characterChildRemovedCon
|
|
||||||
local backpackAddCon
|
|
||||||
|
|
||||||
local playerBackpack = waitForChild(player, "Backpack")
|
local playerBackpack = waitForChild(player, "Backpack")
|
||||||
|
|
||||||
|
|
@ -346,13 +344,13 @@ function resizeGrid()
|
||||||
local beginPos
|
local beginPos
|
||||||
buttonClone.DragBegin:connect(function(value)
|
buttonClone.DragBegin:connect(function(value)
|
||||||
waitForChild(buttonClone, "Background")
|
waitForChild(buttonClone, "Background")
|
||||||
buttonClone["Background"].ZIndex = 10
|
buttonClone.Background.ZIndex = 10
|
||||||
buttonClone.ZIndex = 10
|
buttonClone.ZIndex = 10
|
||||||
beginPos = value
|
beginPos = value
|
||||||
end)
|
end)
|
||||||
buttonClone.DragStopped:connect(function(x, y)
|
buttonClone.DragStopped:connect(function(x, y)
|
||||||
waitForChild(buttonClone, "Background")
|
waitForChild(buttonClone, "Background")
|
||||||
buttonClone["Background"].ZIndex = 1
|
buttonClone.Background.ZIndex = 1
|
||||||
buttonClone.ZIndex = 2
|
buttonClone.ZIndex = 2
|
||||||
if beginPos ~= buttonClone.Position then
|
if beginPos ~= buttonClone.Position then
|
||||||
if not checkForSwap(buttonClone, x, y) then
|
if not checkForSwap(buttonClone, x, y) then
|
||||||
|
|
@ -994,7 +992,7 @@ if not backpack.Visible then
|
||||||
end
|
end
|
||||||
|
|
||||||
-- make sure that inventory is listening to gear reparenting
|
-- 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()
|
setupCharacterConnections()
|
||||||
end
|
end
|
||||||
if not backpackAddCon then
|
if not backpackAddCon then
|
||||||
|
|
|
||||||
|
|
@ -221,7 +221,7 @@ function toggleBackpack()
|
||||||
if not game.Players.LocalPlayer then
|
if not game.Players.LocalPlayer then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if not game.Players.LocalPlayer["Character"] then
|
if not game.Players.LocalPlayer.Character then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if not canToggle then
|
if not canToggle then
|
||||||
|
|
@ -477,7 +477,7 @@ backpackButton.MouseButton1Click:connect(function()
|
||||||
toggleBackpack()
|
toggleBackpack()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
if game.Players.LocalPlayer["Character"] then
|
if game.Players.LocalPlayer.Character then
|
||||||
activateBackpack()
|
activateBackpack()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -921,12 +921,12 @@ local function GetNameValue(pName)
|
||||||
local cValue = string.byte(string.sub(pName, index, index))
|
local cValue = string.byte(string.sub(pName, index, index))
|
||||||
local reverseIndex = #pName - index + 1
|
local reverseIndex = #pName - index + 1
|
||||||
if #pName % 2 == 1 then
|
if #pName % 2 == 1 then
|
||||||
reverseIndex = reverseIndex - 1
|
reverseIndex -= 1
|
||||||
end
|
end
|
||||||
if reverseIndex % 4 >= 2 then
|
if reverseIndex % 4 >= 2 then
|
||||||
cValue = -cValue
|
cValue = -cValue
|
||||||
end
|
end
|
||||||
value = value + cValue
|
value += cValue
|
||||||
end
|
end
|
||||||
return value % 8
|
return value % 8
|
||||||
end
|
end
|
||||||
|
|
@ -994,9 +994,9 @@ end
|
||||||
-- local next = self.MessageQueue[i].Next
|
-- local next = self.MessageQueue[i].Next
|
||||||
-- local previous = self.MessageQueue[i].Previous
|
-- local previous = self.MessageQueue[i].Previous
|
||||||
-- if label and label:IsA('TextLabel') or label:IsA('TextButton') then
|
-- 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
|
-- label.Position = previous['Message'].Position
|
||||||
-- elseif value < 1 and next['Message'] then
|
-- elseif value < 1 and next.Message then
|
||||||
-- label.Position = previous['Message'].Position
|
-- label.Position = previous['Message'].Position
|
||||||
-- end
|
-- end
|
||||||
-- end
|
-- end
|
||||||
|
|
@ -1026,7 +1026,7 @@ function Chat:UpdateQueue(field, diff)
|
||||||
self.Configuration.XScale,
|
self.Configuration.XScale,
|
||||||
0,
|
0,
|
||||||
label.Position.Y.Scale
|
label.Position.Y.Scale
|
||||||
- field["Message"].Size.Y.Scale,
|
- field.Message.Size.Y.Scale,
|
||||||
0
|
0
|
||||||
)
|
)
|
||||||
-- Just to show up popping effect for the latest message in chat
|
-- Just to show up popping effect for the latest message in chat
|
||||||
|
|
@ -1037,7 +1037,7 @@ function Chat:UpdateQueue(field, diff)
|
||||||
- 0.2
|
- 0.2
|
||||||
wait(0.03)
|
wait(0.03)
|
||||||
end
|
end
|
||||||
if label == field["Message"] then
|
if label == field.Message then
|
||||||
label.TextStrokeTransparency = 0.8
|
label.TextStrokeTransparency = 0.8
|
||||||
else
|
else
|
||||||
label.TextStrokeTransparency = 1
|
label.TextStrokeTransparency = 1
|
||||||
|
|
@ -1048,7 +1048,7 @@ function Chat:UpdateQueue(field, diff)
|
||||||
self.Configuration.XScale,
|
self.Configuration.XScale,
|
||||||
0,
|
0,
|
||||||
label.Position.Y.Scale
|
label.Position.Y.Scale
|
||||||
- field["Message"].Size.Y.Scale,
|
- field.Message.Size.Y.Scale,
|
||||||
0
|
0
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
@ -1141,7 +1141,7 @@ function Chat:UpdateChat(cPlayer, message)
|
||||||
Chat.MessageThread = coroutine.create(function()
|
Chat.MessageThread = coroutine.create(function()
|
||||||
for i = 1, #Chat.Messages_List do
|
for i = 1, #Chat.Messages_List do
|
||||||
local field = Chat.Messages_List[i]
|
local field = Chat.Messages_List[i]
|
||||||
Chat:CreateMessage(field["Player"], field["Message"])
|
Chat:CreateMessage(field.Player, field.Message)
|
||||||
end
|
end
|
||||||
Chat.Messages_List = {}
|
Chat.Messages_List = {}
|
||||||
end)
|
end)
|
||||||
|
|
@ -1306,9 +1306,9 @@ function Chat:CreateMessage(cPlayer, message)
|
||||||
pLabel.Size = mLabel.Size
|
pLabel.Size = mLabel.Size
|
||||||
|
|
||||||
local queueField = {}
|
local queueField = {}
|
||||||
queueField["Player"] = pLabel
|
queueField.Player = pLabel
|
||||||
queueField["Message"] = mLabel
|
queueField.Message = mLabel
|
||||||
queueField["SpawnTime"] = tick() -- Used for identifying when to make the message invisible
|
queueField.SpawnTime = tick() -- Used for identifying when to make the message invisible
|
||||||
|
|
||||||
table.insert(self.MessageQueue, 1, queueField)
|
table.insert(self.MessageQueue, 1, queueField)
|
||||||
Chat:UpdateQueue(queueField)
|
Chat:UpdateQueue(queueField)
|
||||||
|
|
@ -1317,7 +1317,7 @@ end
|
||||||
function Chat:ScreenSizeChanged()
|
function Chat:ScreenSizeChanged()
|
||||||
wait()
|
wait()
|
||||||
while self.Frame.AbsoluteSize.Y > 120 do
|
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
|
end
|
||||||
Chat:RecalculateSpacing()
|
Chat:RecalculateSpacing()
|
||||||
end
|
end
|
||||||
|
|
@ -1374,7 +1374,7 @@ function Chat:CreateSafeChatOptions(list, rootButton)
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
count = count + 1
|
count += 1
|
||||||
|
|
||||||
if type(list[msg]) == "table" then
|
if type(list[msg]) == "table" then
|
||||||
text_List[rootButton][chatText] =
|
text_List[rootButton][chatText] =
|
||||||
|
|
@ -1438,7 +1438,7 @@ function Chat:FocusOnChatBar()
|
||||||
end
|
end
|
||||||
|
|
||||||
self.GotFocus = true
|
self.GotFocus = true
|
||||||
if self.Frame["Background"] then
|
if self.Frame.Background then
|
||||||
self.Frame.Background.Visible = false
|
self.Frame.Background.Visible = false
|
||||||
end
|
end
|
||||||
self.ChatBar:CaptureFocus()
|
self.ChatBar:CaptureFocus()
|
||||||
|
|
@ -1675,12 +1675,12 @@ function Input:OnMouseScroll()
|
||||||
while Input.Speed ~= 0 do
|
while Input.Speed ~= 0 do
|
||||||
if Input.Speed > 1 then
|
if Input.Speed > 1 then
|
||||||
while Input.Speed > 0 do
|
while Input.Speed > 0 do
|
||||||
Input.Speed = Input.Speed - 1
|
Input.Speed -= 1
|
||||||
wait(0.25)
|
wait(0.25)
|
||||||
end
|
end
|
||||||
elseif Input.Speed < 0 then
|
elseif Input.Speed < 0 then
|
||||||
while Input.Speed < 0 do
|
while Input.Speed < 0 do
|
||||||
Input.Speed = Input.Speed + 1
|
Input.Speed += 1
|
||||||
wait(0.25)
|
wait(0.25)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -1694,7 +1694,7 @@ function Input:OnMouseScroll()
|
||||||
end
|
end
|
||||||
|
|
||||||
function Input:ApplySpeed(value)
|
function Input:ApplySpeed(value)
|
||||||
Input.Speed = Input.Speed + value
|
Input.Speed += value
|
||||||
if not self.Simulating then
|
if not self.Simulating then
|
||||||
Input:OnMouseScroll()
|
Input:OnMouseScroll()
|
||||||
end
|
end
|
||||||
|
|
@ -1770,14 +1770,14 @@ function Chat:CullThread()
|
||||||
if #self.MessageQueue > 0 then
|
if #self.MessageQueue > 0 then
|
||||||
for _, field in pairs(self.MessageQueue) do
|
for _, field in pairs(self.MessageQueue) do
|
||||||
if
|
if
|
||||||
field["SpawnTime"]
|
field.SpawnTime
|
||||||
and field["Player"]
|
and field.Player
|
||||||
and field["Message"]
|
and field.Message
|
||||||
and tick() - field["SpawnTime"]
|
and tick() - field.SpawnTime
|
||||||
> self.Configuration.LifeTime
|
> self.Configuration.LifeTime
|
||||||
then
|
then
|
||||||
field["Player"].Visible = false
|
field.Player.Visible = false
|
||||||
field["Message"].Visible = false
|
field.Message.Visible = false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -181,8 +181,8 @@ settings().Diagnostics.LuaRamLimit = 0
|
||||||
--settings().Network.SendRate = 35
|
--settings().Network.SendRate = 35
|
||||||
--settings().Network.PhysicsSend = 0 -- 1==RoundRobin
|
--settings().Network.PhysicsSend = 0 -- 1==RoundRobin
|
||||||
|
|
||||||
--shared["__time"] = 0
|
--shared.__time = 0
|
||||||
--game:GetService("RunService").Stepped:connect(function (time) shared["__time"] = time end)
|
--game:GetService("RunService").Stepped:connect(function (time) shared.__time = time end)
|
||||||
|
|
||||||
if placeId ~= nil and killID ~= nil and deathID ~= nil and url ~= nil then
|
if placeId ~= nil and killID ~= nil and deathID ~= nil and url ~= nil then
|
||||||
-- listen for the death of a Player
|
-- listen for the death of a Player
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue