diff --git a/lua/107893730.lua b/lua/107893730.lua index 108f2d4..852c251 100644 --- a/lua/107893730.lua +++ b/lua/107893730.lua @@ -161,7 +161,7 @@ function signalPromptEnded(isSuccess) end -- make sure our gui displays the proper purchase data, and set the productid we will try and buy if use specifies a buy action -function updatePurchasePromptData(toggleColoredText) +function updatePurchasePromptData(_) local newItemDescription = "" -- id to use when we request a purchase @@ -199,7 +199,7 @@ end function doPlayerFundsCheck(checkIndefinitely) if checkingPlayerFunds then - canPurchase, insufficientFunds = canPurchaseItem() -- check again to see if we can buy item + local canPurchase, insufficientFunds = canPurchaseItem() -- check again to see if we can buy item if canPurchase and insufficientFunds then -- wait a bit and try a few more times local retries = 1000 while (retries > 0 or checkIndefinitely) and insufficientFunds and checkingPlayerFunds and canPurchase do @@ -344,7 +344,7 @@ function purchaseFailed(inGamePurchasesDisabled) end -- user has specified they want to buy an item, now try to attempt to buy it for them -function doAcceptPurchase(currencyPreferredByUser) +function doAcceptPurchase(_) showPurchasing() -- shows a purchasing ui (shows spinner) local startTime = tick() @@ -813,24 +813,24 @@ function canPurchaseItem() return true, insufficientFunds end -function computeSpaceString(pLabel) - local nString = " " - local tempSpaceLabel = Instance.new "TextButton" - tempSpaceLabel.Size = UDim2.new(0, pLabel.AbsoluteSize.X, 0, pLabel.AbsoluteSize.Y) - tempSpaceLabel.FontSize = pLabel.FontSize - tempSpaceLabel.Parent = pLabel.Parent - tempSpaceLabel.BackgroundTransparency = 1 - tempSpaceLabel.Text = nString - tempSpaceLabel.Name = "SpaceButton" +-- function computeSpaceString(pLabel) +-- local nString = " " +-- local tempSpaceLabel = Instance.new "TextButton" +-- tempSpaceLabel.Size = UDim2.new(0, pLabel.AbsoluteSize.X, 0, pLabel.AbsoluteSize.Y) +-- tempSpaceLabel.FontSize = pLabel.FontSize +-- tempSpaceLabel.Parent = pLabel.Parent +-- tempSpaceLabel.BackgroundTransparency = 1 +-- tempSpaceLabel.Text = nString +-- tempSpaceLabel.Name = "SpaceButton" - while tempSpaceLabel.TextBounds.X < pLabel.TextBounds.X do - nString = nString .. " " - tempSpaceLabel.Text = nString - end - nString = nString .. " " - tempSpaceLabel.Text = "" - return nString -end +-- while tempSpaceLabel.TextBounds.X < pLabel.TextBounds.X do +-- nString = nString .. " " +-- tempSpaceLabel.Text = nString +-- end +-- nString = nString .. " " +-- tempSpaceLabel.Text = "" +-- return nString +-- end ---------------------------------------------- End Data Functions ----------------------------------------------------- @@ -1149,7 +1149,7 @@ function setHeaderText(text) purchaseDialog.TitleBackdrop.Text = text end -function cutSizeInHalfRecursive(instance) +function cutSizeInHalfRecursive(_) -- todo: change the gui size based on how much space we have --[[changeSize(instance,0.5) @@ -1159,7 +1159,7 @@ function cutSizeInHalfRecursive(instance) end]] end -function doubleSizeRecursive(instance) +function doubleSizeRecursive(_) -- todo: change the gui size based on how much space we have --[[changeSize(instance,2) diff --git a/lua/153556783.lua b/lua/153556783.lua index 40e1bab..77a9a33 100644 --- a/lua/153556783.lua +++ b/lua/153556783.lua @@ -189,8 +189,8 @@ function followThumbstickTouchMove(thumbstickFrame, thumbstickOuter, touchLocati thumbstickFrame.Position = transformFromCenterToTopLeft(touchLocation, thumbstickFrame) -- a bit of error checking to make sure thumbsticks stay close to eachother - thumbstickFramePosition = Vector2.new(thumbstickFrame.Position.X.Offset, thumbstickFrame.Position.Y.Offset) - thumbstickOuterPosition = Vector2.new(thumbstickOuter.Position.X.Offset, thumbstickOuter.Position.Y.Offset) + local thumbstickFramePosition = Vector2.new(thumbstickFrame.Position.X.Offset, thumbstickFrame.Position.Y.Offset) + local thumbstickOuterPosition = Vector2.new(thumbstickOuter.Position.X.Offset, thumbstickOuter.Position.Y.Offset) if DistanceBetweenTwoPoints(thumbstickFramePosition, thumbstickOuterPosition) > thumbstickSize / 2 then local vectorWithLength = (thumbstickOuterPosition - thumbstickFramePosition).unit * thumbstickSize / 2 thumbstickOuter.Position = UDim2.new( @@ -573,7 +573,7 @@ function setupCameraControl(parentFrame, refreshCharacterMoveFunc) if cameraTouch == nil and not usedByThumbstick then cameraTouch = inputObject lastPos = Vector2.new(cameraTouch.Position.x, cameraTouch.Position.y) - lastTick = tick() + -- lastTick = tick() end end) userInputService.InputChanged:connect(function(inputObject) diff --git a/lua/157877000.lua b/lua/157877000.lua index d37aa8f..0bc6726 100644 --- a/lua/157877000.lua +++ b/lua/157877000.lua @@ -426,7 +426,7 @@ function initializeDeveloperConsole() Size = UDim2.new(0, 185, 0, 20), Font = "SourceSansBold", FontSize = Enum.FontSize.Size18, - Text = "Server Console", + -- Text = "Server Console", TextColor3 = Color3.new(1, 1, 1), Text = "Roblox Developer Console", TextYAlignment = Enum.TextYAlignment.Top, @@ -440,6 +440,9 @@ function initializeDeveloperConsole() local pSize = nil local previousMousePosScroll = nil + + local pScrollHandle = nil + local pOffset = nil local scrollUpIsDown = false diff --git a/lua/38037565.lua b/lua/38037565.lua index af7ab04..ea37dbe 100644 --- a/lua/38037565.lua +++ b/lua/38037565.lua @@ -111,7 +111,7 @@ myHealth.Changed:connect(setMaxHealth) -- Visual Effects -- -fireEffect = Instance.new "Fire" +local fireEffect = Instance.new "Fire" fireEffect.Heat = 0.1 fireEffect.Size = 3.0 fireEffect.Name = "FireEffect" @@ -125,11 +125,11 @@ while true do if health > 0 then -- and health < Humanoid.MaxHealth then local delta = 0 if config then - regen = config:FindFirstChild "Regen" - poison = config:FindFirstChild "Poison" - ice = config:FindFirstChild "Ice" - fire = config:FindFirstChild "Fire" - stun = config:FindFirstChild "Stun" + local regen = config:FindFirstChild "Regen" + local poison = config:FindFirstChild "Poison" + local ice = config:FindFirstChild "Ice" + local fire = config:FindFirstChild "Fire" + local stun = config:FindFirstChild "Stun" if regen then delta = delta + regen.Value.X if regen.Value.Y >= 0 then @@ -200,7 +200,7 @@ while true do else Torso.Anchored = false for i = 1, #backpackTools do - rbTool = backpackTools[i]:FindFirstChild "RobloxBuildTool" + local rbTool = backpackTools[i]:FindFirstChild "RobloxBuildTool" if rbTool then rbTool:Remove() end @@ -208,7 +208,7 @@ while true do end wait(0.2) for i = 1, #backpackTools do - wasInCharacter = backpackTools[i]:FindFirstChild "InCharTag" + local wasInChar = backpackTools[i]:FindFirstChild "InCharTag" if wasInChar then wasInChar:Remove() backpackTools[i].Parent = script.Parent @@ -221,8 +221,7 @@ while true do end if delta ~= 0 then - newCo = coroutine.create(billboardHealthChange) - coroutine.resume(newCo, delta) + coroutine.resume(coroutine.create(billboardHealthChange), delta) end --delta = delta * .01 end diff --git a/lua/39250920.lua b/lua/39250920.lua index 46a1bb7..0f1f30a 100644 --- a/lua/39250920.lua +++ b/lua/39250920.lua @@ -328,7 +328,7 @@ function initialize(parent) mainFrame.Style = Enum.FrameStyle.ChatBlue mainFrame.Visible = false - imageLabel = Instance.new "ImageLabel" + local imageLabel = Instance.new "ImageLabel" imageLabel.Name = "Tail" imageLabel.Size = UDim2.new(0, 62, 0, 53) imageLabel.Position = UDim2.new(1, 8, 0.25) @@ -354,7 +354,7 @@ function presentDialogChoices(talkingPart, dialogChoices) end currentConversationPartner = talkingPart - sortedDialogChoices = {} + local sortedDialogChoices = {} for _, obj in pairs(dialogChoices) do if obj:IsA "DialogChoice" then table.insert(sortedDialogChoices, obj) diff --git a/lua/45284430.lua b/lua/45284430.lua index 04cbf14..65bf793 100644 --- a/lua/45284430.lua +++ b/lua/45284430.lua @@ -681,7 +681,7 @@ t.LayoutGuiObjects = function(frame, guiObjects, settingsTable) if not frame:IsA "GuiObject" then error "Frame must be a GuiObject" end - for i, child in ipairs(guiObjects) do + for _, child in ipairs(guiObjects) do if not child:IsA "GuiObject" then error "All elements that are layed out must be of type GuiObject" end @@ -751,7 +751,7 @@ t.CreateSlider = function(steps, width, position) areaSoak.Visible = false areaSoak.ZIndex = 4 - sliderGui.AncestryChanged:connect(function(child, parent) + sliderGui.AncestryChanged:connect(function(_, parent) if parent == nil then areaSoak.Parent = nil else @@ -764,8 +764,6 @@ t.CreateSlider = function(steps, width, position) sliderPosition.Value = 0 sliderPosition.Parent = sliderGui - local id = math.random(1, 100) - local bar = Instance.new "TextButton" bar.Text = "" bar.AutoButtonColor = false @@ -1039,14 +1037,10 @@ t.CreateTrueScrollingFrame = function() return end - if lowY and lowY > instance.AbsolutePosition.Y then - lowY = instance.AbsolutePosition.Y - elseif not lowY then + if (lowY and lowY > instance.AbsolutePosition.Y) or not lowY then lowY = instance.AbsolutePosition.Y end - if highY and highY < (instance.AbsolutePosition.Y + instance.AbsoluteSize.Y) then - highY = instance.AbsolutePosition.Y + instance.AbsoluteSize.Y - elseif not highY then + if (highY and highY < (instance.AbsolutePosition.Y + instance.AbsoluteSize.Y)) or not highY then highY = instance.AbsolutePosition.Y + instance.AbsoluteSize.Y end local children = instance:GetChildren() @@ -1185,7 +1179,7 @@ t.CreateTrueScrollingFrame = function() local function scrollUp(mouseYPos) if scrollUpButton.Active then - scrollStamp = tick() + local scrollStamp = tick() local current = scrollStamp local upCon upCon = mouseDrag.MouseButton1Up:connect(function() @@ -1218,7 +1212,7 @@ t.CreateTrueScrollingFrame = function() local function scrollDown(mouseYPos) if scrollDownButton.Active then - scrollStamp = tick() + local scrollStamp = tick() local current = scrollStamp local downCon downCon = mouseDrag.MouseButton1Up:connect(function() @@ -1251,7 +1245,7 @@ t.CreateTrueScrollingFrame = function() scrollbar.MouseButton1Down:connect(function(x, y) if scrollbar.Active then - scrollStamp = tick() + local scrollStamp = tick() local mouseOffset = y - scrollbar.AbsolutePosition.y if dragCon then dragCon:disconnect() @@ -1261,7 +1255,6 @@ t.CreateTrueScrollingFrame = function() upCon:disconnect() upCon = nil end - local prevY = y local reentrancyGuardMouseScroll = false dragCon = mouseDrag.MouseMoved:connect(function(x, y) if reentrancyGuardMouseScroll then @@ -1603,7 +1596,7 @@ t.CreateScrollingFrame = function(orderList, scrollStyle) howManyDisplayed = 0 if orderList then - for i, child in ipairs(orderList) do + for _, child in ipairs(orderList) do if child.Parent == frame then table.insert(guiObjects, child) end @@ -1827,7 +1820,7 @@ t.CreateScrollingFrame = function(orderList, scrollStyle) end end - local y = 0 + -- local y = 0 scrollDrag.MouseButton1Down:connect(function(_, y) if scrollDrag.Active then scrollStamp = tick() @@ -2352,7 +2345,7 @@ t.CreateTextTutorialPage = function(name, text, skipTutorialFunc) textLabel.Size = UDim2.new(1, 0, 1, 0) local function handleResize(minSize, maxSize) - size = binaryShrink(minSize, maxSize, function(size) + local size = binaryShrink(minSize, maxSize, function(size) frame.Size = UDim2.new(0, size, 0, size) return textLabel.TextFits end) @@ -2377,7 +2370,7 @@ t.CreateImageTutorialPage = function(name, imageAsset, x, y, skipTutorialFunc, g imageLabel.Position = UDim2.new(0.5, -x / 2, 0.5, -y / 2) local function handleResize(minSize, maxSize) - size = binaryShrink(minSize, maxSize, function(size) + local size = binaryShrink(minSize, maxSize, function(size) return size >= x and size >= y end) if size >= x and size >= y then @@ -2450,843 +2443,839 @@ t.AddTutorialPage = function(tutorial, tutorialPage) end end -t.CreateSetPanel = function( - userIdsForSets, - objectSelected, - dialogClosed, - size, - position, - showAdminCategories, - useAssetVersionId -) - if not userIdsForSets then - error "CreateSetPanel: userIdsForSets (first arg) is nil, should be a table of number ids" - end - if type(userIdsForSets) ~= "table" and type(userIdsForSets) ~= "userdata" then - error( - "CreateSetPanel: userIdsForSets (first arg) is of type " - .. type(userIdsForSets) - .. ", should be of type table or userdata" - ) - end - if not objectSelected then - error "CreateSetPanel: objectSelected (second arg) is nil, should be a callback function!" - end - if type(objectSelected) ~= "function" then - error( - "CreateSetPanel: objectSelected (second arg) is of type " - .. type(objectSelected) - .. ", should be of type function!" - ) - end - if dialogClosed and type(dialogClosed) ~= "function" then - error( - "CreateSetPanel: dialogClosed (third arg) is of type " - .. type(dialogClosed) - .. ", should be of type function!" - ) - end - - if showAdminCategories == nil then -- by default, don't show beta sets - showAdminCategories = false - end - - local arrayPosition = 1 - local insertButtons = {} - local insertButtonCons = {} - local contents = nil - local setGui = nil - - -- used for water selections - local waterForceDirection = "NegX" - local waterForce = "None" - local waterGui, waterTypeChangedEvent = nil - - local Data = {} - Data.CurrentCategory = nil - Data.Category = {} - local SetCache = {} - - local userCategoryButtons = nil - - local buttonWidth = 64 - local buttonHeight = buttonWidth - - local SmallThumbnailUrl = nil - local LargeThumbnailUrl = nil - local BaseUrl = game:GetService("ContentProvider").BaseUrl:lower() - - if useAssetVersionId then - LargeThumbnailUrl = BaseUrl .. "Game/Tools/ThumbnailAsset.ashx?fmt=png&wd=420&ht=420&assetversionid=" - SmallThumbnailUrl = BaseUrl .. "Game/Tools/ThumbnailAsset.ashx?fmt=png&wd=75&ht=75&assetversionid=" - else - LargeThumbnailUrl = BaseUrl .. "Game/Tools/ThumbnailAsset.ashx?fmt=png&wd=420&ht=420&aid=" - SmallThumbnailUrl = BaseUrl .. "Game/Tools/ThumbnailAsset.ashx?fmt=png&wd=75&ht=75&aid=" - end - - local function drillDownSetZIndex(parent, index) - local children = parent:GetChildren() - for i = 1, #children do - if children[i]:IsA "GuiObject" then - children[i].ZIndex = index - end - drillDownSetZIndex(children[i], index) +t.CreateSetPanel = + function(userIdsForSets, objectSelected, dialogClosed, size, position, showAdminCategories, useAssetVersionId) + if not userIdsForSets then + error "CreateSetPanel: userIdsForSets (first arg) is nil, should be a table of number ids" end - end - - -- for terrain stamping - local currTerrainDropDownFrame = nil - local terrainShapes = - { "Block", "Vertical Ramp", "Corner Wedge", "Inverse Corner Wedge", "Horizontal Ramp", "Auto-Wedge" } - local terrainShapeMap = {} - for i = 1, #terrainShapes do - terrainShapeMap[terrainShapes[i]] = i - 1 - end - terrainShapeMap[terrainShapes[#terrainShapes]] = 6 - - local function createWaterGui() - local waterForceDirections = { "NegX", "X", "NegY", "Y", "NegZ", "Z" } - local waterForces = { "None", "Small", "Medium", "Strong", "Max" } - - local waterFrame = Instance.new "Frame" - waterFrame.Name = "WaterFrame" - waterFrame.Style = Enum.FrameStyle.RobloxSquare - waterFrame.Size = UDim2.new(0, 150, 0, 110) - waterFrame.Visible = false - - local waterForceLabel = Instance.new "TextLabel" - waterForceLabel.Name = "WaterForceLabel" - waterForceLabel.BackgroundTransparency = 1 - waterForceLabel.Size = UDim2.new(1, 0, 0, 12) - waterForceLabel.Font = Enum.Font.ArialBold - waterForceLabel.FontSize = Enum.FontSize.Size12 - waterForceLabel.TextColor3 = Color3.new(1, 1, 1) - waterForceLabel.TextXAlignment = Enum.TextXAlignment.Left - waterForceLabel.Text = "Water Force" - waterForceLabel.Parent = waterFrame - - local waterForceDirLabel = waterForceLabel:Clone() - waterForceDirLabel.Name = "WaterForceDirectionLabel" - waterForceDirLabel.Text = "Water Force Direction" - waterForceDirLabel.Position = UDim2.new(0, 0, 0, 50) - waterForceDirLabel.Parent = waterFrame - - local waterTypeChangedEvent = Instance.new "BindableEvent" - waterTypeChangedEvent.Name = "WaterTypeChangedEvent" - waterTypeChangedEvent.Parent = waterFrame - - local waterForceDirectionSelectedFunc = function(newForceDirection) - waterForceDirection = newForceDirection - waterTypeChangedEvent:Fire { waterForce, waterForceDirection } - end - local waterForceSelectedFunc = function(newForce) - waterForce = newForce - waterTypeChangedEvent:Fire { waterForce, waterForceDirection } - end - - local waterForceDirectionDropDown, forceWaterDirectionSelection = - t.CreateDropDownMenu(waterForceDirections, waterForceDirectionSelectedFunc) - waterForceDirectionDropDown.Size = UDim2.new(1, 0, 0, 25) - waterForceDirectionDropDown.Position = UDim2.new(0, 0, 1, 3) - forceWaterDirectionSelection "NegX" - waterForceDirectionDropDown.Parent = waterForceDirLabel - - local waterForceDropDown, forceWaterForceSelection = t.CreateDropDownMenu(waterForces, waterForceSelectedFunc) - forceWaterForceSelection "None" - waterForceDropDown.Size = UDim2.new(1, 0, 0, 25) - waterForceDropDown.Position = UDim2.new(0, 0, 1, 3) - waterForceDropDown.Parent = waterForceLabel - - return waterFrame, waterTypeChangedEvent - end - - -- Helper Function that contructs gui elements - local function createSetGui() - local setGui = Instance.new "ScreenGui" - setGui.Name = "SetGui" - - local setPanel = Instance.new "Frame" - setPanel.Name = "SetPanel" - setPanel.Active = true - setPanel.BackgroundTransparency = 1 - if position then - setPanel.Position = position - else - setPanel.Position = UDim2.new(0.2, 29, 0.1, 24) - end - if size then - setPanel.Size = size - else - setPanel.Size = UDim2.new(0.6, -58, 0.64, 0) - end - setPanel.Style = Enum.FrameStyle.RobloxRound - setPanel.ZIndex = 6 - setPanel.Parent = setGui - - -- Children of SetPanel - local itemPreview = Instance.new "Frame" - itemPreview.Name = "ItemPreview" - itemPreview.BackgroundTransparency = 1 - itemPreview.Position = UDim2.new(0.8, 5, 0.085, 0) - itemPreview.Size = UDim2.new(0.21, 0, 0.9, 0) - itemPreview.ZIndex = 6 - itemPreview.Parent = setPanel - - -- Children of ItemPreview - local textPanel = Instance.new "Frame" - textPanel.Name = "TextPanel" - textPanel.BackgroundTransparency = 1 - textPanel.Position = UDim2.new(0, 0, 0.45, 0) - textPanel.Size = UDim2.new(1, 0, 0.55, 0) - textPanel.ZIndex = 6 - textPanel.Parent = itemPreview - - -- Children of TextPanel - local rolloverText = Instance.new "TextLabel" - rolloverText.Name = "RolloverText" - rolloverText.BackgroundTransparency = 1 - rolloverText.Size = UDim2.new(1, 0, 0, 48) - rolloverText.ZIndex = 6 - rolloverText.Font = Enum.Font.ArialBold - rolloverText.FontSize = Enum.FontSize.Size24 - rolloverText.Text = "" - rolloverText.TextColor3 = Color3.new(1, 1, 1) - rolloverText.TextWrap = true - rolloverText.TextXAlignment = Enum.TextXAlignment.Left - rolloverText.TextYAlignment = Enum.TextYAlignment.Top - rolloverText.Parent = textPanel - - local largePreview = Instance.new "ImageLabel" - largePreview.Name = "LargePreview" - largePreview.BackgroundTransparency = 1 - largePreview.Image = "" - largePreview.Size = UDim2.new(1, 0, 0, 170) - largePreview.ZIndex = 6 - largePreview.Parent = itemPreview - - local sets = Instance.new "Frame" - sets.Name = "Sets" - sets.BackgroundTransparency = 1 - sets.Position = UDim2.new(0, 0, 0, 5) - sets.Size = UDim2.new(0.23, 0, 1, -5) - sets.ZIndex = 6 - sets.Parent = setPanel - - -- Children of Sets - local line = Instance.new "Frame" - line.Name = "Line" - line.BackgroundColor3 = Color3.new(1, 1, 1) - line.BackgroundTransparency = 0.7 - line.BorderSizePixel = 0 - line.Position = UDim2.new(1, -3, 0.06, 0) - line.Size = UDim2.new(0, 3, 0.9, 0) - line.ZIndex = 6 - line.Parent = sets - - local setsLists, controlFrame = t.CreateTrueScrollingFrame() - setsLists.Size = UDim2.new(1, -6, 0.94, 0) - setsLists.Position = UDim2.new(0, 0, 0.06, 0) - setsLists.BackgroundTransparency = 1 - setsLists.Name = "SetsLists" - setsLists.ZIndex = 6 - setsLists.Parent = sets - drillDownSetZIndex(controlFrame, 7) - - local setsHeader = Instance.new "TextLabel" - setsHeader.Name = "SetsHeader" - setsHeader.BackgroundTransparency = 1 - setsHeader.Size = UDim2.new(0, 47, 0, 24) - setsHeader.ZIndex = 6 - setsHeader.Font = Enum.Font.ArialBold - setsHeader.FontSize = Enum.FontSize.Size24 - setsHeader.Text = "Sets" - setsHeader.TextColor3 = Color3.new(1, 1, 1) - setsHeader.TextXAlignment = Enum.TextXAlignment.Left - setsHeader.TextYAlignment = Enum.TextYAlignment.Top - setsHeader.Parent = sets - - local cancelButton = Instance.new "TextButton" - cancelButton.Name = "CancelButton" - cancelButton.Position = UDim2.new(1, -32, 0, -2) - cancelButton.Size = UDim2.new(0, 34, 0, 34) - cancelButton.Style = Enum.ButtonStyle.RobloxButtonDefault - cancelButton.ZIndex = 6 - cancelButton.Text = "" - cancelButton.Modal = true - cancelButton.Parent = setPanel - - -- Children of Cancel Button - local cancelImage = Instance.new "ImageLabel" - cancelImage.Name = "CancelImage" - cancelImage.BackgroundTransparency = 1 - cancelImage.Image = "http://www.roblox.com/asset?id=54135717" - cancelImage.Position = UDim2.new(0, -2, 0, -2) - cancelImage.Size = UDim2.new(0, 16, 0, 16) - cancelImage.ZIndex = 6 - cancelImage.Parent = cancelButton - - return setGui - end - - local function createSetButton(text) - local setButton = Instance.new "TextButton" - - if text then - setButton.Text = text - else - setButton.Text = "" - end - - setButton.AutoButtonColor = false - setButton.BackgroundTransparency = 1 - setButton.BackgroundColor3 = Color3.new(1, 1, 1) - setButton.BorderSizePixel = 0 - setButton.Size = UDim2.new(1, -5, 0, 18) - setButton.ZIndex = 6 - setButton.Visible = false - setButton.Font = Enum.Font.Arial - setButton.FontSize = Enum.FontSize.Size18 - setButton.TextColor3 = Color3.new(1, 1, 1) - setButton.TextXAlignment = Enum.TextXAlignment.Left - - return setButton - end - - local function buildSetButton(name, setId, _, _, _) - local button = createSetButton(name) - button.Text = name - button.Name = "SetButton" - button.Visible = true - - local setValue = Instance.new "IntValue" - setValue.Name = "SetId" - setValue.Value = setId - setValue.Parent = button - - local setName = Instance.new "StringValue" - setName.Name = "SetName" - setName.Value = name - setName.Parent = button - - return button - end - - local function processCategory(sets) - local setButtons = {} - local numSkipped = 0 - for i = 1, #sets do - if not showAdminCategories and sets[i].Name == "Beta" then - numSkipped = numSkipped + 1 - else - setButtons[i - numSkipped] = - buildSetButton(sets[i].Name, sets[i].CategoryId, sets[i].ImageAssetId, i - numSkipped, #sets) - end - end - return setButtons - end - - local function handleResize() - wait() -- neccessary to insure heartbeat happened - - local itemPreview = setGui.SetPanel.ItemPreview - - itemPreview.LargePreview.Size = UDim2.new(1, 0, 0, itemPreview.AbsoluteSize.X) - itemPreview.LargePreview.Position = UDim2.new(0.5, -itemPreview.LargePreview.AbsoluteSize.X / 2, 0, 0) - itemPreview.TextPanel.Position = UDim2.new(0, 0, 0, itemPreview.LargePreview.AbsoluteSize.Y) - itemPreview.TextPanel.Size = - UDim2.new(1, 0, 0, itemPreview.AbsoluteSize.Y - itemPreview.LargePreview.AbsoluteSize.Y) - end - - local function makeInsertAssetButton() - local insertAssetButtonExample = Instance.new "Frame" - insertAssetButtonExample.Name = "InsertAssetButtonExample" - insertAssetButtonExample.Position = UDim2.new(0, 128, 0, 64) - insertAssetButtonExample.Size = UDim2.new(0, 64, 0, 64) - insertAssetButtonExample.BackgroundTransparency = 1 - insertAssetButtonExample.ZIndex = 6 - insertAssetButtonExample.Visible = false - - local assetId = Instance.new "IntValue" - assetId.Name = "AssetId" - assetId.Value = 0 - assetId.Parent = insertAssetButtonExample - - local assetName = Instance.new "StringValue" - assetName.Name = "AssetName" - assetName.Value = "" - assetName.Parent = insertAssetButtonExample - - local button = Instance.new "TextButton" - button.Name = "Button" - button.Text = "" - button.Style = Enum.ButtonStyle.RobloxButton - button.Position = UDim2.new(0.025, 0, 0.025, 0) - button.Size = UDim2.new(0.95, 0, 0.95, 0) - button.ZIndex = 6 - button.Parent = insertAssetButtonExample - - local buttonImage = Instance.new "ImageLabel" - buttonImage.Name = "ButtonImage" - buttonImage.Image = "" - buttonImage.Position = UDim2.new(0, -7, 0, -7) - buttonImage.Size = UDim2.new(1, 14, 1, 14) - buttonImage.BackgroundTransparency = 1 - buttonImage.ZIndex = 7 - buttonImage.Parent = button - - local configIcon = buttonImage:clone() - configIcon.Name = "ConfigIcon" - configIcon.Visible = false - configIcon.Position = UDim2.new(1, -23, 1, -24) - configIcon.Size = UDim2.new(0, 16, 0, 16) - configIcon.Image = "" - configIcon.ZIndex = 6 - configIcon.Parent = insertAssetButtonExample - - return insertAssetButtonExample - end - - local function showLargePreview(insertButton) - if insertButton:FindFirstChild "AssetId" then - delay(0, function() - game:GetService("ContentProvider"):Preload(LargeThumbnailUrl .. tostring(insertButton.AssetId.Value)) - setGui.SetPanel.ItemPreview.LargePreview.Image = LargeThumbnailUrl - .. tostring(insertButton.AssetId.Value) - end) - end - if insertButton:FindFirstChild "AssetName" then - setGui.SetPanel.ItemPreview.TextPanel.RolloverText.Text = insertButton.AssetName.Value - end - end - - local function selectTerrainShape(shape) - if currTerrainDropDownFrame then - objectSelected( - tostring(currTerrainDropDownFrame.AssetName.Value), - tonumber(currTerrainDropDownFrame.AssetId.Value), - shape + if type(userIdsForSets) ~= "table" and type(userIdsForSets) ~= "userdata" then + error( + "CreateSetPanel: userIdsForSets (first arg) is of type " + .. type(userIdsForSets) + .. ", should be of type table or userdata" + ) + end + if not objectSelected then + error "CreateSetPanel: objectSelected (second arg) is nil, should be a callback function!" + end + if type(objectSelected) ~= "function" then + error( + "CreateSetPanel: objectSelected (second arg) is of type " + .. type(objectSelected) + .. ", should be of type function!" + ) + end + if dialogClosed and type(dialogClosed) ~= "function" then + error( + "CreateSetPanel: dialogClosed (third arg) is of type " + .. type(dialogClosed) + .. ", should be of type function!" ) end - end - local function createTerrainTypeButton(name, parent) - local dropDownTextButton = Instance.new "TextButton" - dropDownTextButton.Name = name .. "Button" - dropDownTextButton.Font = Enum.Font.ArialBold - dropDownTextButton.FontSize = Enum.FontSize.Size14 - dropDownTextButton.BorderSizePixel = 0 - dropDownTextButton.TextColor3 = Color3.new(1, 1, 1) - dropDownTextButton.Text = name - dropDownTextButton.TextXAlignment = Enum.TextXAlignment.Left - dropDownTextButton.BackgroundTransparency = 1 - dropDownTextButton.ZIndex = parent.ZIndex + 1 - dropDownTextButton.Size = UDim2.new(0, parent.Size.X.Offset - 2, 0, 16) - dropDownTextButton.Position = UDim2.new(0, 1, 0, 0) + if showAdminCategories == nil then -- by default, don't show beta sets + showAdminCategories = false + end - dropDownTextButton.MouseEnter:connect(function() - dropDownTextButton.BackgroundTransparency = 0 - dropDownTextButton.TextColor3 = Color3.new(0, 0, 0) - end) + local arrayPosition = 1 + local insertButtons = {} + local insertButtonCons = {} + local contents = nil + local setGui = nil - dropDownTextButton.MouseLeave:connect(function() - dropDownTextButton.BackgroundTransparency = 1 - dropDownTextButton.TextColor3 = Color3.new(1, 1, 1) - end) + -- used for water selections + local waterForceDirection = "NegX" + local waterForce = "None" + local waterGui, waterTypeChangedEvent = nil - dropDownTextButton.MouseButton1Click:connect(function() - dropDownTextButton.BackgroundTransparency = 1 - dropDownTextButton.TextColor3 = Color3.new(1, 1, 1) - if dropDownTextButton.Parent and dropDownTextButton.Parent:IsA "GuiObject" then - dropDownTextButton.Parent.Visible = false + local Data = {} + Data.CurrentCategory = nil + Data.Category = {} + local SetCache = {} + + local userCategoryButtons = nil + + local buttonWidth = 64 + local buttonHeight = buttonWidth + + local SmallThumbnailUrl = nil + local LargeThumbnailUrl = nil + local BaseUrl = game:GetService("ContentProvider").BaseUrl:lower() + + if useAssetVersionId then + LargeThumbnailUrl = BaseUrl .. "Game/Tools/ThumbnailAsset.ashx?fmt=png&wd=420&ht=420&assetversionid=" + SmallThumbnailUrl = BaseUrl .. "Game/Tools/ThumbnailAsset.ashx?fmt=png&wd=75&ht=75&assetversionid=" + else + LargeThumbnailUrl = BaseUrl .. "Game/Tools/ThumbnailAsset.ashx?fmt=png&wd=420&ht=420&aid=" + SmallThumbnailUrl = BaseUrl .. "Game/Tools/ThumbnailAsset.ashx?fmt=png&wd=75&ht=75&aid=" + end + + local function drillDownSetZIndex(parent, index) + local children = parent:GetChildren() + for i = 1, #children do + if children[i]:IsA "GuiObject" then + children[i].ZIndex = index + end + drillDownSetZIndex(children[i], index) end - selectTerrainShape(terrainShapeMap[dropDownTextButton.Text]) - end) - - return dropDownTextButton - end - - local function createTerrainDropDownMenu(zIndex) - local dropDown = Instance.new "Frame" - dropDown.Name = "TerrainDropDown" - dropDown.BackgroundColor3 = Color3.new(0, 0, 0) - dropDown.BorderColor3 = Color3.new(1, 0, 0) - dropDown.Size = UDim2.new(0, 200, 0, 0) - dropDown.Visible = false - dropDown.ZIndex = zIndex - dropDown.Parent = setGui + end + -- for terrain stamping + local currTerrainDropDownFrame = nil + local terrainShapes = + { "Block", "Vertical Ramp", "Corner Wedge", "Inverse Corner Wedge", "Horizontal Ramp", "Auto-Wedge" } + local terrainShapeMap = {} for i = 1, #terrainShapes do - local shapeButton = createTerrainTypeButton(terrainShapes[i], dropDown) - shapeButton.Position = UDim2.new(0, 1, 0, (i - 1) * shapeButton.Size.Y.Offset) - shapeButton.Parent = dropDown - dropDown.Size = UDim2.new(0, 200, 0, dropDown.Size.Y.Offset + shapeButton.Size.Y.Offset) + terrainShapeMap[terrainShapes[i]] = i - 1 end + terrainShapeMap[terrainShapes[#terrainShapes]] = 6 - dropDown.MouseLeave:connect(function() - dropDown.Visible = false - end) - end + local function createWaterGui() + local waterForceDirections = { "NegX", "X", "NegY", "Y", "NegZ", "Z" } + local waterForces = { "None", "Small", "Medium", "Strong", "Max" } - local function createDropDownMenuButton(parent) - local dropDownButton = Instance.new "ImageButton" - dropDownButton.Name = "DropDownButton" - dropDownButton.Image = "http://www.roblox.com/asset/?id=67581509" - dropDownButton.BackgroundTransparency = 1 - dropDownButton.Size = UDim2.new(0, 16, 0, 16) - dropDownButton.Position = UDim2.new(1, -24, 0, 6) - dropDownButton.ZIndex = parent.ZIndex + 2 - dropDownButton.Parent = parent + local waterFrame = Instance.new "Frame" + waterFrame.Name = "WaterFrame" + waterFrame.Style = Enum.FrameStyle.RobloxSquare + waterFrame.Size = UDim2.new(0, 150, 0, 110) + waterFrame.Visible = false - if not setGui:FindFirstChild "TerrainDropDown" then - createTerrainDropDownMenu(8) - end + local waterForceLabel = Instance.new "TextLabel" + waterForceLabel.Name = "WaterForceLabel" + waterForceLabel.BackgroundTransparency = 1 + waterForceLabel.Size = UDim2.new(1, 0, 0, 12) + waterForceLabel.Font = Enum.Font.ArialBold + waterForceLabel.FontSize = Enum.FontSize.Size12 + waterForceLabel.TextColor3 = Color3.new(1, 1, 1) + waterForceLabel.TextXAlignment = Enum.TextXAlignment.Left + waterForceLabel.Text = "Water Force" + waterForceLabel.Parent = waterFrame - dropDownButton.MouseButton1Click:connect(function() - setGui.TerrainDropDown.Visible = true - setGui.TerrainDropDown.Position = UDim2.new(0, parent.AbsolutePosition.X, 0, parent.AbsolutePosition.Y) - currTerrainDropDownFrame = parent - end) - end + local waterForceDirLabel = waterForceLabel:Clone() + waterForceDirLabel.Name = "WaterForceDirectionLabel" + waterForceDirLabel.Text = "Water Force Direction" + waterForceDirLabel.Position = UDim2.new(0, 0, 0, 50) + waterForceDirLabel.Parent = waterFrame - local function buildInsertButton() - local insertButton = makeInsertAssetButton() - insertButton.Name = "InsertAssetButton" - insertButton.Visible = true + local waterTypeChangedEvent = Instance.new "BindableEvent" + waterTypeChangedEvent.Name = "WaterTypeChangedEvent" + waterTypeChangedEvent.Parent = waterFrame - if Data.Category[Data.CurrentCategory].SetName == "High Scalability" then - createDropDownMenuButton(insertButton) - end - - local lastEnter = nil - local mouseEnterCon = insertButton.MouseEnter:connect(function() - lastEnter = insertButton - delay(0.1, function() - if lastEnter == insertButton then - showLargePreview(insertButton) - end - end) - end) - return insertButton, mouseEnterCon - end - - local function realignButtonGrid(columns) - local x = 0 - local y = 0 - for i = 1, #insertButtons do - insertButtons[i].Position = UDim2.new(0, buttonWidth * x, 0, buttonHeight * y) - x = x + 1 - if x >= columns then - x = 0 - y = y + 1 + local waterForceDirectionSelectedFunc = function(newForceDirection) + waterForceDirection = newForceDirection + waterTypeChangedEvent:Fire { waterForce, waterForceDirection } end - end - end - - local function setInsertButtonImageBehavior(insertFrame, visible, name, assetId) - if visible then - insertFrame.AssetName.Value = name - insertFrame.AssetId.Value = assetId - local newImageUrl = SmallThumbnailUrl .. assetId - if newImageUrl ~= insertFrame.Button.ButtonImage.Image then - delay(0, function() - game:GetService("ContentProvider"):Preload(SmallThumbnailUrl .. assetId) - insertFrame.Button.ButtonImage.Image = SmallThumbnailUrl .. assetId - end) - end - table.insert( - insertButtonCons, - insertFrame.Button.MouseButton1Click:connect(function() - -- special case for water, show water selection gui - local isWaterSelected = (name == "Water") - and (Data.Category[Data.CurrentCategory].SetName == "High Scalability") - waterGui.Visible = isWaterSelected - if isWaterSelected then - objectSelected(name, tonumber(assetId), nil) - else - objectSelected(name, tonumber(assetId)) - end - end) - ) - insertFrame.Visible = true - else - insertFrame.Visible = false - end - end - - local function loadSectionOfItems(setGui, rows, columns) - local pageSize = rows * columns - - if arrayPosition > #contents then - return - end - - local origArrayPos = arrayPosition - - local yCopy = 0 - for i = 1, pageSize + 1 do - if arrayPosition >= #contents + 1 then - break + local waterForceSelectedFunc = function(newForce) + waterForce = newForce + waterTypeChangedEvent:Fire { waterForce, waterForceDirection } end - local buttonCon - insertButtons[arrayPosition], buttonCon = buildInsertButton() - table.insert(insertButtonCons, buttonCon) - insertButtons[arrayPosition].Parent = setGui.SetPanel.ItemsFrame - arrayPosition = arrayPosition + 1 + local waterForceDirectionDropDown, forceWaterDirectionSelection = + t.CreateDropDownMenu(waterForceDirections, waterForceDirectionSelectedFunc) + waterForceDirectionDropDown.Size = UDim2.new(1, 0, 0, 25) + waterForceDirectionDropDown.Position = UDim2.new(0, 0, 1, 3) + forceWaterDirectionSelection "NegX" + waterForceDirectionDropDown.Parent = waterForceDirLabel + + local waterForceDropDown, forceWaterForceSelection = + t.CreateDropDownMenu(waterForces, waterForceSelectedFunc) + forceWaterForceSelection "None" + waterForceDropDown.Size = UDim2.new(1, 0, 0, 25) + waterForceDropDown.Position = UDim2.new(0, 0, 1, 3) + waterForceDropDown.Parent = waterForceLabel + + return waterFrame, waterTypeChangedEvent end - realignButtonGrid(columns) - local indexCopy = origArrayPos - for index = origArrayPos, arrayPosition do - if insertButtons[index] then - if contents[index] then - -- we don't want water to have a drop down button - if contents[index].Name == "Water" then - if Data.Category[Data.CurrentCategory].SetName == "High Scalability" then - insertButtons[index]:FindFirstChild("DropDownButton", true):Destroy() - end - end + -- Helper Function that contructs gui elements + local function createSetGui() + local setGui = Instance.new "ScreenGui" + setGui.Name = "SetGui" - local assetId - if useAssetVersionId then - assetId = contents[index].AssetVersionId - else - assetId = contents[index].AssetId - end - setInsertButtonImageBehavior(insertButtons[index], true, contents[index].Name, assetId) + local setPanel = Instance.new "Frame" + setPanel.Name = "SetPanel" + setPanel.Active = true + setPanel.BackgroundTransparency = 1 + if position then + setPanel.Position = position + else + setPanel.Position = UDim2.new(0.2, 29, 0.1, 24) + end + if size then + setPanel.Size = size + else + setPanel.Size = UDim2.new(0.6, -58, 0.64, 0) + end + setPanel.Style = Enum.FrameStyle.RobloxRound + setPanel.ZIndex = 6 + setPanel.Parent = setGui + + -- Children of SetPanel + local itemPreview = Instance.new "Frame" + itemPreview.Name = "ItemPreview" + itemPreview.BackgroundTransparency = 1 + itemPreview.Position = UDim2.new(0.8, 5, 0.085, 0) + itemPreview.Size = UDim2.new(0.21, 0, 0.9, 0) + itemPreview.ZIndex = 6 + itemPreview.Parent = setPanel + + -- Children of ItemPreview + local textPanel = Instance.new "Frame" + textPanel.Name = "TextPanel" + textPanel.BackgroundTransparency = 1 + textPanel.Position = UDim2.new(0, 0, 0.45, 0) + textPanel.Size = UDim2.new(1, 0, 0.55, 0) + textPanel.ZIndex = 6 + textPanel.Parent = itemPreview + + -- Children of TextPanel + local rolloverText = Instance.new "TextLabel" + rolloverText.Name = "RolloverText" + rolloverText.BackgroundTransparency = 1 + rolloverText.Size = UDim2.new(1, 0, 0, 48) + rolloverText.ZIndex = 6 + rolloverText.Font = Enum.Font.ArialBold + rolloverText.FontSize = Enum.FontSize.Size24 + rolloverText.Text = "" + rolloverText.TextColor3 = Color3.new(1, 1, 1) + rolloverText.TextWrap = true + rolloverText.TextXAlignment = Enum.TextXAlignment.Left + rolloverText.TextYAlignment = Enum.TextYAlignment.Top + rolloverText.Parent = textPanel + + local largePreview = Instance.new "ImageLabel" + largePreview.Name = "LargePreview" + largePreview.BackgroundTransparency = 1 + largePreview.Image = "" + largePreview.Size = UDim2.new(1, 0, 0, 170) + largePreview.ZIndex = 6 + largePreview.Parent = itemPreview + + local sets = Instance.new "Frame" + sets.Name = "Sets" + sets.BackgroundTransparency = 1 + sets.Position = UDim2.new(0, 0, 0, 5) + sets.Size = UDim2.new(0.23, 0, 1, -5) + sets.ZIndex = 6 + sets.Parent = setPanel + + -- Children of Sets + local line = Instance.new "Frame" + line.Name = "Line" + line.BackgroundColor3 = Color3.new(1, 1, 1) + line.BackgroundTransparency = 0.7 + line.BorderSizePixel = 0 + line.Position = UDim2.new(1, -3, 0.06, 0) + line.Size = UDim2.new(0, 3, 0.9, 0) + line.ZIndex = 6 + line.Parent = sets + + local setsLists, controlFrame = t.CreateTrueScrollingFrame() + setsLists.Size = UDim2.new(1, -6, 0.94, 0) + setsLists.Position = UDim2.new(0, 0, 0.06, 0) + setsLists.BackgroundTransparency = 1 + setsLists.Name = "SetsLists" + setsLists.ZIndex = 6 + setsLists.Parent = sets + drillDownSetZIndex(controlFrame, 7) + + local setsHeader = Instance.new "TextLabel" + setsHeader.Name = "SetsHeader" + setsHeader.BackgroundTransparency = 1 + setsHeader.Size = UDim2.new(0, 47, 0, 24) + setsHeader.ZIndex = 6 + setsHeader.Font = Enum.Font.ArialBold + setsHeader.FontSize = Enum.FontSize.Size24 + setsHeader.Text = "Sets" + setsHeader.TextColor3 = Color3.new(1, 1, 1) + setsHeader.TextXAlignment = Enum.TextXAlignment.Left + setsHeader.TextYAlignment = Enum.TextYAlignment.Top + setsHeader.Parent = sets + + local cancelButton = Instance.new "TextButton" + cancelButton.Name = "CancelButton" + cancelButton.Position = UDim2.new(1, -32, 0, -2) + cancelButton.Size = UDim2.new(0, 34, 0, 34) + cancelButton.Style = Enum.ButtonStyle.RobloxButtonDefault + cancelButton.ZIndex = 6 + cancelButton.Text = "" + cancelButton.Modal = true + cancelButton.Parent = setPanel + + -- Children of Cancel Button + local cancelImage = Instance.new "ImageLabel" + cancelImage.Name = "CancelImage" + cancelImage.BackgroundTransparency = 1 + cancelImage.Image = "http://www.roblox.com/asset?id=54135717" + cancelImage.Position = UDim2.new(0, -2, 0, -2) + cancelImage.Size = UDim2.new(0, 16, 0, 16) + cancelImage.ZIndex = 6 + cancelImage.Parent = cancelButton + + return setGui + end + + local function createSetButton(text) + local setButton = Instance.new "TextButton" + + if text then + setButton.Text = text + else + setButton.Text = "" + end + + setButton.AutoButtonColor = false + setButton.BackgroundTransparency = 1 + setButton.BackgroundColor3 = Color3.new(1, 1, 1) + setButton.BorderSizePixel = 0 + setButton.Size = UDim2.new(1, -5, 0, 18) + setButton.ZIndex = 6 + setButton.Visible = false + setButton.Font = Enum.Font.Arial + setButton.FontSize = Enum.FontSize.Size18 + setButton.TextColor3 = Color3.new(1, 1, 1) + setButton.TextXAlignment = Enum.TextXAlignment.Left + + return setButton + end + + local function buildSetButton(name, setId, _, _, _) + local button = createSetButton(name) + button.Text = name + button.Name = "SetButton" + button.Visible = true + + local setValue = Instance.new "IntValue" + setValue.Name = "SetId" + setValue.Value = setId + setValue.Parent = button + + local setName = Instance.new "StringValue" + setName.Name = "SetName" + setName.Value = name + setName.Parent = button + + return button + end + + local function processCategory(sets) + local setButtons = {} + local numSkipped = 0 + for i = 1, #sets do + if not showAdminCategories and sets[i].Name == "Beta" then + numSkipped = numSkipped + 1 else - break + setButtons[i - numSkipped] = + buildSetButton(sets[i].Name, sets[i].CategoryId, sets[i].ImageAssetId, i - numSkipped, #sets) end - else - break end - indexCopy = index + return setButtons end - end - local function setSetIndex() - Data.Category[Data.CurrentCategory].Index = 0 + local function handleResize() + wait() -- neccessary to insure heartbeat happened - rows = 7 - columns = math.floor(setGui.SetPanel.ItemsFrame.AbsoluteSize.X / buttonWidth) + local itemPreview = setGui.SetPanel.ItemPreview - contents = Data.Category[Data.CurrentCategory].Contents - if contents then - -- remove our buttons and their connections - for i = 1, #insertButtons do - insertButtons[i]:remove() - end - for i = 1, #insertButtonCons do - if insertButtonCons[i] then - insertButtonCons[i]:disconnect() - end - end - insertButtonCons = {} - insertButtons = {} - - arrayPosition = 1 - loadSectionOfItems(setGui, rows, columns) + itemPreview.LargePreview.Size = UDim2.new(1, 0, 0, itemPreview.AbsoluteSize.X) + itemPreview.LargePreview.Position = UDim2.new(0.5, -itemPreview.LargePreview.AbsoluteSize.X / 2, 0, 0) + itemPreview.TextPanel.Position = UDim2.new(0, 0, 0, itemPreview.LargePreview.AbsoluteSize.Y) + itemPreview.TextPanel.Size = + UDim2.new(1, 0, 0, itemPreview.AbsoluteSize.Y - itemPreview.LargePreview.AbsoluteSize.Y) end - end - local function selectSet(button, setName, setId, _) - if button and Data.Category[Data.CurrentCategory] ~= nil then - if button ~= Data.Category[Data.CurrentCategory].Button then - Data.Category[Data.CurrentCategory].Button = button + local function makeInsertAssetButton() + local insertAssetButtonExample = Instance.new "Frame" + insertAssetButtonExample.Name = "InsertAssetButtonExample" + insertAssetButtonExample.Position = UDim2.new(0, 128, 0, 64) + insertAssetButtonExample.Size = UDim2.new(0, 64, 0, 64) + insertAssetButtonExample.BackgroundTransparency = 1 + insertAssetButtonExample.ZIndex = 6 + insertAssetButtonExample.Visible = false - if SetCache[setId] == nil then - SetCache[setId] = game:GetService("InsertService"):GetCollection(setId) - end - Data.Category[Data.CurrentCategory].Contents = SetCache[setId] + local assetId = Instance.new "IntValue" + assetId.Name = "AssetId" + assetId.Value = 0 + assetId.Parent = insertAssetButtonExample - Data.Category[Data.CurrentCategory].SetName = setName - Data.Category[Data.CurrentCategory].SetId = setId - end - setSetIndex() + local assetName = Instance.new "StringValue" + assetName.Name = "AssetName" + assetName.Value = "" + assetName.Parent = insertAssetButtonExample + + local button = Instance.new "TextButton" + button.Name = "Button" + button.Text = "" + button.Style = Enum.ButtonStyle.RobloxButton + button.Position = UDim2.new(0.025, 0, 0.025, 0) + button.Size = UDim2.new(0.95, 0, 0.95, 0) + button.ZIndex = 6 + button.Parent = insertAssetButtonExample + + local buttonImage = Instance.new "ImageLabel" + buttonImage.Name = "ButtonImage" + buttonImage.Image = "" + buttonImage.Position = UDim2.new(0, -7, 0, -7) + buttonImage.Size = UDim2.new(1, 14, 1, 14) + buttonImage.BackgroundTransparency = 1 + buttonImage.ZIndex = 7 + buttonImage.Parent = button + + local configIcon = buttonImage:clone() + configIcon.Name = "ConfigIcon" + configIcon.Visible = false + configIcon.Position = UDim2.new(1, -23, 1, -24) + configIcon.Size = UDim2.new(0, 16, 0, 16) + configIcon.Image = "" + configIcon.ZIndex = 6 + configIcon.Parent = insertAssetButtonExample + + return insertAssetButtonExample end - end - local function selectCategoryPage(buttons, _) - if buttons ~= Data.CurrentCategory then - if Data.CurrentCategory then - for _, button in pairs(Data.CurrentCategory) do - button.Visible = false - end + local function showLargePreview(insertButton) + if insertButton:FindFirstChild "AssetId" then + delay(0, function() + game:GetService("ContentProvider"):Preload( + LargeThumbnailUrl .. tostring(insertButton.AssetId.Value) + ) + setGui.SetPanel.ItemPreview.LargePreview.Image = LargeThumbnailUrl + .. tostring(insertButton.AssetId.Value) + end) end + if insertButton:FindFirstChild "AssetName" then + setGui.SetPanel.ItemPreview.TextPanel.RolloverText.Text = insertButton.AssetName.Value + end + end - Data.CurrentCategory = buttons - if Data.Category[Data.CurrentCategory] == nil then - Data.Category[Data.CurrentCategory] = {} - if #buttons > 0 then - selectSet(buttons[1], buttons[1].SetName.Value, buttons[1].SetId.Value, 0) - end - else - Data.Category[Data.CurrentCategory].Button = nil - selectSet( - Data.Category[Data.CurrentCategory].ButtonFrame, - Data.Category[Data.CurrentCategory].SetName, - Data.Category[Data.CurrentCategory].SetId, - Data.Category[Data.CurrentCategory].Index + local function selectTerrainShape(shape) + if currTerrainDropDownFrame then + objectSelected( + tostring(currTerrainDropDownFrame.AssetName.Value), + tonumber(currTerrainDropDownFrame.AssetId.Value), + shape ) end end - end - local function selectCategory(category) - selectCategoryPage(category, 0) - end + local function createTerrainTypeButton(name, parent) + local dropDownTextButton = Instance.new "TextButton" + dropDownTextButton.Name = name .. "Button" + dropDownTextButton.Font = Enum.Font.ArialBold + dropDownTextButton.FontSize = Enum.FontSize.Size14 + dropDownTextButton.BorderSizePixel = 0 + dropDownTextButton.TextColor3 = Color3.new(1, 1, 1) + dropDownTextButton.Text = name + dropDownTextButton.TextXAlignment = Enum.TextXAlignment.Left + dropDownTextButton.BackgroundTransparency = 1 + dropDownTextButton.ZIndex = parent.ZIndex + 1 + dropDownTextButton.Size = UDim2.new(0, parent.Size.X.Offset - 2, 0, 16) + dropDownTextButton.Position = UDim2.new(0, 1, 0, 0) - local function resetAllSetButtonSelection() - local setButtons = setGui.SetPanel.Sets.SetsLists:GetChildren() - for i = 1, #setButtons do - if setButtons[i]:IsA "TextButton" then - setButtons[i].Selected = false - setButtons[i].BackgroundTransparency = 1 - setButtons[i].TextColor3 = Color3.new(1, 1, 1) - setButtons[i].BackgroundColor3 = Color3.new(1, 1, 1) - end - end - end + dropDownTextButton.MouseEnter:connect(function() + dropDownTextButton.BackgroundTransparency = 0 + dropDownTextButton.TextColor3 = Color3.new(0, 0, 0) + end) - local function populateSetsFrame() - local currRow = 0 - for i = 1, #userCategoryButtons do - local button = userCategoryButtons[i] - button.Visible = true - button.Position = UDim2.new(0, 5, 0, currRow * button.Size.Y.Offset) - button.Parent = setGui.SetPanel.Sets.SetsLists + dropDownTextButton.MouseLeave:connect(function() + dropDownTextButton.BackgroundTransparency = 1 + dropDownTextButton.TextColor3 = Color3.new(1, 1, 1) + end) - if i == 1 then -- we will have this selected by default, so show it - button.Selected = true - button.BackgroundColor3 = Color3.new(0, 204 / 255, 0) - button.TextColor3 = Color3.new(0, 0, 0) - button.BackgroundTransparency = 0 - end - - button.MouseEnter:connect(function() - if not button.Selected then - button.BackgroundTransparency = 0 - button.TextColor3 = Color3.new(0, 0, 0) + dropDownTextButton.MouseButton1Click:connect(function() + dropDownTextButton.BackgroundTransparency = 1 + dropDownTextButton.TextColor3 = Color3.new(1, 1, 1) + if dropDownTextButton.Parent and dropDownTextButton.Parent:IsA "GuiObject" then + dropDownTextButton.Parent.Visible = false end - end) - button.MouseLeave:connect(function() - if not button.Selected then - button.BackgroundTransparency = 1 - button.TextColor3 = Color3.new(1, 1, 1) - end - end) - button.MouseButton1Click:connect(function() - resetAllSetButtonSelection() - button.Selected = not button.Selected - button.BackgroundColor3 = Color3.new(0, 204 / 255, 0) - button.TextColor3 = Color3.new(0, 0, 0) - button.BackgroundTransparency = 0 - selectSet(button, button.Text, userCategoryButtons[i].SetId.Value, 0) + selectTerrainShape(terrainShapeMap[dropDownTextButton.Text]) end) - currRow = currRow + 1 + return dropDownTextButton end - local buttons = setGui.SetPanel.Sets.SetsLists:GetChildren() + local function createTerrainDropDownMenu(zIndex) + local dropDown = Instance.new "Frame" + dropDown.Name = "TerrainDropDown" + dropDown.BackgroundColor3 = Color3.new(0, 0, 0) + dropDown.BorderColor3 = Color3.new(1, 0, 0) + dropDown.Size = UDim2.new(0, 200, 0, 0) + dropDown.Visible = false + dropDown.ZIndex = zIndex + dropDown.Parent = setGui - -- set first category as loaded for default - if buttons then - for i = 1, #buttons do - if buttons[i]:IsA "TextButton" then - selectSet(buttons[i], buttons[i].Text, userCategoryButtons[i].SetId.Value, 0) - selectCategory(userCategoryButtons) - break + for i = 1, #terrainShapes do + local shapeButton = createTerrainTypeButton(terrainShapes[i], dropDown) + shapeButton.Position = UDim2.new(0, 1, 0, (i - 1) * shapeButton.Size.Y.Offset) + shapeButton.Parent = dropDown + dropDown.Size = UDim2.new(0, 200, 0, dropDown.Size.Y.Offset + shapeButton.Size.Y.Offset) + end + + dropDown.MouseLeave:connect(function() + dropDown.Visible = false + end) + end + + local function createDropDownMenuButton(parent) + local dropDownButton = Instance.new "ImageButton" + dropDownButton.Name = "DropDownButton" + dropDownButton.Image = "http://www.roblox.com/asset/?id=67581509" + dropDownButton.BackgroundTransparency = 1 + dropDownButton.Size = UDim2.new(0, 16, 0, 16) + dropDownButton.Position = UDim2.new(1, -24, 0, 6) + dropDownButton.ZIndex = parent.ZIndex + 2 + dropDownButton.Parent = parent + + if not setGui:FindFirstChild "TerrainDropDown" then + createTerrainDropDownMenu(8) + end + + dropDownButton.MouseButton1Click:connect(function() + setGui.TerrainDropDown.Visible = true + setGui.TerrainDropDown.Position = UDim2.new(0, parent.AbsolutePosition.X, 0, parent.AbsolutePosition.Y) + currTerrainDropDownFrame = parent + end) + end + + local function buildInsertButton() + local insertButton = makeInsertAssetButton() + insertButton.Name = "InsertAssetButton" + insertButton.Visible = true + + if Data.Category[Data.CurrentCategory].SetName == "High Scalability" then + createDropDownMenuButton(insertButton) + end + + local lastEnter = nil + local mouseEnterCon = insertButton.MouseEnter:connect(function() + lastEnter = insertButton + delay(0.1, function() + if lastEnter == insertButton then + showLargePreview(insertButton) + end + end) + end) + return insertButton, mouseEnterCon + end + + local function realignButtonGrid(columns) + local x = 0 + local y = 0 + for i = 1, #insertButtons do + insertButtons[i].Position = UDim2.new(0, buttonWidth * x, 0, buttonHeight * y) + x = x + 1 + if x >= columns then + x = 0 + y = y + 1 end end end - end - setGui = createSetGui() - waterGui, waterTypeChangedEvent = createWaterGui() - waterGui.Position = UDim2.new(0, 55, 0, 0) - waterGui.Parent = setGui - setGui.Changed:connect(function(prop) -- this resizes the preview image to always be the right size - if prop == "AbsoluteSize" then - handleResize() - setSetIndex() + local function setInsertButtonImageBehavior(insertFrame, visible, name, assetId) + if visible then + insertFrame.AssetName.Value = name + insertFrame.AssetId.Value = assetId + local newImageUrl = SmallThumbnailUrl .. assetId + if newImageUrl ~= insertFrame.Button.ButtonImage.Image then + delay(0, function() + game:GetService("ContentProvider"):Preload(SmallThumbnailUrl .. assetId) + insertFrame.Button.ButtonImage.Image = SmallThumbnailUrl .. assetId + end) + end + table.insert( + insertButtonCons, + insertFrame.Button.MouseButton1Click:connect(function() + -- special case for water, show water selection gui + local isWaterSelected = (name == "Water") + and (Data.Category[Data.CurrentCategory].SetName == "High Scalability") + waterGui.Visible = isWaterSelected + if isWaterSelected then + objectSelected(name, tonumber(assetId), nil) + else + objectSelected(name, tonumber(assetId)) + end + end) + ) + insertFrame.Visible = true + else + insertFrame.Visible = false + end end - end) - local scrollFrame, controlFrame = t.CreateTrueScrollingFrame() - scrollFrame.Size = UDim2.new(0.54, 0, 0.85, 0) - scrollFrame.Position = UDim2.new(0.24, 0, 0.085, 0) - scrollFrame.Name = "ItemsFrame" - scrollFrame.ZIndex = 6 - scrollFrame.Parent = setGui.SetPanel - scrollFrame.BackgroundTransparency = 1 + local function loadSectionOfItems(setGui, rows, columns) + local pageSize = rows * columns - drillDownSetZIndex(controlFrame, 7) - - controlFrame.Parent = setGui.SetPanel - controlFrame.Position = UDim2.new(0.76, 5, 0, 0) - - local debounce = false - controlFrame.ScrollBottom.Changed:connect(function(_) - if controlFrame.ScrollBottom.Value == true then - if debounce then + if arrayPosition > #contents then return end - debounce = true - loadSectionOfItems(setGui, rows, columns) - debounce = false - end - end) - local userData = {} - for id = 1, #userIdsForSets do - local newUserData = game:GetService("InsertService"):GetUserSets(userIdsForSets[id]) - if newUserData and #newUserData > 2 then - -- start at #3 to skip over My Decals and My Models for each account - for category = 3, #newUserData do - if newUserData[category].Name == "High Scalability" then -- we want high scalability parts to show first - table.insert(userData, 1, newUserData[category]) + local origArrayPos = arrayPosition + + for _ = 1, pageSize + 1 do + if arrayPosition >= #contents + 1 then + break + end + + local buttonCon + insertButtons[arrayPosition], buttonCon = buildInsertButton() + table.insert(insertButtonCons, buttonCon) + insertButtons[arrayPosition].Parent = setGui.SetPanel.ItemsFrame + arrayPosition = arrayPosition + 1 + end + realignButtonGrid(columns) + + -- local indexCopy = origArrayPos + for index = origArrayPos, arrayPosition do + if insertButtons[index] then + if contents[index] then + -- we don't want water to have a drop down button + if contents[index].Name == "Water" then + if Data.Category[Data.CurrentCategory].SetName == "High Scalability" then + insertButtons[index]:FindFirstChild("DropDownButton", true):Destroy() + end + end + + local assetId + if useAssetVersionId then + assetId = contents[index].AssetVersionId + else + assetId = contents[index].AssetId + end + setInsertButtonImageBehavior(insertButtons[index], true, contents[index].Name, assetId) + else + break + end else - table.insert(userData, newUserData[category]) + break + end + -- indexCopy = index + end + end + + local function setSetIndex() + Data.Category[Data.CurrentCategory].Index = 0 + + local rows = 7 + local columns = math.floor(setGui.SetPanel.ItemsFrame.AbsoluteSize.X / buttonWidth) + + contents = Data.Category[Data.CurrentCategory].Contents + if contents then + -- remove our buttons and their connections + for i = 1, #insertButtons do + insertButtons[i]:remove() + end + for i = 1, #insertButtonCons do + if insertButtonCons[i] then + insertButtonCons[i]:disconnect() + end + end + insertButtonCons = {} + insertButtons = {} + + arrayPosition = 1 + loadSectionOfItems(setGui, rows, columns) + end + end + + local function selectSet(button, setName, setId, _) + if button and Data.Category[Data.CurrentCategory] ~= nil then + if button ~= Data.Category[Data.CurrentCategory].Button then + Data.Category[Data.CurrentCategory].Button = button + + if SetCache[setId] == nil then + SetCache[setId] = game:GetService("InsertService"):GetCollection(setId) + end + Data.Category[Data.CurrentCategory].Contents = SetCache[setId] + + Data.Category[Data.CurrentCategory].SetName = setName + Data.Category[Data.CurrentCategory].SetId = setId + end + setSetIndex() + end + end + + local function selectCategoryPage(buttons, _) + if buttons ~= Data.CurrentCategory then + if Data.CurrentCategory then + for _, button in pairs(Data.CurrentCategory) do + button.Visible = false + end + end + + Data.CurrentCategory = buttons + if Data.Category[Data.CurrentCategory] == nil then + Data.Category[Data.CurrentCategory] = {} + if #buttons > 0 then + selectSet(buttons[1], buttons[1].SetName.Value, buttons[1].SetId.Value, 0) + end + else + Data.Category[Data.CurrentCategory].Button = nil + selectSet( + Data.Category[Data.CurrentCategory].ButtonFrame, + Data.Category[Data.CurrentCategory].SetName, + Data.Category[Data.CurrentCategory].SetId, + Data.Category[Data.CurrentCategory].Index + ) end end end - end - if userData then - userCategoryButtons = processCategory(userData) - end - rows = math.floor(setGui.SetPanel.ItemsFrame.AbsoluteSize.Y / buttonHeight) - columns = math.floor(setGui.SetPanel.ItemsFrame.AbsoluteSize.X / buttonWidth) - - populateSetsFrame() - - insertPanelCloseCon = setGui.SetPanel.CancelButton.MouseButton1Click:connect(function() - setGui.SetPanel.Visible = false - if dialogClosed then - dialogClosed() + local function selectCategory(category) + selectCategoryPage(category, 0) end - end) - local setVisibilityFunction = function(visible) - if visible then - setGui.SetPanel.Visible = true - else - setGui.SetPanel.Visible = false - end - end - - local getVisibilityFunction = function() - if setGui then - if setGui:FindFirstChild "SetPanel" then - return setGui.SetPanel.Visible + local function resetAllSetButtonSelection() + local setButtons = setGui.SetPanel.Sets.SetsLists:GetChildren() + for i = 1, #setButtons do + if setButtons[i]:IsA "TextButton" then + setButtons[i].Selected = false + setButtons[i].BackgroundTransparency = 1 + setButtons[i].TextColor3 = Color3.new(1, 1, 1) + setButtons[i].BackgroundColor3 = Color3.new(1, 1, 1) + end end end - return false - end + local function populateSetsFrame() + local currRow = 0 + for i = 1, #userCategoryButtons do + local button = userCategoryButtons[i] + button.Visible = true + button.Position = UDim2.new(0, 5, 0, currRow * button.Size.Y.Offset) + button.Parent = setGui.SetPanel.Sets.SetsLists - return setGui, setVisibilityFunction, getVisibilityFunction, waterTypeChangedEvent -end + if i == 1 then -- we will have this selected by default, so show it + button.Selected = true + button.BackgroundColor3 = Color3.new(0, 204 / 255, 0) + button.TextColor3 = Color3.new(0, 0, 0) + button.BackgroundTransparency = 0 + end + + button.MouseEnter:connect(function() + if not button.Selected then + button.BackgroundTransparency = 0 + button.TextColor3 = Color3.new(0, 0, 0) + end + end) + button.MouseLeave:connect(function() + if not button.Selected then + button.BackgroundTransparency = 1 + button.TextColor3 = Color3.new(1, 1, 1) + end + end) + button.MouseButton1Click:connect(function() + resetAllSetButtonSelection() + button.Selected = not button.Selected + button.BackgroundColor3 = Color3.new(0, 204 / 255, 0) + button.TextColor3 = Color3.new(0, 0, 0) + button.BackgroundTransparency = 0 + selectSet(button, button.Text, userCategoryButtons[i].SetId.Value, 0) + end) + + currRow = currRow + 1 + end + + local buttons = setGui.SetPanel.Sets.SetsLists:GetChildren() + + -- set first category as loaded for default + if buttons then + for i = 1, #buttons do + if buttons[i]:IsA "TextButton" then + selectSet(buttons[i], buttons[i].Text, userCategoryButtons[i].SetId.Value, 0) + selectCategory(userCategoryButtons) + break + end + end + end + end + + setGui = createSetGui() + waterGui, waterTypeChangedEvent = createWaterGui() + waterGui.Position = UDim2.new(0, 55, 0, 0) + waterGui.Parent = setGui + setGui.Changed:connect(function(prop) -- this resizes the preview image to always be the right size + if prop == "AbsoluteSize" then + handleResize() + setSetIndex() + end + end) + + local scrollFrame, controlFrame = t.CreateTrueScrollingFrame() + scrollFrame.Size = UDim2.new(0.54, 0, 0.85, 0) + scrollFrame.Position = UDim2.new(0.24, 0, 0.085, 0) + scrollFrame.Name = "ItemsFrame" + scrollFrame.ZIndex = 6 + scrollFrame.Parent = setGui.SetPanel + scrollFrame.BackgroundTransparency = 1 + + drillDownSetZIndex(controlFrame, 7) + + controlFrame.Parent = setGui.SetPanel + controlFrame.Position = UDim2.new(0.76, 5, 0, 0) + + local debounce = false + controlFrame.ScrollBottom.Changed:connect(function(_) + if controlFrame.ScrollBottom.Value == true then + if debounce then + return + end + debounce = true + loadSectionOfItems(setGui, rows, columns) + debounce = false + end + end) + + local userData = {} + for id = 1, #userIdsForSets do + local newUserData = game:GetService("InsertService"):GetUserSets(userIdsForSets[id]) + if newUserData and #newUserData > 2 then + -- start at #3 to skip over My Decals and My Models for each account + for category = 3, #newUserData do + if newUserData[category].Name == "High Scalability" then -- we want high scalability parts to show first + table.insert(userData, 1, newUserData[category]) + else + table.insert(userData, newUserData[category]) + end + end + end + end + if userData then + userCategoryButtons = processCategory(userData) + end + + rows = math.floor(setGui.SetPanel.ItemsFrame.AbsoluteSize.Y / buttonHeight) + columns = math.floor(setGui.SetPanel.ItemsFrame.AbsoluteSize.X / buttonWidth) + + populateSetsFrame() + + --[[local insertPanelCloseCon = ]] + setGui.SetPanel.CancelButton.MouseButton1Click:connect(function() + setGui.SetPanel.Visible = false + if dialogClosed then + dialogClosed() + end + end) + + local setVisibilityFunction = function(visible) + if visible then + setGui.SetPanel.Visible = true + else + setGui.SetPanel.Visible = false + end + end + + local getVisibilityFunction = function() + if setGui then + if setGui:FindFirstChild "SetPanel" then + return setGui.SetPanel.Visible + end + end + + return false + end + + return setGui, setVisibilityFunction, getVisibilityFunction, waterTypeChangedEvent + end t.CreateTerrainMaterialSelector = function(size, position) local terrainMaterialSelectionChanged = Instance.new "BindableEvent" diff --git a/lua/46295863.lua b/lua/46295863.lua index 090342f..b59b634 100644 --- a/lua/46295863.lua +++ b/lua/46295863.lua @@ -33,8 +33,8 @@ local recordingVideo = false local currentMenuSelection = nil local lastMenuSelection = {} -local defaultPosition = UDim2.new(0, 0, 0, 0) -local newGuiPlaces = { 0, 41324860 } +-- local defaultPosition = UDim2.new(0, 0, 0, 0) +-- local newGuiPlaces = { 0, 41324860 } local centerDialogs = {} local mainShield = nil @@ -53,7 +53,7 @@ end local function robloxLock(instance) instance.RobloxLocked = true - children = instance:GetChildren() + local children = instance:GetChildren() if children then for _, child in ipairs(children) do robloxLock(child) @@ -1312,7 +1312,7 @@ local function createGameSettingsMenu(baseZIndex, _) backButton.ZIndex = baseZIndex + 4 backButton.Parent = gameSettingsMenuFrame - local syncVideoCaptureSetting + syncVideoCaptureSetting = nil if not macClient then local videoCaptureLabel = Instance.new "TextLabel" @@ -1937,7 +1937,7 @@ if LoadLibrary then shield.BackgroundTransparency = 0.4 shield.ZIndex = baseZIndex + 1 - local closeAndResetDialgo + local closeAndResetDialog local messageBoxButtons = {} messageBoxButtons[1] = {} @@ -2037,7 +2037,7 @@ if LoadLibrary then local children = players:GetChildren() local pos = 1 if children then - for i, player in ipairs(children) do + for _, player in ipairs(children) do if player:IsA "Player" and player ~= localPlayer then playerNames[pos] = player.Name nameToPlayer[player.Name] = player @@ -2229,90 +2229,90 @@ if LoadLibrary then return shield end - local createChatBar = function() - --Only show a chat bar if we are a NetworkClient - waitForChild(game, "NetworkClient") + -- local createChatBar = function() + -- --Only show a chat bar if we are a NetworkClient + -- waitForChild(game, "NetworkClient") - waitForChild(game, "Players") - waitForProperty(game.Players, "LocalPlayer") + -- waitForChild(game, "Players") + -- waitForProperty(game.Players, "LocalPlayer") - local chatBar = Instance.new "Frame" - chatBar.Name = "ChatBar" - chatBar.Size = UDim2.new(1, 0, 0, 22) - chatBar.Position = UDim2.new(0, 0, 1, 0) - chatBar.BackgroundColor3 = Color3.new(0, 0, 0) - chatBar.BorderSizePixel = 0 + -- local chatBar = Instance.new "Frame" + -- chatBar.Name = "ChatBar" + -- chatBar.Size = UDim2.new(1, 0, 0, 22) + -- chatBar.Position = UDim2.new(0, 0, 1, 0) + -- chatBar.BackgroundColor3 = Color3.new(0, 0, 0) + -- chatBar.BorderSizePixel = 0 - local chatBox = Instance.new "TextBox" - chatBox.Text = "" - chatBox.Visible = false - chatBox.Size = UDim2.new(1, -4, 1, 0) - chatBox.Position = UDim2.new(0, 2, 0, 0) - chatBox.TextXAlignment = Enum.TextXAlignment.Left - chatBox.Font = Enum.Font.Arial - chatBox.ClearTextOnFocus = false - chatBox.FontSize = Enum.FontSize.Size14 - chatBox.TextColor3 = Color3.new(1, 1, 1) - chatBox.BackgroundTransparency = 1 - --chatBox.Parent = chatBar + -- local chatBox = Instance.new "TextBox" + -- chatBox.Text = "" + -- chatBox.Visible = false + -- chatBox.Size = UDim2.new(1, -4, 1, 0) + -- chatBox.Position = UDim2.new(0, 2, 0, 0) + -- chatBox.TextXAlignment = Enum.TextXAlignment.Left + -- chatBox.Font = Enum.Font.Arial + -- chatBox.ClearTextOnFocus = false + -- chatBox.FontSize = Enum.FontSize.Size14 + -- chatBox.TextColor3 = Color3.new(1, 1, 1) + -- chatBox.BackgroundTransparency = 1 + -- --chatBox.Parent = chatBar - local chatButton = Instance.new "TextButton" - chatButton.Size = UDim2.new(1, -4, 1, 0) - chatButton.Position = UDim2.new(0, 2, 0, 0) - chatButton.AutoButtonColor = false - chatButton.Text = 'To chat click here or press "/" key' - chatButton.TextXAlignment = Enum.TextXAlignment.Left - chatButton.Font = Enum.Font.Arial - chatButton.FontSize = Enum.FontSize.Size14 - chatButton.TextColor3 = Color3.new(1, 1, 1) - chatButton.BackgroundTransparency = 1 - --chatButton.Parent = chatBar + -- local chatButton = Instance.new "TextButton" + -- chatButton.Size = UDim2.new(1, -4, 1, 0) + -- chatButton.Position = UDim2.new(0, 2, 0, 0) + -- chatButton.AutoButtonColor = false + -- chatButton.Text = 'To chat click here or press "/" key' + -- chatButton.TextXAlignment = Enum.TextXAlignment.Left + -- chatButton.Font = Enum.Font.Arial + -- chatButton.FontSize = Enum.FontSize.Size14 + -- chatButton.TextColor3 = Color3.new(1, 1, 1) + -- chatButton.BackgroundTransparency = 1 + -- --chatButton.Parent = chatBar - local activateChat = function() - if chatBox.Visible then - return - end - chatButton.Visible = false - chatBox.Text = "" - chatBox.Visible = true - chatBox:CaptureFocus() - end + -- local activateChat = function() + -- if chatBox.Visible then + -- return + -- end + -- chatButton.Visible = false + -- chatBox.Text = "" + -- chatBox.Visible = true + -- chatBox:CaptureFocus() + -- end - chatButton.MouseButton1Click:connect(activateChat) + -- chatButton.MouseButton1Click:connect(activateChat) - -- local hotKeyEnabled = true - local toggleHotKey = function(_) - -- hotKeyEnabled = value - end + -- -- local hotKeyEnabled = true + -- local toggleHotKey = function(_) + -- -- hotKeyEnabled = value + -- end - -- local guiService = game:GetService "GuiService" - --[[local newChatMode = ]]pcall(function() - --guiService:AddSpecialKey(Enum.SpecialKey.ChatHotkey) - --guiService.SpecialKeyPressed:connect(function(key) if key == Enum.SpecialKey.ChatHotkey and hotKeyEnabled then activateChat() end end) - end) - -- if not newChatMode then - --guiService:AddKey("/") - --guiService.KeyPressed:connect(function(key) if key == "/" and hotKeyEnabled then activateChat() end end) - -- end + -- -- local guiService = game:GetService "GuiService" + -- --[[local newChatMode = ]]pcall(function() + -- --guiService:AddSpecialKey(Enum.SpecialKey.ChatHotkey) + -- --guiService.SpecialKeyPressed:connect(function(key) if key == Enum.SpecialKey.ChatHotkey and hotKeyEnabled then activateChat() end end) + -- end) + -- -- if not newChatMode then + -- --guiService:AddKey("/") + -- --guiService.KeyPressed:connect(function(key) if key == "/" and hotKeyEnabled then activateChat() end end) + -- -- end - chatBox.FocusLost:connect(function(enterPressed) - if enterPressed then - if chatBox.Text ~= "" then - local str = chatBox.Text - if string.sub(str, 1, 1) == "%" then - game.Players:TeamChat(string.sub(str, 2)) - else - game.Players:Chat(str) - end - end - end - chatBox.Text = "" - chatBox.Visible = false - chatButton.Visible = true - end) - robloxLock(chatBar) - return chatBar, toggleHotKey - end + -- chatBox.FocusLost:connect(function(enterPressed) + -- if enterPressed then + -- if chatBox.Text ~= "" then + -- local str = chatBox.Text + -- if string.sub(str, 1, 1) == "%" then + -- game.Players:TeamChat(string.sub(str, 2)) + -- else + -- game.Players:Chat(str) + -- end + -- end + -- end + -- chatBox.Text = "" + -- chatBox.Visible = false + -- chatButton.Visible = true + -- end) + -- robloxLock(chatBar) + -- return chatBar, toggleHotKey + -- end --Spawn a thread for the Save dialogs local isSaveDialogSupported = pcall(function() @@ -2355,12 +2355,13 @@ if LoadLibrary then end) --Spawn a thread for Chat Bar - --[[local success, luaChat = ]]pcall(function() + --[[local success, luaChat = ]] + pcall(function() return game.GuiService.UseLuaChat end) -- if success and luaChat then - --[[delay(0, + --[[delay(0, function() waitForChild(game, "Players") waitForProperty(game.Players, "LocalPlayer") diff --git a/lua/48488235.lua b/lua/48488235.lua index 2ffb2dc..544a0a7 100644 --- a/lua/48488235.lua +++ b/lua/48488235.lua @@ -904,7 +904,6 @@ local NeutralTeam = nil -- final 'to be displayed' list of frames local MiddleFrames = {} local MiddleFrameBackgrounds = {} -local MiddleFrameHeight = 0.03 -- time of last click local LastClick = 0 local ButtonCooldown = 0.25 @@ -1459,7 +1458,7 @@ end used when leaderstats are removed, or when new leaderstats are added(for weird edge case)+ --]] function RemoveAllStats(playerEntry) - for i, val in ipairs(ScoreNames) do + for _, val in ipairs(ScoreNames) do StatRemoved(val, playerEntry) end end @@ -1789,7 +1788,7 @@ function UpdateMaximize() i.Background.Image = "http://www.roblox.com/asset/?id=" .. Images["midLight"] end end - for index, i in ipairs(MiddleFrames) do + for _, i in ipairs(MiddleFrames) do if i:FindFirstChild "ClickListener" then i.ClickListener.Size = UDim2.new(0.96, 0, i.ClickListener.Size.Y.Scale, 0) for j = 1, #ScoreNames, 1 do @@ -2447,8 +2446,8 @@ function InsertPlayerFrame(nplayer) dropShadow.Position = nFrame.TitleFrame.Title.Position + UDim2.new(0, 1, 0, 1) dropShadow.Name = "DropShadow" dropShadow.Parent = nFrame.TitleFrame - -- else - -- --Delay(2, function () OnFriendshipChanged(nplayer,LocalPlayer:GetFriendStatus(nplayer)) end) + -- else + -- --Delay(2, function () OnFriendshipChanged(nplayer,LocalPlayer:GetFriendStatus(nplayer)) end) end nFrame.TitleFrame.Title.Font = "ArialBold" @@ -2471,7 +2470,7 @@ function InsertPlayerFrame(nplayer) end else local addedToTeam = false - for i, tval in ipairs(TeamFrames) do + for _, tval in ipairs(TeamFrames) do if tval["MyTeam"].TeamColor == nplayer.TeamColor then AddPlayerToTeam(tval, nentry) nentry["MyTeam"] = tval @@ -2621,7 +2620,7 @@ end tentries table of team entries --]] function SortTeams(tentries) - for i, val in ipairs(tentries) do + for _, val in ipairs(tentries) do table.sort(val["MyPlayers"], PlayerSortFunction) AddTeamScores(val) end diff --git a/lua/53878057.lua b/lua/53878057.lua index bf3919f..3c9dd26 100644 --- a/lua/53878057.lua +++ b/lua/53878057.lua @@ -81,7 +81,7 @@ local backpackManager = waitForChild(guiBackpack, "CoreScripts/BackpackScripts/B local backpackOpenEvent = waitForChild(backpackManager, "BackpackOpenEvent") local backpackCloseEvent = waitForChild(backpackManager, "BackpackCloseEvent") local tabClickedEvent = waitForChild(backpackManager, "TabClickedEvent") -local resizeEvent = waitForChild(backpackManager, "ResizeEvent") +-- local resizeEvent = waitForChild(backpackManager, "ResizeEvent") local inGearTab = true @@ -275,7 +275,7 @@ function insertGear(gear, addToSlot) end) end -function reorganizeLoadout(gear, inserting, equipped, addToSlot) +function reorganizeLoadout(gear, inserting, _, addToSlot) if inserting then -- add in gear insertGear(gear, addToSlot) else @@ -304,11 +304,10 @@ function checkToolAncestry(child, parent) gearSlots[i].Selected = false end return true - else - gearSlots[i].Kill.Value = true - return false end - return true + + gearSlots[i].Kill.Value = true + return false end end end @@ -501,7 +500,6 @@ normalizeButton = function(button, speed) if button:IsA "ImageButton" or button:IsA "TextButton" then button.ZIndex = 1 - local inverseEnlarge = 1 / enlargeFactor local centerizeX = -(buttonSizeNormal.X.Scale - button.Size.X.Scale) / 2 local centerizeY = -(buttonSizeNormal.Y.Scale - button.Size.Y.Scale) / 2 button:TweenSizeAndPosition( @@ -604,10 +602,10 @@ function resolveDrag(gearClone, x, y) end end - if x < frame.AbsolutePosition.x or x > (frame.AbsolutePosition.x + frame.AbsoluteSize.x) then - reorganizeLoadout(gearClone, false) - return false - elseif y < frame.AbsolutePosition.y or y > (frame.AbsolutePosition.y + frame.AbsoluteSize.y) then + if + (x < frame.AbsolutePosition.x or x > (frame.AbsolutePosition.x + frame.AbsoluteSize.x)) + or (y < frame.AbsolutePosition.y or y > (frame.AbsolutePosition.y + frame.AbsoluteSize.y)) + then reorganizeLoadout(gearClone, false) return false else @@ -649,7 +647,7 @@ function showToolTip(button, tip) end end -function hideToolTip(button, tip) +function hideToolTip(button, _) if button and button:FindFirstChild "ToolTipLabel" and button.ToolTipLabel:IsA "TextLabel" then button.ToolTipLabel.Visible = false end @@ -1128,7 +1126,7 @@ player.ChildAdded:connect(function(child) end) waitForProperty(player, "Character") -for i, v in ipairs(player.Character:GetChildren()) do +for _, v in ipairs(player.Character:GetChildren()) do playerCharacterChildAdded(v) end characterChildAddedCon = player.Character.ChildAdded:connect(function(child) diff --git a/lua/60595411.lua b/lua/60595411.lua index 32f068e..5268e57 100644 --- a/lua/60595411.lua +++ b/lua/60595411.lua @@ -43,7 +43,6 @@ local setmetatable = setmetatable local pairs = pairs local ipairs = ipairs local assert = assert -local Chipmunk = Chipmunk local StringBuilder = { buffer = {}, @@ -458,6 +457,10 @@ end -------------------- End JSON Parser ------------------------ t.DecodeJSON = function(jsonString) + pcall(function() + warn "RbxUtility.DecodeJSON is deprecated, please use Game:GetService('HttpService'):JSONDecode() instead." + end) + if type(jsonString) == "string" then return Decode(jsonString) end @@ -466,6 +469,9 @@ t.DecodeJSON = function(jsonString) end t.EncodeJSON = function(jsonTable) + pcall(function() + warn "RbxUtility.EncodeJSON is deprecated, please use Game:GetService('HttpService'):JSONEncode() instead." + end) return Encode(jsonTable) end @@ -528,13 +534,12 @@ t.SelectTerrainRegion = function(regionToSelect, color, selectEmptyCells, select selectionPart.Anchored = true selectionPart.Locked = true selectionPart.CanCollide = false - selectionPart.FormFactor = Enum.FormFactor.Custom selectionPart.Size = Vector3.new(4.2, 4.2, 4.2) local selectionBox = Instance.new "SelectionBox" -- srs translation from region3 to region3int16 - -- function Region3ToRegion3int16(region3) + -- local function Region3ToRegion3int16(region3) -- local theLowVec = region3.CFrame.p - (region3.Size / 2) + Vector3.new(2, 2, 2) -- local lowCell = WorldToCellPreferSolid(terrain, theLowVec) @@ -749,8 +754,11 @@ function t.CreateSignal() cn:disconnect() mAllCns[cn] = nil end + pubCn.Disconnect = pubCn.disconnect + return pubCn end + function this:disconnect() if self ~= this then error("disconnect must be called with `:`, not `.`", 2) @@ -760,12 +768,14 @@ function t.CreateSignal() mAllCns[cn] = nil end end + function this:wait() if self ~= this then error("wait must be called with `:`, not `.`", 2) end return mBindableEvent.Event:wait() end + function this:fire(...) if self ~= this then error("fire must be called with `:`, not `.`", 2) @@ -773,6 +783,11 @@ function t.CreateSignal() mBindableEvent:Fire(...) end + this.Connect = this.connect + this.Disconnect = this.disconnect + this.Wait = this.wait + this.Fire = this.fire + return this end @@ -885,6 +900,7 @@ local function Create_PrivImpl(objectType) --make the object to mutate local obj = Instance.new(objectType) + local parent = nil --stored constructor function to be called after other initialization local ctor = nil @@ -892,7 +908,13 @@ local function Create_PrivImpl(objectType) for k, v in pairs(dat) do --add property if type(k) == "string" then - obj[k] = v + if k == "Parent" then + -- Parent should always be set last, setting the Parent of a new object + -- immediately makes performance worse for all subsequent property updates. + parent = v + else + obj[k] = v + end --add child elseif type(k) == "number" then @@ -937,6 +959,10 @@ local function Create_PrivImpl(objectType) ctor(obj) end + if parent then + obj.Parent = parent + end + --return the completed object return obj end diff --git a/lua/73157242.lua b/lua/73157242.lua index b05d32a..da41bb3 100644 --- a/lua/73157242.lua +++ b/lua/73157242.lua @@ -92,7 +92,7 @@ local function collectParts(object, baseParts, scripts, decals) decals[#decals + 1] = object end - for index, child in pairs(object:GetChildren()) do + for _, child in pairs(object:GetChildren()) do collectParts(child, baseParts, scripts, decals) end end @@ -323,12 +323,12 @@ local function getBoundingBox2(partOrModel) local justifyValue = partOrModel:FindFirstChild "Justification" if justifyValue ~= nil then -- find the multiple of 4 that contains the model - justify = justifyValue.Value - two = Vector3.new(2, 2, 2) - actualBox = maxVec - minVec - Vector3.new(0.01, 0.01, 0.01) - containingGridBox = + local justify = justifyValue.Value + local two = Vector3.new(2, 2, 2) + local actualBox = maxVec - minVec - Vector3.new(0.01, 0.01, 0.01) + local containingGridBox = Vector3.new(4 * math.ceil(actualBox.x / 4), 4 * math.ceil(actualBox.y / 4), 4 * math.ceil(actualBox.z / 4)) - adjustment = containingGridBox - actualBox + local adjustment = containingGridBox - actualBox minVec = minVec - 0.5 * adjustment * justify maxVec = maxVec + 0.5 * adjustment * (two - justify) end @@ -341,17 +341,17 @@ local function getBoundingBoxInWorldCoordinates(partOrModel) local maxVec = Vector3.new(-math.huge, -math.huge, -math.huge) if partOrModel:IsA "BasePart" and not partOrModel:IsA "Terrain" then - vec1 = partOrModel.CFrame:pointToWorldSpace(-0.5 * partOrModel.Size) - vec2 = partOrModel.CFrame:pointToWorldSpace(0.5 * partOrModel.Size) + local vec1 = partOrModel.CFrame:pointToWorldSpace(-0.5 * partOrModel.Size) + local vec2 = partOrModel.CFrame:pointToWorldSpace(0.5 * partOrModel.Size) minVec = Vector3.new(math.min(vec1.X, vec2.X), math.min(vec1.Y, vec2.Y), math.min(vec1.Z, vec2.Z)) maxVec = Vector3.new(math.max(vec1.X, vec2.X), math.max(vec1.Y, vec2.Y), math.max(vec1.Z, vec2.Z)) - elseif partOrModel:IsA "Terrain" then + elseif not partOrModel:IsA "Terrain" then -- we shouldn't have to deal with this case --minVec = Vector3.new(-2, -2, -2) --maxVec = Vector3.new(2, 2, 2) - else - vec1 = partOrModel:GetModelCFrame():pointToWorldSpace(-0.5 * partOrModel:GetModelSize()) - vec2 = partOrModel:GetModelCFrame():pointToWorldSpace(0.5 * partOrModel:GetModelSize()) + -- else + local vec1 = partOrModel:GetModelCFrame():pointToWorldSpace(-0.5 * partOrModel:GetModelSize()) + local vec2 = partOrModel:GetModelCFrame():pointToWorldSpace(0.5 * partOrModel:GetModelSize()) minVec = Vector3.new(math.min(vec1.X, vec2.X), math.min(vec1.Y, vec2.Y), math.min(vec1.Z, vec2.Z)) maxVec = Vector3.new(math.max(vec1.X, vec2.X), math.max(vec1.Y, vec2.Y), math.max(vec1.Z, vec2.Z)) end @@ -587,7 +587,7 @@ local function findConfigAtMouseTarget(Mouse, stampData) local InsertTouchInWorld = insertCFrame:vectorToWorldSpace(insertRefPointInInsert) local posInsertOriginInWorld = TargetTouchRelToWorld - InsertTouchInWorld - local x, y, z, R00, R01, R02, R10, R11, R12, R20, R21, R22 = insertCFrame:components() + local _, _, _, R00, R01, R02, R10, R11, R12, R20, R21, R22 = insertCFrame:components() targetConfig = CFrame.new( posInsertOriginInWorld.x, posInsertOriginInWorld.y, @@ -687,7 +687,7 @@ t.GetStampModel = function(assetId, terrainShape, useAssetVersionId) if object:IsA "BasePart" then object.Locked = false end - for index, child in pairs(object:GetChildren()) do + for _, child in pairs(object:GetChildren()) do UnlockInstances(child) end end @@ -781,7 +781,7 @@ t.GetStampModel = function(assetId, terrainShape, useAssetVersionId) -- below we wait a max of 8 seconds before deciding to bail out on loading local root local loader - loading = true + local loading = true if useAssetVersionId then loader = coroutine.create(function() root = game:GetService("InsertService"):LoadAssetVersion(assetId) @@ -830,12 +830,12 @@ t.GetStampModel = function(assetId, terrainShape, useAssetVersionId) root = root:GetChildren()[1] --Examine the contents and decide what it looks like - for pos, instance in pairs(instances) do + for _, instance in pairs(instances) do if instance:IsA "Team" then instance.Parent = game:GetService "Teams" elseif instance:IsA "Sky" then local lightingService = game:GetService "Lighting" - for index, child in pairs(lightingService:GetChildren()) do + for _, child in pairs(lightingService:GetChildren()) do if child:IsA "Sky" then child:Remove() end @@ -848,12 +848,12 @@ t.GetStampModel = function(assetId, terrainShape, useAssetVersionId) -- ...and tag all inserted models for subsequent origin identification -- if no RobloxModel tag already exists, then add it. if root:FindFirstChild "RobloxModel" == nil then - local stringTag = Instance.new("BoolValue") + local stringTag = Instance.new "BoolValue" stringTag.Name = "RobloxModel" stringTag.Parent = root if root:FindFirstChild "RobloxStamper" == nil then - local stringTag2 = Instance.new("BoolValue") + local stringTag2 = Instance.new "BoolValue" stringTag2.Name = "RobloxStamper" stringTag2.Parent = root end @@ -1098,9 +1098,10 @@ t.SetupStamperDragger = function(modelToStamp, Mouse, StampInModel, AllowedStamp if game.Players["LocalPlayer"] then gui = game.Players.LocalPlayer:FindFirstChild "PlayerGui" if gui and gui:IsA "PlayerGui" then - if HighScalabilityLine.Dimensions == 1 and line.magnitude > 3 then -- don't show if mouse hasn't moved enough - HighScalabilityLine.Adorn.Parent = gui - elseif HighScalabilityLine.Dimensions > 1 then + if + (HighScalabilityLine.Dimensions == 1 and line.magnitude > 3) + or HighScalabilityLine.Dimensions > 1 + then -- don't show if mouse hasn't moved enough HighScalabilityLine.Adorn.Parent = gui end end @@ -1108,9 +1109,7 @@ t.SetupStamperDragger = function(modelToStamp, Mouse, StampInModel, AllowedStamp if gui == nil then -- we are in studio gui = game:GetService "CoreGui" - if HighScalabilityLine.Dimensions == 1 and line.magnitude > 3 then -- don't show if mouse hasn't moved enough - HighScalabilityLine.Adorn.Parent = gui - elseif HighScalabilityLine.Dimensions > 1 then + if (HighScalabilityLine.Dimensions == 1 and line.magnitude > 3) or HighScalabilityLine.Dimensions > 1 then -- don't show if mouse hasn't moved enough HighScalabilityLine.Adorn.Parent = gui end end @@ -1204,7 +1203,7 @@ t.SetupStamperDragger = function(modelToStamp, Mouse, StampInModel, AllowedStamp local cellToStamp = game.Workspace.Terrain:WorldToCell(targetCFrame.p) local newCFramePosition = game.Workspace.Terrain:CellCenterToWorld(cellToStamp.X, cellToStamp.Y, cellToStamp.Z) - local x, y, z, R00, R01, R02, R10, R11, R12, R20, R21, R22 = targetCFrame:components() + local _, _, _, R00, R01, R02, R10, R11, R12, R20, R21, R22 = targetCFrame:components() targetCFrame = CFrame.new( newCFramePosition.X, newCFramePosition.Y, @@ -1404,7 +1403,7 @@ t.SetupStamperDragger = function(modelToStamp, Mouse, StampInModel, AllowedStamp end delay(0, function() - for i = 1, 3 do + for _ = 1, 3 do if stampData["ErrorBox"] then stampData.ErrorBox.Visible = true end @@ -1474,9 +1473,9 @@ t.SetupStamperDragger = function(modelToStamp, Mouse, StampInModel, AllowedStamp myTable[part] = tempTable end - local function makeSurfaceUnjoinable(part, surface) - -- TODO: FILL OUT! - end + -- local function makeSurfaceUnjoinable(part, surface) + -- -- TODO: FILL OUT! + -- end local function prepareModel(model) if not model then @@ -1507,13 +1506,13 @@ t.SetupStamperDragger = function(modelToStamp, Mouse, StampInModel, AllowedStamp return nil, "no parts found in modelToStamp" end - for index, script in pairs(scripts) do + for _, script in pairs(scripts) do if not script.Disabled then script.Disabled = true stampData.DisabledScripts[#stampData.DisabledScripts + 1] = script end end - for index, part in pairs(parts) do + for _, part in pairs(parts) do stampData.TransparencyTable[part] = part.Transparency part.Transparency = gStaticTrans + (1 - gStaticTrans) * part.Transparency stampData.MaterialTable[part] = part.Material @@ -1555,7 +1554,7 @@ t.SetupStamperDragger = function(modelToStamp, Mouse, StampInModel, AllowedStamp end) end - for index, decal in pairs(decals) do + for _, decal in pairs(decals) do stampData.DecalTransparencyTable[decal] = decal.Transparency decal.Transparency = gDesiredTrans + (1 - gDesiredTrans) * decal.Transparency end @@ -1664,17 +1663,14 @@ t.SetupStamperDragger = function(modelToStamp, Mouse, StampInModel, AllowedStamp if checkHighScalabilityStamp then -- check to see if cell is in region, if not we'll skip set if allowedStampRegion then local cellPos = cellCenterToWorld(game.Workspace.Terrain, cellPos.X, cellPos.Y, cellPos.Z) - if cellPos.X + 2 > allowedStampRegion.CFrame.p.X + allowedStampRegion.Size.X / 2 then - canSetCell = false - elseif cellPos.X - 2 < allowedStampRegion.CFrame.p.X - allowedStampRegion.Size.X / 2 then - canSetCell = false - elseif cellPos.Y + 2 > allowedStampRegion.CFrame.p.Y + allowedStampRegion.Size.Y / 2 then - canSetCell = false - elseif cellPos.Y - 2 < allowedStampRegion.CFrame.p.Y - allowedStampRegion.Size.Y / 2 then - canSetCell = false - elseif cellPos.Z + 2 > allowedStampRegion.CFrame.p.Z + allowedStampRegion.Size.Z / 2 then - canSetCell = false - elseif cellPos.Z - 2 < allowedStampRegion.CFrame.p.Z - allowedStampRegion.Size.Z / 2 then + if + (cellPos.X + 2 > allowedStampRegion.CFrame.p.X + allowedStampRegion.Size.X / 2) + or (cellPos.X - 2 < allowedStampRegion.CFrame.p.X - allowedStampRegion.Size.X / 2) + or (cellPos.Y + 2 > allowedStampRegion.CFrame.p.Y + allowedStampRegion.Size.Y / 2) + or (cellPos.Y - 2 < allowedStampRegion.CFrame.p.Y - allowedStampRegion.Size.Y / 2) + or (cellPos.Z + 2 > allowedStampRegion.CFrame.p.Z + allowedStampRegion.Size.Z / 2) + or (cellPos.Z - 2 < allowedStampRegion.CFrame.p.Z - allowedStampRegion.Size.Z / 2) + then canSetCell = false end end @@ -1688,7 +1684,7 @@ t.SetupStamperDragger = function(modelToStamp, Mouse, StampInModel, AllowedStamp local function ResolveMegaClusterStamp(checkHighScalabilityStamp) local cellSet = false - local cluser = game.Workspace.Terrain + local cluster = game.Workspace.Terrain local line = HighScalabilityLine.InternalLine local cMax = game.Workspace.Terrain.MaxExtents.Max @@ -1724,8 +1720,6 @@ t.SetupStamperDragger = function(modelToStamp, Mouse, StampInModel, AllowedStamp local yInc = { 0, 0, 0 } local zInc = { 0, 0, 0 } - local cluster = game.Workspace.Terrain - local incrementVect = { nil, nil, nil } local stepVect = { Vector3.new(0, 0, 0), Vector3.new(0, 0, 0), Vector3.new(0, 0, 0) } @@ -2179,12 +2173,12 @@ t.SetupStamperDragger = function(modelToStamp, Mouse, StampInModel, AllowedStamp -- ...and tag all inserted models for subsequent origin identification -- if no RobloxModel tag already exists, then add it. if stampData.CurrentParts:FindFirstChild "RobloxModel" == nil then - local stringTag = Instance.new("BoolValue") + local stringTag = Instance.new "BoolValue" stringTag.Name = "RobloxModel" stringTag.Parent = stampData.CurrentParts if stampData.CurrentParts:FindFirstChild "RobloxStamper" == nil then - local stringTag2 = Instance.new("BoolValue") + local stringTag2 = Instance.new "BoolValue" stringTag2.Name = "RobloxStamper" stringTag2.Parent = stampData.CurrentParts end @@ -2192,7 +2186,7 @@ t.SetupStamperDragger = function(modelToStamp, Mouse, StampInModel, AllowedStamp else stampData.CurrentParts:BreakJoints() if stampData.CurrentParts:FindFirstChild "RobloxStamper" == nil then - local stringTag2 = Instance.new("BoolValue") + local stringTag2 = Instance.new "BoolValue" stringTag2.Name = "RobloxStamper" stringTag2.Parent = stampData.CurrentParts end @@ -2244,7 +2238,7 @@ t.SetupStamperDragger = function(modelToStamp, Mouse, StampInModel, AllowedStamp -- ...and tag all inserted models for subsequent origin identification -- if no RobloxModel tag already exists, then add it. if stampData.CurrentParts:FindFirstChild "RobloxModel" == nil then - local stringTag = Instance.new("BoolValue") + local stringTag = Instance.new "BoolValue" stringTag.Name = "RobloxModel" stringTag.Parent = stampData.CurrentParts end @@ -2255,12 +2249,12 @@ t.SetupStamperDragger = function(modelToStamp, Mouse, StampInModel, AllowedStamp end --Re-enable the scripts - for index, script in pairs(stampData.DisabledScripts) do + for _, script in pairs(stampData.DisabledScripts) do script.Disabled = false end --Now that they are all marked enabled, reinsert them into the world so they start running - for index, script in pairs(stampData.DisabledScripts) do + for _, script in pairs(stampData.DisabledScripts) do local oldParent = script.Parent script.Parent = nil script:Clone().Parent = oldParent @@ -2390,7 +2384,7 @@ t.SetupStamperDragger = function(modelToStamp, Mouse, StampInModel, AllowedStamp end game.JointsService:ShowPermissibleJoints() - for index, object in pairs(stampData.DisabledScripts) do + for _, object in pairs(stampData.DisabledScripts) do if object.Name == "GhostRemovalScript" then object.Parent = stampData.CurrentParts end @@ -2461,17 +2455,19 @@ t.SetupStamperDragger = function(modelToStamp, Mouse, StampInModel, AllowedStamp control.Stamped = stamped -- BoolValue that fires when user stamps control.Paused = false - control.LoadNewModel = function(newStampModel) -- allows us to specify a new stamper model to be used with this stamper - if newStampModel and not newStampModel:IsA "Model" and not newStampModel:IsA "BasePart" then - error "Control.LoadNewModel: newStampModel (first arg) is not a Model or Part!" - return nil + control.LoadNewModel = + function(newStampModel) -- allows us to specify a new stamper model to be used with this stamper + if newStampModel and not newStampModel:IsA "Model" and not newStampModel:IsA "BasePart" then + error "Control.LoadNewModel: newStampModel (first arg) is not a Model or Part!" + return nil + end + resetStamperState(newStampModel) end - resetStamperState(newStampModel) - end - control.ReloadModel = function() -- will automatically set stamper to get a new model of current model and start stamping with new model - resetStamperState() - end + control.ReloadModel = + function() -- will automatically set stamper to get a new model of current model and start stamping with new model + resetStamperState() + end control.Pause = function() -- temporarily stops stamping, use resume to start up again if not control.Paused then diff --git a/lua/89449008.lua b/lua/89449008.lua index 91b1e44..fc35871 100644 --- a/lua/89449008.lua +++ b/lua/89449008.lua @@ -186,7 +186,7 @@ function addToGrid(child) return end - for i, v in pairs(backpackItems) do -- check to see if we already have this gear registered + for _, v in pairs(backpackItems) do -- check to see if we already have this gear registered if v == child then return end @@ -517,20 +517,20 @@ function clearPreview() gearPreview.GearStats.GearName.Text = "" end -function removeAllEquippedGear(physGear) - local stuff = player.Character:GetChildren() - for i = 1, #stuff do - if (stuff[i]:IsA "Tool" or stuff[i]:IsA "HopperBin") and stuff[i] ~= physGear then - stuff[i].Parent = playerBackpack - end - end -end +-- function removeAllEquippedGear(physGear) +-- local stuff = player.Character:GetChildren() +-- for i = 1, #stuff do +-- if (stuff[i]:IsA "Tool" or stuff[i]:IsA "HopperBin") and stuff[i] ~= physGear then +-- stuff[i].Parent = playerBackpack +-- end +-- end +-- end -function equipGear(physGear) - removeAllEquippedGear(physGear) - physGear.Parent = player.Character - updateGridActive() -end +-- function equipGear(physGear) +-- removeAllEquippedGear(physGear) +-- physGear.Parent = player.Character +-- updateGridActive() +-- end function unequipGear(physGear) physGear.Parent = playerBackpack @@ -630,7 +630,7 @@ end function filterGear(terms) local filteredGear = {} - for k, v in pairs(backpackItems) do + for _, v in pairs(backpackItems) do if buttons[v] then local gearString = string.lower(buttons[v].GearReference.Value.Name) gearString = trim(gearString) @@ -664,6 +664,7 @@ function showSearchGear(searchTerms) end -- currently not active tab local searchTermTable = splitByWhitespace(searchTerms) + local currSearchTerms if searchTermTable and (#searchTermTable > 0) then currSearchTerms = searchTermTable else diff --git a/lua/89449093.lua b/lua/89449093.lua index c32368c..616736c 100644 --- a/lua/89449093.lua +++ b/lua/89449093.lua @@ -354,7 +354,7 @@ function doSearch() end searchText = trim(searchText) resetButton.Visible = true - termTable = splitByWhitespace(searchText) + -- termTable = splitByWhitespace(searchText) searchRequestedEvent:Fire(searchText) -- todo: replace this with termtable when table passing is possible end diff --git a/lua/97188756.lua b/lua/97188756.lua index b808b62..09a0667 100644 --- a/lua/97188756.lua +++ b/lua/97188756.lua @@ -1287,7 +1287,6 @@ end function Chat:CreateSafeChatOptions(list, rootButton) local text_List = {} - level = level or 0 local count = 0 text_List[rootButton] = {} text_List[rootButton][1] = list[1] @@ -1680,11 +1679,9 @@ function Chat:PlayerChatted(...) end if PlayersService.ClassicChat then - if string.sub(message, 1, 3) == "/e " or string.sub(message, 1, 7) == "/emote " then - -- don't do anything right now - -- print(1) - elseif - (forceChatGUI or Player.ChatMode == Enum.ChatMode.TextAndMenu) + if + not (string.sub(message, 1, 3) == "/e " or string.sub(message, 1, 7) == "/emote ") + and (forceChatGUI or Player.ChatMode == Enum.ChatMode.TextAndMenu) or (Player.ChatMode == Enum.ChatMode.Menu and string.sub(message, 1, 3) == "/sc") or (Chat:FindMessageInSafeChat(message, self.SafeChat_List)) then diff --git a/mercury.yml b/mercury.yml index 4db34f9..b974425 100644 --- a/mercury.yml +++ b/mercury.yml @@ -8100,17 +8100,11 @@ structs: - required: false type: any method: true - deprecated: - message: this property is deprecated. - replace: [] AutowedgeCells: args: - required: false type: any method: true - deprecated: - message: this property is deprecated. - replace: [] BackParamA: property: override-fields deprecated: @@ -8374,9 +8368,6 @@ structs: - required: false type: any method: true - deprecated: - message: this property is deprecated. - replace: [] GetChildren: args: [] method: true @@ -9066,9 +9057,6 @@ structs: - required: false type: any method: true - deprecated: - message: this property is deprecated. - replace: [] FindPartsInRegion3WithIgnoreList: args: - required: false @@ -9078,9 +9066,6 @@ structs: - required: false type: any method: true - deprecated: - message: this property is deprecated. - replace: [] FindPartsInRegion3WithWhiteList: args: - required: false @@ -9090,9 +9075,6 @@ structs: - required: false type: any method: true - deprecated: - message: this property is deprecated. - replace: [] GetActor: args: [] method: true diff --git a/processed/107893730.lua b/processed/107893730.lua index 79c02c5..1683768 100644 --- a/processed/107893730.lua +++ b/processed/107893730.lua @@ -42,13 +42,11 @@ ItemPreview.ItemDescription.Text=W if l then p.BodyFrame.ItemPreview.Image=b.. 'thumbs/asset.ashx?assetid='..tostring(c['IconImageAssetId']).. '&x=100&y=100&format=png'else p.BodyFrame.ItemPreview.Image=b.. 'thumbs/asset.ashx?assetid='..tostring(d)..'&x=100&y=100&format=png'end end -function doPlayerFundsCheck(V)if j then canPurchase,insufficientFunds= -canPurchaseItem()if canPurchase and insufficientFunds then local W=1000 while(W> -0 or V)and insufficientFunds and j and canPurchase do wait(0.1)canPurchase, -insufficientFunds=canPurchaseItem()W=W-1 end end if canPurchase and not -insufficientFunds then setButtonsVisible(p.BodyFrame.BuyButton,p.BodyFrame. -CancelButton,p.BodyFrame.AfterBalanceButton)end end end function -showPurchasePrompt()local V,W,X,Y,Z=canPurchaseItem()if V then +function doPlayerFundsCheck(V)if j then local W,X=canPurchaseItem()if W and X +then local Y=1000 while(Y>0 or V)and X and j and W do wait(0.1)W,X= +canPurchaseItem()Y=Y-1 end end if W and not X then setButtonsVisible(p.BodyFrame +.BuyButton,p.BodyFrame.CancelButton,p.BodyFrame.AfterBalanceButton)end end end +function showPurchasePrompt()local V,W,X,Y,Z=canPurchaseItem()if V then updatePurchasePromptData()if Y and Z then p.BodyFrame.ItemPreview. ItemDescription.Text=Z p.BodyFrame.AfterBalanceButton.Visible=false end game. GuiService:AddCenterDialog(p,Enum.CenterDialogType.ModalDialog,function()p. @@ -183,12 +181,8 @@ and(c['Remaining']==''or c['Remaining']==0 or c['Remaining']==nil)then W= return true,nil,nil,true,W end if not Z then W= [[Could not update your balance. Please check back after some time.]]return true ,nil,nil,true,W end p.BodyFrame.AfterBalanceButton.Active=true return true,_ end -function computeSpaceString(aa)local V,W=' ',Instance.new'TextButton'W.Size= -UDim2.new(0,aa.AbsoluteSize.X,0,aa.AbsoluteSize.Y)W.FontSize=aa.FontSize W. -Parent=aa.Parent W.BackgroundTransparency=1 W.Text=V W.Name='SpaceButton'while W -.TextBounds.X0.00001 then local D =rotatePointAboutLocation(u,v,C)s.Position=transformFromCenterToTopLeft(Vector2. new(D.x,D.y),s)end s.Position=UDim2.new(0,s.Position.X.Offset+z.x,0,s.Position.Y -.Offset+z.y)end r.Position=transformFromCenterToTopLeft(t,r) -thumbstickFramePosition=Vector2.new(r.Position.X.Offset,r.Position.Y.Offset) -thumbstickOuterPosition=Vector2.new(s.Position.X.Offset,s.Position.Y.Offset)if -DistanceBetweenTwoPoints(thumbstickFramePosition,thumbstickOuterPosition)>e/2 -then local v=(thumbstickOuterPosition-thumbstickFramePosition).unit*e/2 s. -Position=UDim2.new(0,thumbstickFramePosition.x+v.x,0,thumbstickFramePosition.y+v -.y)end return Vector2.new(r.Position.X.Offset-s.Position.X.Offset,r.Position.Y. -Offset-s.Position.Y.Offset)end function movementOutsideDeadZone(r)return((math. -abs(r.x)>g)or(math.abs(r.y)>g))end function constructThumbstick(r,s,t)local u= -Instance.new'Frame'u.Name='ThumbstickFrame'u.Active=true u.Size=UDim2.new(0,e,0, -e)u.Position=r u.BackgroundTransparency=1 local v=Instance.new'ImageLabel'v.Name -='OuterThumbstick'v.Image=f v.ImageRectOffset=Vector2.new(0,0)v.ImageRectSize= +.Offset+z.y)end r.Position=transformFromCenterToTopLeft(t,r)local v,w=Vector2. +new(r.Position.X.Offset,r.Position.Y.Offset),Vector2.new(s.Position.X.Offset,s. +Position.Y.Offset)if DistanceBetweenTwoPoints(v,w)>e/2 then local x=(w-v).unit*e +/2 s.Position=UDim2.new(0,v.x+x.x,0,v.y+x.y)end return Vector2.new(r.Position.X. +Offset-s.Position.X.Offset,r.Position.Y.Offset-s.Position.Y.Offset)end function +movementOutsideDeadZone(r)return((math.abs(r.x)>g)or(math.abs(r.y)>g))end +function constructThumbstick(r,s,t)local u=Instance.new'Frame'u.Name= +'ThumbstickFrame'u.Active=true u.Size=UDim2.new(0,e,0,e)u.Position=r u. +BackgroundTransparency=1 local v=Instance.new'ImageLabel'v.Name= +'OuterThumbstick'v.Image=f v.ImageRectOffset=Vector2.new(0,0)v.ImageRectSize= Vector2.new(220,220)v.BackgroundTransparency=1 v.Size=UDim2.new(0,e,0,e)v. Position=r v.Parent=Game.CoreGui.RobloxGui local w=Instance.new'ImageLabel'w. Name='InnerThumbstick'w.Image=f w.ImageRectOffset=Vector2.new(220,0)w. @@ -100,15 +98,15 @@ tick()-w)<=p)if x then table.insert(A,F)E(A[1],A[2])else A={}end end end r. InputBegan:connect(function(G)if G.UserInputType~=Enum.UserInputType.Touch then return end if isTouchUsedByJumpButton(G)then return end local H= isTouchUsedByThumbstick(G)if not H then F(G)end if q==nil and not H then q=G t= -Vector2.new(q.Position.x,q.Position.y)lastTick=tick()end end)a.InputChanged: -connect(function(G)if G.UserInputType~=Enum.UserInputType.Touch then return end -if q~=G then return end local H=Vector2.new(q.Position.x,q.Position.y)local I=(t --H)*m if not u and(I.magnitude>n)then u=true t=H end if u and(t~=H)then v(a,I)s( -)t=H end end)a.InputEnded:connect(function(G)if q==G or q==nil then C()end for H -,I in pairs(A)do if I==G then table.remove(A,H)end end end)end function -setupTouchControls()local r=Instance.new'Frame'r.Name='TouchControlFrame'r.Size= -UDim2.new(1,0,1,0)r.BackgroundTransparency=1 r.Parent=Game.CoreGui.RobloxGui -local s=setupCharacterMovement(r)setupJumpButton(r)setupCameraControl(r,s)a. +Vector2.new(q.Position.x,q.Position.y)end end)a.InputChanged:connect(function(G) +if G.UserInputType~=Enum.UserInputType.Touch then return end if q~=G then return +end local H=Vector2.new(q.Position.x,q.Position.y)local I=(t-H)*m if not u and(I +.magnitude>n)then u=true t=H end if u and(t~=H)then v(a,I)s()t=H end end)a. +InputEnded:connect(function(G)if q==G or q==nil then C()end for H,I in pairs(A) +do if I==G then table.remove(A,H)end end end)end function setupTouchControls() +local r=Instance.new'Frame'r.Name='TouchControlFrame'r.Size=UDim2.new(1,0,1,0)r. +BackgroundTransparency=1 r.Parent=Game.CoreGui.RobloxGui local s= +setupCharacterMovement(r)setupJumpButton(r)setupCameraControl(r,s)a. ProcessedEvent:connect(function(t,u)if not u then return end if t==q and t. UserInputState==Enum.UserInputState.Begin then q=nil end end)end do setupTouchControls()end \ No newline at end of file diff --git a/processed/157877000.lua b/processed/157877000.lua index aebdd62..e46ea9b 100644 --- a/processed/157877000.lua +++ b/processed/157877000.lua @@ -95,121 +95,121 @@ UDim2.new(0,3,0,3),Size=UDim2.new(0,14,0,14),Image= Parent=M,BackgroundColor3=Color3.new(0,0,0),BackgroundTransparency=0.5,Position= UDim2.new(0,0,0,0),Size=UDim2.new(1,-23,1,0),Text=''}a'TextLabel'{Name= 'TitleText',Parent=M,BackgroundTransparency=1,Position=UDim2.new(0,0,0,0),Size= -UDim2.new(0,185,0,20),Font='SourceSansBold',FontSize=Enum.FontSize.Size18,Text= -'Server Console',TextColor3=Color3.new(1,1,1),Text='Roblox Developer Console', -TextYAlignment=Enum.TextYAlignment.Top}local O,P,Q,R,S,T,U,V=nil,nil,nil,nil,nil -,nil,false,false function clean()O=nil P=nil Q=nil R=nil S=nil pScrollHandle=nil -T=nil U=false V=false end function refreshConsolePosition(W,X)if not O then -return end local Y=Vector2.new(W,X)-O c.Position=UDim2.new(0,P.X+Y.X,0,P.Y+Y.Y) -end M.TextButton.MouseButton1Down:connect(function(W,X)O=Vector2.new(W,X)P=c. -AbsolutePosition end)M.TextButton.MouseButton1Up:connect(function(W,X)clean()end -)function refreshConsoleSize(X,Y)if not Q then return end local Z=Vector2.new(X, -Y)-Q c.Size=UDim2.new(0,math.max(R.X+Z.X,i.X),0,math.max(R.Y+Z.Y,i.Y))end c.Body -.ResizeButton.MouseButton1Down:connect(function(X,Y)Q=Vector2.new(X,Y)R=c. -AbsoluteSize end)c.Body.ResizeButton.MouseButton1Up:connect(function(X,Y)clean() -end)M.CloseButton.MouseButton1Down:connect(function(Y,Z)c.Visible=false end)c. -TitleBar.CloseButton.MouseButton1Up:connect(function()clean()end)local Z,_=true, -false function startAnimation()if _ then return end _=true repeat if Z then u=u- -1 else u=u+1 end local aa=u/5 local ab=aa*aa*(3-(2*aa))K.ImageLabel.Rotation=ab* -5*9 x.Position=UDim2.new(0,(ab*5*50)-250,0,4)wait()if(u<=0 and Z)or(u>=5 and not -Z)then _=false end until not _ end K.MouseButton1Down:connect(function(aa,ab)Z= -not Z startAnimation()end)function changeOffset(ab)if j==f then m=m+ab elseif j -==g then n=n+ab end repositionList()end function refreshTextHolderForReal()local -ab,ac=J:GetChildren(),nil if j==f then ac=k elseif j==g then ac=l end local ad=0 -for ae=1,#ab do ab[ae].Visible=false end for ae=1,#ac do local af,ag=nil,false -if ae>#ab then af=a'TextLabel'{Name='Message',Parent=J,BackgroundTransparency=1, -TextXAlignment='Left',Size=UDim2.new(1,0,0,14),FontSize='Size10',ZIndex=1}ag= -true else af=ab[ae]end if(r or ac[ae].Type~=Enum.MessageType.MessageOutput)and(q -or ac[ae].Type~=Enum.MessageType.MessageInfo)and(p or ac[ae].Type~=Enum. -MessageType.MessageWarning)and(o or ac[ae].Type~=Enum.MessageType.MessageError) -then af.TextWrapped=s af.Size=UDim2.new(0.98,0,0,2000)af.Parent=c af.Text=ac[ae] -.Time..' -- '..ac[ae].Message af.Size=UDim2.new(0.98,0,0,af.TextBounds.Y)af. -Position=UDim2.new(0,5,0,ad)af.Parent=J ad=ad+af.TextBounds.Y if ag then if(j==f -and m>0)or(j==g and n>0)then changeOffset(af.TextBounds.Y)end end af.Visible= -true if ac[ae].Type==Enum.MessageType.MessageError then af.TextColor3=Color3. -new(1,0,0)elseif ac[ae].Type==Enum.MessageType.MessageInfo then af.TextColor3= -Color3.new(0.4,0.5,1)elseif ac[ae].Type==Enum.MessageType.MessageWarning then af -.TextColor3=Color3.new(1,0.6,0.4)else af.TextColor3=Color3.new(1,1,1)end end end -t=ad end local ab=false function refreshTextHolder()if ab then return end Delay( -0.1,function()ab=false refreshTextHolderForReal()end)ab=true end local ac=0 -function holdingUpButton()if U then return end U=true wait(0.6)ac=ac+1 while U -and ac<2 do wait()changeOffset(12)end ac=ac-1 end function holdingDownButton()if -V then return end V=true wait(0.6)ac=ac+1 while V and ac<2 do wait() -changeOffset(-12)end ac=ac-1 end c.Body.ScrollBar.Up.MouseButton1Click:connect( -function()changeOffset(10)end)c.Body.ScrollBar.Up.MouseButton1Down:connect( -function()changeOffset(10)holdingUpButton()end)c.Body.ScrollBar.Up. -MouseButton1Up:connect(function()clean()end)c.Body.ScrollBar.Down. -MouseButton1Down:connect(function()changeOffset(-10)holdingDownButton()end)c. -Body.ScrollBar.Down.MouseButton1Up:connect(function()clean()end)function -handleScroll(ad,ae)if not S then return end local af,ag,ah=(Vector2.new(ad,ae)-S -).Y,1-(c.Body.TextBox.AbsoluteSize.Y/J.AbsoluteSize.Y),E.AbsoluteSize.Y-E.Handle -.AbsoluteSize.Y local ai=math.max(math.min(af,ah),0-ah)local aj,ak=ai/ah,(ag*J. -AbsoluteSize.Y)local al=ak*aj if j==f then m=T-al elseif j==g then n=T-al end -end E.Handle.MouseButton1Down:connect(function(ad,ae)S=Vector2.new(ad,ae) -pScrollHandle=E.Handle.AbsolutePosition if j==f then T=m elseif j==g then T=n -end end)E.Handle.MouseButton1Up:connect(function(ad,ae)clean()end)local function -existsInsideContainer(ae,af,ag)local ah,ai=ae.AbsolutePosition,ae.AbsoluteSize -if afah.X+ai.X or agah.y+ai.y then return false end -return true end function repositionList()if j==f then m=math.min(math.max(m,0),t --c.Body.TextBox.AbsoluteSize.Y)J.Size=UDim2.new(1,0,0,t)elseif j==g then n=math. -min(math.max(n,0),t-c.Body.TextBox.AbsoluteSize.Y)J.Size=UDim2.new(1,0,0,t)end -local ae=c.Body.TextBox.AbsoluteSize.Y/J.AbsoluteSize.Y if ae>=1 then c.Body. -ScrollBar.Visible=false c.Body.TextBox.Size=UDim2.new(1,-4,1,-28)if j==f or j==g -then J.Position=UDim2.new(0,0,1,0-t)end else c.Body.ScrollBar.Visible=true c. -Body.TextBox.Size=UDim2.new(1,-25,1,-28)local af,ag=1-ae,nil if j==f then ag=m/J -.AbsoluteSize.Y elseif j==g then ag=n/J.AbsoluteSize.Y end local ah,ai=math.max( -0,af-ag),math.max(E.AbsoluteSize.Y*ae,21)local aj=ai/E.AbsoluteSize.Y local ak=( -1-aj)/(1-ae)local al=ah*ak local am=math.min(E.AbsoluteSize.Y*al,E.AbsoluteSize. -Y-ai)E.Handle.Size=UDim2.new(1,0,0,ai)E.Handle.Position=UDim2.new(0,0,0,am)if j -==f then J.Position=UDim2.new(0,0,1,0-t+m)elseif j==g then J.Position=UDim2.new( -0,0,1,0-t+n)end end end local function numberWithZero(ae)return(ae<10 and'0'or'' -)..ae end local ae='%s:%s:%s'function ConvertTimeStamp(af)local ag=af-os.time()+ -math.floor(tick())local ah=ag%86400 local ai=math.floor(ah/3600)ah=ah-(ai*3600) -local aj=math.floor(ah/60)ah=ah-(aj*60)local ak,al,am=numberWithZero(ai), -numberWithZero(aj),numberWithZero(ah)return ae:format(ak,al,am)end x. -ErrorToggleButton.MouseButton1Down:connect(function(af,ag)o=not o x. +UDim2.new(0,185,0,20),Font='SourceSansBold',FontSize=Enum.FontSize.Size18, +TextColor3=Color3.new(1,1,1),Text='Roblox Developer Console',TextYAlignment=Enum +.TextYAlignment.Top}local O,P,Q,R,S,T,U,V,W=nil,nil,nil,nil,nil,nil,nil,false, +false function clean()O=nil P=nil Q=nil R=nil S=nil T=nil U=nil V=false W=false +end function refreshConsolePosition(X,Y)if not O then return end local Z=Vector2 +.new(X,Y)-O c.Position=UDim2.new(0,P.X+Z.X,0,P.Y+Z.Y)end M.TextButton. +MouseButton1Down:connect(function(X,Y)O=Vector2.new(X,Y)P=c.AbsolutePosition end +)M.TextButton.MouseButton1Up:connect(function(X,Y)clean()end)function +refreshConsoleSize(Y,Z)if not Q then return end local _=Vector2.new(Y,Z)-Q c. +Size=UDim2.new(0,math.max(R.X+_.X,i.X),0,math.max(R.Y+_.Y,i.Y))end c.Body. +ResizeButton.MouseButton1Down:connect(function(Y,Z)Q=Vector2.new(Y,Z)R=c. +AbsoluteSize end)c.Body.ResizeButton.MouseButton1Up:connect(function(Y,Z)clean() +end)M.CloseButton.MouseButton1Down:connect(function(Z,_)c.Visible=false end)c. +TitleBar.CloseButton.MouseButton1Up:connect(function()clean()end)local _,aa=true +,false function startAnimation()if aa then return end aa=true repeat if _ then u +=u-1 else u=u+1 end local ab=u/5 local ac=ab*ab*(3-(2*ab))K.ImageLabel.Rotation= +ac*5*9 x.Position=UDim2.new(0,(ac*5*50)-250,0,4)wait()if(u<=0 and _)or(u>=5 and +not _)then aa=false end until not aa end K.MouseButton1Down:connect(function(ab, +ac)_=not _ startAnimation()end)function changeOffset(ac)if j==f then m=m+ac +elseif j==g then n=n+ac end repositionList()end function +refreshTextHolderForReal()local ac,ad=J:GetChildren(),nil if j==f then ad=k +elseif j==g then ad=l end local ae=0 for af=1,#ac do ac[af].Visible=false end +for af=1,#ad do local ag,ah=nil,false if af>#ac then ag=a'TextLabel'{Name= +'Message',Parent=J,BackgroundTransparency=1,TextXAlignment='Left',Size=UDim2. +new(1,0,0,14),FontSize='Size10',ZIndex=1}ah=true else ag=ac[af]end if(r or ad[af +].Type~=Enum.MessageType.MessageOutput)and(q or ad[af].Type~=Enum.MessageType. +MessageInfo)and(p or ad[af].Type~=Enum.MessageType.MessageWarning)and(o or ad[af +].Type~=Enum.MessageType.MessageError)then ag.TextWrapped=s ag.Size=UDim2.new( +0.98,0,0,2000)ag.Parent=c ag.Text=ad[af].Time..' -- '..ad[af].Message ag.Size= +UDim2.new(0.98,0,0,ag.TextBounds.Y)ag.Position=UDim2.new(0,5,0,ae)ag.Parent=J ae +=ae+ag.TextBounds.Y if ah then if(j==f and m>0)or(j==g and n>0)then +changeOffset(ag.TextBounds.Y)end end ag.Visible=true if ad[af].Type==Enum. +MessageType.MessageError then ag.TextColor3=Color3.new(1,0,0)elseif ad[af].Type +==Enum.MessageType.MessageInfo then ag.TextColor3=Color3.new(0.4,0.5,1)elseif ad +[af].Type==Enum.MessageType.MessageWarning then ag.TextColor3=Color3.new(1,0.6, +0.4)else ag.TextColor3=Color3.new(1,1,1)end end end t=ae end local ac=false +function refreshTextHolder()if ac then return end Delay(0.1,function()ac=false +refreshTextHolderForReal()end)ac=true end local ad=0 function holdingUpButton() +if V then return end V=true wait(0.6)ad=ad+1 while V and ad<2 do wait() +changeOffset(12)end ad=ad-1 end function holdingDownButton()if W then return end +W=true wait(0.6)ad=ad+1 while W and ad<2 do wait()changeOffset(-12)end ad=ad-1 +end c.Body.ScrollBar.Up.MouseButton1Click:connect(function()changeOffset(10)end) +c.Body.ScrollBar.Up.MouseButton1Down:connect(function()changeOffset(10) +holdingUpButton()end)c.Body.ScrollBar.Up.MouseButton1Up:connect(function()clean( +)end)c.Body.ScrollBar.Down.MouseButton1Down:connect(function()changeOffset(-10) +holdingDownButton()end)c.Body.ScrollBar.Down.MouseButton1Up:connect(function() +clean()end)function handleScroll(ae,af)if not S then return end local ag,ah,ai=( +Vector2.new(ae,af)-S).Y,1-(c.Body.TextBox.AbsoluteSize.Y/J.AbsoluteSize.Y),E. +AbsoluteSize.Y-E.Handle.AbsoluteSize.Y local aj=math.max(math.min(ag,ai),0-ai) +local ak,al=aj/ai,(ah*J.AbsoluteSize.Y)local am=al*ak if j==f then m=U-am elseif +j==g then n=U-am end end E.Handle.MouseButton1Down:connect(function(ae,af)S= +Vector2.new(ae,af)T=E.Handle.AbsolutePosition if j==f then U=m elseif j==g then +U=n end end)E.Handle.MouseButton1Up:connect(function(ae,af)clean()end) +local function existsInsideContainer(af,ag,ah)local ai,aj=af.AbsolutePosition,af +.AbsoluteSize if agai.X+aj.X or ahai.y+aj.y then return +false end return true end function repositionList()if j==f then m=math.min(math. +max(m,0),t-c.Body.TextBox.AbsoluteSize.Y)J.Size=UDim2.new(1,0,0,t)elseif j==g +then n=math.min(math.max(n,0),t-c.Body.TextBox.AbsoluteSize.Y)J.Size=UDim2.new(1 +,0,0,t)end local af=c.Body.TextBox.AbsoluteSize.Y/J.AbsoluteSize.Y if af>=1 then +c.Body.ScrollBar.Visible=false c.Body.TextBox.Size=UDim2.new(1,-4,1,-28)if j==f +or j==g then J.Position=UDim2.new(0,0,1,0-t)end else c.Body.ScrollBar.Visible= +true c.Body.TextBox.Size=UDim2.new(1,-25,1,-28)local ag,ah=1-af,nil if j==f then +ah=m/J.AbsoluteSize.Y elseif j==g then ah=n/J.AbsoluteSize.Y end local ai,aj= +math.max(0,ag-ah),math.max(E.AbsoluteSize.Y*af,21)local ak=aj/E.AbsoluteSize.Y +local al=(1-ak)/(1-af)local am=ai*al local an=math.min(E.AbsoluteSize.Y*am,E. +AbsoluteSize.Y-aj)E.Handle.Size=UDim2.new(1,0,0,aj)E.Handle.Position=UDim2.new(0 +,0,0,an)if j==f then J.Position=UDim2.new(0,0,1,0-t+m)elseif j==g then J. +Position=UDim2.new(0,0,1,0-t+n)end end end local function numberWithZero(af) +return(af<10 and'0'or'')..af end local af='%s:%s:%s'function ConvertTimeStamp(ag +)local ah=ag-os.time()+math.floor(tick())local ai=ah%86400 local aj=math.floor( +ai/3600)ai=ai-(aj*3600)local ak=math.floor(ai/60)ai=ai-(ak*60)local al,am,an= +numberWithZero(aj),numberWithZero(ak),numberWithZero(ai)return af:format(al,am, +an)end x.ErrorToggleButton.MouseButton1Down:connect(function(ag,ah)o=not o x. ErrorToggleButton.CheckFrame.Visible=o refreshTextHolder()repositionList()end)x. -WarningToggleButton.MouseButton1Down:connect(function(ag,ah)p=not p x. +WarningToggleButton.MouseButton1Down:connect(function(ah,ai)p=not p x. WarningToggleButton.CheckFrame.Visible=p refreshTextHolder()repositionList()end) -x.InfoToggleButton.MouseButton1Down:connect(function(ah,ai)q=not q x. +x.InfoToggleButton.MouseButton1Down:connect(function(ai,aj)q=not q x. InfoToggleButton.CheckFrame.Visible=q refreshTextHolder()repositionList()end)x. -OutputToggleButton.MouseButton1Down:connect(function(ai,aj)r=not r x. +OutputToggleButton.MouseButton1Down:connect(function(aj,ak)r=not r x. OutputToggleButton.CheckFrame.Visible=r refreshTextHolder()repositionList()end)x -.WordWrapToggleButton.MouseButton1Down:connect(function(aj,ak)s=not s x. +.WordWrapToggleButton.MouseButton1Down:connect(function(ak,al)s=not s x. WordWrapToggleButton.CheckFrame.Visible=s refreshTextHolder()repositionList()end -)function AddLocalMessage(ak,al,am)k[#k+1]={Message=ak,Time=ConvertTimeStamp(am) -,Type=al}while#k>h do table.remove(k,1)end refreshTextHolder()repositionList() -end function AddServerMessage(ak,al,am)l[#l+1]={Message=ak,Time= -ConvertTimeStamp(am),Type=al}while#l>h do table.remove(l,1)end +)function AddLocalMessage(al,am,an)k[#k+1]={Message=al,Time=ConvertTimeStamp(an) +,Type=am}while#k>h do table.remove(k,1)end refreshTextHolder()repositionList() +end function AddServerMessage(al,am,an)l[#l+1]={Message=al,Time= +ConvertTimeStamp(an),Type=am}while#l>h do table.remove(l,1)end refreshTextHolder()repositionList()end c.Body.LocalConsole.MouseButton1Click: -connect(function(ak,al)if j==g then j=f local am,an=c.Body.LocalConsole,c.Body. -ServerConsole am.Size=UDim2.new(0,90,0,20)an.Size=UDim2.new(0,90,0,17)am. -BackgroundTransparency=0.6 an.BackgroundTransparency=0.8 if game:FindFirstChild -'Players'and game.Players['LocalPlayer']then local ao=game.Players.LocalPlayer: -GetMouse()refreshConsolePosition(ao.X,ao.Y)refreshConsoleSize(ao.X,ao.Y) -handleScroll(ao.X,ao.Y)end refreshTextHolder()repositionList()end end)c.Body. -LocalConsole.MouseButton1Up:connect(function()clean()end)local al=false c.Body. -ServerConsole.MouseButton1Click:connect(function(am,an)if not al then al=true -game:GetService'LogService':RequestServerOutput()end if j==f then j=g local ao, -ap=c.Body.LocalConsole,c.Body.ServerConsole ap.Size=UDim2.new(0,90,0,20)ao.Size= -UDim2.new(0,90,0,17)ap.BackgroundTransparency=0.6 ao.BackgroundTransparency=0.8 -if game:FindFirstChild'Players'and game.Players['LocalPlayer']then local aq=game -.Players.LocalPlayer:GetMouse()refreshConsolePosition(aq.X,aq.Y) -refreshConsoleSize(aq.X,aq.Y)handleScroll(aq.X,aq.Y)end refreshTextHolder() +connect(function(al,am)if j==g then j=f local an,ao=c.Body.LocalConsole,c.Body. +ServerConsole an.Size=UDim2.new(0,90,0,20)ao.Size=UDim2.new(0,90,0,17)an. +BackgroundTransparency=0.6 ao.BackgroundTransparency=0.8 if game:FindFirstChild +'Players'and game.Players['LocalPlayer']then local ap=game.Players.LocalPlayer: +GetMouse()refreshConsolePosition(ap.X,ap.Y)refreshConsoleSize(ap.X,ap.Y) +handleScroll(ap.X,ap.Y)end refreshTextHolder()repositionList()end end)c.Body. +LocalConsole.MouseButton1Up:connect(function()clean()end)local am=false c.Body. +ServerConsole.MouseButton1Click:connect(function(an,ao)if not am then am=true +game:GetService'LogService':RequestServerOutput()end if j==f then j=g local ap, +aq=c.Body.LocalConsole,c.Body.ServerConsole aq.Size=UDim2.new(0,90,0,20)ap.Size= +UDim2.new(0,90,0,17)aq.BackgroundTransparency=0.6 ap.BackgroundTransparency=0.8 +if game:FindFirstChild'Players'and game.Players['LocalPlayer']then local ar=game +.Players.LocalPlayer:GetMouse()refreshConsolePosition(ar.X,ar.Y) +refreshConsoleSize(ar.X,ar.Y)handleScroll(ar.X,ar.Y)end refreshTextHolder() repositionList()end end)c.Body.ServerConsole.MouseButton1Up:connect(function() clean()end)if game:FindFirstChild'Players'and game.Players['LocalPlayer']then -local an=game.Players.LocalPlayer:GetMouse()an.Move:connect(function()if not c. -Visible then return end local ao=game.Players.LocalPlayer:GetMouse() -refreshConsolePosition(ao.X,ao.Y)refreshConsoleSize(ao.X,ao.Y)handleScroll(ao.X, -ao.Y)refreshTextHolder()repositionList()end)an.Button1Up:connect(function() -clean()end)an.WheelForward:connect(function()if not c.Visible then return end if -existsInsideContainer(c,an.X,an.Y)then changeOffset(10)end end)an.WheelBackward: -connect(function()if not c.Visible then return end if existsInsideContainer(c,an -.X,an.Y)then changeOffset(-10)end end)end E.Handle.MouseButton1Down:connect( -function()repositionList()end)local an=game:GetService'LogService': -GetLogHistory()for ao=1,#an do AddLocalMessage(an[ao].message,an[ao].messageType -,an[ao].timestamp)end game:GetService'LogService'.MessageOut:connect(function(ao -,ap)AddLocalMessage(ao,ap,os.time())end)game:GetService'LogService'. -ServerMessageOut:connect(AddServerMessage)end local ab=false function d.OnInvoke -()if ab then return end ab=true initializeDeveloperConsole()c.Visible=not c. -Visible ab=false end \ No newline at end of file +local ao=game.Players.LocalPlayer:GetMouse()ao.Move:connect(function()if not c. +Visible then return end local ap=game.Players.LocalPlayer:GetMouse() +refreshConsolePosition(ap.X,ap.Y)refreshConsoleSize(ap.X,ap.Y)handleScroll(ap.X, +ap.Y)refreshTextHolder()repositionList()end)ao.Button1Up:connect(function() +clean()end)ao.WheelForward:connect(function()if not c.Visible then return end if +existsInsideContainer(c,ao.X,ao.Y)then changeOffset(10)end end)ao.WheelBackward: +connect(function()if not c.Visible then return end if existsInsideContainer(c,ao +.X,ao.Y)then changeOffset(-10)end end)end E.Handle.MouseButton1Down:connect( +function()repositionList()end)local ao=game:GetService'LogService': +GetLogHistory()for ap=1,#ao do AddLocalMessage(ao[ap].message,ao[ap].messageType +,ao[ap].timestamp)end game:GetService'LogService'.MessageOut:connect(function(ap +,aq)AddLocalMessage(ap,aq,os.time())end)game:GetService'LogService'. +ServerMessageOut:connect(AddServerMessage)end local aa=false function d.OnInvoke +()if aa then return end aa=true initializeDeveloperConsole()c.Visible=not c. +Visible aa=false end \ No newline at end of file diff --git a/processed/38037565.lua b/processed/38037565.lua index 38228eb..64e0644 100644 --- a/processed/38037565.lua +++ b/processed/38037565.lua @@ -19,34 +19,30 @@ FontSize=6 o.BackgroundTransparency=1 o.Parent=m for p=1,10 do wait(0.1)o. TextTransparency=p/10 o.Position=UDim2.new(0,0,0,-p*5)o.FontSize=6-p*0.6 end o: remove()end function setMaxHealth()if k.Value>=0 then d.MaxHealth=k.Value print( d.MaxHealth)if d.Health>d.MaxHealth then d.Health=d.MaxHealth end end end k. -Changed:connect(setMaxHealth)fireEffect=Instance.new'Fire'fireEffect.Heat=0.1 -fireEffect.Size=3 fireEffect.Name='FireEffect'fireEffect.Enabled=false while -true do local n,o=wait(1),d.Health if o>0 then local p=0 if f then regen=f: -FindFirstChild'Regen'poison=f:FindFirstChild'Poison'ice=f:FindFirstChild'Ice' -fire=f:FindFirstChild'Fire'stun=f:FindFirstChild'Stun'if regen then p=p+regen. -Value.X if regen.Value.Y>=0 then regen.Value=Vector3.new(regen.Value.X+regen. -Value.Z,regen.Value.Y-n,regen.Value.Z)elseif regen.Value.Y==-1 then regen.Value= -Vector3.new(regen.Value.X+regen.Value.Z,-1,regen.Value.Z)else regen:remove()end -end if poison then p=p-poison.Value.X if poison.Value.Y>=0 then poison.Value= -Vector3.new(poison.Value.X+poison.Value.Z,poison.Value.Y-n,poison.Value.Z)elseif -poison.Value.Y==-1 then poison.Value=Vector3.new(poison.Value.X+poison.Value.Z,- -1,poison.Value.Z)else poison:remove()end end if ice then p=p-ice.Value.X if ice. -Value.Y>=0 then ice.Value=Vector3.new(ice.Value.X,ice.Value.Y-n,ice.Value.Z)else -ice:remove()end end if fire then fireEffect.Enabled=true fireEffect.Parent=c. -Torso p=p-fire.Value.X if fire.Value.Y>=0 then fire.Value=Vector3.new(fire.Value -.X,fire.Value.Y-n,fire.Value.Z)else fire:remove()fireEffect.Enabled=false -fireEffect.Parent=nil end end if stun then if stun.Value>0 then e.Anchored=true -i=script.Parent:GetChildren()j=game.Players:GetPlayerFromCharacter(script.Parent -).Backpack:GetChildren()for q=1,#i do if i[q].className=='Tool'then g:Clone(). -Parent=i[q]print(j)table.insert(j,i[q])end end for q=1,#j do if j[q]: -FindFirstChild'RobloxBuildTool'==nil then h:Clone().Parent=j[q]j[q].Parent=game. -Lighting end end wait(0.2)for q=1,#j do j[q].Parent=game.Players: -GetPlayerFromCharacter(script.Parent).Backpack end stun.Value=stun.Value-n else -e.Anchored=false for q=1,#j do rbTool=j[q]:FindFirstChild'RobloxBuildTool'if -rbTool then rbTool:Remove()end j[q].Parent=game.Lighting end wait(0.2)for q=1,#j -do wasInCharacter=j[q]:FindFirstChild'InCharTag'if wasInChar then wasInChar: -Remove()j[q].Parent=script.Parent else j[q].Parent=game.Players: -GetPlayerFromCharacter(script.Parent).Backpack end end stun:Remove()end end if p -~=0 then newCo=coroutine.create(billboardHealthChange)coroutine.resume(newCo,p) -end end o=d.Health+p*n if o*1.010 then d. -Health=d.MaxHealth end end end \ No newline at end of file +Changed:connect(setMaxHealth)local n=Instance.new'Fire'n.Heat=0.1 n.Size=3 n. +Name='FireEffect'n.Enabled=false while true do local o,p=wait(1),d.Health if p>0 +then local q=0 if f then local r,s,t,u,v=f:FindFirstChild'Regen',f: +FindFirstChild'Poison',f:FindFirstChild'Ice',f:FindFirstChild'Fire',f: +FindFirstChild'Stun'if r then q=q+r.Value.X if r.Value.Y>=0 then r.Value=Vector3 +.new(r.Value.X+r.Value.Z,r.Value.Y-o,r.Value.Z)elseif r.Value.Y==-1 then r.Value +=Vector3.new(r.Value.X+r.Value.Z,-1,r.Value.Z)else r:remove()end end if s then q +=q-s.Value.X if s.Value.Y>=0 then s.Value=Vector3.new(s.Value.X+s.Value.Z,s. +Value.Y-o,s.Value.Z)elseif s.Value.Y==-1 then s.Value=Vector3.new(s.Value.X+s. +Value.Z,-1,s.Value.Z)else s:remove()end end if t then q=q-t.Value.X if t.Value.Y +>=0 then t.Value=Vector3.new(t.Value.X,t.Value.Y-o,t.Value.Z)else t:remove()end +end if u then n.Enabled=true n.Parent=c.Torso q=q-u.Value.X if u.Value.Y>=0 then +u.Value=Vector3.new(u.Value.X,u.Value.Y-o,u.Value.Z)else u:remove()n.Enabled= +false n.Parent=nil end end if v then if v.Value>0 then e.Anchored=true i=script. +Parent:GetChildren()j=game.Players:GetPlayerFromCharacter(script.Parent). +Backpack:GetChildren()for w=1,#i do if i[w].className=='Tool'then g:Clone(). +Parent=i[w]print(j)table.insert(j,i[w])end end for w=1,#j do if j[w]: +FindFirstChild'RobloxBuildTool'==nil then h:Clone().Parent=j[w]j[w].Parent=game. +Lighting end end wait(0.2)for w=1,#j do j[w].Parent=game.Players: +GetPlayerFromCharacter(script.Parent).Backpack end v.Value=v.Value-o else e. +Anchored=false for w=1,#j do local x=j[w]:FindFirstChild'RobloxBuildTool'if x +then x:Remove()end j[w].Parent=game.Lighting end wait(0.2)for w=1,#j do local x= +j[w]:FindFirstChild'InCharTag'if x then x:Remove()j[w].Parent=script.Parent else +j[w].Parent=game.Players:GetPlayerFromCharacter(script.Parent).Backpack end end +v:Remove()end end if q~=0 then coroutine.resume(coroutine.create( +billboardHealthChange),q)end end p=d.Health+q*o if p*1.010 then d.Health=d.MaxHealth end end end \ No newline at end of file diff --git a/processed/39250920.lua b/processed/39250920.lua index 64da4de..f03cd0b 100644 --- a/processed/39250920.lua +++ b/processed/39250920.lua @@ -89,42 +89,40 @@ Enum.TextYAlignment.Top z.TextWrap=true z.RobloxLocked=true z.Parent=x return x end function initialize(w)b[1]=newChoice'1)'b[2]=newChoice'2)'b[3]=newChoice'3)' b[4]=newChoice'4)'c=newChoice'5)'c.UserPrompt.Text='Goodbye!'c.Size=UDim2.new(1, 0,0,28)a=Instance.new'Frame'a.Name='UserDialogArea'a.Size=UDim2.new(0,350,0,200) -a.Style=Enum.FrameStyle.ChatBlue a.Visible=false imageLabel=Instance.new -'ImageLabel'imageLabel.Name='Tail'imageLabel.Size=UDim2.new(0,62,0,53)imageLabel -.Position=UDim2.new(1,8,0.25)imageLabel.Image= -'rbxasset://textures/chatBubble_botBlue_tailRight.png'imageLabel. -BackgroundTransparency=1 imageLabel.RobloxLocked=true imageLabel.Parent=a for x, -y in pairs(b)do y.RobloxLocked=true y.Parent=a end c.RobloxLocked=true c.Parent= -a a.RobloxLocked=true a.Parent=w end function presentDialogChoices(w,x)if not e -then return end f=w sortedDialogChoices={}for y,z in pairs(x)do if z:IsA -'DialogChoice'then table.insert(sortedDialogChoices,z)end end table.sort( -sortedDialogChoices,function(A,B)return A.Name=e.ConversationDistance)then -wanderDialog()end wait(1)end end function startDialog(w)if w.Parent and w.Parent -:IsA'BasePart'then if n:DistanceFromCharacter(w.Parent.Position)>=w. -ConversationDistance then showMessage(h,i)return end for x,A in pairs(s)do if x -and A then A.Enabled=false end end renewKillswitch(x)delay(1,checkForLeaveArea) -doDialog(x)end end function removeDialog(w)if s[w]then s[w]:Remove()s[w]=nil end -if t[w]then t[w]:disconnect()t[w]=nil end end function addDialog(w)if w.Parent -then if w.Parent:IsA'BasePart'then local x=o:clone()x.Enabled=not w.InUse x. -Adornee=w.Parent x.RobloxLocked=true x.Parent=game.CoreGui x.Image.Button. -MouseButton1Click:connect(function()startDialog(w)end)setChatNotificationTone(x, -w.Purpose,w.Tone)s[w]=x t[w]=w.Changed:connect(function(A)if A=='Parent'and w. -Parent then removeDialog(w)addDialog(w)elseif A=='InUse'then x.Enabled=not e and -not w.InUse if w==e then timeoutDialog()end elseif A=='Tone'or A=='Purpose'then +a.Style=Enum.FrameStyle.ChatBlue a.Visible=false local x=Instance.new +'ImageLabel'x.Name='Tail'x.Size=UDim2.new(0,62,0,53)x.Position=UDim2.new(1,8, +0.25)x.Image='rbxasset://textures/chatBubble_botBlue_tailRight.png'x. +BackgroundTransparency=1 x.RobloxLocked=true x.Parent=a for y,z in pairs(b)do z. +RobloxLocked=true z.Parent=a end c.RobloxLocked=true c.Parent=a a.RobloxLocked= +true a.Parent=w end function presentDialogChoices(w,x)if not e then return end f +=w local y={}for z,A in pairs(x)do if A:IsA'DialogChoice'then table.insert(y,A) +end end table.sort(y,function(B,C)return B.Name=e.ConversationDistance)then wanderDialog()end wait(1)end end function +startDialog(w)if w.Parent and w.Parent:IsA'BasePart'then if n: +DistanceFromCharacter(w.Parent.Position)>=w.ConversationDistance then +showMessage(h,i)return end for x,y in pairs(s)do if x and y then y.Enabled=false +end end renewKillswitch(x)delay(1,checkForLeaveArea)doDialog(x)end end function +removeDialog(w)if s[w]then s[w]:Remove()s[w]=nil end if t[w]then t[w]: +disconnect()t[w]=nil end end function addDialog(w)if w.Parent then if w.Parent: +IsA'BasePart'then local x=o:clone()x.Enabled=not w.InUse x.Adornee=w.Parent x. +RobloxLocked=true x.Parent=game.CoreGui x.Image.Button.MouseButton1Click: +connect(function()startDialog(w)end)setChatNotificationTone(x,w.Purpose,w.Tone)s +[w]=x t[w]=w.Changed:connect(function(y)if y=='Parent'and w.Parent then +removeDialog(w)addDialog(w)elseif y=='InUse'then x.Enabled=not e and not w.InUse +if w==e then timeoutDialog()end elseif y=='Tone'or y=='Purpose'then setChatNotificationTone(x,w.Purpose,w.Tone)end end)else t[w]=w.Changed:connect( function(x)if x=='Parent'and w.Parent then removeDialog(w)addDialog(w)end end) end end end function fetchScripts()local w=game:GetService'InsertService': @@ -140,5 +138,5 @@ UDim2.new(0,0,0,0)w.Size=UDim2.new(0,0,0,0)w.BackgroundTransparency=1 w. RobloxLocked=true w.Parent=u.BottomLeftControl initialize(w)game. CollectionService.ItemAdded:connect(function(x)if x:IsA'Dialog'then addDialog(x) end end)game.CollectionService.ItemRemoved:connect(function(x)if x:IsA'Dialog' -then removeDialog(x)end end)for x,A in pairs(game.CollectionService: -GetCollection'Dialog')do if A:IsA'Dialog'then addDialog(A)end end end onLoad() \ No newline at end of file +then removeDialog(x)end end)for x,y in pairs(game.CollectionService: +GetCollection'Dialog')do if y:IsA'Dialog'then addDialog(y)end end end onLoad() \ No newline at end of file diff --git a/processed/45284430.lua b/processed/45284430.lua index fcf0373..eaac569 100644 --- a/processed/45284430.lua +++ b/processed/45284430.lua @@ -161,330 +161,326 @@ d={}end if not d['TextLabelSizePadY']then d['TextLabelSizePadY']=0 end if not d[ 1,0)g.Parent=b for h,i in ipairs(c)do i.Parent=g end local j=function()wait() layoutGuiObjectsHelper(g,c,d)end b.Changed:connect(function(k)if k== 'AbsoluteSize'then j(nil)end end)b.AncestryChanged:connect(j) -layoutGuiObjectsHelper(g,c,d)end a.CreateSlider=function(b,c,d)local e=Instance. -new'Frame'e.Size=UDim2.new(1,0,1,0)e.BackgroundTransparency=1 e.Name='SliderGui' -local g=Instance.new'IntValue'g.Name='SliderSteps'g.Value=b g.Parent=e local h= -Instance.new'TextButton'h.Name='AreaSoak'h.Text=''h.BackgroundTransparency=1 h. -Active=false h.Size=UDim2.new(1,0,1,0)h.Visible=false h.ZIndex=4 e. -AncestryChanged:connect(function(i,j)if j==nil then h.Parent=nil else h.Parent= -getScreenGuiAncestor(e)end end)local i=Instance.new'IntValue'i.Name= -'SliderPosition'i.Value=0 i.Parent=e local j,k=math.random(1,100),Instance.new -'TextButton'k.Text=''k.AutoButtonColor=false k.Name='Bar'k.BackgroundColor3= -Color3.new(0,0,0)if type(c)=='number'then k.Size=UDim2.new(0,c,0,5)else k.Size= -UDim2.new(0,200,0,5)end k.BorderColor3=Color3.new(0.37254901960784315, -0.37254901960784315,0.37254901960784315)k.ZIndex=2 k.Parent=e if d['X']and d['X' -]['Scale']and d['X']['Offset']and d['Y']and d['Y']['Scale']and d['Y']['Offset'] -then k.Position=d end local l=Instance.new'ImageButton'l.Name='Slider'l. -BackgroundTransparency=1 l.Image='rbxasset://textures/ui/Slider.png'l.Position= -UDim2.new(0,0,0.5,-10)l.Size=UDim2.new(0,20,0,20)l.ZIndex=3 l.Parent=k local m= -nil h.MouseLeave:connect(function()if h.Visible then cancelSlide(h)end end)h. -MouseButton1Up:connect(function()if h.Visible then cancelSlide(h)end end)l. -MouseButton1Down:connect(function()h.Visible=true if m then m:disconnect()end m= -h.MouseMoved:connect(function(n,o)setSliderPos(n,l,i,k,b)end)end)l. -MouseButton1Up:connect(function()cancelSlide(h)end)i.Changed:connect(function(n) -i.Value=math.min(b,math.max(1,i.Value))local o=(i.Value-1)/(b-1)l.Position=UDim2 -.new(o,-l.AbsoluteSize.X/2,l.Position.Y.Scale,l.Position.Y.Offset)end)k. -MouseButton1Down:connect(function(n,o)setSliderPos(n,l,i,k,b)end)return e,i,g -end a.CreateTrueScrollingFrame=function()local b,c,d,e,g,h,i=nil,nil,nil,nil, -false,{},Instance.new'Frame'i.Name='ScrollingFrame'i.Active=true i.Size=UDim2. -new(1,0,1,0)i.ClipsDescendants=true local j=Instance.new'Frame'j.Name= -'ControlFrame'j.BackgroundTransparency=1 j.Size=UDim2.new(0,18,1,0)j.Position= -UDim2.new(1,-20,0,0)j.Parent=i local k=Instance.new'BoolValue'k.Value=false k. -Name='ScrollBottom'k.Parent=j local l=Instance.new'BoolValue'l.Value=false l. -Name='scrollUp'l.Parent=j local m=Instance.new'TextButton'm.Name= -'ScrollUpButton'm.Text=''m.AutoButtonColor=false m.BackgroundColor3=Color3.new(0 -,0,0)m.BorderColor3=Color3.new(1,1,1)m.BackgroundTransparency=0.5 m.Size=UDim2. -new(0,18,0,18)m.ZIndex=2 m.Parent=j for n=1,6 do local o=Instance.new'Frame'o. -BorderColor3=Color3.new(1,1,1)o.Name='tri'..tostring(n)o.ZIndex=3 o. -BackgroundTransparency=0.5 o.Size=UDim2.new(0,12-((n-1)*2),0,0)o.Position=UDim2. -new(0,3+(n-1),0.5,2-(n-1))o.Parent=m end m.MouseEnter:connect(function()m. -BackgroundTransparency=0.1 local n=m:GetChildren()for o=1,#n do n[o]. -BackgroundTransparency=0.1 end end)m.MouseLeave:connect(function()m. -BackgroundTransparency=0.5 local n=m:GetChildren()for o=1,#n do n[o]. -BackgroundTransparency=0.5 end end)local n=m:clone()n.Name='ScrollDownButton'n. -Position=UDim2.new(0,0,1,-18)local o=n:GetChildren()for p=1,#o do o[p].Position= -UDim2.new(0,3+(p-1),0.5,-2+(p-1))end n.MouseEnter:connect(function()n. -BackgroundTransparency=0.1 local p=n:GetChildren()for q=1,#p do p[q]. -BackgroundTransparency=0.1 end end)n.MouseLeave:connect(function()n. -BackgroundTransparency=0.5 local p=n:GetChildren()for q=1,#p do p[q]. -BackgroundTransparency=0.5 end end)n.Parent=j local p=Instance.new'Frame'p.Name= -'ScrollTrack'p.BackgroundTransparency=1 p.Size=UDim2.new(0,18,1,-38)p.Position= -UDim2.new(0,0,0,19)p.Parent=j local q=Instance.new'TextButton'q.BackgroundColor3 -=Color3.new(0,0,0)q.BorderColor3=Color3.new(1,1,1)q.BackgroundTransparency=0.5 q -.AutoButtonColor=false q.Text=''q.Active=true q.Name='ScrollBar'q.ZIndex=2 q. -BackgroundTransparency=0.5 q.Size=UDim2.new(0,18,0.1,0)q.Position=UDim2.new(0,0, -0,0)q.Parent=p local r=Instance.new'Frame'r.Name='ScrollNub'r.BorderColor3= -Color3.new(1,1,1)r.Size=UDim2.new(0,10,0,0)r.Position=UDim2.new(0.5,-5,0.5,0)r. -ZIndex=2 r.BackgroundTransparency=0.5 r.Parent=q local s=r:clone()s.Position= -UDim2.new(0.5,-5,0.5,-2)s.Parent=q local t=r:clone()t.Position=UDim2.new(0.5,-5, -0.5,2)t.Parent=q q.MouseEnter:connect(function()q.BackgroundTransparency=0.1 r. -BackgroundTransparency=0.1 s.BackgroundTransparency=0.1 t.BackgroundTransparency -=0.1 end)q.MouseLeave:connect(function()q.BackgroundTransparency=0.5 r. -BackgroundTransparency=0.5 s.BackgroundTransparency=0.5 t.BackgroundTransparency -=0.5 end)local u=Instance.new'ImageButton'u.Active=false u.Size=UDim2.new(1.5,0, -1.5,0)u.AutoButtonColor=false u.BackgroundTransparency=1 u.Name='mouseDrag'u. -Position=UDim2.new(-0.25,0,-0.25,0)u.ZIndex=10 local function positionScrollBar( -v,w,x)local y=q.Position if w(p.AbsolutePosition.y+p.AbsoluteSize.y)then -q.Position=UDim2.new(q.Position.X.Scale,q.Position.X.Offset,1-z,0)return(y~=q. -Position)end local A=(w-p.AbsolutePosition.y-x)/p.AbsoluteSize.y if A+z>1 then A -=1-z k.Value=true l.Value=false elseif A<=0 then A=0 l.Value=true k.Value=false -else l.Value=false k.Value=false end q.Position=UDim2.new(q.Position.X.Scale,q. -Position.X.Offset,A,0)return(y~=q.Position)end local function -drillDownSetHighLow(v)if not v or not v:IsA'GuiObject'then return end if v==j -then return end if v:IsDescendantOf(j)then return end if not v.Visible then -return end if b and b>v.AbsolutePosition.Y then b=v.AbsolutePosition.Y elseif -not b then b=v.AbsolutePosition.Y end if c and c<(v.AbsolutePosition.Y+v. -AbsoluteSize.Y)then c=v.AbsolutePosition.Y+v.AbsoluteSize.Y elseif not c then c= -v.AbsolutePosition.Y+v.AbsoluteSize.Y end local w=v:GetChildren()for x=1,#w do -drillDownSetHighLow(w[x])end end local function resetHighLow()local v=i: -GetChildren()for w=1,#v do drillDownSetHighLow(v[w])end end local function -recalculate()g=true local v=0 if q.Position.Y.Scale>0 then if q.Visible then v=q -.Position.Y.Scale/((p.AbsoluteSize.Y-q.AbsoluteSize.Y)/p.AbsoluteSize.Y)else v=0 -end end if v>0.99 then v=1 end local w,x=(i.AbsoluteSize.Y-(c-b))*v,i: -GetChildren()for y=1,#x do if x[y]~=j then x[y].Position=UDim2.new(x[y].Position -.X.Scale,x[y].Position.X.Offset,0,math.ceil(x[y].AbsolutePosition.Y)-math.ceil(b -)+w)end end b=nil c=nil resetHighLow()g=false end local function -setSliderSizeAndPosition()if not c or not b then return end local v=math.abs(c-b -)if v==0 then q.Visible=false n.Visible=false m.Visible=false if d then d: -disconnect()d=nil end if e then e:disconnect()e=nil end return end local w=i. -AbsoluteSize.Y/v if w>=1 then q.Visible=false n.Visible=false m.Visible=false -recalculate()else q.Visible=true n.Visible=true m.Visible=true q.Size=UDim2.new( -q.Size.X.Scale,q.Size.X.Offset,w,0)end local x=(i.AbsolutePosition.Y-b)/v q. -Position=UDim2.new(q.Position.X.Scale,q.Position.X.Offset,x,-q.AbsoluteSize.X/2) -if q.AbsolutePosition.y(p.AbsolutePosition.y+p.AbsoluteSize.y)then local y=q. -AbsoluteSize.Y/p.AbsoluteSize.Y q.Position=UDim2.new(q.Position.X.Scale,q. -Position.X.Offset,1-y,0)end end local v,w=7,false local function doScrollUp()if -w then return end w=true if positionScrollBar(0,q.AbsolutePosition.Y-v,0)then -recalculate()end w=false end local x=false local function doScrollDown()if x -then return end x=true if positionScrollBar(0,q.AbsolutePosition.Y+v,0)then -recalculate()end x=false end local function scrollUp(y)if m.Active then -scrollStamp=tick()local z,A=scrollStamp,nil A=u.MouseButton1Up:connect(function( -)scrollStamp=tick()u.Parent=nil A:disconnect()end)u.Parent=getScreenGuiAncestor( -q)doScrollUp()wait(0.2)local B,C=tick(),0.1 while scrollStamp==z do doScrollUp() -if y and y>q.AbsolutePosition.y then break end if not m.Active then break end if -tick()-B>5 then C=0 elseif tick()-B>2 then C=0.06 end wait(C)end end end -local function scrollDown(y)if n.Active then scrollStamp=tick()local z,A= -scrollStamp,nil A=u.MouseButton1Up:connect(function()scrollStamp=tick()u.Parent= -nil A:disconnect()end)u.Parent=getScreenGuiAncestor(q)doScrollDown()wait(0.2) -local B,C=tick(),0.1 while scrollStamp==z do doScrollDown()if y and y<(q. -AbsolutePosition.y+q.AbsoluteSize.x)then break end if not n.Active then break -end if tick()-B>5 then C=0 elseif tick()-B>2 then C=0.06 end wait(C)end end end -q.MouseButton1Down:connect(function(y,z)if q.Active then scrollStamp=tick()local -A=z-q.AbsolutePosition.y if d then d:disconnect()d=nil end if e then e: -disconnect()e=nil end local B,C=z,false d=u.MouseMoved:connect(function(D,E)if C -then return end C=true if positionScrollBar(D,E,A)then recalculate()end C=false -end)e=u.MouseButton1Up:connect(function()scrollStamp=tick()u.Parent=nil d: -disconnect()d=nil e:disconnect()drag=nil end)u.Parent=getScreenGuiAncestor(q)end -end)local y=0 m.MouseButton1Down:connect(function()l()end)n.MouseButton1Down: -connect(function()scrollDown()end)local function scrollTick()scrollStamp=tick() -end m.MouseButton1Up:connect(scrollTick)n.MouseButton1Up:connect(scrollTick)q. -MouseButton1Up:connect(scrollTick)local function highLowRecheck()local z,A=b,c b -=nil c=nil resetHighLow()if(b~=z)or(c~=A)then setSliderSizeAndPosition()end end -local function descendantChanged(z,A)if g then return end if not z.Visible then -return end if A=='Size'or A=='Position'then wait()highLowRecheck()end end i. -DescendantAdded:connect(function(z)if not z:IsA'GuiObject'then return end if z. -Visible then wait()highLowRecheck()end h[z]=z.Changed:connect(function(A) -descendantChanged(z,A)end)end)i.DescendantRemoving:connect(function(z)if not z: -IsA'GuiObject'then return end if h[z]then h[z]:disconnect()h[z]=nil end wait() -highLowRecheck()end)i.Changed:connect(function(z)if z=='AbsoluteSize'then if not +layoutGuiObjectsHelper(g,c,d)end a.CreateSlider=function(b,c,d)local g=Instance. +new'Frame'g.Size=UDim2.new(1,0,1,0)g.BackgroundTransparency=1 g.Name='SliderGui' +local h=Instance.new'IntValue'h.Name='SliderSteps'h.Value=b h.Parent=g local i= +Instance.new'TextButton'i.Name='AreaSoak'i.Text=''i.BackgroundTransparency=1 i. +Active=false i.Size=UDim2.new(1,0,1,0)i.Visible=false i.ZIndex=4 g. +AncestryChanged:connect(function(j,k)if k==nil then i.Parent=nil else i.Parent= +getScreenGuiAncestor(g)end end)local j=Instance.new'IntValue'j.Name= +'SliderPosition'j.Value=0 j.Parent=g local k=Instance.new'TextButton'k.Text=''k. +AutoButtonColor=false k.Name='Bar'k.BackgroundColor3=Color3.new(0,0,0)if type(c) +=='number'then k.Size=UDim2.new(0,c,0,5)else k.Size=UDim2.new(0,200,0,5)end k. +BorderColor3=Color3.new(0.37254901960784315,0.37254901960784315, +0.37254901960784315)k.ZIndex=2 k.Parent=g if d['X']and d['X']['Scale']and d['X'] +['Offset']and d['Y']and d['Y']['Scale']and d['Y']['Offset']then k.Position=d end +local l=Instance.new'ImageButton'l.Name='Slider'l.BackgroundTransparency=1 l. +Image='rbxasset://textures/ui/Slider.png'l.Position=UDim2.new(0,0,0.5,-10)l.Size +=UDim2.new(0,20,0,20)l.ZIndex=3 l.Parent=k local m=nil i.MouseLeave:connect( +function()if i.Visible then cancelSlide(i)end end)i.MouseButton1Up:connect( +function()if i.Visible then cancelSlide(i)end end)l.MouseButton1Down:connect( +function()i.Visible=true if m then m:disconnect()end m=i.MouseMoved:connect( +function(n,o)setSliderPos(n,l,j,k,b)end)end)l.MouseButton1Up:connect(function() +cancelSlide(i)end)j.Changed:connect(function(n)j.Value=math.min(b,math.max(1,j. +Value))local o=(j.Value-1)/(b-1)l.Position=UDim2.new(o,-l.AbsoluteSize.X/2,l. +Position.Y.Scale,l.Position.Y.Offset)end)k.MouseButton1Down:connect(function(n,o +)setSliderPos(n,l,j,k,b)end)return g,j,h end a.CreateTrueScrollingFrame=function +()local b,c,d,g,h,i,j=nil,nil,nil,nil,false,{},Instance.new'Frame'j.Name= +'ScrollingFrame'j.Active=true j.Size=UDim2.new(1,0,1,0)j.ClipsDescendants=true +local k=Instance.new'Frame'k.Name='ControlFrame'k.BackgroundTransparency=1 k. +Size=UDim2.new(0,18,1,0)k.Position=UDim2.new(1,-20,0,0)k.Parent=j local l= +Instance.new'BoolValue'l.Value=false l.Name='ScrollBottom'l.Parent=k local m= +Instance.new'BoolValue'm.Value=false m.Name='scrollUp'm.Parent=k local n= +Instance.new'TextButton'n.Name='ScrollUpButton'n.Text=''n.AutoButtonColor=false +n.BackgroundColor3=Color3.new(0,0,0)n.BorderColor3=Color3.new(1,1,1)n. +BackgroundTransparency=0.5 n.Size=UDim2.new(0,18,0,18)n.ZIndex=2 n.Parent=k for +o=1,6 do local p=Instance.new'Frame'p.BorderColor3=Color3.new(1,1,1)p.Name='tri' +..tostring(o)p.ZIndex=3 p.BackgroundTransparency=0.5 p.Size=UDim2.new(0,12-((o-1 +)*2),0,0)p.Position=UDim2.new(0,3+(o-1),0.5,2-(o-1))p.Parent=n end n.MouseEnter: +connect(function()n.BackgroundTransparency=0.1 local o=n:GetChildren()for p=1,#o +do o[p].BackgroundTransparency=0.1 end end)n.MouseLeave:connect(function()n. +BackgroundTransparency=0.5 local o=n:GetChildren()for p=1,#o do o[p]. +BackgroundTransparency=0.5 end end)local o=n:clone()o.Name='ScrollDownButton'o. +Position=UDim2.new(0,0,1,-18)local p=o:GetChildren()for q=1,#p do p[q].Position= +UDim2.new(0,3+(q-1),0.5,-2+(q-1))end o.MouseEnter:connect(function()o. +BackgroundTransparency=0.1 local q=o:GetChildren()for r=1,#q do q[r]. +BackgroundTransparency=0.1 end end)o.MouseLeave:connect(function()o. +BackgroundTransparency=0.5 local q=o:GetChildren()for r=1,#q do q[r]. +BackgroundTransparency=0.5 end end)o.Parent=k local q=Instance.new'Frame'q.Name= +'ScrollTrack'q.BackgroundTransparency=1 q.Size=UDim2.new(0,18,1,-38)q.Position= +UDim2.new(0,0,0,19)q.Parent=k local r=Instance.new'TextButton'r.BackgroundColor3 +=Color3.new(0,0,0)r.BorderColor3=Color3.new(1,1,1)r.BackgroundTransparency=0.5 r +.AutoButtonColor=false r.Text=''r.Active=true r.Name='ScrollBar'r.ZIndex=2 r. +BackgroundTransparency=0.5 r.Size=UDim2.new(0,18,0.1,0)r.Position=UDim2.new(0,0, +0,0)r.Parent=q local s=Instance.new'Frame's.Name='ScrollNub's.BorderColor3= +Color3.new(1,1,1)s.Size=UDim2.new(0,10,0,0)s.Position=UDim2.new(0.5,-5,0.5,0)s. +ZIndex=2 s.BackgroundTransparency=0.5 s.Parent=r local t=s:clone()t.Position= +UDim2.new(0.5,-5,0.5,-2)t.Parent=r local u=s:clone()u.Position=UDim2.new(0.5,-5, +0.5,2)u.Parent=r r.MouseEnter:connect(function()r.BackgroundTransparency=0.1 s. +BackgroundTransparency=0.1 t.BackgroundTransparency=0.1 u.BackgroundTransparency +=0.1 end)r.MouseLeave:connect(function()r.BackgroundTransparency=0.5 s. +BackgroundTransparency=0.5 t.BackgroundTransparency=0.5 u.BackgroundTransparency +=0.5 end)local v=Instance.new'ImageButton'v.Active=false v.Size=UDim2.new(1.5,0, +1.5,0)v.AutoButtonColor=false v.BackgroundTransparency=1 v.Name='mouseDrag'v. +Position=UDim2.new(-0.25,0,-0.25,0)v.ZIndex=10 local function positionScrollBar( +w,x,y)local z=r.Position if x(q.AbsolutePosition.y+q.AbsoluteSize.y)then +r.Position=UDim2.new(r.Position.X.Scale,r.Position.X.Offset,1-A,0)return(z~=r. +Position)end local B=(x-q.AbsolutePosition.y-y)/q.AbsoluteSize.y if B+A>1 then B +=1-A l.Value=true m.Value=false elseif B<=0 then B=0 m.Value=true l.Value=false +else m.Value=false l.Value=false end r.Position=UDim2.new(r.Position.X.Scale,r. +Position.X.Offset,B,0)return(z~=r.Position)end local function +drillDownSetHighLow(w)if not w or not w:IsA'GuiObject'then return end if w==k +then return end if w:IsDescendantOf(k)then return end if not w.Visible then +return end if(b and b>w.AbsolutePosition.Y)or not b then b=w.AbsolutePosition.Y +end if(c and c<(w.AbsolutePosition.Y+w.AbsoluteSize.Y))or not c then c=w. +AbsolutePosition.Y+w.AbsoluteSize.Y end local x=w:GetChildren()for y=1,#x do +drillDownSetHighLow(x[y])end end local function resetHighLow()local w=j: +GetChildren()for x=1,#w do drillDownSetHighLow(w[x])end end local function +recalculate()h=true local w=0 if r.Position.Y.Scale>0 then if r.Visible then w=r +.Position.Y.Scale/((q.AbsoluteSize.Y-r.AbsoluteSize.Y)/q.AbsoluteSize.Y)else w=0 +end end if w>0.99 then w=1 end local x,y=(j.AbsoluteSize.Y-(c-b))*w,j: +GetChildren()for z=1,#y do if y[z]~=k then y[z].Position=UDim2.new(y[z].Position +.X.Scale,y[z].Position.X.Offset,0,math.ceil(y[z].AbsolutePosition.Y)-math.ceil(b +)+x)end end b=nil c=nil resetHighLow()h=false end local function +setSliderSizeAndPosition()if not c or not b then return end local w=math.abs(c-b +)if w==0 then r.Visible=false o.Visible=false n.Visible=false if d then d: +disconnect()d=nil end if g then g:disconnect()g=nil end return end local x=j. +AbsoluteSize.Y/w if x>=1 then r.Visible=false o.Visible=false n.Visible=false +recalculate()else r.Visible=true o.Visible=true n.Visible=true r.Size=UDim2.new( +r.Size.X.Scale,r.Size.X.Offset,x,0)end local y=(j.AbsolutePosition.Y-b)/w r. +Position=UDim2.new(r.Position.X.Scale,r.Position.X.Offset,y,-r.AbsoluteSize.X/2) +if r.AbsolutePosition.y(q.AbsolutePosition.y+q.AbsoluteSize.y)then local z=r. +AbsoluteSize.Y/q.AbsoluteSize.Y r.Position=UDim2.new(r.Position.X.Scale,r. +Position.X.Offset,1-z,0)end end local w,x=7,false local function doScrollUp()if +x then return end x=true if positionScrollBar(0,r.AbsolutePosition.Y-w,0)then +recalculate()end x=false end local y=false local function doScrollDown()if y +then return end y=true if positionScrollBar(0,r.AbsolutePosition.Y+w,0)then +recalculate()end y=false end local function scrollUp(z)if n.Active then local A= +tick()local B,C=A,nil C=v.MouseButton1Up:connect(function()A=tick()v.Parent=nil +C:disconnect()end)v.Parent=getScreenGuiAncestor(r)doScrollUp()wait(0.2)local D,E +=tick(),0.1 while A==B do doScrollUp()if z and z>r.AbsolutePosition.y then break +end if not n.Active then break end if tick()-D>5 then E=0 elseif tick()-D>2 then +E=0.06 end wait(E)end end end local function scrollDown(z)if o.Active then local +A=tick()local B,C=A,nil C=v.MouseButton1Up:connect(function()A=tick()v.Parent= +nil C:disconnect()end)v.Parent=getScreenGuiAncestor(r)doScrollDown()wait(0.2) +local D,E=tick(),0.1 while A==B do doScrollDown()if z and z<(r.AbsolutePosition. +y+r.AbsoluteSize.x)then break end if not o.Active then break end if tick()-D>5 +then E=0 elseif tick()-D>2 then E=0.06 end wait(E)end end end r.MouseButton1Down +:connect(function(z,A)if r.Active then local B,C=tick(),A-r.AbsolutePosition.y +if d then d:disconnect()d=nil end if g then g:disconnect()g=nil end local D= +false d=v.MouseMoved:connect(function(E,F)if D then return end D=true if +positionScrollBar(E,F,C)then recalculate()end D=false end)g=v.MouseButton1Up: +connect(function()B=tick()v.Parent=nil d:disconnect()d=nil g:disconnect()drag= +nil end)v.Parent=getScreenGuiAncestor(r)end end)local z=0 n.MouseButton1Down: +connect(function()m()end)o.MouseButton1Down:connect(function()scrollDown()end) +local function scrollTick()scrollStamp=tick()end n.MouseButton1Up:connect( +scrollTick)o.MouseButton1Up:connect(scrollTick)r.MouseButton1Up:connect( +scrollTick)local function highLowRecheck()local A,B=b,c b=nil c=nil +resetHighLow()if(b~=A)or(c~=B)then setSliderSizeAndPosition()end end +local function descendantChanged(A,B)if h then return end if not A.Visible then +return end if B=='Size'or B=='Position'then wait()highLowRecheck()end end j. +DescendantAdded:connect(function(A)if not A:IsA'GuiObject'then return end if A. +Visible then wait()highLowRecheck()end i[A]=A.Changed:connect(function(B) +descendantChanged(A,B)end)end)j.DescendantRemoving:connect(function(A)if not A: +IsA'GuiObject'then return end if i[A]then i[A]:disconnect()i[A]=nil end wait() +highLowRecheck()end)j.Changed:connect(function(A)if A=='AbsoluteSize'then if not c or not b then return end highLowRecheck()setSliderSizeAndPosition()end end) -return i,j end a.CreateScrollingFrame=function(b,c)local d=Instance.new'Frame'd. -Name='ScrollingFrame'd.BackgroundTransparency=1 d.Size=UDim2.new(1,0,1,0)local e -=Instance.new'ImageButton'e.Name='ScrollUpButton'e.BackgroundTransparency=1 e. -Image='rbxasset://textures/ui/scrollbuttonUp.png'e.Size=UDim2.new(0,17,0,17) -local g=Instance.new'ImageButton'g.Name='ScrollDownButton'g. -BackgroundTransparency=1 g.Image='rbxasset://textures/ui/scrollbuttonDown.png'g. -Size=UDim2.new(0,17,0,17)local h=Instance.new'ImageButton'h.Name='ScrollBar'h. -Image='rbxasset://textures/ui/scrollbar.png'h.BackgroundTransparency=1 h.Size= -UDim2.new(0,18,0,150)local i,j=0,Instance.new'ImageButton'j.Image= -'http://www.roblox.com/asset/?id=61367186'j.Size=UDim2.new(1,0,0,16)j. -BackgroundTransparency=1 j.Name='ScrollDrag'j.Active=true j.Parent=h local k= -Instance.new'ImageButton'k.Active=false k.Size=UDim2.new(1.5,0,1.5,0)k. -AutoButtonColor=false k.BackgroundTransparency=1 k.Name='mouseDrag'k.Position= -UDim2.new(-0.25,0,-0.25,0)k.ZIndex=10 local l='simple'if c and tostring(c)then l -=c end local m,n,o=1,0,0 local p,q,r,s=function()o=0 local p={}if b then for q,r -in ipairs(b)do if r.Parent==d then table.insert(p,r)end end else local q=d: -GetChildren()if q then for r,s in ipairs(q)do if s:IsA'GuiObject'then table. -insert(p,s)end end end end if#p==0 then e.Active=false g.Active=false j.Active= -false m=1 return end if m>#p then m=#p end if m<1 then m=1 end local q,r,s,t,u,v -,w,x,y=d.AbsoluteSize.Y,d.AbsoluteSize.Y,d.AbsoluteSize.X,0,0,true,0,#p,0 x=m -while x<=#p and w=s then w=w+y y=0 t=p[x]. -AbsoluteSize.X end if p[x].AbsoluteSize.Y>y then y=p[x].AbsoluteSize.Y end x=x+1 -end w=w+y y=0 x=m-1 t=0 while w+y=1 do t=t+p[x].AbsoluteSize.X u=u+1 if -t>=s then n=u-1 u=0 t=p[x].AbsoluteSize.X if w+y<=q then w=w+y if m<=n then m=1 -break else m=m-n end y=0 else break end end if p[x].AbsoluteSize.Y>y then y=p[x] -.AbsoluteSize.Y end x=x-1 end if(x==0)and(w+y<=q)then m=1 end t=0 u=0 v=true -local z,A,B=0,0 if p[1]then B=math.ceil(math.floor(math.fmod(q,p[1].AbsoluteSize -.X))/2)A=math.ceil(math.floor(math.fmod(s,p[1].AbsoluteSize.Y))/2)end for C,D in -ipairs(p)do if C=s then if v then n=u-1 v=false end t=0 r -=r-D.AbsoluteSize.Y end D.Position=UDim2.new(D.Position.X.Scale,t+A,0,q-r+B)t=t+ -D.AbsoluteSize.X D.Visible=((r-D.AbsoluteSize.Y)>=0)if D.Visible then o=o+1 end -z=D.AbsoluteSize end end end e.Active=(m>1)if z==0 then g.Active=false else g. -Active=((r-z.Y)<0)end j.Active=#p>o j.Visible=j.Active end,function()local p={}o -=0 if b then for q,r in ipairs(b)do if r.Parent==d then table.insert(p,r)end end -else local q=d:GetChildren()if q then for r,s in ipairs(q)do if s:IsA'GuiObject' -then table.insert(p,s)end end end end if#p==0 then e.Active=false g.Active=false -j.Active=false m=1 return end if m>#p then m=#p end local q,r,s,t=d.AbsoluteSize -.Y,d.AbsoluteSize.Y,0,#p while s=1 do if t>=m then s=s+p[t]. -AbsoluteSize.Y else if s+p[t].AbsoluteSize.Y<=q then s=s+p[t].AbsoluteSize.Y if -m<=1 then m=1 break else m=m-1 end else break end end t=t-1 end t=m for u,v in -ipairs(p)do if u=0 then v.Visible=true o=o+1 else v.Visible=false end end -end end e.Active=(m>1)g.Active=(r<0)j.Active=#p>o j.Visible=j.Active end, -function()local p,q=0,d:GetChildren()if q then for r,s in ipairs(q)do if s:IsA -'GuiObject'then p=p+1 end end end if not j.Parent then return end local r=j. -Parent.AbsoluteSize.y*(1/(p-o+1))if r<16 then r=16 end j.Size=UDim2.new(j.Size.X -.Scale,j.Size.X.Offset,j.Size.Y.Scale,r)local s=(m-1)/(p-o)if s>1 then s=1 -elseif s<0 then s=0 end local t=0 if s~=0 then t=(s*h.AbsoluteSize.y)-(s*j. -AbsoluteSize.y)end j.Position=UDim2.new(j.Position.X.Scale,j.Position.X.Offset,j -.Position.Y.Scale,t)end,false local t=function()if s then return end s=true -wait()local t,u=nil if l=='grid'then t,u=pcall(function()p()end)elseif l== -'simple'then t,u=pcall(function()q()end)end if not t then print(u)end r()s=false -end local u,v=function()m=m-n if m<1 then m=1 end t(nil)end,function()m=m+n t( -nil)end local w,x,y=function(w)if e.Active then i=tick()local x,y=i,nil y=k. -MouseButton1Up:connect(function()i=tick()k.Parent=nil y:disconnect()end)k.Parent -=getScreenGuiAncestor(h)u()wait(0.2)local z,A=tick(),0.1 while i==x do u()if w -and w>j.AbsolutePosition.y then break end if not e.Active then break end if -tick()-z>5 then A=0 elseif tick()-z>2 then A=0.06 end wait(A)end end end, -function(w)if g.Active then i=tick()local x,y=i,nil y=k.MouseButton1Up:connect( -function()i=tick()k.Parent=nil y:disconnect()end)k.Parent=getScreenGuiAncestor(h -)v()wait(0.2)local z,A=tick(),0.1 while i==x do v()if w and w<(j. -AbsolutePosition.y+j.AbsoluteSize.x)then break end if not g.Active then break -end if tick()-z>5 then A=0 elseif tick()-z>2 then A=0.06 end wait(A)end end end, -0 j.MouseButton1Down:connect(function(z,A)if j.Active then i=tick()local B,C,D=A --j.AbsolutePosition.y,nil,nil C=k.MouseMoved:connect(function(E,F)local G,H,I=h. -AbsolutePosition.y,h.AbsoluteSize.y,j.AbsoluteSize.y local J=G+H-I F=F-B F=F#q then n=#q end if n<1 then n=1 end local r,s,t,u,v,w +,x,y,z=d.AbsoluteSize.Y,d.AbsoluteSize.Y,d.AbsoluteSize.X,0,0,true,0,#q,0 y=n +while y<=#q and x=t then x=x+z z=0 u=q[y]. +AbsoluteSize.X end if q[y].AbsoluteSize.Y>z then z=q[y].AbsoluteSize.Y end y=y+1 +end x=x+z z=0 y=n-1 u=0 while x+z=1 do u=u+q[y].AbsoluteSize.X v=v+1 if +u>=t then o=v-1 v=0 u=q[y].AbsoluteSize.X if x+z<=r then x=x+z if n<=o then n=1 +break else n=n-o end z=0 else break end end if q[y].AbsoluteSize.Y>z then z=q[y] +.AbsoluteSize.Y end y=y-1 end if(y==0)and(x+z<=r)then n=1 end u=0 v=0 w=true +local A,B,C=0,0 if q[1]then C=math.ceil(math.floor(math.fmod(r,q[1].AbsoluteSize +.X))/2)B=math.ceil(math.floor(math.fmod(t,q[1].AbsoluteSize.Y))/2)end for D,E in +ipairs(q)do if D=t then if w then o=v-1 w=false end u=0 s +=s-E.AbsoluteSize.Y end E.Position=UDim2.new(E.Position.X.Scale,u+B,0,r-s+C)u=u+ +E.AbsoluteSize.X E.Visible=((s-E.AbsoluteSize.Y)>=0)if E.Visible then p=p+1 end +A=E.AbsoluteSize end end end g.Active=(n>1)if A==0 then h.Active=false else h. +Active=((s-A.Y)<0)end k.Active=#q>p k.Visible=k.Active end,function()local q={}p +=0 if b then for r,s in ipairs(b)do if s.Parent==d then table.insert(q,s)end end +else local r=d:GetChildren()if r then for s,t in ipairs(r)do if t:IsA'GuiObject' +then table.insert(q,t)end end end end if#q==0 then g.Active=false h.Active=false +k.Active=false n=1 return end if n>#q then n=#q end local r,s,t,u=d.AbsoluteSize +.Y,d.AbsoluteSize.Y,0,#q while t=1 do if u>=n then t=t+q[u]. +AbsoluteSize.Y else if t+q[u].AbsoluteSize.Y<=r then t=t+q[u].AbsoluteSize.Y if +n<=1 then n=1 break else n=n-1 end else break end end u=u-1 end u=n for v,w in +ipairs(q)do if v=0 then w.Visible=true p=p+1 else w.Visible=false end end +end end g.Active=(n>1)h.Active=(s<0)k.Active=#q>p k.Visible=k.Active end, +function()local q,r=0,d:GetChildren()if r then for s,t in ipairs(r)do if t:IsA +'GuiObject'then q=q+1 end end end if not k.Parent then return end local s=k. +Parent.AbsoluteSize.y*(1/(q-p+1))if s<16 then s=16 end k.Size=UDim2.new(k.Size.X +.Scale,k.Size.X.Offset,k.Size.Y.Scale,s)local t=(n-1)/(q-p)if t>1 then t=1 +elseif t<0 then t=0 end local u=0 if t~=0 then u=(t*i.AbsoluteSize.y)-(t*k. +AbsoluteSize.y)end k.Position=UDim2.new(k.Position.X.Scale,k.Position.X.Offset,k +.Position.Y.Scale,u)end,false local u=function()if t then return end t=true +wait()local u,v=nil if m=='grid'then u,v=pcall(function()q()end)elseif m== +'simple'then u,v=pcall(function()r()end)end if not u then print(v)end s()t=false +end local v,w=function()n=n-o if n<1 then n=1 end u(nil)end,function()n=n+o u( +nil)end local x,y=function(x)if g.Active then j=tick()local y,z=j,nil z=l. +MouseButton1Up:connect(function()j=tick()l.Parent=nil z:disconnect()end)l.Parent +=getScreenGuiAncestor(i)v()wait(0.2)local A,B=tick(),0.1 while j==y do v()if x +and x>k.AbsolutePosition.y then break end if not g.Active then break end if +tick()-A>5 then B=0 elseif tick()-A>2 then B=0.06 end wait(B)end end end, +function(x)if h.Active then j=tick()local y,z=j,nil z=l.MouseButton1Up:connect( +function()j=tick()l.Parent=nil z:disconnect()end)l.Parent=getScreenGuiAncestor(i +)w()wait(0.2)local A,B=tick(),0.1 while j==y do w()if x and x<(k. +AbsolutePosition.y+k.AbsoluteSize.x)then break end if not h.Active then break +end if tick()-A>5 then B=0 elseif tick()-A>2 then B=0.06 end wait(B)end end end +k.MouseButton1Down:connect(function(z,A)if k.Active then j=tick()local B,C,D=A-k +.AbsolutePosition.y,nil,nil C=l.MouseMoved:connect(function(E,F)local G,H,I=i. +AbsolutePosition.y,i.AbsoluteSize.y,k.AbsoluteSize.y local J=G+H-I F=F-B F=FJ and J or F F=F-G local K,L=0,d:GetChildren()if L then for M,N in -ipairs(L)do if N:IsA'GuiObject'then K=K+1 end end end local M,N,O=F/(H-I),n,K-(o --1)local P=math.floor((M*O)+0.5)+N if P(j.AbsoluteSize.y+j. -AbsolutePosition.y)then x(B)elseif Bc then return b end local e=b while b<=c do local g=b+math -.floor((c-b)/2)if d(g)and(e==nil or ec then return b end local e=c while -b<=c do local g=b+math.floor((c-b)/2)if d(g)and(e==nil or e>g)then e=g c=g-1 -else b=g+1 end end return e end local function getGuiOwner(b)while b~=nil do if +ipairs(L)do if N:IsA'GuiObject'then K=K+1 end end end local M,N,O=F/(H-I),o,K-(p +-1)local P=math.floor((M*O)+0.5)+N if P(k.AbsoluteSize.y+k. +AbsolutePosition.y)then y(B)elseif Bc then return b end local g=b while b<=c do local h=b+math +.floor((c-b)/2)if d(h)and(g==nil or gc then return b end local g=c while +b<=c do local h=b+math.floor((c-b)/2)if d(h)and(g==nil or g>h)then g=h c=h-1 +else b=h+1 end end return g end local function getGuiOwner(b)while b~=nil do if b:IsA'ScreenGui'or b:IsA'BillboardGui'then return b end b=b.Parent end return nil end a.AutoTruncateTextObject=function(b)local c,d=b.Text,b:Clone()d.Name= 'Full'..b.Name d.BorderSizePixel=0 d.BackgroundTransparency=0 d.Text=c d. TextXAlignment=Enum.TextXAlignment.Center d.Position=UDim2.new(0,-3,0,0)d.Size= -UDim2.new(0,100,1,0)d.Visible=false d.Parent=b local e,g,h=nil,nil,nil local i= +UDim2.new(0,100,1,0)d.Visible=false d.Parent=b local g,h,i=nil,nil,nil local j= function()if getGuiOwner(b)==nil then return end b.Text=c if b.TextFits then if -g then g:disconnect()g=nil end if h then h:disconnect()h=nil end else local i= -string.len(c)b.Text=c..'~'local j=binaryGrow(0,i,function(j)if j==0 then b.Text= -'~'else b.Text=string.sub(c,1,j)..'~'end return b.TextFits end)e=string.sub(c,1, -j)..'~'b.Text=e if not d.TextFits then d.Size=UDim2.new(0,10000,1,0)end local k= -binaryShrink(b.AbsoluteSize.X,d.AbsoluteSize.X,function(k)d.Size=UDim2.new(0,k,1 -,0)return d.TextFits end)d.Size=UDim2.new(0,k+6,1,0)if g==nil then g=b. -MouseEnter:connect(function()d.ZIndex=b.ZIndex+1 d.Visible=true end)end if h== -nil then h=b.MouseLeave:connect(function()d.Visible=false end)end end end b. -AncestryChanged:connect(i)b.Changed:connect(function(j)if j=='AbsoluteSize'then -i()end end)i()local function changeText(j)c=j d.Text=c i()end return b, -changeText end local function TransitionTutorialPages(b,c,d,e)if b then b. +h then h:disconnect()h=nil end if i then i:disconnect()i=nil end else local j= +string.len(c)b.Text=c..'~'local k=binaryGrow(0,j,function(k)if k==0 then b.Text= +'~'else b.Text=string.sub(c,1,k)..'~'end return b.TextFits end)g=string.sub(c,1, +k)..'~'b.Text=g if not d.TextFits then d.Size=UDim2.new(0,10000,1,0)end local l= +binaryShrink(b.AbsoluteSize.X,d.AbsoluteSize.X,function(l)d.Size=UDim2.new(0,l,1 +,0)return d.TextFits end)d.Size=UDim2.new(0,l+6,1,0)if h==nil then h=b. +MouseEnter:connect(function()d.ZIndex=b.ZIndex+1 d.Visible=true end)end if i== +nil then i=b.MouseLeave:connect(function()d.Visible=false end)end end end b. +AncestryChanged:connect(j)b.Changed:connect(function(k)if k=='AbsoluteSize'then +j()end end)j()local function changeText(k)c=k d.Text=c j()end return b, +changeText end local function TransitionTutorialPages(b,c,d,g)if b then b. Visible=false if d.Visible==false then d.Size=b.Size d.Position=b.Position end else if d.Visible==false then d.Size=UDim2.new(0,50,0,50)d.Position=UDim2.new( -0.5,-25,0.5,-25)end end d.Visible=true e.Value=nil local g,h if c then c.Visible -=true g=c.Size h=c.Position c.Visible=false else g=UDim2.new(0,50,0,50)h=UDim2. -new(0.5,-25,0.5,-25)end d:TweenSizeAndPosition(g,h,Enum.EasingDirection.InOut, -Enum.EasingStyle.Quad,0.3,true,function(i)if i==Enum.TweenStatus.Completed then -d.Visible=false if c then c.Visible=true e.Value=c end end end)end a. -CreateTutorial=function(b,c,d)local e=Instance.new'Frame'e.Name='Tutorial-'..b e -.BackgroundTransparency=1 e.Size=UDim2.new(0.6,0,0.6,0)e.Position=UDim2.new(0.2, -0,0.2,0)local g=Instance.new'Frame'g.Name='TransitionFrame'g.Style=Enum. -FrameStyle.RobloxRound g.Size=UDim2.new(0.6,0,0.6,0)g.Position=UDim2.new(0.2,0, -0.2,0)g.Visible=false g.Parent=e local h=Instance.new'ObjectValue'h.Name= -'CurrentTutorialPage'h.Value=nil h.Parent=e local i=Instance.new'BoolValue'i. -Name='Buttons'i.Value=d i.Parent=e local j=Instance.new'Frame'j.Name='Pages'j. -BackgroundTransparency=1 j.Size=UDim2.new(1,0,1,0)j.Parent=e local function -getVisiblePageAndHideOthers()local k,l=nil,j:GetChildren()if l then for m,n in -ipairs(l)do if n.Visible then if k then n.Visible=false else k=n end end end end -return k end local k,l,m=function(k)if k or UserSettings().GameSettings: -GetTutorialState(c)==false then print('Showing tutorial-',c)local l,m= -getVisiblePageAndHideOthers(),j:FindFirstChild'TutorialPage1'if m then -TransitionTutorialPages(l,m,g,h)else error'Could not find TutorialPage1'end end -end,function()local k=getVisiblePageAndHideOthers()if k then -TransitionTutorialPages(k,nil,g,h)end UserSettings().GameSettings: -SetTutorialState(c,true)end,function(k)local l,m=j:FindFirstChild('TutorialPage' -..k),getVisiblePageAndHideOthers()TransitionTutorialPages(m,l,g,h)end return e,k -,l,m end local function CreateBasicTutorialPage(b,c,d,e)local g=Instance.new -'Frame'g.Name='TutorialPage'g.Style=Enum.FrameStyle.RobloxRound g.Size=UDim2. -new(0.6,0,0.6,0)g.Position=UDim2.new(0.2,0,0.2,0)g.Visible=false local h= -Instance.new'TextLabel'h.Name='Header'h.Text=b h.BackgroundTransparency=1 h. -FontSize=Enum.FontSize.Size24 h.Font=Enum.Font.ArialBold h.TextColor3=Color3. -new(1,1,1)h.TextXAlignment=Enum.TextXAlignment.Center h.TextWrap=true h.Size= -UDim2.new(1,-55,0,22)h.Position=UDim2.new(0,0,0,0)h.Parent=g local i=Instance. -new'ImageButton'i.Name='SkipButton'i.AutoButtonColor=false i. -BackgroundTransparency=1 i.Image='rbxasset://textures/ui/closeButton.png'i. -MouseButton1Click:connect(function()d()end)i.MouseEnter:connect(function()i. -Image='rbxasset://textures/ui/closeButton_dn.png'end)i.MouseLeave:connect( -function()i.Image='rbxasset://textures/ui/closeButton.png'end)i.Size=UDim2.new(0 -,25,0,25)i.Position=UDim2.new(1,-25,0,0)i.Parent=g if e then local j=Instance. -new'TextButton'j.Name='DoneButton'j.Style=Enum.ButtonStyle.RobloxButtonDefault j -.Text='Done'j.TextColor3=Color3.new(1,1,1)j.Font=Enum.Font.ArialBold j.FontSize= -Enum.FontSize.Size18 j.Size=UDim2.new(0,100,0,50)j.Position=UDim2.new(0.5,-50,1, --50)if d then j.MouseButton1Click:connect(function()d()end)end j.Parent=g end -local j=Instance.new'Frame'j.Name='ContentFrame'j.BackgroundTransparency=1 j. -Position=UDim2.new(0,0,0,25)j.Parent=g local k=Instance.new'TextButton'k.Name= -'NextButton'k.Text='Next'k.TextColor3=Color3.new(1,1,1)k.Font=Enum.Font.Arial k. -FontSize=Enum.FontSize.Size18 k.Style=Enum.ButtonStyle.RobloxButtonDefault k. -Size=UDim2.new(0,80,0,32)k.Position=UDim2.new(0.5,5,1,-32)k.Active=false k. -Visible=false k.Parent=g local l=Instance.new'TextButton'l.Name='PrevButton'l. -Text='Previous'l.TextColor3=Color3.new(1,1,1)l.Font=Enum.Font.Arial l.FontSize= -Enum.FontSize.Size18 l.Style=Enum.ButtonStyle.RobloxButton l.Size=UDim2.new(0,80 -,0,32)l.Position=UDim2.new(0.5,-85,1,-32)l.Active=false l.Visible=false l.Parent -=g if e then j.Size=UDim2.new(1,0,1,-75)else j.Size=UDim2.new(1,0,1,-22)end -local m=nil local function basicHandleResize()if g.Visible and g.Parent then -local n=math.min(g.Parent.AbsoluteSize.X,g.Parent.AbsoluteSize.Y)c(200,n)end end -g.Changed:connect(function(n)if n=='Parent'then if m~=nil then m:disconnect()m= -nil end if g.Parent and g.Parent:IsA'GuiObject'then m=g.Parent.Changed:connect( -function(o)if o=='AbsoluteSize'then wait()basicHandleResize()end end) -basicHandleResize()end end if n=='Visible'then basicHandleResize()end end)return -g,j end a.CreateTextTutorialPage=function(b,c,d)local e,g,h=nil,nil,Instance.new -'TextLabel'h.BackgroundTransparency=1 h.TextColor3=Color3.new(1,1,1)h.Text=c h. -TextWrap=true h.TextXAlignment=Enum.TextXAlignment.Left h.TextYAlignment=Enum. -TextYAlignment.Center h.Font=Enum.Font.Arial h.FontSize=Enum.FontSize.Size14 h. -Size=UDim2.new(1,0,1,0)local function handleResize(i,j)size=binaryShrink(i,j, -function(k)e.Size=UDim2.new(0,k,0,k)return h.TextFits end)e.Size=UDim2.new(0, -size,0,size)e.Position=UDim2.new(0.5,-size/2,0.5,-size/2)end e,g= -CreateBasicTutorialPage(b,handleResize,d)h.Parent=g return e end a. -CreateImageTutorialPage=function(b,c,d,e,g,h)local i,j,k=nil,nil,Instance.new -'ImageLabel'k.BackgroundTransparency=1 k.Image=c k.Size=UDim2.new(0,d,0,e)k. -Position=UDim2.new(0.5,-d/2,0.5,-e/2)local function handleResize(l,m)size= -binaryShrink(l,m,function(n)return n>=d and n>=e end)if size>=d and size>=e then -k.Size=UDim2.new(0,d,0,e)k.Position=UDim2.new(0.5,-d/2,0.5,-e/2)else if d>e then -k.Size=UDim2.new(1,0,e/d,0)k.Position=UDim2.new(0,0,0.5-(e/d)/2,0)else k.Size= -UDim2.new(d/e,0,1,0)k.Position=UDim2.new(0.5-(d/e)/2,0,0,0)end end size=size+50 -i.Size=UDim2.new(0,size,0,size)i.Position=UDim2.new(0.5,-size/2,0.5,-size/2)end -i,j=CreateBasicTutorialPage(b,handleResize,g,h)k.Parent=j return i end a. -AddTutorialPage=function(b,c)local d,e=b.TransitionFrame,b.CurrentTutorialPage -if not b.Buttons.Value then c.NextButton.Parent=nil c.PrevButton.Parent=nil end -local g=b.Pages:GetChildren()if g and#g>0 then c.Name='TutorialPage'..(#g+1) -local h=g[#g]if not h:IsA'GuiObject'then error -'All elements under Pages must be GuiObjects'end if b.Buttons.Value then if h. +0.5,-25,0.5,-25)end end d.Visible=true g.Value=nil local h,i if c then c.Visible +=true h=c.Size i=c.Position c.Visible=false else h=UDim2.new(0,50,0,50)i=UDim2. +new(0.5,-25,0.5,-25)end d:TweenSizeAndPosition(h,i,Enum.EasingDirection.InOut, +Enum.EasingStyle.Quad,0.3,true,function(j)if j==Enum.TweenStatus.Completed then +d.Visible=false if c then c.Visible=true g.Value=c end end end)end a. +CreateTutorial=function(b,c,d)local g=Instance.new'Frame'g.Name='Tutorial-'..b g +.BackgroundTransparency=1 g.Size=UDim2.new(0.6,0,0.6,0)g.Position=UDim2.new(0.2, +0,0.2,0)local h=Instance.new'Frame'h.Name='TransitionFrame'h.Style=Enum. +FrameStyle.RobloxRound h.Size=UDim2.new(0.6,0,0.6,0)h.Position=UDim2.new(0.2,0, +0.2,0)h.Visible=false h.Parent=g local i=Instance.new'ObjectValue'i.Name= +'CurrentTutorialPage'i.Value=nil i.Parent=g local j=Instance.new'BoolValue'j. +Name='Buttons'j.Value=d j.Parent=g local k=Instance.new'Frame'k.Name='Pages'k. +BackgroundTransparency=1 k.Size=UDim2.new(1,0,1,0)k.Parent=g local function +getVisiblePageAndHideOthers()local l,m=nil,k:GetChildren()if m then for n,o in +ipairs(m)do if o.Visible then if l then o.Visible=false else l=o end end end end +return l end local l,m,n=function(l)if l or UserSettings().GameSettings: +GetTutorialState(c)==false then print('Showing tutorial-',c)local m,n= +getVisiblePageAndHideOthers(),k:FindFirstChild'TutorialPage1'if n then +TransitionTutorialPages(m,n,h,i)else error'Could not find TutorialPage1'end end +end,function()local l=getVisiblePageAndHideOthers()if l then +TransitionTutorialPages(l,nil,h,i)end UserSettings().GameSettings: +SetTutorialState(c,true)end,function(l)local m,n=k:FindFirstChild('TutorialPage' +..l),getVisiblePageAndHideOthers()TransitionTutorialPages(n,m,h,i)end return g,l +,m,n end local function CreateBasicTutorialPage(b,c,d,g)local h=Instance.new +'Frame'h.Name='TutorialPage'h.Style=Enum.FrameStyle.RobloxRound h.Size=UDim2. +new(0.6,0,0.6,0)h.Position=UDim2.new(0.2,0,0.2,0)h.Visible=false local i= +Instance.new'TextLabel'i.Name='Header'i.Text=b i.BackgroundTransparency=1 i. +FontSize=Enum.FontSize.Size24 i.Font=Enum.Font.ArialBold i.TextColor3=Color3. +new(1,1,1)i.TextXAlignment=Enum.TextXAlignment.Center i.TextWrap=true i.Size= +UDim2.new(1,-55,0,22)i.Position=UDim2.new(0,0,0,0)i.Parent=h local j=Instance. +new'ImageButton'j.Name='SkipButton'j.AutoButtonColor=false j. +BackgroundTransparency=1 j.Image='rbxasset://textures/ui/closeButton.png'j. +MouseButton1Click:connect(function()d()end)j.MouseEnter:connect(function()j. +Image='rbxasset://textures/ui/closeButton_dn.png'end)j.MouseLeave:connect( +function()j.Image='rbxasset://textures/ui/closeButton.png'end)j.Size=UDim2.new(0 +,25,0,25)j.Position=UDim2.new(1,-25,0,0)j.Parent=h if g then local k=Instance. +new'TextButton'k.Name='DoneButton'k.Style=Enum.ButtonStyle.RobloxButtonDefault k +.Text='Done'k.TextColor3=Color3.new(1,1,1)k.Font=Enum.Font.ArialBold k.FontSize= +Enum.FontSize.Size18 k.Size=UDim2.new(0,100,0,50)k.Position=UDim2.new(0.5,-50,1, +-50)if d then k.MouseButton1Click:connect(function()d()end)end k.Parent=h end +local k=Instance.new'Frame'k.Name='ContentFrame'k.BackgroundTransparency=1 k. +Position=UDim2.new(0,0,0,25)k.Parent=h local l=Instance.new'TextButton'l.Name= +'NextButton'l.Text='Next'l.TextColor3=Color3.new(1,1,1)l.Font=Enum.Font.Arial l. +FontSize=Enum.FontSize.Size18 l.Style=Enum.ButtonStyle.RobloxButtonDefault l. +Size=UDim2.new(0,80,0,32)l.Position=UDim2.new(0.5,5,1,-32)l.Active=false l. +Visible=false l.Parent=h local m=Instance.new'TextButton'm.Name='PrevButton'm. +Text='Previous'm.TextColor3=Color3.new(1,1,1)m.Font=Enum.Font.Arial m.FontSize= +Enum.FontSize.Size18 m.Style=Enum.ButtonStyle.RobloxButton m.Size=UDim2.new(0,80 +,0,32)m.Position=UDim2.new(0.5,-85,1,-32)m.Active=false m.Visible=false m.Parent +=h if g then k.Size=UDim2.new(1,0,1,-75)else k.Size=UDim2.new(1,0,1,-22)end +local n=nil local function basicHandleResize()if h.Visible and h.Parent then +local o=math.min(h.Parent.AbsoluteSize.X,h.Parent.AbsoluteSize.Y)c(200,o)end end +h.Changed:connect(function(o)if o=='Parent'then if n~=nil then n:disconnect()n= +nil end if h.Parent and h.Parent:IsA'GuiObject'then n=h.Parent.Changed:connect( +function(p)if p=='AbsoluteSize'then wait()basicHandleResize()end end) +basicHandleResize()end end if o=='Visible'then basicHandleResize()end end)return +h,k end a.CreateTextTutorialPage=function(b,c,d)local g,h,i=nil,nil,Instance.new +'TextLabel'i.BackgroundTransparency=1 i.TextColor3=Color3.new(1,1,1)i.Text=c i. +TextWrap=true i.TextXAlignment=Enum.TextXAlignment.Left i.TextYAlignment=Enum. +TextYAlignment.Center i.Font=Enum.Font.Arial i.FontSize=Enum.FontSize.Size14 i. +Size=UDim2.new(1,0,1,0)local function handleResize(j,k)local l=binaryShrink(j,k, +function(l)g.Size=UDim2.new(0,l,0,l)return i.TextFits end)g.Size=UDim2.new(0,l,0 +,l)g.Position=UDim2.new(0.5,-l/2,0.5,-l/2)end g,h=CreateBasicTutorialPage(b, +handleResize,d)i.Parent=h return g end a.CreateImageTutorialPage=function(b,c,d, +g,h,i)local j,k,l=nil,nil,Instance.new'ImageLabel'l.BackgroundTransparency=1 l. +Image=c l.Size=UDim2.new(0,d,0,g)l.Position=UDim2.new(0.5,-d/2,0.5,-g/2) +local function handleResize(m,n)local o=binaryShrink(m,n,function(o)return o>=d +and o>=g end)if o>=d and o>=g then l.Size=UDim2.new(0,d,0,g)l.Position=UDim2. +new(0.5,-d/2,0.5,-g/2)else if d>g then l.Size=UDim2.new(1,0,g/d,0)l.Position= +UDim2.new(0,0,0.5-(g/d)/2,0)else l.Size=UDim2.new(d/g,0,1,0)l.Position=UDim2. +new(0.5-(d/g)/2,0,0,0)end end o=o+50 j.Size=UDim2.new(0,o,0,o)j.Position=UDim2. +new(0.5,-o/2,0.5,-o/2)end j,k=CreateBasicTutorialPage(b,handleResize,h,i)l. +Parent=k return j end a.AddTutorialPage=function(b,c)local d,g=b.TransitionFrame +,b.CurrentTutorialPage if not b.Buttons.Value then c.NextButton.Parent=nil c. +PrevButton.Parent=nil end local h=b.Pages:GetChildren()if h and#h>0 then c.Name= +'TutorialPage'..(#h+1)local i=h[#h]if not i:IsA'GuiObject'then error +'All elements under Pages must be GuiObjects'end if b.Buttons.Value then if i. NextButton.Active then error [[NextButton already Active on previousPage, please only add pages with RbxGui.AddTutorialPage function]] -end h.NextButton.MouseButton1Click:connect(function()TransitionTutorialPages(h,c -,d,e)end)h.NextButton.Active=true h.NextButton.Visible=true if c.PrevButton. +end i.NextButton.MouseButton1Click:connect(function()TransitionTutorialPages(i,c +,d,g)end)i.NextButton.Active=true i.NextButton.Visible=true if c.PrevButton. Active then error [[PrevButton already Active on tutorialPage, please only add pages with RbxGui.AddTutorialPage function]] -end c.PrevButton.MouseButton1Click:connect(function()TransitionTutorialPages(c,h -,d,e)end)c.PrevButton.Active=true c.PrevButton.Visible=true end c.Parent=b.Pages +end c.PrevButton.MouseButton1Click:connect(function()TransitionTutorialPages(c,i +,d,g)end)c.PrevButton.Active=true c.PrevButton.Visible=true end c.Parent=b.Pages else c.Name='TutorialPage1'c.Parent=b.Pages end end a.CreateSetPanel=function(b, -c,d,e,g,h,i)if not b then error +c,d,g,h,i,j)if not b then error [[CreateSetPanel: userIdsForSets (first arg) is nil, should be a table of number ids]] end if type(b)~='table'and type(b)~='userdata'then error( 'CreateSetPanel: userIdsForSets (first arg) is of type '..type(b).. @@ -494,383 +490,383 @@ end if type(c)~='function'then error( 'CreateSetPanel: objectSelected (second arg) is of type '..type(c).. ', should be of type function!')end if d and type(d)~='function'then error( 'CreateSetPanel: dialogClosed (third arg) is of type '..type(d).. -', should be of type function!')end if h==nil then h=false end local j,k,l,m,n,o -,p,q,r=1,{},{},nil,nil,'NegX','None',nil local s={}s.CurrentCategory=nil s. -Category={}local t,u,v={},nil,64 local w,x,y,z=v,nil,nil,game:GetService -'ContentProvider'.BaseUrl:lower()if i then y=z.. -[[Game/Tools/ThumbnailAsset.ashx?fmt=png&wd=420&ht=420&assetversionid=]]x=z.. -[[Game/Tools/ThumbnailAsset.ashx?fmt=png&wd=75&ht=75&assetversionid=]]else y=z.. -'Game/Tools/ThumbnailAsset.ashx?fmt=png&wd=420&ht=420&aid='x=z.. +', should be of type function!')end if i==nil then i=false end local k,l,m,n,o,p +,q,r,s=1,{},{},nil,nil,'NegX','None',nil local t={}t.CurrentCategory=nil t. +Category={}local u,v,w={},nil,64 local x,y,z,A=w,nil,nil,game:GetService +'ContentProvider'.BaseUrl:lower()if j then z=A.. +[[Game/Tools/ThumbnailAsset.ashx?fmt=png&wd=420&ht=420&assetversionid=]]y=A.. +[[Game/Tools/ThumbnailAsset.ashx?fmt=png&wd=75&ht=75&assetversionid=]]else z=A.. +'Game/Tools/ThumbnailAsset.ashx?fmt=png&wd=420&ht=420&aid='y=A.. 'Game/Tools/ThumbnailAsset.ashx?fmt=png&wd=75&ht=75&aid='end local function -drillDownSetZIndex(A,B)local C=A:GetChildren()for D=1,#C do if C[D]:IsA -'GuiObject'then C[D].ZIndex=B end drillDownSetZIndex(C[D],B)end end local A,B,C= +drillDownSetZIndex(B,C)local D=B:GetChildren()for E=1,#D do if D[E]:IsA +'GuiObject'then D[E].ZIndex=C end drillDownSetZIndex(D[E],C)end end local B,C,D= nil,{'Block','Vertical Ramp','Corner Wedge','Inverse Corner Wedge', -'Horizontal Ramp','Auto-Wedge'},{}for D=1,#B do C[B[D]]=D-1 end C[B[#B]]=6 -local function createWaterGui()local D,E,F={'NegX','X','NegY','Y','NegZ','Z'},{ -'None','Small','Medium','Strong','Max'},Instance.new'Frame'F.Name='WaterFrame'F. -Style=Enum.FrameStyle.RobloxSquare F.Size=UDim2.new(0,150,0,110)F.Visible=false -local G=Instance.new'TextLabel'G.Name='WaterForceLabel'G.BackgroundTransparency= -1 G.Size=UDim2.new(1,0,0,12)G.Font=Enum.Font.ArialBold G.FontSize=Enum.FontSize. -Size12 G.TextColor3=Color3.new(1,1,1)G.TextXAlignment=Enum.TextXAlignment.Left G -.Text='Water Force'G.Parent=F local H=G:Clone()H.Name='WaterForceDirectionLabel' -H.Text='Water Force Direction'H.Position=UDim2.new(0,0,0,50)H.Parent=F local I= -Instance.new'BindableEvent'I.Name='WaterTypeChangedEvent'I.Parent=F local J,K= -function(J)o=J I:Fire{p,o}end,function(J)p=J I:Fire{p,o}end local L,M=a. -CreateDropDownMenu(D,J)L.Size=UDim2.new(1,0,0,25)L.Position=UDim2.new(0,0,1,3)M -'NegX'L.Parent=H local N,O=a.CreateDropDownMenu(E,K)O'None'N.Size=UDim2.new(1,0, -0,25)N.Position=UDim2.new(0,0,1,3)N.Parent=G return F,I end local function -createSetGui()local D=Instance.new'ScreenGui'D.Name='SetGui'local E=Instance.new -'Frame'E.Name='SetPanel'E.Active=true E.BackgroundTransparency=1 if g then E. -Position=g else E.Position=UDim2.new(0.2,29,0.1,24)end if e then E.Size=e else E -.Size=UDim2.new(0.6,-58,0.64,0)end E.Style=Enum.FrameStyle.RobloxRound E.ZIndex= -6 E.Parent=D local F=Instance.new'Frame'F.Name='ItemPreview'F. -BackgroundTransparency=1 F.Position=UDim2.new(0.8,5,0.085,0)F.Size=UDim2.new( -0.21,0,0.9,0)F.ZIndex=6 F.Parent=E local G=Instance.new'Frame'G.Name='TextPanel' -G.BackgroundTransparency=1 G.Position=UDim2.new(0,0,0.45,0)G.Size=UDim2.new(1,0, -0.55,0)G.ZIndex=6 G.Parent=F local H=Instance.new'TextLabel'H.Name= -'RolloverText'H.BackgroundTransparency=1 H.Size=UDim2.new(1,0,0,48)H.ZIndex=6 H. -Font=Enum.Font.ArialBold H.FontSize=Enum.FontSize.Size24 H.Text=''H.TextColor3= -Color3.new(1,1,1)H.TextWrap=true H.TextXAlignment=Enum.TextXAlignment.Left H. -TextYAlignment=Enum.TextYAlignment.Top H.Parent=G local I=Instance.new -'ImageLabel'I.Name='LargePreview'I.BackgroundTransparency=1 I.Image=''I.Size= -UDim2.new(1,0,0,170)I.ZIndex=6 I.Parent=F local J=Instance.new'Frame'J.Name= -'Sets'J.BackgroundTransparency=1 J.Position=UDim2.new(0,0,0,5)J.Size=UDim2.new( -0.23,0,1,-5)J.ZIndex=6 J.Parent=E local K=Instance.new'Frame'K.Name='Line'K. -BackgroundColor3=Color3.new(1,1,1)K.BackgroundTransparency=0.7 K.BorderSizePixel -=0 K.Position=UDim2.new(1,-3,0.06,0)K.Size=UDim2.new(0,3,0.9,0)K.ZIndex=6 K. -Parent=J local L,M=a.CreateTrueScrollingFrame()L.Size=UDim2.new(1,-6,0.94,0)L. -Position=UDim2.new(0,0,0.06,0)L.BackgroundTransparency=1 L.Name='SetsLists'L. -ZIndex=6 L.Parent=J drillDownSetZIndex(M,7)local N=Instance.new'TextLabel'N.Name -='SetsHeader'N.BackgroundTransparency=1 N.Size=UDim2.new(0,47,0,24)N.ZIndex=6 N. -Font=Enum.Font.ArialBold N.FontSize=Enum.FontSize.Size24 N.Text='Sets'N. -TextColor3=Color3.new(1,1,1)N.TextXAlignment=Enum.TextXAlignment.Left N. -TextYAlignment=Enum.TextYAlignment.Top N.Parent=J local O=Instance.new -'TextButton'O.Name='CancelButton'O.Position=UDim2.new(1,-32,0,-2)O.Size=UDim2. -new(0,34,0,34)O.Style=Enum.ButtonStyle.RobloxButtonDefault O.ZIndex=6 O.Text=''O -.Modal=true O.Parent=E local P=Instance.new'ImageLabel'P.Name='CancelImage'P. -BackgroundTransparency=1 P.Image='http://www.roblox.com/asset?id=54135717'P. -Position=UDim2.new(0,-2,0,-2)P.Size=UDim2.new(0,16,0,16)P.ZIndex=6 P.Parent=O -return D end local function createSetButton(D)local E=Instance.new'TextButton'if -D then E.Text=D else E.Text=''end E.AutoButtonColor=false E. -BackgroundTransparency=1 E.BackgroundColor3=Color3.new(1,1,1)E.BorderSizePixel=0 -E.Size=UDim2.new(1,-5,0,18)E.ZIndex=6 E.Visible=false E.Font=Enum.Font.Arial E. -FontSize=Enum.FontSize.Size18 E.TextColor3=Color3.new(1,1,1)E.TextXAlignment= -Enum.TextXAlignment.Left return E end local function buildSetButton(D,E,F,G,H) -local I=createSetButton(D)I.Text=D I.Name='SetButton'I.Visible=true local J= -Instance.new'IntValue'J.Name='SetId'J.Value=E J.Parent=I local K=Instance.new -'StringValue'K.Name='SetName'K.Value=D K.Parent=I return I end local function -processCategory(D)local E,H={},0 for I=1,#D do if not h and D[I].Name=='Beta' -then H=H+1 else E[I-H]=buildSetButton(D[I].Name,D[I].CategoryId,D[I]. -ImageAssetId,I-H,#D)end end return E end local function handleResize()wait() -local D=n.SetPanel.ItemPreview D.LargePreview.Size=UDim2.new(1,0,0,D. -AbsoluteSize.X)D.LargePreview.Position=UDim2.new(0.5,-D.LargePreview. -AbsoluteSize.X/2,0,0)D.TextPanel.Position=UDim2.new(0,0,0,D.LargePreview. -AbsoluteSize.Y)D.TextPanel.Size=UDim2.new(1,0,0,D.AbsoluteSize.Y-D.LargePreview. -AbsoluteSize.Y)end local function makeInsertAssetButton()local D=Instance.new -'Frame'D.Name='InsertAssetButtonExample'D.Position=UDim2.new(0,128,0,64)D.Size= -UDim2.new(0,64,0,64)D.BackgroundTransparency=1 D.ZIndex=6 D.Visible=false local -E=Instance.new'IntValue'E.Name='AssetId'E.Value=0 E.Parent=D local H=Instance. -new'StringValue'H.Name='AssetName'H.Value=''H.Parent=D local I=Instance.new -'TextButton'I.Name='Button'I.Text=''I.Style=Enum.ButtonStyle.RobloxButton I. -Position=UDim2.new(0.025,0,0.025,0)I.Size=UDim2.new(0.95,0,0.95,0)I.ZIndex=6 I. -Parent=D local J=Instance.new'ImageLabel'J.Name='ButtonImage'J.Image=''J. -Position=UDim2.new(0,-7,0,-7)J.Size=UDim2.new(1,14,1,14)J.BackgroundTransparency -=1 J.ZIndex=7 J.Parent=I local K=J:clone()K.Name='ConfigIcon'K.Visible=false K. -Position=UDim2.new(1,-23,1,-24)K.Size=UDim2.new(0,16,0,16)K.Image=''K.ZIndex=6 K -.Parent=D return D end local function showLargePreview(D)if D:FindFirstChild -'AssetId'then delay(0,function()game:GetService'ContentProvider':Preload(y.. -tostring(D.AssetId.Value))n.SetPanel.ItemPreview.LargePreview.Image=y..tostring( -D.AssetId.Value)end)end if D:FindFirstChild'AssetName'then n.SetPanel. -ItemPreview.TextPanel.RolloverText.Text=D.AssetName.Value end end local function -selectTerrainShape(D)if A then c(tostring(A.AssetName.Value),tonumber(A.AssetId. -Value),D)end end local function createTerrainTypeButton(D,E)local H=Instance.new -'TextButton'H.Name=D..'Button'H.Font=Enum.Font.ArialBold H.FontSize=Enum. -FontSize.Size14 H.BorderSizePixel=0 H.TextColor3=Color3.new(1,1,1)H.Text=D H. -TextXAlignment=Enum.TextXAlignment.Left H.BackgroundTransparency=1 H.ZIndex=E. -ZIndex+1 H.Size=UDim2.new(0,E.Size.X.Offset-2,0,16)H.Position=UDim2.new(0,1,0,0) -H.MouseEnter:connect(function()H.BackgroundTransparency=0 H.TextColor3=Color3. -new(0,0,0)end)H.MouseLeave:connect(function()H.BackgroundTransparency=1 H. -TextColor3=Color3.new(1,1,1)end)H.MouseButton1Click:connect(function()H. -BackgroundTransparency=1 H.TextColor3=Color3.new(1,1,1)if H.Parent and H.Parent: -IsA'GuiObject'then H.Parent.Visible=false end selectTerrainShape(C[H.Text])end) -return H end local function createTerrainDropDownMenu(D)local E=Instance.new -'Frame'E.Name='TerrainDropDown'E.BackgroundColor3=Color3.new(0,0,0)E. -BorderColor3=Color3.new(1,0,0)E.Size=UDim2.new(0,200,0,0)E.Visible=false E. -ZIndex=D E.Parent=n for H=1,#B do local I=createTerrainTypeButton(B[H],E)I. -Position=UDim2.new(0,1,0,(H-1)*I.Size.Y.Offset)I.Parent=E E.Size=UDim2.new(0,200 -,0,E.Size.Y.Offset+I.Size.Y.Offset)end E.MouseLeave:connect(function()E.Visible= -false end)end local function createDropDownMenuButton(D)local E=Instance.new -'ImageButton'E.Name='DropDownButton'E.Image= -'http://www.roblox.com/asset/?id=67581509'E.BackgroundTransparency=1 E.Size= -UDim2.new(0,16,0,16)E.Position=UDim2.new(1,-24,0,6)E.ZIndex=D.ZIndex+2 E.Parent= -D if not n:FindFirstChild'TerrainDropDown'then createTerrainDropDownMenu(8)end E -.MouseButton1Click:connect(function()n.TerrainDropDown.Visible=true n. -TerrainDropDown.Position=UDim2.new(0,D.AbsolutePosition.X,0,D.AbsolutePosition.Y -)A=D end)end local function buildInsertButton()local D=makeInsertAssetButton()D. -Name='InsertAssetButton'D.Visible=true if s.Category[s.CurrentCategory].SetName -=='High Scalability'then createDropDownMenuButton(D)end local E=nil local H=D. -MouseEnter:connect(function()E=D delay(0.1,function()if E==D then -showLargePreview(D)end end)end)return D,H end local function realignButtonGrid(D -)local E,H=0,0 for I=1,#k do k[I].Position=UDim2.new(0,v*E,0,w*H)E=E+1 if E>=D -then E=0 H=H+1 end end end local function setInsertButtonImageBehavior(D,E,H,I) -if E then D.AssetName.Value=H D.AssetId.Value=I local J=x..I if J~=D.Button. +'Horizontal Ramp','Auto-Wedge'},{}for E=1,#C do D[C[E]]=E-1 end D[C[#C]]=6 +local function createWaterGui()local E,F,G={'NegX','X','NegY','Y','NegZ','Z'},{ +'None','Small','Medium','Strong','Max'},Instance.new'Frame'G.Name='WaterFrame'G. +Style=Enum.FrameStyle.RobloxSquare G.Size=UDim2.new(0,150,0,110)G.Visible=false +local H=Instance.new'TextLabel'H.Name='WaterForceLabel'H.BackgroundTransparency= +1 H.Size=UDim2.new(1,0,0,12)H.Font=Enum.Font.ArialBold H.FontSize=Enum.FontSize. +Size12 H.TextColor3=Color3.new(1,1,1)H.TextXAlignment=Enum.TextXAlignment.Left H +.Text='Water Force'H.Parent=G local I=H:Clone()I.Name='WaterForceDirectionLabel' +I.Text='Water Force Direction'I.Position=UDim2.new(0,0,0,50)I.Parent=G local J= +Instance.new'BindableEvent'J.Name='WaterTypeChangedEvent'J.Parent=G local K,L= +function(K)p=K J:Fire{q,p}end,function(K)q=K J:Fire{q,p}end local M,N=a. +CreateDropDownMenu(E,K)M.Size=UDim2.new(1,0,0,25)M.Position=UDim2.new(0,0,1,3)N +'NegX'M.Parent=I local O,P=a.CreateDropDownMenu(F,L)P'None'O.Size=UDim2.new(1,0, +0,25)O.Position=UDim2.new(0,0,1,3)O.Parent=H return G,J end local function +createSetGui()local E=Instance.new'ScreenGui'E.Name='SetGui'local F=Instance.new +'Frame'F.Name='SetPanel'F.Active=true F.BackgroundTransparency=1 if h then F. +Position=h else F.Position=UDim2.new(0.2,29,0.1,24)end if g then F.Size=g else F +.Size=UDim2.new(0.6,-58,0.64,0)end F.Style=Enum.FrameStyle.RobloxRound F.ZIndex= +6 F.Parent=E local G=Instance.new'Frame'G.Name='ItemPreview'G. +BackgroundTransparency=1 G.Position=UDim2.new(0.8,5,0.085,0)G.Size=UDim2.new( +0.21,0,0.9,0)G.ZIndex=6 G.Parent=F local H=Instance.new'Frame'H.Name='TextPanel' +H.BackgroundTransparency=1 H.Position=UDim2.new(0,0,0.45,0)H.Size=UDim2.new(1,0, +0.55,0)H.ZIndex=6 H.Parent=G local I=Instance.new'TextLabel'I.Name= +'RolloverText'I.BackgroundTransparency=1 I.Size=UDim2.new(1,0,0,48)I.ZIndex=6 I. +Font=Enum.Font.ArialBold I.FontSize=Enum.FontSize.Size24 I.Text=''I.TextColor3= +Color3.new(1,1,1)I.TextWrap=true I.TextXAlignment=Enum.TextXAlignment.Left I. +TextYAlignment=Enum.TextYAlignment.Top I.Parent=H local J=Instance.new +'ImageLabel'J.Name='LargePreview'J.BackgroundTransparency=1 J.Image=''J.Size= +UDim2.new(1,0,0,170)J.ZIndex=6 J.Parent=G local K=Instance.new'Frame'K.Name= +'Sets'K.BackgroundTransparency=1 K.Position=UDim2.new(0,0,0,5)K.Size=UDim2.new( +0.23,0,1,-5)K.ZIndex=6 K.Parent=F local L=Instance.new'Frame'L.Name='Line'L. +BackgroundColor3=Color3.new(1,1,1)L.BackgroundTransparency=0.7 L.BorderSizePixel +=0 L.Position=UDim2.new(1,-3,0.06,0)L.Size=UDim2.new(0,3,0.9,0)L.ZIndex=6 L. +Parent=K local M,N=a.CreateTrueScrollingFrame()M.Size=UDim2.new(1,-6,0.94,0)M. +Position=UDim2.new(0,0,0.06,0)M.BackgroundTransparency=1 M.Name='SetsLists'M. +ZIndex=6 M.Parent=K drillDownSetZIndex(N,7)local O=Instance.new'TextLabel'O.Name +='SetsHeader'O.BackgroundTransparency=1 O.Size=UDim2.new(0,47,0,24)O.ZIndex=6 O. +Font=Enum.Font.ArialBold O.FontSize=Enum.FontSize.Size24 O.Text='Sets'O. +TextColor3=Color3.new(1,1,1)O.TextXAlignment=Enum.TextXAlignment.Left O. +TextYAlignment=Enum.TextYAlignment.Top O.Parent=K local P=Instance.new +'TextButton'P.Name='CancelButton'P.Position=UDim2.new(1,-32,0,-2)P.Size=UDim2. +new(0,34,0,34)P.Style=Enum.ButtonStyle.RobloxButtonDefault P.ZIndex=6 P.Text=''P +.Modal=true P.Parent=F local Q=Instance.new'ImageLabel'Q.Name='CancelImage'Q. +BackgroundTransparency=1 Q.Image='http://www.roblox.com/asset?id=54135717'Q. +Position=UDim2.new(0,-2,0,-2)Q.Size=UDim2.new(0,16,0,16)Q.ZIndex=6 Q.Parent=P +return E end local function createSetButton(E)local F=Instance.new'TextButton'if +E then F.Text=E else F.Text=''end F.AutoButtonColor=false F. +BackgroundTransparency=1 F.BackgroundColor3=Color3.new(1,1,1)F.BorderSizePixel=0 +F.Size=UDim2.new(1,-5,0,18)F.ZIndex=6 F.Visible=false F.Font=Enum.Font.Arial F. +FontSize=Enum.FontSize.Size18 F.TextColor3=Color3.new(1,1,1)F.TextXAlignment= +Enum.TextXAlignment.Left return F end local function buildSetButton(E,F,G,H,I) +local J=createSetButton(E)J.Text=E J.Name='SetButton'J.Visible=true local K= +Instance.new'IntValue'K.Name='SetId'K.Value=F K.Parent=J local L=Instance.new +'StringValue'L.Name='SetName'L.Value=E L.Parent=J return J end local function +processCategory(E)local F,I={},0 for J=1,#E do if not i and E[J].Name=='Beta' +then I=I+1 else F[J-I]=buildSetButton(E[J].Name,E[J].CategoryId,E[J]. +ImageAssetId,J-I,#E)end end return F end local function handleResize()wait() +local E=o.SetPanel.ItemPreview E.LargePreview.Size=UDim2.new(1,0,0,E. +AbsoluteSize.X)E.LargePreview.Position=UDim2.new(0.5,-E.LargePreview. +AbsoluteSize.X/2,0,0)E.TextPanel.Position=UDim2.new(0,0,0,E.LargePreview. +AbsoluteSize.Y)E.TextPanel.Size=UDim2.new(1,0,0,E.AbsoluteSize.Y-E.LargePreview. +AbsoluteSize.Y)end local function makeInsertAssetButton()local E=Instance.new +'Frame'E.Name='InsertAssetButtonExample'E.Position=UDim2.new(0,128,0,64)E.Size= +UDim2.new(0,64,0,64)E.BackgroundTransparency=1 E.ZIndex=6 E.Visible=false local +F=Instance.new'IntValue'F.Name='AssetId'F.Value=0 F.Parent=E local I=Instance. +new'StringValue'I.Name='AssetName'I.Value=''I.Parent=E local J=Instance.new +'TextButton'J.Name='Button'J.Text=''J.Style=Enum.ButtonStyle.RobloxButton J. +Position=UDim2.new(0.025,0,0.025,0)J.Size=UDim2.new(0.95,0,0.95,0)J.ZIndex=6 J. +Parent=E local K=Instance.new'ImageLabel'K.Name='ButtonImage'K.Image=''K. +Position=UDim2.new(0,-7,0,-7)K.Size=UDim2.new(1,14,1,14)K.BackgroundTransparency +=1 K.ZIndex=7 K.Parent=J local L=K:clone()L.Name='ConfigIcon'L.Visible=false L. +Position=UDim2.new(1,-23,1,-24)L.Size=UDim2.new(0,16,0,16)L.Image=''L.ZIndex=6 L +.Parent=E return E end local function showLargePreview(E)if E:FindFirstChild +'AssetId'then delay(0,function()game:GetService'ContentProvider':Preload(z.. +tostring(E.AssetId.Value))o.SetPanel.ItemPreview.LargePreview.Image=z..tostring( +E.AssetId.Value)end)end if E:FindFirstChild'AssetName'then o.SetPanel. +ItemPreview.TextPanel.RolloverText.Text=E.AssetName.Value end end local function +selectTerrainShape(E)if B then c(tostring(B.AssetName.Value),tonumber(B.AssetId. +Value),E)end end local function createTerrainTypeButton(E,F)local I=Instance.new +'TextButton'I.Name=E..'Button'I.Font=Enum.Font.ArialBold I.FontSize=Enum. +FontSize.Size14 I.BorderSizePixel=0 I.TextColor3=Color3.new(1,1,1)I.Text=E I. +TextXAlignment=Enum.TextXAlignment.Left I.BackgroundTransparency=1 I.ZIndex=F. +ZIndex+1 I.Size=UDim2.new(0,F.Size.X.Offset-2,0,16)I.Position=UDim2.new(0,1,0,0) +I.MouseEnter:connect(function()I.BackgroundTransparency=0 I.TextColor3=Color3. +new(0,0,0)end)I.MouseLeave:connect(function()I.BackgroundTransparency=1 I. +TextColor3=Color3.new(1,1,1)end)I.MouseButton1Click:connect(function()I. +BackgroundTransparency=1 I.TextColor3=Color3.new(1,1,1)if I.Parent and I.Parent: +IsA'GuiObject'then I.Parent.Visible=false end selectTerrainShape(D[I.Text])end) +return I end local function createTerrainDropDownMenu(E)local F=Instance.new +'Frame'F.Name='TerrainDropDown'F.BackgroundColor3=Color3.new(0,0,0)F. +BorderColor3=Color3.new(1,0,0)F.Size=UDim2.new(0,200,0,0)F.Visible=false F. +ZIndex=E F.Parent=o for I=1,#C do local J=createTerrainTypeButton(C[I],F)J. +Position=UDim2.new(0,1,0,(I-1)*J.Size.Y.Offset)J.Parent=F F.Size=UDim2.new(0,200 +,0,F.Size.Y.Offset+J.Size.Y.Offset)end F.MouseLeave:connect(function()F.Visible= +false end)end local function createDropDownMenuButton(E)local F=Instance.new +'ImageButton'F.Name='DropDownButton'F.Image= +'http://www.roblox.com/asset/?id=67581509'F.BackgroundTransparency=1 F.Size= +UDim2.new(0,16,0,16)F.Position=UDim2.new(1,-24,0,6)F.ZIndex=E.ZIndex+2 F.Parent= +E if not o:FindFirstChild'TerrainDropDown'then createTerrainDropDownMenu(8)end F +.MouseButton1Click:connect(function()o.TerrainDropDown.Visible=true o. +TerrainDropDown.Position=UDim2.new(0,E.AbsolutePosition.X,0,E.AbsolutePosition.Y +)B=E end)end local function buildInsertButton()local E=makeInsertAssetButton()E. +Name='InsertAssetButton'E.Visible=true if t.Category[t.CurrentCategory].SetName +=='High Scalability'then createDropDownMenuButton(E)end local F=nil local I=E. +MouseEnter:connect(function()F=E delay(0.1,function()if F==E then +showLargePreview(E)end end)end)return E,I end local function realignButtonGrid(E +)local F,I=0,0 for J=1,#l do l[J].Position=UDim2.new(0,w*F,0,x*I)F=F+1 if F>=E +then F=0 I=I+1 end end end local function setInsertButtonImageBehavior(E,F,I,J) +if F then E.AssetName.Value=I E.AssetId.Value=J local K=y..J if K~=E.Button. ButtonImage.Image then delay(0,function()game:GetService'ContentProvider': -Preload(x..I)D.Button.ButtonImage.Image=x..I end)end table.insert(l,D.Button. -MouseButton1Click:connect(function()local K=(H=='Water')and(s.Category[s. -CurrentCategory].SetName=='High Scalability')q.Visible=K if K then c(H,tonumber( -I),nil)else c(H,tonumber(I))end end))D.Visible=true else D.Visible=false end end -local function loadSectionOfItems(D,E,H)local I=E*H if j>#m then return end -local J,K=j,0 for L=1,I+1 do if j>=#m+1 then break end local M k[j],M= -buildInsertButton()table.insert(l,M)k[j].Parent=D.SetPanel.ItemsFrame j=j+1 end -realignButtonGrid(H)local L=J for M=J,j do if k[M]then if m[M]then if m[M].Name -=='Water'then if s.Category[s.CurrentCategory].SetName=='High Scalability'then k -[M]:FindFirstChild('DropDownButton',true):Destroy()end end local N if i then N=m -[M].AssetVersionId else N=m[M].AssetId end setInsertButtonImageBehavior(k[M], -true,m[M].Name,N)else break end else break end L=M end end local function -setSetIndex()s.Category[s.CurrentCategory].Index=0 rows=7 columns=math.floor(n. -SetPanel.ItemsFrame.AbsoluteSize.X/v)m=s.Category[s.CurrentCategory].Contents if -m then for D=1,#k do k[D]:remove()end for D=1,#l do if l[D]then l[D]:disconnect( -)end end l={}k={}j=1 loadSectionOfItems(n,rows,columns)end end local function -selectSet(D,E,H,I)if D and s.Category[s.CurrentCategory]~=nil then if D~=s. -Category[s.CurrentCategory].Button then s.Category[s.CurrentCategory].Button=D -if t[H]==nil then t[H]=game:GetService'InsertService':GetCollection(H)end s. -Category[s.CurrentCategory].Contents=t[H]s.Category[s.CurrentCategory].SetName=E -s.Category[s.CurrentCategory].SetId=H end setSetIndex()end end local function -selectCategoryPage(D,E)if D~=s.CurrentCategory then if s.CurrentCategory then -for H,I in pairs(s.CurrentCategory)do I.Visible=false end end s.CurrentCategory= -D if s.Category[s.CurrentCategory]==nil then s.Category[s.CurrentCategory]={}if# -D>0 then selectSet(D[1],D[1].SetName.Value,D[1].SetId.Value,0)end else s. -Category[s.CurrentCategory].Button=nil selectSet(s.Category[s.CurrentCategory]. -ButtonFrame,s.Category[s.CurrentCategory].SetName,s.Category[s.CurrentCategory]. -SetId,s.Category[s.CurrentCategory].Index)end end end local function -selectCategory(D)selectCategoryPage(D,0)end local function -resetAllSetButtonSelection()local D=n.SetPanel.Sets.SetsLists:GetChildren()for E -=1,#D do if D[E]:IsA'TextButton'then D[E].Selected=false D[E]. -BackgroundTransparency=1 D[E].TextColor3=Color3.new(1,1,1)D[E].BackgroundColor3= -Color3.new(1,1,1)end end end local function populateSetsFrame()local D=0 for E=1 -,#u do local H=u[E]H.Visible=true H.Position=UDim2.new(0,5,0,D*H.Size.Y.Offset)H -.Parent=n.SetPanel.Sets.SetsLists if E==1 then H.Selected=true H. -BackgroundColor3=Color3.new(0,0.8,0)H.TextColor3=Color3.new(0,0,0)H. -BackgroundTransparency=0 end H.MouseEnter:connect(function()if not H.Selected -then H.BackgroundTransparency=0 H.TextColor3=Color3.new(0,0,0)end end)H. -MouseLeave:connect(function()if not H.Selected then H.BackgroundTransparency=1 H -.TextColor3=Color3.new(1,1,1)end end)H.MouseButton1Click:connect(function() -resetAllSetButtonSelection()H.Selected=not H.Selected H.BackgroundColor3=Color3. -new(0,0.8,0)H.TextColor3=Color3.new(0,0,0)H.BackgroundTransparency=0 selectSet(H -,H.Text,u[E].SetId.Value,0)end)D=D+1 end local E=n.SetPanel.Sets.SetsLists: -GetChildren()if E then for H=1,#E do if E[H]:IsA'TextButton'then selectSet(E[H], -E[H].Text,u[H].SetId.Value,0)selectCategory(u)break end end end end n= -createSetGui()q,r=createWaterGui()q.Position=UDim2.new(0,55,0,0)q.Parent=n n. -Changed:connect(function(D)if D=='AbsoluteSize'then handleResize()setSetIndex() -end end)local D,E=a.CreateTrueScrollingFrame()D.Size=UDim2.new(0.54,0,0.85,0)D. -Position=UDim2.new(0.24,0,0.085,0)D.Name='ItemsFrame'D.ZIndex=6 D.Parent=n. -SetPanel D.BackgroundTransparency=1 drillDownSetZIndex(E,7)E.Parent=n.SetPanel E -.Position=UDim2.new(0.76,5,0,0)local H=false E.ScrollBottom.Changed:connect( -function(I)if E.ScrollBottom.Value==true then if H then return end H=true -loadSectionOfItems(n,rows,columns)H=false end end)local I={}for J=1,#b do local -K=game:GetService'InsertService':GetUserSets(b[J])if K and#K>2 then for L=3,#K -do if K[L].Name=='High Scalability'then table.insert(I,1,K[L])else table.insert( -I,K[L])end end end end if I then u=processCategory(I)end rows=math.floor(n. -SetPanel.ItemsFrame.AbsoluteSize.Y/w)columns=math.floor(n.SetPanel.ItemsFrame. -AbsoluteSize.X/v)populateSetsFrame()insertPanelCloseCon=n.SetPanel.CancelButton. -MouseButton1Click:connect(function()n.SetPanel.Visible=false if d then d()end -end)local J,K=function(J)if J then n.SetPanel.Visible=true else n.SetPanel. -Visible=false end end,function()if n then if n:FindFirstChild'SetPanel'then -return n.SetPanel.Visible end end return false end return n,J,K,r end a. +Preload(y..J)E.Button.ButtonImage.Image=y..J end)end table.insert(m,E.Button. +MouseButton1Click:connect(function()local L=(I=='Water')and(t.Category[t. +CurrentCategory].SetName=='High Scalability')r.Visible=L if L then c(I,tonumber( +J),nil)else c(I,tonumber(J))end end))E.Visible=true else E.Visible=false end end +local function loadSectionOfItems(E,F,I)local J=F*I if k>#n then return end +local K=k for L=1,J+1 do if k>=#n+1 then break end local M l[k],M= +buildInsertButton()table.insert(m,M)l[k].Parent=E.SetPanel.ItemsFrame k=k+1 end +realignButtonGrid(I)for L=K,k do if l[L]then if n[L]then if n[L].Name=='Water' +then if t.Category[t.CurrentCategory].SetName=='High Scalability'then l[L]: +FindFirstChild('DropDownButton',true):Destroy()end end local M if j then M=n[L]. +AssetVersionId else M=n[L].AssetId end setInsertButtonImageBehavior(l[L],true,n[ +L].Name,M)else break end else break end end end local function setSetIndex()t. +Category[t.CurrentCategory].Index=0 local E,F=7,math.floor(o.SetPanel.ItemsFrame +.AbsoluteSize.X/w)n=t.Category[t.CurrentCategory].Contents if n then for I=1,#l +do l[I]:remove()end for I=1,#m do if m[I]then m[I]:disconnect()end end m={}l={}k +=1 loadSectionOfItems(o,E,F)end end local function selectSet(E,F,I,J)if E and t. +Category[t.CurrentCategory]~=nil then if E~=t.Category[t.CurrentCategory].Button +then t.Category[t.CurrentCategory].Button=E if u[I]==nil then u[I]=game: +GetService'InsertService':GetCollection(I)end t.Category[t.CurrentCategory]. +Contents=u[I]t.Category[t.CurrentCategory].SetName=F t.Category[t. +CurrentCategory].SetId=I end setSetIndex()end end local function +selectCategoryPage(E,F)if E~=t.CurrentCategory then if t.CurrentCategory then +for I,J in pairs(t.CurrentCategory)do J.Visible=false end end t.CurrentCategory= +E if t.Category[t.CurrentCategory]==nil then t.Category[t.CurrentCategory]={}if# +E>0 then selectSet(E[1],E[1].SetName.Value,E[1].SetId.Value,0)end else t. +Category[t.CurrentCategory].Button=nil selectSet(t.Category[t.CurrentCategory]. +ButtonFrame,t.Category[t.CurrentCategory].SetName,t.Category[t.CurrentCategory]. +SetId,t.Category[t.CurrentCategory].Index)end end end local function +selectCategory(E)selectCategoryPage(E,0)end local function +resetAllSetButtonSelection()local E=o.SetPanel.Sets.SetsLists:GetChildren()for F +=1,#E do if E[F]:IsA'TextButton'then E[F].Selected=false E[F]. +BackgroundTransparency=1 E[F].TextColor3=Color3.new(1,1,1)E[F].BackgroundColor3= +Color3.new(1,1,1)end end end local function populateSetsFrame()local E=0 for F=1 +,#v do local I=v[F]I.Visible=true I.Position=UDim2.new(0,5,0,E*I.Size.Y.Offset)I +.Parent=o.SetPanel.Sets.SetsLists if F==1 then I.Selected=true I. +BackgroundColor3=Color3.new(0,0.8,0)I.TextColor3=Color3.new(0,0,0)I. +BackgroundTransparency=0 end I.MouseEnter:connect(function()if not I.Selected +then I.BackgroundTransparency=0 I.TextColor3=Color3.new(0,0,0)end end)I. +MouseLeave:connect(function()if not I.Selected then I.BackgroundTransparency=1 I +.TextColor3=Color3.new(1,1,1)end end)I.MouseButton1Click:connect(function() +resetAllSetButtonSelection()I.Selected=not I.Selected I.BackgroundColor3=Color3. +new(0,0.8,0)I.TextColor3=Color3.new(0,0,0)I.BackgroundTransparency=0 selectSet(I +,I.Text,v[F].SetId.Value,0)end)E=E+1 end local F=o.SetPanel.Sets.SetsLists: +GetChildren()if F then for I=1,#F do if F[I]:IsA'TextButton'then selectSet(F[I], +F[I].Text,v[I].SetId.Value,0)selectCategory(v)break end end end end o= +createSetGui()r,s=createWaterGui()r.Position=UDim2.new(0,55,0,0)r.Parent=o o. +Changed:connect(function(E)if E=='AbsoluteSize'then handleResize()setSetIndex() +end end)local E,F=a.CreateTrueScrollingFrame()E.Size=UDim2.new(0.54,0,0.85,0)E. +Position=UDim2.new(0.24,0,0.085,0)E.Name='ItemsFrame'E.ZIndex=6 E.Parent=o. +SetPanel E.BackgroundTransparency=1 drillDownSetZIndex(F,7)F.Parent=o.SetPanel F +.Position=UDim2.new(0.76,5,0,0)local I=false F.ScrollBottom.Changed:connect( +function(J)if F.ScrollBottom.Value==true then if I then return end I=true +loadSectionOfItems(o,rows,columns)I=false end end)local J={}for K=1,#b do local +L=game:GetService'InsertService':GetUserSets(b[K])if L and#L>2 then for M=3,#L +do if L[M].Name=='High Scalability'then table.insert(J,1,L[M])else table.insert( +J,L[M])end end end end if J then v=processCategory(J)end rows=math.floor(o. +SetPanel.ItemsFrame.AbsoluteSize.Y/x)columns=math.floor(o.SetPanel.ItemsFrame. +AbsoluteSize.X/w)populateSetsFrame()o.SetPanel.CancelButton.MouseButton1Click: +connect(function()o.SetPanel.Visible=false if d then d()end end)local K,L= +function(K)if K then o.SetPanel.Visible=true else o.SetPanel.Visible=false end +end,function()if o then if o:FindFirstChild'SetPanel'then return o.SetPanel. +Visible end end return false end return o,K,L,s end a. CreateTerrainMaterialSelector=function(b,c)local d=Instance.new'BindableEvent'd. -Name='TerrainMaterialSelectionChanged'local e,g=nil,Instance.new'Frame'g.Name= -'TerrainMaterialSelector'if b then g.Size=b else g.Size=UDim2.new(0,245,0,230) -end if c then g.Position=c end g.BorderSizePixel=0 g.BackgroundColor3=Color3. -new(0,0,0)g.Active=true d.Parent=g local h,i,j=true,{},{'Grass','Sand','Brick', +Name='TerrainMaterialSelectionChanged'local g,h=nil,Instance.new'Frame'h.Name= +'TerrainMaterialSelector'if b then h.Size=b else h.Size=UDim2.new(0,245,0,230) +end if c then h.Position=c end h.BorderSizePixel=0 h.BackgroundColor3=Color3. +new(0,0,0)h.Active=true d.Parent=h local i,j,k=true,{},{'Grass','Sand','Brick', 'Granite','Asphalt','Iron','Aluminum','Gold','Plank','Log','Gravel', -'Cinder Block','Stone Wall','Concrete','Plastic (red)','Plastic (blue)'}if h -then table.insert(j,'Water')end local k=1 function getEnumFromName(l)if l== -'Grass'then return 1 end if l=='Sand'then return 2 end if l=='Erase'then return -0 end if l=='Brick'then return 3 end if l=='Granite'then return 4 end if l== -'Asphalt'then return 5 end if l=='Iron'then return 6 end if l=='Aluminum'then -return 7 end if l=='Gold'then return 8 end if l=='Plank'then return 9 end if l== -'Log'then return 10 end if l=='Gravel'then return 11 end if l=='Cinder Block' -then return 12 end if l=='Stone Wall'then return 13 end if l=='Concrete'then -return 14 end if l=='Plastic (red)'then return 15 end if l=='Plastic (blue)'then -return 16 end if l=='Water'then return 17 end end function getNameFromEnum(l)if -l==Enum.CellMaterial.Grass or l==1 then return'Grass'elseif l==Enum.CellMaterial -.Sand or l==2 then return'Sand'elseif l==Enum.CellMaterial.Empty or l==0 then -return'Erase'elseif l==Enum.CellMaterial.Brick or l==3 then return'Brick'elseif -l==Enum.CellMaterial.Granite or l==4 then return'Granite'elseif l==Enum. -CellMaterial.Asphalt or l==5 then return'Asphalt'elseif l==Enum.CellMaterial. -Iron or l==6 then return'Iron'elseif l==Enum.CellMaterial.Aluminum or l==7 then -return'Aluminum'elseif l==Enum.CellMaterial.Gold or l==8 then return'Gold'elseif -l==Enum.CellMaterial.WoodPlank or l==9 then return'Plank'elseif l==Enum. -CellMaterial.WoodLog or l==10 then return'Log'elseif l==Enum.CellMaterial.Gravel -or l==11 then return'Gravel'elseif l==Enum.CellMaterial.CinderBlock or l==12 -then return'Cinder Block'elseif l==Enum.CellMaterial.MossyStone or l==13 then -return'Stone Wall'elseif l==Enum.CellMaterial.Cement or l==14 then return -'Concrete'elseif l==Enum.CellMaterial.RedPlastic or l==15 then return -'Plastic (red)'elseif l==Enum.CellMaterial.BluePlastic or l==16 then return -'Plastic (blue)'end if h then if l==Enum.CellMaterial.Water or l==17 then return -'Water'end end end local function updateMaterialChoice(l)k=getEnumFromName(l)d: -Fire(k)end for l,m in pairs(j)do i[m]={}if m=='Grass'then i[m].Regular= -'http://www.roblox.com/asset/?id=56563112'elseif m=='Sand'then i[m].Regular= -'http://www.roblox.com/asset/?id=62356652'elseif m=='Brick'then i[m].Regular= -'http://www.roblox.com/asset/?id=65961537'elseif m=='Granite'then i[m].Regular= -'http://www.roblox.com/asset/?id=67532153'elseif m=='Asphalt'then i[m].Regular= -'http://www.roblox.com/asset/?id=67532038'elseif m=='Iron'then i[m].Regular= -'http://www.roblox.com/asset/?id=67532093'elseif m=='Aluminum'then i[m].Regular= -'http://www.roblox.com/asset/?id=67531995'elseif m=='Gold'then i[m].Regular= -'http://www.roblox.com/asset/?id=67532118'elseif m=='Plastic (red)'then i[m]. -Regular='http://www.roblox.com/asset/?id=67531848'elseif m=='Plastic (blue)'then -i[m].Regular='http://www.roblox.com/asset/?id=67531924'elseif m=='Plank'then i[m -].Regular='http://www.roblox.com/asset/?id=67532015'elseif m=='Log'then i[m]. -Regular='http://www.roblox.com/asset/?id=67532051'elseif m=='Gravel'then i[m]. -Regular='http://www.roblox.com/asset/?id=67532206'elseif m=='Cinder Block'then i -[m].Regular='http://www.roblox.com/asset/?id=67532103'elseif m=='Stone Wall'then -i[m].Regular='http://www.roblox.com/asset/?id=67531804'elseif m=='Concrete'then -i[m].Regular='http://www.roblox.com/asset/?id=67532059'elseif m=='Water'then i[m -].Regular='http://www.roblox.com/asset/?id=81407474'else i[m].Regular= -'http://www.roblox.com/asset/?id=66887593'end end local n,o,p,q=a. -CreateScrollingFrame(nil,'grid')n.Size=UDim2.new(0.85,0,1,0)n.Position=UDim2. -new(0,0,0,0)n.Parent=g o.Parent=g o.Visible=true o.Position=UDim2.new(1,-19,0,0) -p.Parent=g p.Visible=true p.Position=UDim2.new(1,-19,1,-17)local function -goToNewMaterial(r,s)updateMaterialChoice(s)r.BackgroundTransparency=0 e. -BackgroundTransparency=1 e=r end local function createMaterialButton(r)local s= -Instance.new'TextButton's.Text=''s.Size=UDim2.new(0,32,0,32)s.BackgroundColor3= -Color3.new(1,1,1)s.BorderSizePixel=0 s.BackgroundTransparency=1 s. -AutoButtonColor=false s.Name=tostring(r)local t=Instance.new'ImageButton't. -AutoButtonColor=false t.BackgroundTransparency=1 t.Size=UDim2.new(0,30,0,30)t. -Position=UDim2.new(0,1,0,1)t.Name=tostring(r)t.Parent=s t.Image=i[r].Regular -local u=Instance.new'NumberValue'u.Name='EnumType'u.Parent=s u.Value=0 t. -MouseEnter:connect(function()s.BackgroundTransparency=0 end)t.MouseLeave: -connect(function()if e~=s then s.BackgroundTransparency=1 end end)t. -MouseButton1Click:connect(function()if e~=s then goToNewMaterial(s,tostring(r)) -end end)return s end for r=1,#j do local s=createMaterialButton(j[r])if j[r]== -'Grass'then e=s s.BackgroundTransparency=0 end s.Parent=n end local r=function(r -)if not r then return end if k==r then return end local s,t=getNameFromEnum(r),n -:GetChildren()for u=1,#t do if t[u].Name=='Plastic (blue)'and s== -'Plastic (blue)'then goToNewMaterial(t[u],s)return end if t[u].Name== -'Plastic (red)'and s=='Plastic (red)'then goToNewMaterial(t[u],s)return end if -string.find(t[u].Name,s)then goToNewMaterial(t[u],s)return end end end g.Changed -:connect(function(s)if s=='AbsoluteSize'then q()end end)q()return g,d,r end a. +'Cinder Block','Stone Wall','Concrete','Plastic (red)','Plastic (blue)'}if i +then table.insert(k,'Water')end local l=1 function getEnumFromName(m)if m== +'Grass'then return 1 end if m=='Sand'then return 2 end if m=='Erase'then return +0 end if m=='Brick'then return 3 end if m=='Granite'then return 4 end if m== +'Asphalt'then return 5 end if m=='Iron'then return 6 end if m=='Aluminum'then +return 7 end if m=='Gold'then return 8 end if m=='Plank'then return 9 end if m== +'Log'then return 10 end if m=='Gravel'then return 11 end if m=='Cinder Block' +then return 12 end if m=='Stone Wall'then return 13 end if m=='Concrete'then +return 14 end if m=='Plastic (red)'then return 15 end if m=='Plastic (blue)'then +return 16 end if m=='Water'then return 17 end end function getNameFromEnum(m)if +m==Enum.CellMaterial.Grass or m==1 then return'Grass'elseif m==Enum.CellMaterial +.Sand or m==2 then return'Sand'elseif m==Enum.CellMaterial.Empty or m==0 then +return'Erase'elseif m==Enum.CellMaterial.Brick or m==3 then return'Brick'elseif +m==Enum.CellMaterial.Granite or m==4 then return'Granite'elseif m==Enum. +CellMaterial.Asphalt or m==5 then return'Asphalt'elseif m==Enum.CellMaterial. +Iron or m==6 then return'Iron'elseif m==Enum.CellMaterial.Aluminum or m==7 then +return'Aluminum'elseif m==Enum.CellMaterial.Gold or m==8 then return'Gold'elseif +m==Enum.CellMaterial.WoodPlank or m==9 then return'Plank'elseif m==Enum. +CellMaterial.WoodLog or m==10 then return'Log'elseif m==Enum.CellMaterial.Gravel +or m==11 then return'Gravel'elseif m==Enum.CellMaterial.CinderBlock or m==12 +then return'Cinder Block'elseif m==Enum.CellMaterial.MossyStone or m==13 then +return'Stone Wall'elseif m==Enum.CellMaterial.Cement or m==14 then return +'Concrete'elseif m==Enum.CellMaterial.RedPlastic or m==15 then return +'Plastic (red)'elseif m==Enum.CellMaterial.BluePlastic or m==16 then return +'Plastic (blue)'end if i then if m==Enum.CellMaterial.Water or m==17 then return +'Water'end end end local function updateMaterialChoice(m)l=getEnumFromName(m)d: +Fire(l)end for m,n in pairs(k)do j[n]={}if n=='Grass'then j[n].Regular= +'http://www.roblox.com/asset/?id=56563112'elseif n=='Sand'then j[n].Regular= +'http://www.roblox.com/asset/?id=62356652'elseif n=='Brick'then j[n].Regular= +'http://www.roblox.com/asset/?id=65961537'elseif n=='Granite'then j[n].Regular= +'http://www.roblox.com/asset/?id=67532153'elseif n=='Asphalt'then j[n].Regular= +'http://www.roblox.com/asset/?id=67532038'elseif n=='Iron'then j[n].Regular= +'http://www.roblox.com/asset/?id=67532093'elseif n=='Aluminum'then j[n].Regular= +'http://www.roblox.com/asset/?id=67531995'elseif n=='Gold'then j[n].Regular= +'http://www.roblox.com/asset/?id=67532118'elseif n=='Plastic (red)'then j[n]. +Regular='http://www.roblox.com/asset/?id=67531848'elseif n=='Plastic (blue)'then +j[n].Regular='http://www.roblox.com/asset/?id=67531924'elseif n=='Plank'then j[n +].Regular='http://www.roblox.com/asset/?id=67532015'elseif n=='Log'then j[n]. +Regular='http://www.roblox.com/asset/?id=67532051'elseif n=='Gravel'then j[n]. +Regular='http://www.roblox.com/asset/?id=67532206'elseif n=='Cinder Block'then j +[n].Regular='http://www.roblox.com/asset/?id=67532103'elseif n=='Stone Wall'then +j[n].Regular='http://www.roblox.com/asset/?id=67531804'elseif n=='Concrete'then +j[n].Regular='http://www.roblox.com/asset/?id=67532059'elseif n=='Water'then j[n +].Regular='http://www.roblox.com/asset/?id=81407474'else j[n].Regular= +'http://www.roblox.com/asset/?id=66887593'end end local o,p,q,r=a. +CreateScrollingFrame(nil,'grid')o.Size=UDim2.new(0.85,0,1,0)o.Position=UDim2. +new(0,0,0,0)o.Parent=h p.Parent=h p.Visible=true p.Position=UDim2.new(1,-19,0,0) +q.Parent=h q.Visible=true q.Position=UDim2.new(1,-19,1,-17)local function +goToNewMaterial(s,t)updateMaterialChoice(t)s.BackgroundTransparency=0 g. +BackgroundTransparency=1 g=s end local function createMaterialButton(s)local t= +Instance.new'TextButton't.Text=''t.Size=UDim2.new(0,32,0,32)t.BackgroundColor3= +Color3.new(1,1,1)t.BorderSizePixel=0 t.BackgroundTransparency=1 t. +AutoButtonColor=false t.Name=tostring(s)local u=Instance.new'ImageButton'u. +AutoButtonColor=false u.BackgroundTransparency=1 u.Size=UDim2.new(0,30,0,30)u. +Position=UDim2.new(0,1,0,1)u.Name=tostring(s)u.Parent=t u.Image=j[s].Regular +local v=Instance.new'NumberValue'v.Name='EnumType'v.Parent=t v.Value=0 u. +MouseEnter:connect(function()t.BackgroundTransparency=0 end)u.MouseLeave: +connect(function()if g~=t then t.BackgroundTransparency=1 end end)u. +MouseButton1Click:connect(function()if g~=t then goToNewMaterial(t,tostring(s)) +end end)return t end for s=1,#k do local t=createMaterialButton(k[s])if k[s]== +'Grass'then g=t t.BackgroundTransparency=0 end t.Parent=o end local s=function(s +)if not s then return end if l==s then return end local t,u=getNameFromEnum(s),o +:GetChildren()for v=1,#u do if u[v].Name=='Plastic (blue)'and t== +'Plastic (blue)'then goToNewMaterial(u[v],t)return end if u[v].Name== +'Plastic (red)'and t=='Plastic (red)'then goToNewMaterial(u[v],t)return end if +string.find(u[v].Name,t)then goToNewMaterial(u[v],t)return end end end h.Changed +:connect(function(t)if t=='AbsoluteSize'then r()end end)r()return h,d,s end a. CreateLoadingFrame=function(b,c,d)game:GetService'ContentProvider':Preload -'http://www.roblox.com/asset/?id=35238053'local e=Instance.new'Frame'e.Name= -'LoadingFrame'e.Style=Enum.FrameStyle.RobloxRound if c then e.Size=c else e.Size -=UDim2.new(0,300,0,160)end if d then e.Position=d else e.Position=UDim2.new(0.5, --150,0.5,-80)end local g=Instance.new'Frame'g.Name='LoadingBar'g. -BackgroundColor3=Color3.new(0,0,0)g.BorderColor3=Color3.new(0.30980392156862746, -0.30980392156862746,0.30980392156862746)g.Position=UDim2.new(0,0,0,41)g.Size= -UDim2.new(1,0,0,30)g.Parent=e local h=Instance.new'ImageLabel'h.Name= -'LoadingGreenBar'h.Image='http://www.roblox.com/asset/?id=35238053'h.Position= -UDim2.new(0,0,0,0)h.Size=UDim2.new(0,0,1,0)h.Visible=false h.Parent=g local i= -Instance.new'TextLabel'i.Name='LoadingPercent'i.BackgroundTransparency=1 i. -Position=UDim2.new(0,0,1,0)i.Size=UDim2.new(1,0,0,14)i.Font=Enum.Font.Arial i. -Text='0%'i.FontSize=Enum.FontSize.Size14 i.TextColor3=Color3.new(1,1,1)i.Parent= -g local j=Instance.new'TextButton'j.Name='CancelButton'j.Position=UDim2.new(0.5, --60,1,-40)j.Size=UDim2.new(0,120,0,40)j.Font=Enum.Font.Arial j.FontSize=Enum. -FontSize.Size18 j.TextColor3=Color3.new(1,1,1)j.Text='Cancel'j.Style=Enum. -ButtonStyle.RobloxButton j.Parent=e local k=Instance.new'TextLabel'k.Name= -'loadingName'k.BackgroundTransparency=1 k.Size=UDim2.new(1,0,0,18)k.Position= -UDim2.new(0,0,0,2)k.Font=Enum.Font.Arial k.Text=b k.TextColor3=Color3.new(1,1,1) -k.TextStrokeTransparency=1 k.FontSize=Enum.FontSize.Size18 k.Parent=e local l= -Instance.new'BindableEvent'l.Name='CancelButtonClicked'l.Parent=j j. -MouseButton1Click:connect(function()l:Fire()end)local m=function(m,n,o)if m and -type(m)~='number'then error( -'updateLoadingGuiPercent expects number as argument, got',type(m),'instead')end -local p=nil if m<0 then p=UDim2.new(0,0,1,0)elseif m>1 then p=UDim2.new(1,0,1,0) -else p=UDim2.new(m,0,1,0)end if n then if not o then error +'http://www.roblox.com/asset/?id=35238053'local g=Instance.new'Frame'g.Name= +'LoadingFrame'g.Style=Enum.FrameStyle.RobloxRound if c then g.Size=c else g.Size +=UDim2.new(0,300,0,160)end if d then g.Position=d else g.Position=UDim2.new(0.5, +-150,0.5,-80)end local h=Instance.new'Frame'h.Name='LoadingBar'h. +BackgroundColor3=Color3.new(0,0,0)h.BorderColor3=Color3.new(0.30980392156862746, +0.30980392156862746,0.30980392156862746)h.Position=UDim2.new(0,0,0,41)h.Size= +UDim2.new(1,0,0,30)h.Parent=g local i=Instance.new'ImageLabel'i.Name= +'LoadingGreenBar'i.Image='http://www.roblox.com/asset/?id=35238053'i.Position= +UDim2.new(0,0,0,0)i.Size=UDim2.new(0,0,1,0)i.Visible=false i.Parent=h local j= +Instance.new'TextLabel'j.Name='LoadingPercent'j.BackgroundTransparency=1 j. +Position=UDim2.new(0,0,1,0)j.Size=UDim2.new(1,0,0,14)j.Font=Enum.Font.Arial j. +Text='0%'j.FontSize=Enum.FontSize.Size14 j.TextColor3=Color3.new(1,1,1)j.Parent= +h local k=Instance.new'TextButton'k.Name='CancelButton'k.Position=UDim2.new(0.5, +-60,1,-40)k.Size=UDim2.new(0,120,0,40)k.Font=Enum.Font.Arial k.FontSize=Enum. +FontSize.Size18 k.TextColor3=Color3.new(1,1,1)k.Text='Cancel'k.Style=Enum. +ButtonStyle.RobloxButton k.Parent=g local l=Instance.new'TextLabel'l.Name= +'loadingName'l.BackgroundTransparency=1 l.Size=UDim2.new(1,0,0,18)l.Position= +UDim2.new(0,0,0,2)l.Font=Enum.Font.Arial l.Text=b l.TextColor3=Color3.new(1,1,1) +l.TextStrokeTransparency=1 l.FontSize=Enum.FontSize.Size18 l.Parent=g local m= +Instance.new'BindableEvent'm.Name='CancelButtonClicked'm.Parent=k k. +MouseButton1Click:connect(function()m:Fire()end)local n=function(n,o,p)if n and +type(n)~='number'then error( +'updateLoadingGuiPercent expects number as argument, got',type(n),'instead')end +local q=nil if n<0 then q=UDim2.new(0,0,1,0)elseif n>1 then q=UDim2.new(1,0,1,0) +else q=UDim2.new(n,0,1,0)end if o then if not p then error [[updateLoadingGuiPercent is set to tween new percentage, but got no tween time length! Please pass this in as third argument]] -end if p.X.Scale>0 then h.Visible=true h:TweenSize(p,Enum.EasingDirection.Out, -Enum.EasingStyle.Quad,o,true)else h:TweenSize(p,Enum.EasingDirection.Out,Enum. -EasingStyle.Quad,o,true,function()if p.X.Scale<0 then h.Visible=false end end) -end else h.Size=p h.Visible=(p.X.Scale>0)end end h.Changed:connect(function(n)if -n=='Size'then i.Text=tostring(math.ceil(h.Size.X.Scale*100))..'%'end end)return -e,m,l end a.CreatePluginFrame=function(b,c,d,e,g)function createMenuButton(h,i,j -,k,l,m)local n=Instance.new'TextButton'n.AutoButtonColor=false n.Name=l n. -BackgroundTransparency=1 n.Position=i n.Size=h n.Font=Enum.Font.ArialBold n. -FontSize=k n.Text=j n.TextColor3=Color3.new(1,1,1)n.BorderSizePixel=0 n. +end if q.X.Scale>0 then i.Visible=true i:TweenSize(q,Enum.EasingDirection.Out, +Enum.EasingStyle.Quad,p,true)else i:TweenSize(q,Enum.EasingDirection.Out,Enum. +EasingStyle.Quad,p,true,function()if q.X.Scale<0 then i.Visible=false end end) +end else i.Size=q i.Visible=(q.X.Scale>0)end end i.Changed:connect(function(o)if +o=='Size'then j.Text=tostring(math.ceil(i.Size.X.Scale*100))..'%'end end)return +g,n,m end a.CreatePluginFrame=function(b,c,d,g,h)function createMenuButton(i,j,k +,l,m,n)local o=Instance.new'TextButton'o.AutoButtonColor=false o.Name=m o. +BackgroundTransparency=1 o.Position=j o.Size=i o.Font=Enum.Font.ArialBold o. +FontSize=l o.Text=k o.TextColor3=Color3.new(1,1,1)o.BorderSizePixel=0 o. BackgroundColor3=Color3.new(7.8431372549019605E-2,7.8431372549019605E-2, -7.8431372549019605E-2)n.MouseEnter:connect(function()if n.Selected then return -end n.BackgroundTransparency=0 end)n.MouseLeave:connect(function()if n.Selected -then return end n.BackgroundTransparency=1 end)n.Parent=m return n end local h= -Instance.new'Frame'h.Name=tostring(b)..'DragBar'h.BackgroundColor3=Color3.new( -0.15294117647058825,0.15294117647058825,0.15294117647058825)h.BorderColor3= -Color3.new(0,0,0)if c then h.Size=UDim2.new(c.X.Scale,c.X.Offset,0,20)+UDim2. -new(0,20,0,0)else h.Size=UDim2.new(0,183,0,20)end if d then h.Position=d end h. -Active=true h.Draggable=true h.MouseEnter:connect(function()h.BackgroundColor3= -Color3.new(0.19215686274509805,0.19215686274509805,0.19215686274509805)end)h. -MouseLeave:connect(function()h.BackgroundColor3=Color3.new(0.15294117647058825, -0.15294117647058825,0.15294117647058825)end)h.Parent=g local i=Instance.new -'TextLabel'i.Name='BarNameLabel'i.Text=' '..tostring(b)i.TextColor3=Color3.new(1 -,1,1)i.TextStrokeTransparency=0 i.Size=UDim2.new(1,0,1,0)i.Font=Enum.Font. -ArialBold i.FontSize=Enum.FontSize.Size18 i.TextXAlignment=Enum.TextXAlignment. -Left i.BackgroundTransparency=1 i.Parent=h local j,k=createMenuButton(UDim2.new( -0,15,0,17),UDim2.new(1,-16,0.5,-8),'X',Enum.FontSize.Size14,'CloseButton',h), -Instance.new'BindableEvent'k.Name='CloseEvent'k.Parent=j j.MouseButton1Click: -connect(function()k:Fire()j.BackgroundTransparency=1 end)local l,m= +7.8431372549019605E-2)o.MouseEnter:connect(function()if o.Selected then return +end o.BackgroundTransparency=0 end)o.MouseLeave:connect(function()if o.Selected +then return end o.BackgroundTransparency=1 end)o.Parent=n return o end local i= +Instance.new'Frame'i.Name=tostring(b)..'DragBar'i.BackgroundColor3=Color3.new( +0.15294117647058825,0.15294117647058825,0.15294117647058825)i.BorderColor3= +Color3.new(0,0,0)if c then i.Size=UDim2.new(c.X.Scale,c.X.Offset,0,20)+UDim2. +new(0,20,0,0)else i.Size=UDim2.new(0,183,0,20)end if d then i.Position=d end i. +Active=true i.Draggable=true i.MouseEnter:connect(function()i.BackgroundColor3= +Color3.new(0.19215686274509805,0.19215686274509805,0.19215686274509805)end)i. +MouseLeave:connect(function()i.BackgroundColor3=Color3.new(0.15294117647058825, +0.15294117647058825,0.15294117647058825)end)i.Parent=h local j=Instance.new +'TextLabel'j.Name='BarNameLabel'j.Text=' '..tostring(b)j.TextColor3=Color3.new(1 +,1,1)j.TextStrokeTransparency=0 j.Size=UDim2.new(1,0,1,0)j.Font=Enum.Font. +ArialBold j.FontSize=Enum.FontSize.Size18 j.TextXAlignment=Enum.TextXAlignment. +Left j.BackgroundTransparency=1 j.Parent=i local k,l=createMenuButton(UDim2.new( +0,15,0,17),UDim2.new(1,-16,0.5,-8),'X',Enum.FontSize.Size14,'CloseButton',i), +Instance.new'BindableEvent'l.Name='CloseEvent'l.Parent=k k.MouseButton1Click: +connect(function()l:Fire()k.BackgroundTransparency=1 end)local m,n= createMenuButton(UDim2.new(0,15,0,17),UDim2.new(1,-51,0.5,-8),'?',Enum.FontSize. -Size14,'HelpButton',h),Instance.new'Frame'm.Name='HelpFrame'm.BackgroundColor3= -Color3.new(0,0,0)m.Size=UDim2.new(0,300,0,552)m.Position=UDim2.new(1,5,0,0)m. -Active=true m.BorderSizePixel=0 m.Visible=false m.Parent=h l.MouseButton1Click: -connect(function()m.Visible=not m.Visible if m.Visible then l.Selected=true l. -BackgroundTransparency=0 local n=getScreenGuiAncestor(m)if n then if m. -AbsolutePosition.X+m.AbsoluteSize.X>n.AbsoluteSize.X then m.Position=UDim2.new(0 -,-5-m.AbsoluteSize.X,0,0)else m.Position=UDim2.new(1,5,0,0)end else m.Position= -UDim2.new(1,5,0,0)end else l.Selected=false l.BackgroundTransparency=1 end end) -local n=createMenuButton(UDim2.new(0,16,0,17),UDim2.new(1,-34,0.5,-8),'-',Enum. -FontSize.Size14,'MinimizeButton',h)n.TextYAlignment=Enum.TextYAlignment.Top -local o=Instance.new'Frame'o.Name='MinimizeFrame'o.BackgroundColor3=Color3.new( -0.28627450980392155,0.28627450980392155,0.28627450980392155)o.BorderColor3= -Color3.new(0,0,0)o.Position=UDim2.new(0,0,1,0)if c then o.Size=UDim2.new(c.X. -Scale,c.X.Offset,0,50)+UDim2.new(0,20,0,0)else o.Size=UDim2.new(0,183,0,50)end o -.Visible=false o.Parent=h local p=Instance.new'TextButton'p.Position=UDim2.new( -0.5,-50,0.5,-20)p.Name='MinimizeButton'p.Size=UDim2.new(0,100,0,40)p.Style=Enum. -ButtonStyle.RobloxButton p.Font=Enum.Font.ArialBold p.FontSize=Enum.FontSize. -Size18 p.TextColor3=Color3.new(1,1,1)p.Text='Show'p.Parent=o local q=Instance. -new'Frame'q.Name='SeparatingLine'q.BackgroundColor3=Color3.new( -0.45098039215686275,0.45098039215686275,0.45098039215686275)q.BorderSizePixel=0 -q.Position=UDim2.new(1,-18,0.5,-7)q.Size=UDim2.new(0,1,0,14)q.Parent=h local r=q -:clone()r.Position=UDim2.new(1,-35,0.5,-7)r.Parent=h local s=Instance.new'Frame' -s.Name='WidgetContainer's.BackgroundTransparency=1 s.Position=UDim2.new(0,0,1,0) -s.BorderColor3=Color3.new(0,0,0)if not e then s.BackgroundTransparency=0 s. +Size14,'HelpButton',i),Instance.new'Frame'n.Name='HelpFrame'n.BackgroundColor3= +Color3.new(0,0,0)n.Size=UDim2.new(0,300,0,552)n.Position=UDim2.new(1,5,0,0)n. +Active=true n.BorderSizePixel=0 n.Visible=false n.Parent=i m.MouseButton1Click: +connect(function()n.Visible=not n.Visible if n.Visible then m.Selected=true m. +BackgroundTransparency=0 local o=getScreenGuiAncestor(n)if o then if n. +AbsolutePosition.X+n.AbsoluteSize.X>o.AbsoluteSize.X then n.Position=UDim2.new(0 +,-5-n.AbsoluteSize.X,0,0)else n.Position=UDim2.new(1,5,0,0)end else n.Position= +UDim2.new(1,5,0,0)end else m.Selected=false m.BackgroundTransparency=1 end end) +local o=createMenuButton(UDim2.new(0,16,0,17),UDim2.new(1,-34,0.5,-8),'-',Enum. +FontSize.Size14,'MinimizeButton',i)o.TextYAlignment=Enum.TextYAlignment.Top +local p=Instance.new'Frame'p.Name='MinimizeFrame'p.BackgroundColor3=Color3.new( +0.28627450980392155,0.28627450980392155,0.28627450980392155)p.BorderColor3= +Color3.new(0,0,0)p.Position=UDim2.new(0,0,1,0)if c then p.Size=UDim2.new(c.X. +Scale,c.X.Offset,0,50)+UDim2.new(0,20,0,0)else p.Size=UDim2.new(0,183,0,50)end p +.Visible=false p.Parent=i local q=Instance.new'TextButton'q.Position=UDim2.new( +0.5,-50,0.5,-20)q.Name='MinimizeButton'q.Size=UDim2.new(0,100,0,40)q.Style=Enum. +ButtonStyle.RobloxButton q.Font=Enum.Font.ArialBold q.FontSize=Enum.FontSize. +Size18 q.TextColor3=Color3.new(1,1,1)q.Text='Show'q.Parent=p local r=Instance. +new'Frame'r.Name='SeparatingLine'r.BackgroundColor3=Color3.new( +0.45098039215686275,0.45098039215686275,0.45098039215686275)r.BorderSizePixel=0 +r.Position=UDim2.new(1,-18,0.5,-7)r.Size=UDim2.new(0,1,0,14)r.Parent=i local s=r +:clone()s.Position=UDim2.new(1,-35,0.5,-7)s.Parent=i local t=Instance.new'Frame' +t.Name='WidgetContainer't.BackgroundTransparency=1 t.Position=UDim2.new(0,0,1,0) +t.BorderColor3=Color3.new(0,0,0)if not g then t.BackgroundTransparency=0 t. BackgroundColor3=Color3.new(0.2823529411764706,0.2823529411764706, -0.2823529411764706)end s.Parent=h if c then if e then s.Size=c else s.Size=UDim2 -.new(0,h.AbsoluteSize.X,c.Y.Scale,c.Y.Offset)end else if e then s.Size=UDim2. -new(0,163,0,400)else s.Size=UDim2.new(0,h.AbsoluteSize.X,0,400)end end if d then -s.Position=d+UDim2.new(0,0,0,20)end local t,u,v=nil if e then t,u=a. -CreateTrueScrollingFrame()t.Size=UDim2.new(1,0,1,0)t.BackgroundColor3=Color3. -new(0.2823529411764706,0.2823529411764706,0.2823529411764706)t.BorderColor3= -Color3.new(0,0,0)t.Active=true t.Parent=s u.Parent=h u.BackgroundColor3=Color3. -new(0.2823529411764706,0.2823529411764706,0.2823529411764706)u.BorderSizePixel=0 -u.BackgroundTransparency=0 u.Position=UDim2.new(1,-21,1,1)if c then u.Size=UDim2 -.new(0,21,c.Y.Scale,c.Y.Offset)else u.Size=UDim2.new(0,21,0,400)end u: -FindFirstChild'ScrollDownButton'.Position=UDim2.new(0,0,1,-20)local w=Instance. -new'Frame'w.Name='FakeLine'w.BorderSizePixel=0 w.BackgroundColor3=Color3.new(0,0 -,0)w.Size=UDim2.new(0,1,1,1)w.Position=UDim2.new(1,0,0,0)w.Parent=u v=Instance. -new'TextButton'v.ZIndex=2 v.AutoButtonColor=false v.Name='VerticalDragger'v. +0.2823529411764706)end t.Parent=i if c then if g then t.Size=c else t.Size=UDim2 +.new(0,i.AbsoluteSize.X,c.Y.Scale,c.Y.Offset)end else if g then t.Size=UDim2. +new(0,163,0,400)else t.Size=UDim2.new(0,i.AbsoluteSize.X,0,400)end end if d then +t.Position=d+UDim2.new(0,0,0,20)end local u,v,w=nil if g then u,v=a. +CreateTrueScrollingFrame()u.Size=UDim2.new(1,0,1,0)u.BackgroundColor3=Color3. +new(0.2823529411764706,0.2823529411764706,0.2823529411764706)u.BorderColor3= +Color3.new(0,0,0)u.Active=true u.Parent=t v.Parent=i v.BackgroundColor3=Color3. +new(0.2823529411764706,0.2823529411764706,0.2823529411764706)v.BorderSizePixel=0 +v.BackgroundTransparency=0 v.Position=UDim2.new(1,-21,1,1)if c then v.Size=UDim2 +.new(0,21,c.Y.Scale,c.Y.Offset)else v.Size=UDim2.new(0,21,0,400)end v: +FindFirstChild'ScrollDownButton'.Position=UDim2.new(0,0,1,-20)local x=Instance. +new'Frame'x.Name='FakeLine'x.BorderSizePixel=0 x.BackgroundColor3=Color3.new(0,0 +,0)x.Size=UDim2.new(0,1,1,1)x.Position=UDim2.new(1,0,0,0)x.Parent=v w=Instance. +new'TextButton'w.ZIndex=2 w.AutoButtonColor=false w.Name='VerticalDragger'w. BackgroundColor3=Color3.new(0.19607843137254902,0.19607843137254902, -0.19607843137254902)v.BorderColor3=Color3.new(0,0,0)v.Size=UDim2.new(1,20,0,20)v -.Position=UDim2.new(0,0,1,0)v.Active=true v.Text=''v.Parent=s local x=Instance. -new'Frame'x.Name='ScrubFrame'x.BackgroundColor3=Color3.new(1,1,1)x. -BorderSizePixel=0 x.Position=UDim2.new(0.5,-5,0.5,0)x.Size=UDim2.new(0,10,0,1)x. -ZIndex=5 x.Parent=v local y=x:clone()y.Position=UDim2.new(0.5,-5,0.5,-2)y.Parent -=v local z=x:clone()z.Position=UDim2.new(0.5,-5,0.5,2)z.Parent=v local A= -Instance.new'TextButton'A.Name='AreaSoak'A.Size=UDim2.new(1,0,1,0)A. -BackgroundTransparency=1 A.BorderSizePixel=0 A.Text=''A.ZIndex=10 A.Visible= -false A.Active=true A.Parent=getScreenGuiAncestor(g)local B,C=false,nil v. -MouseEnter:connect(function()v.BackgroundColor3=Color3.new(0.23529411764705882, -0.23529411764705882,0.23529411764705882)end)v.MouseLeave:connect(function()v. +0.19607843137254902)w.BorderColor3=Color3.new(0,0,0)w.Size=UDim2.new(1,20,0,20)w +.Position=UDim2.new(0,0,1,0)w.Active=true w.Text=''w.Parent=t local y=Instance. +new'Frame'y.Name='ScrubFrame'y.BackgroundColor3=Color3.new(1,1,1)y. +BorderSizePixel=0 y.Position=UDim2.new(0.5,-5,0.5,0)y.Size=UDim2.new(0,10,0,1)y. +ZIndex=5 y.Parent=w local z=y:clone()z.Position=UDim2.new(0.5,-5,0.5,-2)z.Parent +=w local A=y:clone()A.Position=UDim2.new(0.5,-5,0.5,2)A.Parent=w local B= +Instance.new'TextButton'B.Name='AreaSoak'B.Size=UDim2.new(1,0,1,0)B. +BackgroundTransparency=1 B.BorderSizePixel=0 B.Text=''B.ZIndex=10 B.Visible= +false B.Active=true B.Parent=getScreenGuiAncestor(h)local C,D=false,nil w. +MouseEnter:connect(function()w.BackgroundColor3=Color3.new(0.23529411764705882, +0.23529411764705882,0.23529411764705882)end)w.MouseLeave:connect(function()w. BackgroundColor3=Color3.new(0.19607843137254902,0.19607843137254902, -0.19607843137254902)end)v.MouseButton1Down:connect(function(D,E)B=true A.Visible -=true C=E end)A.MouseButton1Up:connect(function()B=false A.Visible=false end)A. -MouseMoved:connect(function(D,E)if not B then return end local H=E-C if not u. -ScrollDownButton.Visible and H>0 then return end if(s.Size.Y.Offset+H)<150 then -s.Size=UDim2.new(s.Size.X.Scale,s.Size.X.Offset,s.Size.Y.Scale,150)u.Size=UDim2. -new(0,21,0,150)return end C=E if s.Size.Y.Offset+H>=0 then s.Size=UDim2.new(s. -Size.X.Scale,s.Size.X.Offset,s.Size.Y.Scale,s.Size.Y.Offset+H)u.Size=UDim2.new(0 -,21,0,u.Size.Y.Offset+H)end end)end local function switchMinimize()o.Visible=not -o.Visible if e then t.Visible=not t.Visible v.Visible=not v.Visible u.Visible= -not u.Visible else s.Visible=not s.Visible end if o.Visible then n.Text='+'else -n.Text='-'end end p.MouseButton1Click:connect(function()switchMinimize()end)n. -MouseButton1Click:connect(function()switchMinimize()end)if e then return h,t,m,k -else return h,s,m,k end end a.Help=function(b)if b=='CreatePropertyDropDownMenu' +0.19607843137254902)end)w.MouseButton1Down:connect(function(E,F)C=true B.Visible +=true D=F end)B.MouseButton1Up:connect(function()C=false B.Visible=false end)B. +MouseMoved:connect(function(E,F)if not C then return end local I=F-D if not v. +ScrollDownButton.Visible and I>0 then return end if(t.Size.Y.Offset+I)<150 then +t.Size=UDim2.new(t.Size.X.Scale,t.Size.X.Offset,t.Size.Y.Scale,150)v.Size=UDim2. +new(0,21,0,150)return end D=F if t.Size.Y.Offset+I>=0 then t.Size=UDim2.new(t. +Size.X.Scale,t.Size.X.Offset,t.Size.Y.Scale,t.Size.Y.Offset+I)v.Size=UDim2.new(0 +,21,0,v.Size.Y.Offset+I)end end)end local function switchMinimize()p.Visible=not +p.Visible if g then u.Visible=not u.Visible w.Visible=not w.Visible v.Visible= +not v.Visible else t.Visible=not t.Visible end if p.Visible then o.Text='+'else +o.Text='-'end end q.MouseButton1Click:connect(function()switchMinimize()end)o. +MouseButton1Click:connect(function()switchMinimize()end)if g then return i,u,n,l +else return i,t,n,l end end a.Help=function(b)if b=='CreatePropertyDropDownMenu' or b==a.CreatePropertyDropDownMenu then return [[Function CreatePropertyDropDownMenu. Arguments: (instance, propertyName, enumType). Side effect: returns a container with a drop-down-box that is linked to the 'property' field of 'instance' which is of type 'enumType']] end if b=='CreateDropDownMenu'or b==a.CreateDropDownMenu then return diff --git a/processed/46295863.lua b/processed/46295863.lua index 7b46f22..0976c58 100644 --- a/processed/46295863.lua +++ b/processed/46295863.lua @@ -2,575 +2,556 @@ local function waitForChild(a,b)while not a:FindFirstChild(b)do a.ChildAdded: wait()end end local function waitForProperty(a,b)while not a[b]do a.Changed: wait()end end local a if script.Parent:FindFirstChild'ControlFrame'then a=script .Parent:FindFirstChild'ControlFrame'else a=script.Parent end local b,c,d,e,f,g,h -,i,j,k,l,m,n,o,p,q,r,s,t=nil,nil,nil,0.2, -'http://www.roblox.com/asset?id=54071825', +,i,j,k,l,m,n,o,p,q,r=nil,nil,nil,0.2,'http://www.roblox.com/asset?id=54071825', 'http://www.roblox.com/Asset?id=45915798',(game:GetService'CoreGui'.Version>=5), -10,false,nil,{},UDim2.new(0,0,0,0),{0,41324860},{},nil,UserSettings(). -GameSettings:InStudioMode(),false,pcall(function()return not game.GuiService. -IsWindows end)r=s and t local function Color3I(u,v,w)return Color3.new(u/255,v/ -255,w/255)end local function robloxLock(u)u.RobloxLocked=true children=u: -GetChildren()if children then for v,w in ipairs(children)do robloxLock(w)end end -end function resumeGameFunction(u)u.Settings:TweenPosition(UDim2.new(0.5,-262,- -0.5,-200),Enum.EasingDirection.InOut,Enum.EasingStyle.Sine,e,true)delay(e, -function()u.Visible=false for v=1,#o do o[v].Visible=false game.GuiService: -RemoveCenterDialog(o[v])end game.GuiService:RemoveCenterDialog(u)settingsButton. -Active=true k=nil l={}end)end function goToMenu(u,v,w,x,y)if type(v)~='string' -then return end table.insert(l,k)if v=='GameMainMenu'then l={}end local z=u: -GetChildren()for A=1,#z do if z[A].Name==v then z[A].Visible=true k={container=u -,name=v,direction=w,lastSize=x}if x and y then z[A]:TweenSizeAndPosition(x,y, -Enum.EasingDirection.InOut,Enum.EasingStyle.Sine,e,true)elseif x then z[A]: -TweenSizeAndPosition(x,UDim2.new(0.5,-x.X.Offset/2,0.5,-x.Y.Offset/2),Enum. -EasingDirection.InOut,Enum.EasingStyle.Sine,e,true)else z[A]:TweenPosition(UDim2 -.new(0,0,0,0),Enum.EasingDirection.InOut,Enum.EasingStyle.Sine,e,true)end else -if w=='left'then z[A]:TweenPosition(UDim2.new(-1,-525,0,0),Enum.EasingDirection. -InOut,Enum.EasingStyle.Sine,e,true)elseif w=='right'then z[A]:TweenPosition( -UDim2.new(1,525,0,0),Enum.EasingDirection.InOut,Enum.EasingStyle.Sine,e,true) -elseif w=='up'then z[A]:TweenPosition(UDim2.new(0,0,-1,-400),Enum. -EasingDirection.InOut,Enum.EasingStyle.Sine,e,true)elseif w=='down'then z[A]: -TweenPosition(UDim2.new(0,0,1,400),Enum.EasingDirection.InOut,Enum.EasingStyle. -Sine,e,true)end delay(e,function()z[A].Visible=false end)end end end function -resetLocalCharacter()local u=game.Players.LocalPlayer if u then if u.Character -and u.Character:FindFirstChild'Humanoid'then u.Character.Humanoid.Health=0 end -end end local function createTextButton(u,v,w,x,y)local z=Instance.new -'TextButton'z.Font=Enum.Font.Arial z.FontSize=w z.Size=x z.Position=y z.Style=v -z.TextColor3=Color3.new(1,1,1)z.Text=u return z end local function -CreateTextButtons(u,v,w,x)if#v<1 then error'Must have more than one button'end -local y,z=1,{}local function toggleSelection(A)for B,C in ipairs(z)do if C==A -then C.Style=Enum.ButtonStyle.RobloxButtonDefault else C.Style=Enum.ButtonStyle. -RobloxButton end end end for A,B in ipairs(v)do local C=Instance.new'TextButton' -C.Name='Button'..y C.Font=Enum.Font.Arial C.FontSize=Enum.FontSize.Size18 C. -AutoButtonColor=true C.Style=Enum.ButtonStyle.RobloxButton C.Text=B.Text C. -TextColor3=Color3.new(1,1,1)C.MouseButton1Click:connect(function() -toggleSelection(C)B.Function()end)C.Parent=u z[y]=C y=y+1 end toggleSelection(z[ -1])local C=y-1 if C==1 then u.Button1.Position=UDim2.new(0.35,0,w.Scale,w.Offset -)u.Button1.Size=UDim2.new(0.4,0,x.Scale,x.Offset)elseif C==2 then u.Button1. -Position=UDim2.new(0.1,0,w.Scale,w.Offset)u.Button1.Size=UDim2.new(0.35,0,x. -Scale,x.Offset)u.Button2.Position=UDim2.new(0.55,0,w.Scale,w.Offset)u.Button2. -Size=UDim2.new(0.35,0,x.Scale,x.Offset)elseif C>=3 then local D,E=0.1/C,0.9/C y= -1 while y<=C do z[y].Position=UDim2.new(D*y+(y-1)*E,0,w.Scale,w.Offset)z[y].Size -=UDim2.new(E,0,x.Scale,x.Offset)y=y+1 end end end function setRecordGui(u,v,w)if -u then v.Visible=true w.Text='Stop Recording'else v.Visible=false w.Text= -'Record Video'end end function recordVideoClick(u,v)j=not j setRecordGui(j,v,u) -end function backToGame(u,v,w)u.Parent.Parent.Parent.Parent.Visible=false v. -Visible=false for x=1,#o do game.GuiService:RemoveCenterDialog(o[x])o[x].Visible -=false end o={}game.GuiService:RemoveCenterDialog(v)w.Active=true end function -setDisabledState(u)if not u then return end if u:IsA'TextLabel'then u. -TextTransparency=0.9 elseif u:IsA'TextButton'then u.TextTransparency=0.9 u. -Active=false else if u['ClassName']then print( -[[setDisabledState() got object of unsupported type. object type is ]],u. -ClassName)end end end local function createHelpDialog(u)if b==nil then if a: +10,false,nil,{},{},nil,UserSettings().GameSettings:InStudioMode(),false,pcall( +function()return not game.GuiService.IsWindows end)p=q and r local function +Color3I(s,t,u)return Color3.new(s/255,t/255,u/255)end local function robloxLock( +s)s.RobloxLocked=true local t=s:GetChildren()if t then for u,v in ipairs(t)do +robloxLock(v)end end end function resumeGameFunction(s)s.Settings:TweenPosition( +UDim2.new(0.5,-262,-0.5,-200),Enum.EasingDirection.InOut,Enum.EasingStyle.Sine,e +,true)delay(e,function()s.Visible=false for t=1,#m do m[t].Visible=false game. +GuiService:RemoveCenterDialog(m[t])end game.GuiService:RemoveCenterDialog(s) +settingsButton.Active=true k=nil l={}end)end function goToMenu(s,t,u,v,w)if +type(t)~='string'then return end table.insert(l,k)if t=='GameMainMenu'then l={} +end local x=s:GetChildren()for y=1,#x do if x[y].Name==t then x[y].Visible=true +k={container=s,name=t,direction=u,lastSize=v}if v and w then x[y]: +TweenSizeAndPosition(v,w,Enum.EasingDirection.InOut,Enum.EasingStyle.Sine,e,true +)elseif v then x[y]:TweenSizeAndPosition(v,UDim2.new(0.5,-v.X.Offset/2,0.5,-v.Y. +Offset/2),Enum.EasingDirection.InOut,Enum.EasingStyle.Sine,e,true)else x[y]: +TweenPosition(UDim2.new(0,0,0,0),Enum.EasingDirection.InOut,Enum.EasingStyle. +Sine,e,true)end else if u=='left'then x[y]:TweenPosition(UDim2.new(-1,-525,0,0), +Enum.EasingDirection.InOut,Enum.EasingStyle.Sine,e,true)elseif u=='right'then x[ +y]:TweenPosition(UDim2.new(1,525,0,0),Enum.EasingDirection.InOut,Enum. +EasingStyle.Sine,e,true)elseif u=='up'then x[y]:TweenPosition(UDim2.new(0,0,-1,- +400),Enum.EasingDirection.InOut,Enum.EasingStyle.Sine,e,true)elseif u=='down' +then x[y]:TweenPosition(UDim2.new(0,0,1,400),Enum.EasingDirection.InOut,Enum. +EasingStyle.Sine,e,true)end delay(e,function()x[y].Visible=false end)end end end +function resetLocalCharacter()local s=game.Players.LocalPlayer if s then if s. +Character and s.Character:FindFirstChild'Humanoid'then s.Character.Humanoid. +Health=0 end end end local function createTextButton(s,t,u,v,w)local x=Instance. +new'TextButton'x.Font=Enum.Font.Arial x.FontSize=u x.Size=v x.Position=w x.Style +=t x.TextColor3=Color3.new(1,1,1)x.Text=s return x end local function +CreateTextButtons(s,t,u,v)if#t<1 then error'Must have more than one button'end +local w,x=1,{}local function toggleSelection(y)for z,A in ipairs(x)do if A==y +then A.Style=Enum.ButtonStyle.RobloxButtonDefault else A.Style=Enum.ButtonStyle. +RobloxButton end end end for y,z in ipairs(t)do local A=Instance.new'TextButton' +A.Name='Button'..w A.Font=Enum.Font.Arial A.FontSize=Enum.FontSize.Size18 A. +AutoButtonColor=true A.Style=Enum.ButtonStyle.RobloxButton A.Text=z.Text A. +TextColor3=Color3.new(1,1,1)A.MouseButton1Click:connect(function() +toggleSelection(A)z.Function()end)A.Parent=s x[w]=A w=w+1 end toggleSelection(x[ +1])local A=w-1 if A==1 then s.Button1.Position=UDim2.new(0.35,0,u.Scale,u.Offset +)s.Button1.Size=UDim2.new(0.4,0,v.Scale,v.Offset)elseif A==2 then s.Button1. +Position=UDim2.new(0.1,0,u.Scale,u.Offset)s.Button1.Size=UDim2.new(0.35,0,v. +Scale,v.Offset)s.Button2.Position=UDim2.new(0.55,0,u.Scale,u.Offset)s.Button2. +Size=UDim2.new(0.35,0,v.Scale,v.Offset)elseif A>=3 then local B,C=0.1/A,0.9/A w= +1 while w<=A do x[w].Position=UDim2.new(B*w+(w-1)*C,0,u.Scale,u.Offset)x[w].Size +=UDim2.new(C,0,v.Scale,v.Offset)w=w+1 end end end function setRecordGui(s,t,u)if +s then t.Visible=true u.Text='Stop Recording'else t.Visible=false u.Text= +'Record Video'end end function recordVideoClick(s,t)j=not j setRecordGui(j,t,s) +end function backToGame(s,t,u)s.Parent.Parent.Parent.Parent.Visible=false t. +Visible=false for v=1,#m do game.GuiService:RemoveCenterDialog(m[v])m[v].Visible +=false end m={}game.GuiService:RemoveCenterDialog(t)u.Active=true end function +setDisabledState(s)if not s then return end if s:IsA'TextLabel'then s. +TextTransparency=0.9 elseif s:IsA'TextButton'then s.TextTransparency=0.9 s. +Active=false else if s['ClassName']then print( +[[setDisabledState() got object of unsupported type. object type is ]],s. +ClassName)end end end local function createHelpDialog(s)if b==nil then if a: FindFirstChild'TopLeftControl'and a.TopLeftControl:FindFirstChild'Help'then b=a. TopLeftControl.Help elseif a:FindFirstChild'BottomRightControl'and a. BottomRightControl:FindFirstChild'Help'then b=a.BottomRightControl.Help end end -local v=Instance.new'Frame'v.Name='HelpDialogShield'v.Active=true v.Visible= -false v.Size=UDim2.new(1,0,1,0)v.BackgroundColor3=Color3I(51,51,51)v. -BorderColor3=Color3I(27,42,53)v.BackgroundTransparency=0.4 v.ZIndex=u+1 local w= -Instance.new'Frame'w.Name='HelpDialog'w.Style=Enum.FrameStyle.RobloxRound w. -Position=UDim2.new(0.2,0,0.2,0)w.Size=UDim2.new(0.6,0,0.6,0)w.Active=true w. -Parent=v local x=Instance.new'TextLabel'x.Name='Title'x.Text= -'Keyboard & Mouse Controls'x.Font=Enum.Font.ArialBold x.FontSize=Enum.FontSize. -Size36 x.Position=UDim2.new(0,0,0.025,0)x.Size=UDim2.new(1,0,0,40)x.TextColor3= -Color3.new(1,1,1)x.BackgroundTransparency=1 x.Parent=w local y=Instance.new -'Frame'y.Name='Buttons'y.Position=UDim2.new(0.1,0,0.07,40)y.Size=UDim2.new(0.8,0 -,0,45)y.BackgroundTransparency=1 y.Parent=w local z=Instance.new'Frame'z.Name= -'ImageFrame'z.Position=UDim2.new(0.05,0,0.075,80)z.Size=UDim2.new(0.9,0,0.9,-120 -)z.BackgroundTransparency=1 z.Parent=w local A=Instance.new'Frame'A.Name= -'LayoutFrame'A.Position=UDim2.new(0.5,0,0,0)A.Size=UDim2.new(1.5,0,1,0)A. -BackgroundTransparency=1 A.SizeConstraint=Enum.SizeConstraint.RelativeYY A. -Parent=z local B=Instance.new'ImageLabel'B.Name='Image'if UserSettings(). -GameSettings.ControlMode==Enum.ControlMode['Mouse Lock Switch']then B.Image=f -else B.Image=g end B.Position=UDim2.new(-0.5,0,0,0)B.Size=UDim2.new(1,0,1,0)B. -BackgroundTransparency=1 B.Parent=A local C={}C[1]={}C[1].Text='Look'C[1]. +local t=Instance.new'Frame't.Name='HelpDialogShield't.Active=true t.Visible= +false t.Size=UDim2.new(1,0,1,0)t.BackgroundColor3=Color3I(51,51,51)t. +BorderColor3=Color3I(27,42,53)t.BackgroundTransparency=0.4 t.ZIndex=s+1 local u= +Instance.new'Frame'u.Name='HelpDialog'u.Style=Enum.FrameStyle.RobloxRound u. +Position=UDim2.new(0.2,0,0.2,0)u.Size=UDim2.new(0.6,0,0.6,0)u.Active=true u. +Parent=t local v=Instance.new'TextLabel'v.Name='Title'v.Text= +'Keyboard & Mouse Controls'v.Font=Enum.Font.ArialBold v.FontSize=Enum.FontSize. +Size36 v.Position=UDim2.new(0,0,0.025,0)v.Size=UDim2.new(1,0,0,40)v.TextColor3= +Color3.new(1,1,1)v.BackgroundTransparency=1 v.Parent=u local w=Instance.new +'Frame'w.Name='Buttons'w.Position=UDim2.new(0.1,0,0.07,40)w.Size=UDim2.new(0.8,0 +,0,45)w.BackgroundTransparency=1 w.Parent=u local x=Instance.new'Frame'x.Name= +'ImageFrame'x.Position=UDim2.new(0.05,0,0.075,80)x.Size=UDim2.new(0.9,0,0.9,-120 +)x.BackgroundTransparency=1 x.Parent=u local y=Instance.new'Frame'y.Name= +'LayoutFrame'y.Position=UDim2.new(0.5,0,0,0)y.Size=UDim2.new(1.5,0,1,0)y. +BackgroundTransparency=1 y.SizeConstraint=Enum.SizeConstraint.RelativeYY y. +Parent=x local z=Instance.new'ImageLabel'z.Name='Image'if UserSettings(). +GameSettings.ControlMode==Enum.ControlMode['Mouse Lock Switch']then z.Image=f +else z.Image=g end z.Position=UDim2.new(-0.5,0,0,0)z.Size=UDim2.new(1,0,1,0)z. +BackgroundTransparency=1 z.Parent=y local A={}A[1]={}A[1].Text='Look'A[1]. Function=function()if UserSettings().GameSettings.ControlMode==Enum.ControlMode[ -'Mouse Lock Switch']then B.Image=f else B.Image=g end end C[2]={}C[2].Text= -'Move'C[2].Function=function()B.Image='http://www.roblox.com/Asset?id=45915811' -end C[3]={}C[3].Text='Gear'C[3].Function=function()B.Image= -'http://www.roblox.com/Asset?id=45917596'end C[4]={}C[4].Text='Zoom'C[4]. -Function=function()B.Image='http://www.roblox.com/Asset?id=45915825'end -CreateTextButtons(y,C,UDim.new(0,0),UDim.new(1,0))delay(0,function() +'Mouse Lock Switch']then z.Image=f else z.Image=g end end A[2]={}A[2].Text= +'Move'A[2].Function=function()z.Image='http://www.roblox.com/Asset?id=45915811' +end A[3]={}A[3].Text='Gear'A[3].Function=function()z.Image= +'http://www.roblox.com/Asset?id=45917596'end A[4]={}A[4].Text='Zoom'A[4]. +Function=function()z.Image='http://www.roblox.com/Asset?id=45915825'end +CreateTextButtons(w,A,UDim.new(0,0),UDim.new(1,0))delay(0,function() waitForChild(a,'UserSettingsShield')waitForChild(a.UserSettingsShield,'Settings' )waitForChild(a.UserSettingsShield.Settings,'SettingsStyle')waitForChild(a. UserSettingsShield.Settings.SettingsStyle,'GameSettingsMenu')waitForChild(a. UserSettingsShield.Settings.SettingsStyle.GameSettingsMenu,'CameraField') waitForChild(a.UserSettingsShield.Settings.SettingsStyle.GameSettingsMenu. CameraField,'DropDownMenuButton')a.UserSettingsShield.Settings.SettingsStyle. -GameSettingsMenu.CameraField.DropDownMenuButton.Changed:connect(function(D)if D -~='Text'then return end if y.Button1.Style==Enum.ButtonStyle.RobloxButtonDefault +GameSettingsMenu.CameraField.DropDownMenuButton.Changed:connect(function(B)if B +~='Text'then return end if w.Button1.Style==Enum.ButtonStyle.RobloxButtonDefault then if a.UserSettingsShield.Settings.SettingsStyle.GameSettingsMenu.CameraField -.DropDownMenuButton.Text=='Classic'then B.Image=g else B.Image=f end end end)end -)local D=Instance.new'TextButton'D.Name='OkBtn'D.Text='OK'D.Modal=true D.Size= -UDim2.new(0.3,0,0,45)D.Position=UDim2.new(0.35,0,0.975,-50)D.Font=Enum.Font. -Arial D.FontSize=Enum.FontSize.Size18 D.BackgroundTransparency=1 D.TextColor3= -Color3.new(1,1,1)D.Style=Enum.ButtonStyle.RobloxButtonDefault D. -MouseButton1Click:connect(function()v.Visible=false game.GuiService: -RemoveCenterDialog(v)end)D.Parent=w robloxLock(v)return v end local function -createLeaveConfirmationMenu(u,v)local w=Instance.new'Frame'w.Name= -'LeaveConfirmationMenu'w.BackgroundTransparency=1 w.Size=UDim2.new(1,0,1,0)w. -Position=UDim2.new(0,0,2,400)w.ZIndex=u+4 local x=createTextButton('Leave',Enum. +.DropDownMenuButton.Text=='Classic'then z.Image=g else z.Image=f end end end)end +)local B=Instance.new'TextButton'B.Name='OkBtn'B.Text='OK'B.Modal=true B.Size= +UDim2.new(0.3,0,0,45)B.Position=UDim2.new(0.35,0,0.975,-50)B.Font=Enum.Font. +Arial B.FontSize=Enum.FontSize.Size18 B.BackgroundTransparency=1 B.TextColor3= +Color3.new(1,1,1)B.Style=Enum.ButtonStyle.RobloxButtonDefault B. +MouseButton1Click:connect(function()t.Visible=false game.GuiService: +RemoveCenterDialog(t)end)B.Parent=u robloxLock(t)return t end local function +createLeaveConfirmationMenu(s,t)local u=Instance.new'Frame'u.Name= +'LeaveConfirmationMenu'u.BackgroundTransparency=1 u.Size=UDim2.new(1,0,1,0)u. +Position=UDim2.new(0,0,2,400)u.ZIndex=s+4 local v=createTextButton('Leave',Enum. ButtonStyle.RobloxButton,Enum.FontSize.Size24,UDim2.new(0,128,0,50),UDim2.new(0, -313,0.8,0))x.Name='YesButton'x.ZIndex=u+4 x.Parent=w x.Modal=true x:SetVerb -'Exit'local y=createTextButton('Stay',Enum.ButtonStyle.RobloxButtonDefault,Enum. -FontSize.Size24,UDim2.new(0,128,0,50),UDim2.new(0,90,0.8,0))y.Name='NoButton'y. -Parent=w y.ZIndex=u+4 y.MouseButton1Click:connect(function()goToMenu(v.Settings. -SettingsStyle,'GameMainMenu','down',UDim2.new(0,525,0,430))v.Settings:TweenSize( +313,0.8,0))v.Name='YesButton'v.ZIndex=s+4 v.Parent=u v.Modal=true v:SetVerb +'Exit'local w=createTextButton('Stay',Enum.ButtonStyle.RobloxButtonDefault,Enum. +FontSize.Size24,UDim2.new(0,128,0,50),UDim2.new(0,90,0.8,0))w.Name='NoButton'w. +Parent=u w.ZIndex=s+4 w.MouseButton1Click:connect(function()goToMenu(t.Settings. +SettingsStyle,'GameMainMenu','down',UDim2.new(0,525,0,430))t.Settings:TweenSize( UDim2.new(0,525,0,430),Enum.EasingDirection.InOut,Enum.EasingStyle.Sine,e,true) -end)local z=Instance.new'TextLabel'z.Name='LeaveText'z.Text='Leave this game?'z. -Size=UDim2.new(1,0,0.8,0)z.TextWrap=true z.TextColor3=Color3.new(1,1,1)z.Font= -Enum.Font.ArialBold z.FontSize=Enum.FontSize.Size36 z.BackgroundTransparency=1 z -.ZIndex=u+4 z.Parent=w return w end local function createResetConfirmationMenu(u -,v)local w=Instance.new'Frame'w.Name='ResetConfirmationMenu'w. -BackgroundTransparency=1 w.Size=UDim2.new(1,0,1,0)w.Position=UDim2.new(0,0,2,400 -)w.ZIndex=u+4 local x=createTextButton('Reset',Enum.ButtonStyle. +end)local x=Instance.new'TextLabel'x.Name='LeaveText'x.Text='Leave this game?'x. +Size=UDim2.new(1,0,0.8,0)x.TextWrap=true x.TextColor3=Color3.new(1,1,1)x.Font= +Enum.Font.ArialBold x.FontSize=Enum.FontSize.Size36 x.BackgroundTransparency=1 x +.ZIndex=s+4 x.Parent=u return u end local function createResetConfirmationMenu(s +,t)local u=Instance.new'Frame'u.Name='ResetConfirmationMenu'u. +BackgroundTransparency=1 u.Size=UDim2.new(1,0,1,0)u.Position=UDim2.new(0,0,2,400 +)u.ZIndex=s+4 local v=createTextButton('Reset',Enum.ButtonStyle. RobloxButtonDefault,Enum.FontSize.Size24,UDim2.new(0,128,0,50),UDim2.new(0,313,0 -,299))x.Name='YesButton'x.ZIndex=u+4 x.Parent=w x.Modal=true x.MouseButton1Click -:connect(function()resumeGameFunction(v)resetLocalCharacter()end)local y= +,299))v.Name='YesButton'v.ZIndex=s+4 v.Parent=u v.Modal=true v.MouseButton1Click +:connect(function()resumeGameFunction(t)resetLocalCharacter()end)local w= createTextButton('Cancel',Enum.ButtonStyle.RobloxButton,Enum.FontSize.Size24, -UDim2.new(0,128,0,50),UDim2.new(0,90,0,299))y.Name='NoButton'y.Parent=w y.ZIndex -=u+4 y.MouseButton1Click:connect(function()goToMenu(v.Settings.SettingsStyle, -'GameMainMenu','down',UDim2.new(0,525,0,430))v.Settings:TweenSize(UDim2.new(0, -525,0,430),Enum.EasingDirection.InOut,Enum.EasingStyle.Sine,e,true)end)local z= -Instance.new'TextLabel'z.Name='ResetCharacterText'z.Text= -'Are you sure you want to reset your character?'z.Size=UDim2.new(1,0,0.8,0)z. -TextWrap=true z.TextColor3=Color3.new(1,1,1)z.Font=Enum.Font.ArialBold z. -FontSize=Enum.FontSize.Size36 z.BackgroundTransparency=1 z.ZIndex=u+4 z.Parent=w -local A=z:Clone()A.Name='FineResetCharacterText'A.Text= -'You will be put back on a spawn point'A.Size=UDim2.new(0,303,0,18)A.Position= -UDim2.new(0,109,0,215)A.FontSize=Enum.FontSize.Size18 A.Parent=w return w end -local function createGameMainMenu(u,v)local w=Instance.new'Frame'w.Name= -'GameMainMenu'w.BackgroundTransparency=1 w.Size=UDim2.new(1,0,1,0)w.ZIndex=u+4 w -.Parent=settingsFrame local x=Instance.new'TextLabel'x.Name='Title'x.Text= -'Game Menu'x.BackgroundTransparency=1 x.TextStrokeTransparency=0 x.Font=Enum. -Font.ArialBold x.FontSize=Enum.FontSize.Size36 x.Size=UDim2.new(1,0,0,36)x. -Position=UDim2.new(0,0,0,4)x.TextColor3=Color3.new(1,1,1)x.ZIndex=u+4 x.Parent=w -local y=createTextButton('Help',Enum.ButtonStyle.RobloxButton,Enum.FontSize. -Size18,UDim2.new(0,164,0,50),UDim2.new(0,82,0,256))y.Name='HelpButton'y.ZIndex=u -+4 y.Parent=w b=y local z=createHelpDialog(u)z.Parent=a b.MouseButton1Click: -connect(function()table.insert(o,z)game.GuiService:AddCenterDialog(z,Enum. -CenterDialogType.ModalDialog,function()z.Visible=true p.Visible=false end, -function()z.Visible=false end)end)b.Active=true local A=Instance.new'TextLabel'A -.Name='HelpShortcutText'A.Text='F1'A.Visible=false A.BackgroundTransparency=1 A. -Font=Enum.Font.Arial A.FontSize=Enum.FontSize.Size12 A.Position=UDim2.new(0,85,0 -,0)A.Size=UDim2.new(0,30,0,30)A.TextColor3=Color3.new(0,1,0)A.ZIndex=u+4 A. -Parent=y local B=createTextButton('Screenshot',Enum.ButtonStyle.RobloxButton, -Enum.FontSize.Size18,UDim2.new(0,168,0,50),UDim2.new(0,254,0,256))B.Name= -'ScreenshotButton'B.ZIndex=u+4 B.Parent=w B.Visible=not r B:SetVerb'Screenshot' -local C=A:clone()C.Name='ScreenshotShortcutText'C.Text='PrintSc'C.Position=UDim2 -.new(0,118,0,0)C.Visible=true C.Parent=B local D=createTextButton('Record Video' +UDim2.new(0,128,0,50),UDim2.new(0,90,0,299))w.Name='NoButton'w.Parent=u w.ZIndex +=s+4 w.MouseButton1Click:connect(function()goToMenu(t.Settings.SettingsStyle, +'GameMainMenu','down',UDim2.new(0,525,0,430))t.Settings:TweenSize(UDim2.new(0, +525,0,430),Enum.EasingDirection.InOut,Enum.EasingStyle.Sine,e,true)end)local x= +Instance.new'TextLabel'x.Name='ResetCharacterText'x.Text= +'Are you sure you want to reset your character?'x.Size=UDim2.new(1,0,0.8,0)x. +TextWrap=true x.TextColor3=Color3.new(1,1,1)x.Font=Enum.Font.ArialBold x. +FontSize=Enum.FontSize.Size36 x.BackgroundTransparency=1 x.ZIndex=s+4 x.Parent=u +local y=x:Clone()y.Name='FineResetCharacterText'y.Text= +'You will be put back on a spawn point'y.Size=UDim2.new(0,303,0,18)y.Position= +UDim2.new(0,109,0,215)y.FontSize=Enum.FontSize.Size18 y.Parent=u return u end +local function createGameMainMenu(s,t)local u=Instance.new'Frame'u.Name= +'GameMainMenu'u.BackgroundTransparency=1 u.Size=UDim2.new(1,0,1,0)u.ZIndex=s+4 u +.Parent=settingsFrame local v=Instance.new'TextLabel'v.Name='Title'v.Text= +'Game Menu'v.BackgroundTransparency=1 v.TextStrokeTransparency=0 v.Font=Enum. +Font.ArialBold v.FontSize=Enum.FontSize.Size36 v.Size=UDim2.new(1,0,0,36)v. +Position=UDim2.new(0,0,0,4)v.TextColor3=Color3.new(1,1,1)v.ZIndex=s+4 v.Parent=u +local w=createTextButton('Help',Enum.ButtonStyle.RobloxButton,Enum.FontSize. +Size18,UDim2.new(0,164,0,50),UDim2.new(0,82,0,256))w.Name='HelpButton'w.ZIndex=s ++4 w.Parent=u b=w local x=createHelpDialog(s)x.Parent=a b.MouseButton1Click: +connect(function()table.insert(m,x)game.GuiService:AddCenterDialog(x,Enum. +CenterDialogType.ModalDialog,function()x.Visible=true n.Visible=false end, +function()x.Visible=false end)end)b.Active=true local y=Instance.new'TextLabel'y +.Name='HelpShortcutText'y.Text='F1'y.Visible=false y.BackgroundTransparency=1 y. +Font=Enum.Font.Arial y.FontSize=Enum.FontSize.Size12 y.Position=UDim2.new(0,85,0 +,0)y.Size=UDim2.new(0,30,0,30)y.TextColor3=Color3.new(0,1,0)y.ZIndex=s+4 y. +Parent=w local z=createTextButton('Screenshot',Enum.ButtonStyle.RobloxButton, +Enum.FontSize.Size18,UDim2.new(0,168,0,50),UDim2.new(0,254,0,256))z.Name= +'ScreenshotButton'z.ZIndex=s+4 z.Parent=u z.Visible=not p z:SetVerb'Screenshot' +local A=y:clone()A.Name='ScreenshotShortcutText'A.Text='PrintSc'A.Position=UDim2 +.new(0,118,0,0)A.Visible=true A.Parent=z local B=createTextButton('Record Video' ,Enum.ButtonStyle.RobloxButton,Enum.FontSize.Size18,UDim2.new(0,168,0,50),UDim2. -new(0,254,0,306))D.Name='RecordVideoButton'D.ZIndex=u+4 D.Parent=w D.Visible=not -r D:SetVerb'RecordToggle'local E=A:clone()E.Visible=h E.Name= -'RecordVideoShortcutText'E.Text='F12'E.Position=UDim2.new(0,120,0,0)E.Parent=D -local F=Instance.new'ImageButton'F.Name='StopRecordButton'F. -BackgroundTransparency=1 F.Image='rbxasset://textures/ui/RecordStop.png'F.Size= -UDim2.new(0,59,0,27)F:SetVerb'RecordToggle'F.MouseButton1Click:connect(function( -)recordVideoClick(D,F)end)F.Visible=false F.Parent=a local G=createTextButton( +new(0,254,0,306))B.Name='RecordVideoButton'B.ZIndex=s+4 B.Parent=u B.Visible=not +p B:SetVerb'RecordToggle'local C=y:clone()C.Visible=h C.Name= +'RecordVideoShortcutText'C.Text='F12'C.Position=UDim2.new(0,120,0,0)C.Parent=B +local D=Instance.new'ImageButton'D.Name='StopRecordButton'D. +BackgroundTransparency=1 D.Image='rbxasset://textures/ui/RecordStop.png'D.Size= +UDim2.new(0,59,0,27)D:SetVerb'RecordToggle'D.MouseButton1Click:connect(function( +)recordVideoClick(B,D)end)D.Visible=false D.Parent=a local E=createTextButton( 'Report Abuse',Enum.ButtonStyle.RobloxButton,Enum.FontSize.Size18,UDim2.new(0, -164,0,50),UDim2.new(0,82,0,306))G.Name='ReportAbuseButton'G.ZIndex=u+4 G.Parent= -w local H=createTextButton('Leave Game',Enum.ButtonStyle.RobloxButton,Enum. -FontSize.Size24,UDim2.new(0,340,0,50),UDim2.new(0,82,0,358))H.Name= -'LeaveGameButton'H.ZIndex=u+4 H.Parent=w local I=createTextButton('Resume Game', +164,0,50),UDim2.new(0,82,0,306))E.Name='ReportAbuseButton'E.ZIndex=s+4 E.Parent= +u local F=createTextButton('Leave Game',Enum.ButtonStyle.RobloxButton,Enum. +FontSize.Size24,UDim2.new(0,340,0,50),UDim2.new(0,82,0,358))F.Name= +'LeaveGameButton'F.ZIndex=s+4 F.Parent=u local G=createTextButton('Resume Game', Enum.ButtonStyle.RobloxButtonDefault,Enum.FontSize.Size24,UDim2.new(0,340,0,50), -UDim2.new(0,82,0,54))I.Name='resumeGameButton'I.ZIndex=u+4 I.Parent=w I.Modal= -true I.MouseButton1Click:connect(function()resumeGameFunction(v)end)local J= +UDim2.new(0,82,0,54))G.Name='resumeGameButton'G.ZIndex=s+4 G.Parent=u G.Modal= +true G.MouseButton1Click:connect(function()resumeGameFunction(t)end)local H= createTextButton('Game Settings',Enum.ButtonStyle.RobloxButton,Enum.FontSize. -Size24,UDim2.new(0,340,0,50),UDim2.new(0,82,0,156))J.Name='SettingsButton'J. -ZIndex=u+4 J.Parent=w if game:FindFirstChild'LoadingGuiService'and#game. -LoadingGuiService:GetChildren()>0 then local K=createTextButton( +Size24,UDim2.new(0,340,0,50),UDim2.new(0,82,0,156))H.Name='SettingsButton'H. +ZIndex=s+4 H.Parent=u if game:FindFirstChild'LoadingGuiService'and#game. +LoadingGuiService:GetChildren()>0 then local I=createTextButton( 'Game Instructions',Enum.ButtonStyle.RobloxButton,Enum.FontSize.Size24,UDim2. -new(0,340,0,50),UDim2.new(0,82,0,207))K.Name='GameInstructions'K.ZIndex=u+4 K. -Parent=w K.MouseButton1Click:connect(function()if game:FindFirstChild'Players' -and game.Players['LocalPlayer']then local L=game.Players.LocalPlayer: -FindFirstChild'PlayerLoadingGui'if L then L.Visible=true end end end)end local K +new(0,340,0,50),UDim2.new(0,82,0,207))I.Name='GameInstructions'I.ZIndex=s+4 I. +Parent=u I.MouseButton1Click:connect(function()if game:FindFirstChild'Players' +and game.Players['LocalPlayer']then local J=game.Players.LocalPlayer: +FindFirstChild'PlayerLoadingGui'if J then J.Visible=true end end end)end local I =createTextButton('Reset Character',Enum.ButtonStyle.RobloxButton,Enum.FontSize. -Size24,UDim2.new(0,340,0,50),UDim2.new(0,82,0,105))K.Name='ResetButton'K.ZIndex= -u+4 K.Parent=w return w end local function createGameSettingsMenu(u,v)local w= -Instance.new'Frame'w.Name='GameSettingsMenu'w.BackgroundTransparency=1 w.Size= -UDim2.new(1,0,1,0)w.ZIndex=u+4 local x=Instance.new'TextLabel'x.Name='Title'x. -Text='Settings'x.Size=UDim2.new(1,0,0,48)x.Position=UDim2.new(0,9,0,-9)x.Font= -Enum.Font.ArialBold x.FontSize=Enum.FontSize.Size36 x.TextColor3=Color3.new(1,1, -1)x.ZIndex=u+4 x.BackgroundTransparency=1 x.Parent=w local y=Instance.new -'TextLabel'y.Name='FullscreenText'y.Text='Fullscreen Mode'y.Size=UDim2.new(0,124 -,0,18)y.Position=UDim2.new(0,62,0,145)y.Font=Enum.Font.Arial y.FontSize=Enum. -FontSize.Size18 y.TextColor3=Color3.new(1,1,1)y.ZIndex=u+4 y. -BackgroundTransparency=1 y.Parent=w local z=Instance.new'TextLabel'z.Visible=h z -.Name='FullscreenShortcutText'z.Text='F11'z.BackgroundTransparency=1 z.Font=Enum -.Font.Arial z.FontSize=Enum.FontSize.Size12 z.Position=UDim2.new(0,186,0,141)z. -Size=UDim2.new(0,30,0,30)z.TextColor3=Color3.new(0,1,0)z.ZIndex=u+4 z.Parent=w -local A=Instance.new'TextLabel'A.Visible=false A.Name='StudioText'A.Text= -'Studio Mode'A.Size=UDim2.new(0,95,0,18)A.Position=UDim2.new(0,62,0,179)A.Font= -Enum.Font.Arial A.FontSize=Enum.FontSize.Size18 A.TextColor3=Color3.new(1,1,1)A. -ZIndex=u+4 A.BackgroundTransparency=1 A.Parent=w local B=z:clone()B.Name= -'StudioShortcutText'B.Visible=false B.Text='F2'B.Position=UDim2.new(0,154,0,175) -B.Parent=w local C=nil if h then local D=Instance.new'TextLabel'D.Name= -'QualityText'D.Text='Graphics Quality'D.Size=UDim2.new(0,128,0,18)D.Position= -UDim2.new(0,30,0,239)D.Font=Enum.Font.Arial D.FontSize=Enum.FontSize.Size18 D. -TextColor3=Color3.new(1,1,1)D.ZIndex=u+4 D.BackgroundTransparency=1 D.Parent=w D -.Visible=not q local E=D:clone()E.Name='AutoText'E.Text='Auto'E.Position=UDim2. -new(0,183,0,214)E.TextColor3=Color3.new(0.5019607843137255,0.5019607843137255, -0.5019607843137255)E.Size=UDim2.new(0,34,0,18)E.Parent=w E.Visible=not q local F -=E:clone()F.Name='FasterText'F.Text='Faster'F.Position=UDim2.new(0,185,0,274)F. -TextColor3=Color3.new(95,95,95)F.FontSize=Enum.FontSize.Size14 F.Parent=w F. -Visible=not q local G=z:clone()G.Name='FasterShortcutText'G.Text='F10 + Shift'G. -Position=UDim2.new(0,185,0,283)G.Parent=w G.Visible=not q local H=E:clone()H. -Name='BetterQualityText'H.Text='Better Quality'H.TextWrap=true H.Size=UDim2.new( -0,41,0,28)H.Position=UDim2.new(0,390,0,269)H.TextColor3=Color3.new(95,95,95)H. -FontSize=Enum.FontSize.Size14 H.Parent=w H.Visible=not q local I=z:clone()I.Name -='BetterQualityShortcut'I.Text='F10'I.Position=UDim2.new(0,394,0,288)I.Parent=w -I.Visible=not q local J=createTextButton('X',Enum.ButtonStyle.RobloxButton,Enum. -FontSize.Size18,UDim2.new(0,25,0,25),UDim2.new(0,187,0,239))J.Name= -'AutoGraphicsButton'J.ZIndex=u+4 J.Parent=w J.Visible=not q local K,L=RbxGui. -CreateSlider(i,150,UDim2.new(0,230,0,280))K.Parent=w K.Bar.ZIndex=u+4 K.Bar. -Slider.ZIndex=u+5 K.Visible=not q L.Value=math.floor((settings().Rendering: -GetMaxQualityLevel()-1)/2)local M=Instance.new'TextBox'M.Name='GraphicsSetter'M. -BackgroundColor3=Color3.new(0,0,0)M.BorderColor3=Color3.new(0.5019607843137255, -0.5019607843137255,0.5019607843137255)M.Size=UDim2.new(0,50,0,25)M.Position= -UDim2.new(0,450,0,269)M.TextColor3=Color3.new(1,1,1)M.Font=Enum.Font.Arial M. -FontSize=Enum.FontSize.Size18 M.Text='Auto'M.ZIndex=1 M.TextWrap=true M.Parent=w -M.Visible=not q local N=true if not q then N=(UserSettings().GameSettings. +Size24,UDim2.new(0,340,0,50),UDim2.new(0,82,0,105))I.Name='ResetButton'I.ZIndex= +s+4 I.Parent=u return u end local function createGameSettingsMenu(s,t)local u= +Instance.new'Frame'u.Name='GameSettingsMenu'u.BackgroundTransparency=1 u.Size= +UDim2.new(1,0,1,0)u.ZIndex=s+4 local v=Instance.new'TextLabel'v.Name='Title'v. +Text='Settings'v.Size=UDim2.new(1,0,0,48)v.Position=UDim2.new(0,9,0,-9)v.Font= +Enum.Font.ArialBold v.FontSize=Enum.FontSize.Size36 v.TextColor3=Color3.new(1,1, +1)v.ZIndex=s+4 v.BackgroundTransparency=1 v.Parent=u local w=Instance.new +'TextLabel'w.Name='FullscreenText'w.Text='Fullscreen Mode'w.Size=UDim2.new(0,124 +,0,18)w.Position=UDim2.new(0,62,0,145)w.Font=Enum.Font.Arial w.FontSize=Enum. +FontSize.Size18 w.TextColor3=Color3.new(1,1,1)w.ZIndex=s+4 w. +BackgroundTransparency=1 w.Parent=u local x=Instance.new'TextLabel'x.Visible=h x +.Name='FullscreenShortcutText'x.Text='F11'x.BackgroundTransparency=1 x.Font=Enum +.Font.Arial x.FontSize=Enum.FontSize.Size12 x.Position=UDim2.new(0,186,0,141)x. +Size=UDim2.new(0,30,0,30)x.TextColor3=Color3.new(0,1,0)x.ZIndex=s+4 x.Parent=u +local y=Instance.new'TextLabel'y.Visible=false y.Name='StudioText'y.Text= +'Studio Mode'y.Size=UDim2.new(0,95,0,18)y.Position=UDim2.new(0,62,0,179)y.Font= +Enum.Font.Arial y.FontSize=Enum.FontSize.Size18 y.TextColor3=Color3.new(1,1,1)y. +ZIndex=s+4 y.BackgroundTransparency=1 y.Parent=u local z=x:clone()z.Name= +'StudioShortcutText'z.Visible=false z.Text='F2'z.Position=UDim2.new(0,154,0,175) +z.Parent=u local A=nil if h then local B=Instance.new'TextLabel'B.Name= +'QualityText'B.Text='Graphics Quality'B.Size=UDim2.new(0,128,0,18)B.Position= +UDim2.new(0,30,0,239)B.Font=Enum.Font.Arial B.FontSize=Enum.FontSize.Size18 B. +TextColor3=Color3.new(1,1,1)B.ZIndex=s+4 B.BackgroundTransparency=1 B.Parent=u B +.Visible=not o local C=B:clone()C.Name='AutoText'C.Text='Auto'C.Position=UDim2. +new(0,183,0,214)C.TextColor3=Color3.new(0.5019607843137255,0.5019607843137255, +0.5019607843137255)C.Size=UDim2.new(0,34,0,18)C.Parent=u C.Visible=not o local D +=C:clone()D.Name='FasterText'D.Text='Faster'D.Position=UDim2.new(0,185,0,274)D. +TextColor3=Color3.new(95,95,95)D.FontSize=Enum.FontSize.Size14 D.Parent=u D. +Visible=not o local E=x:clone()E.Name='FasterShortcutText'E.Text='F10 + Shift'E. +Position=UDim2.new(0,185,0,283)E.Parent=u E.Visible=not o local F=C:clone()F. +Name='BetterQualityText'F.Text='Better Quality'F.TextWrap=true F.Size=UDim2.new( +0,41,0,28)F.Position=UDim2.new(0,390,0,269)F.TextColor3=Color3.new(95,95,95)F. +FontSize=Enum.FontSize.Size14 F.Parent=u F.Visible=not o local G=x:clone()G.Name +='BetterQualityShortcut'G.Text='F10'G.Position=UDim2.new(0,394,0,288)G.Parent=u +G.Visible=not o local H=createTextButton('X',Enum.ButtonStyle.RobloxButton,Enum. +FontSize.Size18,UDim2.new(0,25,0,25),UDim2.new(0,187,0,239))H.Name= +'AutoGraphicsButton'H.ZIndex=s+4 H.Parent=u H.Visible=not o local I,J=RbxGui. +CreateSlider(i,150,UDim2.new(0,230,0,280))I.Parent=u I.Bar.ZIndex=s+4 I.Bar. +Slider.ZIndex=s+5 I.Visible=not o J.Value=math.floor((settings().Rendering: +GetMaxQualityLevel()-1)/2)local K=Instance.new'TextBox'K.Name='GraphicsSetter'K. +BackgroundColor3=Color3.new(0,0,0)K.BorderColor3=Color3.new(0.5019607843137255, +0.5019607843137255,0.5019607843137255)K.Size=UDim2.new(0,50,0,25)K.Position= +UDim2.new(0,450,0,269)K.TextColor3=Color3.new(1,1,1)K.Font=Enum.Font.Arial K. +FontSize=Enum.FontSize.Size18 K.Text='Auto'K.ZIndex=1 K.TextWrap=true K.Parent=u +K.Visible=not o local L=true if not o then L=(UserSettings().GameSettings. SavedQualityLevel==Enum.SavedQualitySetting.Automatic)else settings().Rendering. -EnableFRM=false end local O=true local function setAutoGraphicsGui(P)N=P if P -then J.Text='X'H.ZIndex=1 I.ZIndex=1 G.ZIndex=1 F.ZIndex=1 K.Bar.ZIndex=1 K.Bar. -Slider.ZIndex=1 M.ZIndex=1 M.Text='Auto'else J.Text=''K.Bar.ZIndex=u+4 K.Bar. -Slider.ZIndex=u+5 I.ZIndex=u+4 G.ZIndex=u+4 H.ZIndex=u+4 F.ZIndex=u+4 M.ZIndex=u +EnableFRM=false end local M=true local function setAutoGraphicsGui(N)L=N if N +then H.Text='X'F.ZIndex=1 G.ZIndex=1 E.ZIndex=1 D.ZIndex=1 I.Bar.ZIndex=1 I.Bar. +Slider.ZIndex=1 K.ZIndex=1 K.Text='Auto'else H.Text=''I.Bar.ZIndex=s+4 I.Bar. +Slider.ZIndex=s+5 G.ZIndex=s+4 E.ZIndex=s+4 F.ZIndex=s+4 D.ZIndex=s+4 K.ZIndex=s +4 end end local function goToAutoGraphics()setAutoGraphicsGui(true) UserSettings().GameSettings.SavedQualityLevel=Enum.SavedQualitySetting.Automatic settings().Rendering.QualityLevel=Enum.QualityLevel.Automatic end local function -setGraphicsQualityLevel(P)local Q=P/i local R=math.floor((settings().Rendering: -GetMaxQualityLevel()-1)*Q)if R==20 then R=21 elseif P==1 then R=1 elseif R> -settings().Rendering:GetMaxQualityLevel()then R=settings().Rendering: -GetMaxQualityLevel()-1 end UserSettings().GameSettings.SavedQualityLevel=P -settings().Rendering.QualityLevel=R end local function goToManualGraphics(P) -setAutoGraphicsGui(false)if P then L.Value=P else L.Value=math.floor((settings() +setGraphicsQualityLevel(N)local O=N/i local P=math.floor((settings().Rendering: +GetMaxQualityLevel()-1)*O)if P==20 then P=21 elseif N==1 then P=1 elseif P> +settings().Rendering:GetMaxQualityLevel()then P=settings().Rendering: +GetMaxQualityLevel()-1 end UserSettings().GameSettings.SavedQualityLevel=N +settings().Rendering.QualityLevel=P end local function goToManualGraphics(N) +setAutoGraphicsGui(false)if N then J.Value=N else J.Value=math.floor((settings() .Rendering.AutoFRMLevel/(settings().Rendering:GetMaxQualityLevel()-1))*i)end if -P==L.Value then setGraphicsQualityLevel(L.Value)end if not P then UserSettings() -.GameSettings.SavedQualityLevel=L.Value end M.Text=tostring(L.Value)end -local function showAutoGraphics()E.ZIndex=u+4 J.ZIndex=u+4 end local function -hideAutoGraphics()E.ZIndex=1 J.ZIndex=1 end local function showManualGraphics()K -.Bar.ZIndex=u+4 K.Bar.Slider.ZIndex=u+5 I.ZIndex=u+4 G.ZIndex=u+4 H.ZIndex=u+4 F -.ZIndex=u+4 M.ZIndex=u+4 end local function hideManualGraphics()H.ZIndex=1 I. -ZIndex=1 G.ZIndex=1 F.ZIndex=1 K.Bar.ZIndex=1 K.Bar.Slider.ZIndex=1 M.ZIndex=1 -end local function translateSavedQualityLevelToInt(P)if P==Enum. -SavedQualitySetting.Automatic then return 0 elseif P==Enum.SavedQualitySetting. -QualityLevel1 then return 1 elseif P==Enum.SavedQualitySetting.QualityLevel2 -then return 2 elseif P==Enum.SavedQualitySetting.QualityLevel3 then return 3 -elseif P==Enum.SavedQualitySetting.QualityLevel4 then return 4 elseif P==Enum. -SavedQualitySetting.QualityLevel5 then return 5 elseif P==Enum. -SavedQualitySetting.QualityLevel6 then return 6 elseif P==Enum. -SavedQualitySetting.QualityLevel7 then return 7 elseif P==Enum. -SavedQualitySetting.QualityLevel8 then return 8 elseif P==Enum. -SavedQualitySetting.QualityLevel9 then return 9 elseif P==Enum. +N==J.Value then setGraphicsQualityLevel(J.Value)end if not N then UserSettings() +.GameSettings.SavedQualityLevel=J.Value end K.Text=tostring(J.Value)end +local function showAutoGraphics()C.ZIndex=s+4 H.ZIndex=s+4 end local function +hideAutoGraphics()C.ZIndex=1 H.ZIndex=1 end local function showManualGraphics()I +.Bar.ZIndex=s+4 I.Bar.Slider.ZIndex=s+5 G.ZIndex=s+4 E.ZIndex=s+4 F.ZIndex=s+4 D +.ZIndex=s+4 K.ZIndex=s+4 end local function hideManualGraphics()F.ZIndex=1 G. +ZIndex=1 E.ZIndex=1 D.ZIndex=1 I.Bar.ZIndex=1 I.Bar.Slider.ZIndex=1 K.ZIndex=1 +end local function translateSavedQualityLevelToInt(N)if N==Enum. +SavedQualitySetting.Automatic then return 0 elseif N==Enum.SavedQualitySetting. +QualityLevel1 then return 1 elseif N==Enum.SavedQualitySetting.QualityLevel2 +then return 2 elseif N==Enum.SavedQualitySetting.QualityLevel3 then return 3 +elseif N==Enum.SavedQualitySetting.QualityLevel4 then return 4 elseif N==Enum. +SavedQualitySetting.QualityLevel5 then return 5 elseif N==Enum. +SavedQualitySetting.QualityLevel6 then return 6 elseif N==Enum. +SavedQualitySetting.QualityLevel7 then return 7 elseif N==Enum. +SavedQualitySetting.QualityLevel8 then return 8 elseif N==Enum. +SavedQualitySetting.QualityLevel9 then return 9 elseif N==Enum. SavedQualitySetting.QualityLevel10 then return 10 end end local function -enableGraphicsWidget()settings().Rendering.EnableFRM=true N=(UserSettings(). -GameSettings.SavedQualityLevel==Enum.SavedQualitySetting.Automatic)if N then +enableGraphicsWidget()settings().Rendering.EnableFRM=true L=(UserSettings(). +GameSettings.SavedQualityLevel==Enum.SavedQualitySetting.Automatic)if L then showAutoGraphics()goToAutoGraphics()else showAutoGraphics()showManualGraphics() goToManualGraphics(translateSavedQualityLevelToInt(UserSettings().GameSettings. SavedQualityLevel))end end local function disableGraphicsWidget() -hideManualGraphics()hideAutoGraphics()settings().Rendering.EnableFRM=false end M -.FocusLost:connect(function()if N then M.Text=tostring(L.Value)return end local -P=tonumber(M.Text)if P==nil then M.Text=tostring(L.Value)return end if P<1 then -P=1 elseif P>=settings().Rendering:GetMaxQualityLevel()then P=settings(). -Rendering:GetMaxQualityLevel()-1 end L.Value=P setGraphicsQualityLevel(L.Value)M -.Text=tostring(L.Value)end)L.Changed:connect(function(P)if N then return end if -not O then return end M.Text=tostring(L.Value)setGraphicsQualityLevel(L.Value) -end)if q or UserSettings().GameSettings.SavedQualityLevel==Enum. -SavedQualitySetting.Automatic then if q then settings().Rendering.EnableFRM= +hideManualGraphics()hideAutoGraphics()settings().Rendering.EnableFRM=false end K +.FocusLost:connect(function()if L then K.Text=tostring(J.Value)return end local +N=tonumber(K.Text)if N==nil then K.Text=tostring(J.Value)return end if N<1 then +N=1 elseif N>=settings().Rendering:GetMaxQualityLevel()then N=settings(). +Rendering:GetMaxQualityLevel()-1 end J.Value=N setGraphicsQualityLevel(J.Value)K +.Text=tostring(J.Value)end)J.Changed:connect(function(N)if L then return end if +not M then return end K.Text=tostring(J.Value)setGraphicsQualityLevel(J.Value) +end)if o or UserSettings().GameSettings.SavedQualityLevel==Enum. +SavedQualitySetting.Automatic then if o then settings().Rendering.EnableFRM= false disableGraphicsWidget()else settings().Rendering.EnableFRM=true goToAutoGraphics()end else settings().Rendering.EnableFRM=true goToManualGraphics(translateSavedQualityLevelToInt(UserSettings().GameSettings. -SavedQualityLevel))end J.MouseButton1Click:connect(function()if q and not game. -Players.LocalPlayer then return end if not N then goToAutoGraphics()else -goToManualGraphics(L.Value)end end)game.GraphicsQualityChangeRequest:connect( -function(P)if N then return end if P then if(L.Value+1)>i then return end L. -Value=L.Value+1 M.Text=tostring(L.Value)setGraphicsQualityLevel(L.Value)game: -GetService'GuiService':SendNotification('Graphics Quality','Increased to ('..M. -Text..')','',2,function()end)else if(L.Value-1)<=0 then return end L.Value=L. -Value-1 M.Text=tostring(L.Value)setGraphicsQualityLevel(L.Value)game:GetService -'GuiService':SendNotification('Graphics Quality','Decreased to ('..M.Text..')', -'',2,function()end)end end)game.Players.PlayerAdded:connect(function(P)if P== -game.Players.LocalPlayer and q then enableGraphicsWidget()end end)game.Players. -PlayerRemoving:connect(function(P)if P==game.Players.LocalPlayer and q then -disableGraphicsWidget()end end)C=createTextButton('',Enum.ButtonStyle. -RobloxButton,Enum.FontSize.Size18,UDim2.new(0,25,0,25),UDim2.new(0,30,0,176))C. -Name='StudioCheckbox'C.ZIndex=u+4 C:SetVerb'TogglePlayMode'C.Visible=false local -P=(settings().Rendering.QualityLevel~=Enum.QualityLevel.Automatic)if q and not -game.Players.LocalPlayer then C.Text='X'disableGraphicsWidget()elseif q then C. +SavedQualityLevel))end H.MouseButton1Click:connect(function()if o and not game. +Players.LocalPlayer then return end if not L then goToAutoGraphics()else +goToManualGraphics(J.Value)end end)game.GraphicsQualityChangeRequest:connect( +function(N)if L then return end if N then if(J.Value+1)>i then return end J. +Value=J.Value+1 K.Text=tostring(J.Value)setGraphicsQualityLevel(J.Value)game: +GetService'GuiService':SendNotification('Graphics Quality','Increased to ('..K. +Text..')','',2,function()end)else if(J.Value-1)<=0 then return end J.Value=J. +Value-1 K.Text=tostring(J.Value)setGraphicsQualityLevel(J.Value)game:GetService +'GuiService':SendNotification('Graphics Quality','Decreased to ('..K.Text..')', +'',2,function()end)end end)game.Players.PlayerAdded:connect(function(N)if N== +game.Players.LocalPlayer and o then enableGraphicsWidget()end end)game.Players. +PlayerRemoving:connect(function(N)if N==game.Players.LocalPlayer and o then +disableGraphicsWidget()end end)A=createTextButton('',Enum.ButtonStyle. +RobloxButton,Enum.FontSize.Size18,UDim2.new(0,25,0,25),UDim2.new(0,30,0,176))A. +Name='StudioCheckbox'A.ZIndex=s+4 A:SetVerb'TogglePlayMode'A.Visible=false local +N=(settings().Rendering.QualityLevel~=Enum.QualityLevel.Automatic)if o and not +game.Players.LocalPlayer then A.Text='X'disableGraphicsWidget()elseif o then A. Text='X'enableGraphicsWidget()end if h then UserSettings().GameSettings. -StudioModeChanged:connect(function(Q)q=Q if Q then P=(settings().Rendering. -QualityLevel~=Enum.QualityLevel.Automatic)goToAutoGraphics()C.Text='X'J.ZIndex=1 -E.ZIndex=1 else if P then goToManualGraphics()end C.Text=''J.ZIndex=u+4 E.ZIndex -=u+4 end end)else C.MouseButton1Click:connect(function()if not C.Active then -return end if C.Text==''then C.Text='X'else C.Text=''end end)end end local D= +StudioModeChanged:connect(function(O)o=O if O then N=(settings().Rendering. +QualityLevel~=Enum.QualityLevel.Automatic)goToAutoGraphics()A.Text='X'H.ZIndex=1 +C.ZIndex=1 else if N then goToManualGraphics()end A.Text=''H.ZIndex=s+4 C.ZIndex +=s+4 end end)else A.MouseButton1Click:connect(function()if not A.Active then +return end if A.Text==''then A.Text='X'else A.Text=''end end)end end local B= createTextButton('',Enum.ButtonStyle.RobloxButton,Enum.FontSize.Size18,UDim2. -new(0,25,0,25),UDim2.new(0,30,0,144))D.Name='FullscreenCheckbox'D.ZIndex=u+4 D. -Parent=w D:SetVerb'ToggleFullScreen'if UserSettings().GameSettings:InFullScreen( -)then D.Text='X'end if h then UserSettings().GameSettings.FullscreenChanged: -connect(function(E)if E then D.Text='X'else D.Text=''end end)else D. -MouseButton1Click:connect(function()if D.Text==''then D.Text='X'else D.Text='' -end end)end if game:FindFirstChild'NetworkClient'then setDisabledState(A) -setDisabledState(B)setDisabledState(C)end local E if h then E=createTextButton( +new(0,25,0,25),UDim2.new(0,30,0,144))B.Name='FullscreenCheckbox'B.ZIndex=s+4 B. +Parent=u B:SetVerb'ToggleFullScreen'if UserSettings().GameSettings:InFullScreen( +)then B.Text='X'end if h then UserSettings().GameSettings.FullscreenChanged: +connect(function(C)if C then B.Text='X'else B.Text=''end end)else B. +MouseButton1Click:connect(function()if B.Text==''then B.Text='X'else B.Text='' +end end)end if game:FindFirstChild'NetworkClient'then setDisabledState(y) +setDisabledState(z)setDisabledState(A)end local C if h then C=createTextButton( 'OK',Enum.ButtonStyle.RobloxButtonDefault,Enum.FontSize.Size24,UDim2.new(0,180,0 -,50),UDim2.new(0,170,0,330))E.Modal=true else E=createTextButton('OK',Enum. +,50),UDim2.new(0,170,0,330))C.Modal=true else C=createTextButton('OK',Enum. ButtonStyle.RobloxButtonDefault,Enum.FontSize.Size24,UDim2.new(0,180,0,50),UDim2 -.new(0,170,0,270))E.Modal=true end E.Name='BackButton'E.ZIndex=u+4 E.Parent=w -local F if not r then local G=Instance.new'TextLabel'G.Name='VideoCaptureLabel'G -.Text='After Capturing Video'G.Font=Enum.Font.Arial G.FontSize=Enum.FontSize. -Size18 G.Position=UDim2.new(0,32,0,100)G.Size=UDim2.new(0,164,0,18)G. -BackgroundTransparency=1 G.TextColor3=Color3I(255,255,255)G.TextXAlignment=Enum. -TextXAlignment.Left G.ZIndex=u+4 G.Parent=w local H,I={},{}H[1]= -'Just Save to Disk'I[H[1]]=Enum.UploadSetting['Never']H[2]='Upload to YouTube'I[ -H[2]]=Enum.UploadSetting['Ask me first']local J=nil J,d=RbxGui. -CreateDropDownMenu(H,function(K)UserSettings().GameSettings. -VideoUploadPromptBehavior=I[K]end)J.Name='VideoCaptureField'J.ZIndex=u+4 J. -DropDownMenuButton.ZIndex=u+4 J.DropDownMenuButton.Icon.ZIndex=u+4 J.Position= -UDim2.new(0,270,0,94)J.Size=UDim2.new(0,200,0,32)J.Parent=w F=function()if +.new(0,170,0,270))C.Modal=true end C.Name='BackButton'C.ZIndex=s+4 C.Parent=u +syncVideoCaptureSetting=nil if not p then local D=Instance.new'TextLabel'D.Name= +'VideoCaptureLabel'D.Text='After Capturing Video'D.Font=Enum.Font.Arial D. +FontSize=Enum.FontSize.Size18 D.Position=UDim2.new(0,32,0,100)D.Size=UDim2.new(0 +,164,0,18)D.BackgroundTransparency=1 D.TextColor3=Color3I(255,255,255)D. +TextXAlignment=Enum.TextXAlignment.Left D.ZIndex=s+4 D.Parent=u local E,F={},{}E +[1]='Just Save to Disk'F[E[1]]=Enum.UploadSetting['Never']E[2]= +'Upload to YouTube'F[E[2]]=Enum.UploadSetting['Ask me first']local G=nil G,d= +RbxGui.CreateDropDownMenu(E,function(H)UserSettings().GameSettings. +VideoUploadPromptBehavior=F[H]end)G.Name='VideoCaptureField'G.ZIndex=s+4 G. +DropDownMenuButton.ZIndex=s+4 G.DropDownMenuButton.Icon.ZIndex=s+4 G.Position= +UDim2.new(0,270,0,94)G.Size=UDim2.new(0,200,0,32)G.Parent=u +syncVideoCaptureSetting=function()if UserSettings().GameSettings. +VideoUploadPromptBehavior==Enum.UploadSetting['Never']then d(E[1])elseif UserSettings().GameSettings.VideoUploadPromptBehavior==Enum.UploadSetting[ -'Never']then d(H[1])elseif UserSettings().GameSettings.VideoUploadPromptBehavior -==Enum.UploadSetting['Ask me first']then d(H[2])else UserSettings().GameSettings -.VideoUploadPromptBehavior=Enum.UploadSetting['Ask me first']d(H[2])end end end -local G=Instance.new'TextLabel'G.Name='CameraLabel'G.Text= -'Character & Camera Controls'G.Font=Enum.Font.Arial G.FontSize=Enum.FontSize. -Size18 G.Position=UDim2.new(0,31,0,58)G.Size=UDim2.new(0,224,0,18)G.TextColor3= -Color3I(255,255,255)G.TextXAlignment=Enum.TextXAlignment.Left G. -BackgroundTransparency=1 G.ZIndex=u+4 G.Parent=w local H,I,J,K=game.CoreGui. +'Ask me first']then d(E[2])else UserSettings().GameSettings. +VideoUploadPromptBehavior=Enum.UploadSetting['Ask me first']d(E[2])end end end +local D=Instance.new'TextLabel'D.Name='CameraLabel'D.Text= +'Character & Camera Controls'D.Font=Enum.Font.Arial D.FontSize=Enum.FontSize. +Size18 D.Position=UDim2.new(0,31,0,58)D.Size=UDim2.new(0,224,0,18)D.TextColor3= +Color3I(255,255,255)D.TextXAlignment=Enum.TextXAlignment.Left D. +BackgroundTransparency=1 D.ZIndex=s+4 D.Parent=u local E,F,G,H=game.CoreGui. RobloxGui:FindFirstChild('MouseLockLabel',true),Enum.ControlMode:GetEnumItems(), -{},{}for L,M in ipairs(I)do J[L]=M.Name K[M.Name]=M end local N N,c=RbxGui. -CreateDropDownMenu(J,function(O)UserSettings().GameSettings.ControlMode=K[O] -pcall(function()if H and UserSettings().GameSettings.ControlMode==Enum. -ControlMode['Mouse Lock Switch']then H.Visible=true elseif H then H.Visible= -false end end)end)N.Name='CameraField'N.ZIndex=u+4 N.DropDownMenuButton.ZIndex=u -+4 N.DropDownMenuButton.Icon.ZIndex=u+4 N.Position=UDim2.new(0,270,0,52)N.Size= -UDim2.new(0,200,0,32)N.Parent=w return w end if LoadLibrary then RbxGui= -LoadLibrary'RbxGui'local u=0 if UserSettings then local v=function() +{},{}for I,J in ipairs(F)do G[I]=J.Name H[J.Name]=J end local K K,c=RbxGui. +CreateDropDownMenu(G,function(L)UserSettings().GameSettings.ControlMode=H[L] +pcall(function()if E and UserSettings().GameSettings.ControlMode==Enum. +ControlMode['Mouse Lock Switch']then E.Visible=true elseif E then E.Visible= +false end end)end)K.Name='CameraField'K.ZIndex=s+4 K.DropDownMenuButton.ZIndex=s ++4 K.DropDownMenuButton.Icon.ZIndex=s+4 K.Position=UDim2.new(0,270,0,52)K.Size= +UDim2.new(0,200,0,32)K.Parent=u return u end if LoadLibrary then RbxGui= +LoadLibrary'RbxGui'local s=0 if UserSettings then local t=function() waitForChild(a,'BottomLeftControl')settingsButton=a.BottomLeftControl: FindFirstChild'SettingsButton'if settingsButton==nil then settingsButton= Instance.new'ImageButton'settingsButton.Name='SettingsButton'settingsButton. Image='rbxasset://textures/ui/SettingsButton.png'settingsButton. BackgroundTransparency=1 settingsButton.Active=false settingsButton.Size=UDim2. new(0,54,0,46)settingsButton.Position=UDim2.new(0,2,0,50)settingsButton.Parent=a -.BottomLeftControl end local v=Instance.new'TextButton'v.Text=''v.Name= -'UserSettingsShield'v.Active=true v.AutoButtonColor=false v.Visible=false v.Size -=UDim2.new(1,0,1,0)v.BackgroundColor3=Color3I(51,51,51)v.BorderColor3=Color3I(27 -,42,53)v.BackgroundTransparency=0.4 v.ZIndex=u+2 p=v local w=Instance.new'Frame' -w.Name='Settings'w.Position=UDim2.new(0.5,-262,-0.5,-200)w.Size=UDim2.new(0,525, -0,430)w.BackgroundTransparency=1 w.Active=true w.Parent=v local x=Instance.new -'Frame'x.Name='SettingsStyle'x.Size=UDim2.new(1,0,1,0)x.Style=Enum.FrameStyle. -RobloxRound x.Active=true x.ZIndex=u+3 x.Parent=w local y=createGameMainMenu(u,v -)y.Parent=x y.ScreenshotButton.MouseButton1Click:connect(function()backToGame(y. -ScreenshotButton,v,settingsButton)end)y.RecordVideoButton.MouseButton1Click: -connect(function()recordVideoClick(y.RecordVideoButton,a.StopRecordButton) -backToGame(y.RecordVideoButton,v,settingsButton)end)if settings():FindFirstChild +.BottomLeftControl end local t=Instance.new'TextButton't.Text=''t.Name= +'UserSettingsShield't.Active=true t.AutoButtonColor=false t.Visible=false t.Size +=UDim2.new(1,0,1,0)t.BackgroundColor3=Color3I(51,51,51)t.BorderColor3=Color3I(27 +,42,53)t.BackgroundTransparency=0.4 t.ZIndex=s+2 n=t local u=Instance.new'Frame' +u.Name='Settings'u.Position=UDim2.new(0.5,-262,-0.5,-200)u.Size=UDim2.new(0,525, +0,430)u.BackgroundTransparency=1 u.Active=true u.Parent=t local v=Instance.new +'Frame'v.Name='SettingsStyle'v.Size=UDim2.new(1,0,1,0)v.Style=Enum.FrameStyle. +RobloxRound v.Active=true v.ZIndex=s+3 v.Parent=u local w=createGameMainMenu(s,t +)w.Parent=v w.ScreenshotButton.MouseButton1Click:connect(function()backToGame(w. +ScreenshotButton,t,settingsButton)end)w.RecordVideoButton.MouseButton1Click: +connect(function()recordVideoClick(w.RecordVideoButton,a.StopRecordButton) +backToGame(w.RecordVideoButton,t,settingsButton)end)if settings():FindFirstChild 'Game Options'then pcall(function()settings():FindFirstChild'Game Options'. -VideoRecordingChangeRequest:connect(function(z)j=z setRecordGui(z,a. -StopRecordButton,y.RecordVideoButton)end)end)end game.CoreGui.RobloxGui.Changed: -connect(function(z)if z=='AbsoluteSize'and j then recordVideoClick(y. -RecordVideoButton,a.StopRecordButton)end end)function localPlayerChange()y. +VideoRecordingChangeRequest:connect(function(x)j=x setRecordGui(x,a. +StopRecordButton,w.RecordVideoButton)end)end)end game.CoreGui.RobloxGui.Changed: +connect(function(x)if x=='AbsoluteSize'and j then recordVideoClick(w. +RecordVideoButton,a.StopRecordButton)end end)function localPlayerChange()w. ResetButton.Visible=game.Players.LocalPlayer if game.Players.LocalPlayer then -settings().Rendering.EnableFRM=true elseif q then settings().Rendering.EnableFRM -=false end end y.ResetButton.Visible=game.Players.LocalPlayer if game.Players. +settings().Rendering.EnableFRM=true elseif o then settings().Rendering.EnableFRM +=false end end w.ResetButton.Visible=game.Players.LocalPlayer if game.Players. LocalPlayer~=nil then game.Players.LocalPlayer.Changed:connect(function() localPlayerChange()end)else delay(0,function()waitForProperty(game.Players, -'LocalPlayer')y.ResetButton.Visible=game.Players.LocalPlayer game.Players. -LocalPlayer.Changed:connect(function()localPlayerChange()end)end)end y. -ReportAbuseButton.Visible=game:FindFirstChild'NetworkClient'if not y. -ReportAbuseButton.Visible then game.ChildAdded:connect(function(z)if z:IsA -'NetworkClient'then y.ReportAbuseButton.Visible=game:FindFirstChild -'NetworkClient'end end)end y.ResetButton.MouseButton1Click:connect(function() -goToMenu(x,'ResetConfirmationMenu','up',UDim2.new(0,525,0,370))end)y. -LeaveGameButton.MouseButton1Click:connect(function()goToMenu(x, +'LocalPlayer')w.ResetButton.Visible=game.Players.LocalPlayer game.Players. +LocalPlayer.Changed:connect(function()localPlayerChange()end)end)end w. +ReportAbuseButton.Visible=game:FindFirstChild'NetworkClient'if not w. +ReportAbuseButton.Visible then game.ChildAdded:connect(function(x)if x:IsA +'NetworkClient'then w.ReportAbuseButton.Visible=game:FindFirstChild +'NetworkClient'end end)end w.ResetButton.MouseButton1Click:connect(function() +goToMenu(v,'ResetConfirmationMenu','up',UDim2.new(0,525,0,370))end)w. +LeaveGameButton.MouseButton1Click:connect(function()goToMenu(v, 'LeaveConfirmationMenu','down',UDim2.new(0,525,0,300))end)if game.CoreGui. Version>=4 then game:GetService'GuiService'.EscapeKeyPressed:connect(function() -if k==nil then game.GuiService:AddCenterDialog(v,Enum.CenterDialogType. +if k==nil then game.GuiService:AddCenterDialog(t,Enum.CenterDialogType. ModalDialog,function()settingsButton.Active=false c(UserSettings().GameSettings. ControlMode.Name)if syncVideoCaptureSetting then syncVideoCaptureSetting()end -goToMenu(x,'GameMainMenu','right',UDim2.new(0,525,0,430))v.Visible=true v.Active -=true x.Parent:TweenPosition(UDim2.new(0.5,-262,0.5,-200),Enum.EasingDirection. -InOut,Enum.EasingStyle.Sine,e,true)x.Parent:TweenSize(UDim2.new(0,525,0,430), -Enum.EasingDirection.InOut,Enum.EasingStyle.Sine,e,true)end,function()x.Parent: +goToMenu(v,'GameMainMenu','right',UDim2.new(0,525,0,430))t.Visible=true t.Active +=true v.Parent:TweenPosition(UDim2.new(0.5,-262,0.5,-200),Enum.EasingDirection. +InOut,Enum.EasingStyle.Sine,e,true)v.Parent:TweenSize(UDim2.new(0,525,0,430), +Enum.EasingDirection.InOut,Enum.EasingStyle.Sine,e,true)end,function()v.Parent: TweenPosition(UDim2.new(0.5,-262,-0.5,-200),Enum.EasingDirection.InOut,Enum. -EasingStyle.Sine,e,true)x.Parent:TweenSize(UDim2.new(0,525,0,430),Enum. -EasingDirection.InOut,Enum.EasingStyle.Sine,e,true)v.Visible=false -settingsButton.Active=true end)elseif#l>0 then if#o>0 then for z=1,#o do game. -GuiService:RemoveCenterDialog(o[z])o[z].Visible=false end o={}end goToMenu(l[#l] +EasingStyle.Sine,e,true)v.Parent:TweenSize(UDim2.new(0,525,0,430),Enum. +EasingDirection.InOut,Enum.EasingStyle.Sine,e,true)t.Visible=false +settingsButton.Active=true end)elseif#l>0 then if#m>0 then for x=1,#m do game. +GuiService:RemoveCenterDialog(m[x])m[x].Visible=false end m={}end goToMenu(l[#l] ['container'],l[#l]['name'],l[#l]['direction'],l[#l]['lastSize'])table.remove(l, -#l)if#l==1 then l={}end else resumeGameFunction(v)end end)end local z= -createGameSettingsMenu(u,v)z.Visible=false z.Parent=x y.SettingsButton. -MouseButton1Click:connect(function()goToMenu(x,'GameSettingsMenu','left',UDim2. -new(0,525,0,350))end)z.BackButton.MouseButton1Click:connect(function()goToMenu(x -,'GameMainMenu','right',UDim2.new(0,525,0,430))end)local A= -createResetConfirmationMenu(u,v)A.Visible=false A.Parent=x local B= -createLeaveConfirmationMenu(u,v)B.Visible=false B.Parent=x robloxLock(v) +#l)if#l==1 then l={}end else resumeGameFunction(t)end end)end local x= +createGameSettingsMenu(s,t)x.Visible=false x.Parent=v w.SettingsButton. +MouseButton1Click:connect(function()goToMenu(v,'GameSettingsMenu','left',UDim2. +new(0,525,0,350))end)x.BackButton.MouseButton1Click:connect(function()goToMenu(v +,'GameMainMenu','right',UDim2.new(0,525,0,430))end)local y= +createResetConfirmationMenu(s,t)y.Visible=false y.Parent=v local z= +createLeaveConfirmationMenu(s,t)z.Visible=false z.Parent=v robloxLock(t) settingsButton.MouseButton1Click:connect(function()game.GuiService: -AddCenterDialog(v,Enum.CenterDialogType.ModalDialog,function()settingsButton. +AddCenterDialog(t,Enum.CenterDialogType.ModalDialog,function()settingsButton. Active=false c(UserSettings().GameSettings.ControlMode.Name)if -syncVideoCaptureSetting then syncVideoCaptureSetting()end goToMenu(x, -'GameMainMenu','right',UDim2.new(0,525,0,430))v.Visible=true x.Parent: +syncVideoCaptureSetting then syncVideoCaptureSetting()end goToMenu(v, +'GameMainMenu','right',UDim2.new(0,525,0,430))t.Visible=true v.Parent: TweenPosition(UDim2.new(0.5,-262,0.5,-200),Enum.EasingDirection.InOut,Enum. -EasingStyle.Sine,e,true)x.Parent:TweenSize(UDim2.new(0,525,0,430),Enum. -EasingDirection.InOut,Enum.EasingStyle.Sine,e,true)end,function()x.Parent: +EasingStyle.Sine,e,true)v.Parent:TweenSize(UDim2.new(0,525,0,430),Enum. +EasingDirection.InOut,Enum.EasingStyle.Sine,e,true)end,function()v.Parent: TweenPosition(UDim2.new(0.5,-262,-0.5,-200),Enum.EasingDirection.InOut,Enum. -EasingStyle.Sine,e,true)x.Parent:TweenSize(UDim2.new(0,525,0,430),Enum. -EasingDirection.InOut,Enum.EasingStyle.Sine,e,true)v.Visible=false -settingsButton.Active=true end)end)return v end delay(0,function()v().Parent=a a +EasingStyle.Sine,e,true)v.Parent:TweenSize(UDim2.new(0,525,0,430),Enum. +EasingDirection.InOut,Enum.EasingStyle.Sine,e,true)t.Visible=false +settingsButton.Active=true end)end)return t end delay(0,function()t().Parent=a a .BottomLeftControl.SettingsButton.Active=true a.BottomLeftControl.SettingsButton .Position=UDim2.new(0,2,0,-2)if mouseLockLabel and UserSettings().GameSettings. ControlMode==Enum.ControlMode['Mouse Lock Switch']then mouseLockLabel.Visible= -true elseif mouseLockLabel then mouseLockLabel.Visible=false end local w=a. -BottomLeftControl:FindFirstChild'Exit'if w then w:Remove()end local x=a: -FindFirstChild'TopLeftControl'if x then w=x:FindFirstChild'Exit'if w then w: -Remove()end x:Remove()end end)end local v,w,x,y=function()local v=Instance.new -'TextButton'v.Text=''v.AutoButtonColor=false v.Name='SaveDialogShield'v.Active= -true v.Visible=false v.Size=UDim2.new(1,0,1,0)v.BackgroundColor3=Color3I(51,51, -51)v.BorderColor3=Color3I(27,42,53)v.BackgroundTransparency=0.4 v.ZIndex=u+1 -local w,x,y,z,A,B=nil,nil,nil,nil,nil,{}B[1]={}B[1].Text='Save'B[1].Style=Enum. -ButtonStyle.RobloxButtonDefault B[1].Function=function()x()end B[2]={}B[2].Text= -'Cancel'B[2].Function=function()A()end B[3]={}B[3].Text="Don't Save"B[3]. -Function=function()z()end local C=RbxGui.CreateStyledMessageDialog( -'Unsaved Changes','Save your changes to ROBLOX before leaving?','Confirm',B)C. -Visible=true C.Parent=v local D,E={},1 if game.LocalSaveEnabled then D[E]={}D[E] -.Text='Save to Disk'D[E].Function=function()y()end E=E+1 end D[E]={}D[E].Text= -'Keep Playing'D[E].Function=function()A()end D[E+1]={}D[E+1].Text="Don't Save"D[ -E+1].Function=function()z()end local F=RbxGui.CreateStyledMessageDialog( -'Upload Failed','Sorry, we could not save your changes to ROBLOX.','Error',D)F. -Visible=false F.Parent=v local G=Instance.new'Frame'G.Name='SpinnerDialog'G. -Style=Enum.FrameStyle.RobloxRound G.Size=UDim2.new(0,350,0,150)G.Position=UDim2. -new(0.5,-175,0.5,-75)G.Visible=false G.Active=true G.Parent=v local H=Instance. -new'TextLabel'H.Name='WaitingLabel'H.Text='Saving to ROBLOX...'H.Font=Enum.Font. -ArialBold H.FontSize=Enum.FontSize.Size18 H.Position=UDim2.new(0.5,25,0.5,0)H. -TextColor3=Color3.new(1,1,1)H.Parent=G local I=Instance.new'Frame'I.Name= -'Spinner'I.Size=UDim2.new(0,80,0,80)I.Position=UDim2.new(0.5,-150,0.5,-40)I. -BackgroundTransparency=1 I.Parent=G local J,K={},1 while K<=8 do local L= -Instance.new'ImageLabel'L.Name='Spinner'..K L.Size=UDim2.new(0,16,0,16)L. -Position=UDim2.new(0.5+0.3*math.cos(math.rad(45*K)),-8,0.5+0.3*math.sin(math. -rad(45*K)),-8)L.BackgroundTransparency=1 L.Image= -'http://www.roblox.com/Asset?id=45880710'L.Parent=I J[K]=L K=K+1 end x=function( -)C.Visible=false G.Visible=true local L=true delay(0,function()local M=0 while L -do local N=0 while N<8 do if N==M or N==((M+1)%8)then J[N+1].Image= -'http://www.roblox.com/Asset?id=45880668'else J[N+1].Image= -'http://www.roblox.com/Asset?id=45880710'end N=N+1 end M=(M+1)%8 wait(0.2)end -end)local M=game:SaveToRoblox()if not M then M=game:SaveToRoblox()end G.Visible= -false L=false if M then game:FinishShutdown(false)w()else F.Visible=true end end -y=function()F.Visible=false game:FinishShutdown(true)w()end z=function()C. -Visible=false F.Visible=false game:FinishShutdown(false)w()end A=function()C. -Visible=false F.Visible=false w()end w=function()C.Visible=true F.Visible=false -G.Visible=false v.Visible=false game.GuiService:RemoveCenterDialog(v)end -robloxLock(v)v.Visible=false return v end,function()waitForChild(game, +true elseif mouseLockLabel then mouseLockLabel.Visible=false end local u=a. +BottomLeftControl:FindFirstChild'Exit'if u then u:Remove()end local v=a: +FindFirstChild'TopLeftControl'if v then u=v:FindFirstChild'Exit'if u then u: +Remove()end v:Remove()end end)end local t,u,v=function()local t=Instance.new +'TextButton't.Text=''t.AutoButtonColor=false t.Name='SaveDialogShield't.Active= +true t.Visible=false t.Size=UDim2.new(1,0,1,0)t.BackgroundColor3=Color3I(51,51, +51)t.BorderColor3=Color3I(27,42,53)t.BackgroundTransparency=0.4 t.ZIndex=s+1 +local u,v,w,x,y,z=nil,nil,nil,nil,nil,{}z[1]={}z[1].Text='Save'z[1].Style=Enum. +ButtonStyle.RobloxButtonDefault z[1].Function=function()v()end z[2]={}z[2].Text= +'Cancel'z[2].Function=function()y()end z[3]={}z[3].Text="Don't Save"z[3]. +Function=function()x()end local A=RbxGui.CreateStyledMessageDialog( +'Unsaved Changes','Save your changes to ROBLOX before leaving?','Confirm',z)A. +Visible=true A.Parent=t local B,C={},1 if game.LocalSaveEnabled then B[C]={}B[C] +.Text='Save to Disk'B[C].Function=function()w()end C=C+1 end B[C]={}B[C].Text= +'Keep Playing'B[C].Function=function()y()end B[C+1]={}B[C+1].Text="Don't Save"B[ +C+1].Function=function()x()end local D=RbxGui.CreateStyledMessageDialog( +'Upload Failed','Sorry, we could not save your changes to ROBLOX.','Error',B)D. +Visible=false D.Parent=t local E=Instance.new'Frame'E.Name='SpinnerDialog'E. +Style=Enum.FrameStyle.RobloxRound E.Size=UDim2.new(0,350,0,150)E.Position=UDim2. +new(0.5,-175,0.5,-75)E.Visible=false E.Active=true E.Parent=t local F=Instance. +new'TextLabel'F.Name='WaitingLabel'F.Text='Saving to ROBLOX...'F.Font=Enum.Font. +ArialBold F.FontSize=Enum.FontSize.Size18 F.Position=UDim2.new(0.5,25,0.5,0)F. +TextColor3=Color3.new(1,1,1)F.Parent=E local G=Instance.new'Frame'G.Name= +'Spinner'G.Size=UDim2.new(0,80,0,80)G.Position=UDim2.new(0.5,-150,0.5,-40)G. +BackgroundTransparency=1 G.Parent=E local H,I={},1 while I<=8 do local J= +Instance.new'ImageLabel'J.Name='Spinner'..I J.Size=UDim2.new(0,16,0,16)J. +Position=UDim2.new(0.5+0.3*math.cos(math.rad(45*I)),-8,0.5+0.3*math.sin(math. +rad(45*I)),-8)J.BackgroundTransparency=1 J.Image= +'http://www.roblox.com/Asset?id=45880710'J.Parent=G H[I]=J I=I+1 end v=function( +)A.Visible=false E.Visible=true local J=true delay(0,function()local K=0 while J +do local L=0 while L<8 do if L==K or L==((K+1)%8)then H[L+1].Image= +'http://www.roblox.com/Asset?id=45880668'else H[L+1].Image= +'http://www.roblox.com/Asset?id=45880710'end L=L+1 end K=(K+1)%8 wait(0.2)end +end)local K=game:SaveToRoblox()if not K then K=game:SaveToRoblox()end E.Visible= +false J=false if K then game:FinishShutdown(false)u()else D.Visible=true end end +w=function()D.Visible=false game:FinishShutdown(true)u()end x=function()A. +Visible=false D.Visible=false game:FinishShutdown(false)u()end y=function()A. +Visible=false D.Visible=false u()end u=function()A.Visible=true D.Visible=false +E.Visible=false t.Visible=false game.GuiService:RemoveCenterDialog(t)end +robloxLock(t)t.Visible=false return t end,function()waitForChild(game, 'NetworkClient')waitForChild(game,'Players')waitForProperty(game.Players, -'LocalPlayer')local v,w=game.Players.LocalPlayer,nil waitForChild(a, +'LocalPlayer')local t,u=game.Players.LocalPlayer,nil waitForChild(a, 'UserSettingsShield')waitForChild(a.UserSettingsShield,'Settings')waitForChild(a .UserSettingsShield.Settings,'SettingsStyle')waitForChild(a.UserSettingsShield. Settings.SettingsStyle,'GameMainMenu')waitForChild(a.UserSettingsShield.Settings -.SettingsStyle.GameMainMenu,'ReportAbuseButton')w=a.UserSettingsShield.Settings. -SettingsStyle.GameMainMenu.ReportAbuseButton local x=Instance.new'TextButton'x. -Name='ReportAbuseShield'x.Text=''x.AutoButtonColor=false x.Active=true x.Visible -=false x.Size=UDim2.new(1,0,1,0)x.BackgroundColor3=Color3I(51,51,51)x. -BorderColor3=Color3I(27,42,53)x.BackgroundTransparency=0.4 x.ZIndex=u+1 local y, -z=nil,{}z[1]={}z[1].Text='Ok'z[1].Modal=true z[1].Function=function() -closeAndResetDialog()end local A=RbxGui.CreateMessageDialog( -'Thanks for your report!', +.SettingsStyle.GameMainMenu,'ReportAbuseButton')u=a.UserSettingsShield.Settings. +SettingsStyle.GameMainMenu.ReportAbuseButton local v=Instance.new'TextButton'v. +Name='ReportAbuseShield'v.Text=''v.AutoButtonColor=false v.Active=true v.Visible +=false v.Size=UDim2.new(1,0,1,0)v.BackgroundColor3=Color3I(51,51,51)v. +BorderColor3=Color3I(27,42,53)v.BackgroundTransparency=0.4 v.ZIndex=s+1 local w, +x=nil,{}x[1]={}x[1].Text='Ok'x[1].Modal=true x[1].Function=function()w()end +local y=RbxGui.CreateMessageDialog('Thanks for your report!', [[Our moderators will review the chat logs and determine what happened. The other user is probably just trying to make you mad. If anyone used swear words, inappropriate language, or threatened you in real life, please report them for Bad Words or Threats]] -,z)A.Visible=false A.Parent=x local B=RbxGui.CreateMessageDialog( -'Thanks for your report!',"We've recorded your report for evaluation.",z)B. -Visible=false B.Parent=x local C=RbxGui.CreateMessageDialog( +,x)y.Visible=false y.Parent=v local z=RbxGui.CreateMessageDialog( +'Thanks for your report!',"We've recorded your report for evaluation.",x)z. +Visible=false z.Parent=v local A=RbxGui.CreateMessageDialog( 'Thanks for your report!', -[[Our moderators will review the chat logs and determine what happened.]],z)C. -Visible=false C.Parent=x local D=Instance.new'Frame'D.Name='Settings'D.Position= -UDim2.new(0.5,-250,0.5,-200)D.Size=UDim2.new(0,500,0,400)D. -BackgroundTransparency=1 D.Active=true D.Parent=x local E=Instance.new'Frame'E. -Name='ReportAbuseStyle'E.Size=UDim2.new(1,0,1,0)E.Style=Enum.FrameStyle. -RobloxRound E.Active=true E.ZIndex=u+1 E.Parent=D local F=Instance.new -'TextLabel'F.Name='Title'F.Text='Report Abuse'F.TextColor3=Color3I(221,221,221)F -.Position=UDim2.new(0.5,0,0,30)F.Font=Enum.Font.ArialBold F.FontSize=Enum. -FontSize.Size36 F.ZIndex=u+2 F.Parent=E local G=Instance.new'TextLabel'G.Name= -'Description'G.Text= +[[Our moderators will review the chat logs and determine what happened.]],x)A. +Visible=false A.Parent=v local B=Instance.new'Frame'B.Name='Settings'B.Position= +UDim2.new(0.5,-250,0.5,-200)B.Size=UDim2.new(0,500,0,400)B. +BackgroundTransparency=1 B.Active=true B.Parent=v local C=Instance.new'Frame'C. +Name='ReportAbuseStyle'C.Size=UDim2.new(1,0,1,0)C.Style=Enum.FrameStyle. +RobloxRound C.Active=true C.ZIndex=s+1 C.Parent=B local D=Instance.new +'TextLabel'D.Name='Title'D.Text='Report Abuse'D.TextColor3=Color3I(221,221,221)D +.Position=UDim2.new(0.5,0,0,30)D.Font=Enum.Font.ArialBold D.FontSize=Enum. +FontSize.Size36 D.ZIndex=s+2 D.Parent=C local E=Instance.new'TextLabel'E.Name= +'Description'E.Text= [[This will send a complete report to a moderator. The moderator will review the chat log and take appropriate action.]] -G.TextColor3=Color3I(221,221,221)G.Position=UDim2.new(0,0,0,55)G.Size=UDim2.new( -1,0,0,40)G.BackgroundTransparency=1 G.Font=Enum.Font.Arial G.FontSize=Enum. -FontSize.Size18 G.TextWrap=true G.ZIndex=u+2 G.TextXAlignment=Enum. -TextXAlignment.Left G.TextYAlignment=Enum.TextYAlignment.Top G.Parent=E local H= -Instance.new'TextLabel'H.Name='PlayerLabel'H.Text='Which player?'H. -BackgroundTransparency=1 H.Font=Enum.Font.Arial H.FontSize=Enum.FontSize.Size18 -H.Position=UDim2.new(0.025,0,0,100)H.Size=UDim2.new(0.4,0,0,36)H.TextColor3= -Color3I(255,255,255)H.TextXAlignment=Enum.TextXAlignment.Left H.ZIndex=u+2 H. -Parent=E local I,J,K,L=nil,nil,nil,nil local M,N=function()local M,N,O=game: -GetService'Players',{},{}local P,Q=M:GetChildren(),1 if P then for R,S in -ipairs(P)do if S:IsA'Player'and S~=v then N[Q]=S.Name O[S.Name]=S Q=Q+1 end end -end local R=nil R,L=RbxGui.CreateDropDownMenu(N,function(S)I=O[S]if J and I then -K.Active=true end end)R.Name='PlayersComboBox'R.ZIndex=u+2 R.Position=UDim2.new( -0.425,0,0,102)R.Size=UDim2.new(0.55,0,0,32)return R end,Instance.new'TextLabel'N -.Name='AbuseLabel'N.Text='Type of Abuse:'N.Font=Enum.Font.Arial N. -BackgroundTransparency=1 N.FontSize=Enum.FontSize.Size18 N.Position=UDim2.new( -0.025,0,0,140)N.Size=UDim2.new(0.4,0,0,36)N.TextColor3=Color3I(255,255,255)N. -TextXAlignment=Enum.TextXAlignment.Left N.ZIndex=u+2 N.Parent=E local O={ +E.TextColor3=Color3I(221,221,221)E.Position=UDim2.new(0,0,0,55)E.Size=UDim2.new( +1,0,0,40)E.BackgroundTransparency=1 E.Font=Enum.Font.Arial E.FontSize=Enum. +FontSize.Size18 E.TextWrap=true E.ZIndex=s+2 E.TextXAlignment=Enum. +TextXAlignment.Left E.TextYAlignment=Enum.TextYAlignment.Top E.Parent=C local F= +Instance.new'TextLabel'F.Name='PlayerLabel'F.Text='Which player?'F. +BackgroundTransparency=1 F.Font=Enum.Font.Arial F.FontSize=Enum.FontSize.Size18 +F.Position=UDim2.new(0.025,0,0,100)F.Size=UDim2.new(0.4,0,0,36)F.TextColor3= +Color3I(255,255,255)F.TextXAlignment=Enum.TextXAlignment.Left F.ZIndex=s+2 F. +Parent=C local G,H,I,J=nil,nil,nil,nil local K,L=function()local K,L,M=game: +GetService'Players',{},{}local N,O=K:GetChildren(),1 if N then for P,Q in +ipairs(N)do if Q:IsA'Player'and Q~=t then L[O]=Q.Name M[Q.Name]=Q O=O+1 end end +end local P=nil P,J=RbxGui.CreateDropDownMenu(L,function(Q)G=M[Q]if H and G then +I.Active=true end end)P.Name='PlayersComboBox'P.ZIndex=s+2 P.Position=UDim2.new( +0.425,0,0,102)P.Size=UDim2.new(0.55,0,0,32)return P end,Instance.new'TextLabel'L +.Name='AbuseLabel'L.Text='Type of Abuse:'L.Font=Enum.Font.Arial L. +BackgroundTransparency=1 L.FontSize=Enum.FontSize.Size18 L.Position=UDim2.new( +0.025,0,0,140)L.Size=UDim2.new(0.4,0,0,36)L.TextColor3=Color3I(255,255,255)L. +TextXAlignment=Enum.TextXAlignment.Left L.ZIndex=s+2 L.Parent=C local M={ 'Swearing','Bullying','Scamming','Dating','Cheating/Exploiting', 'Personal Questions','Offsite Links','Bad Model or Script','Bad Username'}local -P,Q=RbxGui.CreateDropDownMenu(O,function(P)J=P if J and I then K.Active=true end -end,true)P.Name='AbuseComboBox'P.ZIndex=u+2 P.Position=UDim2.new(0.425,0,0,142)P -.Size=UDim2.new(0.55,0,0,32)P.Parent=E local R=Instance.new'TextLabel'R.Name= -'ShortDescriptionLabel'R.Text='Short Description: (optional)'R.Font=Enum.Font. -Arial R.FontSize=Enum.FontSize.Size18 R.Position=UDim2.new(0.025,0,0,180)R.Size= -UDim2.new(0.95,0,0,36)R.TextColor3=Color3I(255,255,255)R.TextXAlignment=Enum. -TextXAlignment.Left R.BackgroundTransparency=1 R.ZIndex=u+2 R.Parent=E local S= -Instance.new'Frame'S.Name='ShortDescriptionWrapper'S.Position=UDim2.new(0.025,0, -0,220)S.Size=UDim2.new(0.95,0,1,-310)S.BackgroundColor3=Color3I(0,0,0)S. -BorderSizePixel=0 S.ZIndex=u+2 S.Parent=E local T=Instance.new'TextBox'T.Name= -'TextBox'T.Text=''T.ClearTextOnFocus=false T.Font=Enum.Font.Arial T.FontSize= -Enum.FontSize.Size18 T.Position=UDim2.new(0,3,0,3)T.Size=UDim2.new(1,-6,1,-6)T. -TextColor3=Color3I(255,255,255)T.TextXAlignment=Enum.TextXAlignment.Left T. -TextYAlignment=Enum.TextYAlignment.Top T.TextWrap=true T.BackgroundColor3= -Color3I(0,0,0)T.BorderSizePixel=0 T.ZIndex=u+2 T.Parent=S K=Instance.new -'TextButton'K.Name='SubmitReportBtn'K.Active=false K.Modal=true K.Font=Enum.Font -.Arial K.FontSize=Enum.FontSize.Size18 K.Position=UDim2.new(0.1,0,1,-80)K.Size= -UDim2.new(0.35,0,0,50)K.AutoButtonColor=true K.Style=Enum.ButtonStyle. -RobloxButtonDefault K.Text='Submit Report'K.TextColor3=Color3I(255,255,255)K. -ZIndex=u+2 K.Parent=E K.MouseButton1Click:connect(function()if K.Active then if -J and I then D.Visible=false game.Players:ReportAbuse(I,J,T.Text)if J== -'Cheating/Exploiting'then B.Visible=true elseif J=='Bullying'or J=='Swearing' -then A.Visible=true else C.Visible=true end else closeAndResetDialog()end end -end)local U=Instance.new'TextButton'U.Name='CancelBtn'U.Font=Enum.Font.Arial U. -FontSize=Enum.FontSize.Size18 U.Position=UDim2.new(0.55,0,1,-80)U.Size=UDim2. -new(0.35,0,0,50)U.AutoButtonColor=true U.Style=Enum.ButtonStyle. -RobloxButtonDefault U.Text='Cancel'U.TextColor3=Color3I(255,255,255)U.ZIndex=u+2 -U.Parent=E closeAndResetDialog=function()local V=E:FindFirstChild -'PlayersComboBox'if V then V.Parent=nil end I=nil L(nil)J=nil Q(nil)K.Active= -false T.Text=''D.Visible=true A.Visible=false B.Visible=false C.Visible=false x. -Visible=false w.Active=true game.GuiService:RemoveCenterDialog(x)end U. -MouseButton1Click:connect(closeAndResetDialog)w.MouseButton1Click:connect( -function()M().Parent=E table.insert(o,x)game.GuiService:AddCenterDialog(x,Enum. -CenterDialogType.ModalDialog,function()w.Active=false x.Visible=true p.Visible= -false end,function()w.Active=true x.Visible=false end)end)robloxLock(x)return x -end,function()waitForChild(game,'NetworkClient')waitForChild(game,'Players') -waitForProperty(game.Players,'LocalPlayer')local v=Instance.new'Frame'v.Name= -'ChatBar'v.Size=UDim2.new(1,0,0,22)v.Position=UDim2.new(0,0,1,0)v. -BackgroundColor3=Color3.new(0,0,0)v.BorderSizePixel=0 local w=Instance.new -'TextBox'w.Text=''w.Visible=false w.Size=UDim2.new(1,-4,1,0)w.Position=UDim2. -new(0,2,0,0)w.TextXAlignment=Enum.TextXAlignment.Left w.Font=Enum.Font.Arial w. -ClearTextOnFocus=false w.FontSize=Enum.FontSize.Size14 w.TextColor3=Color3.new(1 -,1,1)w.BackgroundTransparency=1 local x=Instance.new'TextButton'x.Size=UDim2. -new(1,-4,1,0)x.Position=UDim2.new(0,2,0,0)x.AutoButtonColor=false x.Text= -'To chat click here or press "/" key'x.TextXAlignment=Enum.TextXAlignment.Left x -.Font=Enum.Font.Arial x.FontSize=Enum.FontSize.Size14 x.TextColor3=Color3.new(1, -1,1)x.BackgroundTransparency=1 local y=function()if w.Visible then return end x. -Visible=false w.Text=''w.Visible=true w:CaptureFocus()end x.MouseButton1Click: -connect(y)local z=function(z)end pcall(function()end)w.FocusLost:connect( -function(A)if A then if w.Text~=''then local B=w.Text if string.sub(B,1,1)=='%' -then game.Players:TeamChat(string.sub(B,2))else game.Players:Chat(B)end end end -w.Text=''w.Visible=false x.Visible=true end)robloxLock(v)return v,z end,pcall( -function()end)if y then delay(0,function()local z=v()z.Parent=a game. -RequestShutdown=function()table.insert(o,z)game.GuiService:AddCenterDialog(z, -Enum.CenterDialogType.QuitDialog,function()z.Visible=true end,function()z. -Visible=false end)return true end end)end delay(0,function()w().Parent=a -waitForChild(a,'UserSettingsShield')waitForChild(a.UserSettingsShield,'Settings' -)waitForChild(a.UserSettingsShield.Settings,'SettingsStyle')waitForChild(a. -UserSettingsShield.Settings.SettingsStyle,'GameMainMenu')waitForChild(a. -UserSettingsShield.Settings.SettingsStyle.GameMainMenu,'ReportAbuseButton')a. -UserSettingsShield.Settings.SettingsStyle.GameMainMenu.ReportAbuseButton.Active= -true end)pcall(function()return game.GuiService.UseLuaChat end)local z=41324860 -delay(0,function()waitForChild(game,'NetworkClient')waitForChild(game,'Players') -waitForProperty(game.Players,'LocalPlayer')waitForProperty(game.Players. -LocalPlayer,'Character')waitForChild(game.Players.LocalPlayer.Character, -'Humanoid')waitForProperty(game,'PlaceId')if game.PlaceId==z then game.Players. -LocalPlayer.Character.Humanoid:SetClickToWalkEnabled(false)game.Players. -LocalPlayer.CharacterAdded:connect(function(A)waitForChild(A,'Humanoid')A. -Humanoid:SetClickToWalkEnabled(false)end)end end)end \ No newline at end of file +N,O=RbxGui.CreateDropDownMenu(M,function(N)H=N if H and G then I.Active=true end +end,true)N.Name='AbuseComboBox'N.ZIndex=s+2 N.Position=UDim2.new(0.425,0,0,142)N +.Size=UDim2.new(0.55,0,0,32)N.Parent=C local P=Instance.new'TextLabel'P.Name= +'ShortDescriptionLabel'P.Text='Short Description: (optional)'P.Font=Enum.Font. +Arial P.FontSize=Enum.FontSize.Size18 P.Position=UDim2.new(0.025,0,0,180)P.Size= +UDim2.new(0.95,0,0,36)P.TextColor3=Color3I(255,255,255)P.TextXAlignment=Enum. +TextXAlignment.Left P.BackgroundTransparency=1 P.ZIndex=s+2 P.Parent=C local Q= +Instance.new'Frame'Q.Name='ShortDescriptionWrapper'Q.Position=UDim2.new(0.025,0, +0,220)Q.Size=UDim2.new(0.95,0,1,-310)Q.BackgroundColor3=Color3I(0,0,0)Q. +BorderSizePixel=0 Q.ZIndex=s+2 Q.Parent=C local R=Instance.new'TextBox'R.Name= +'TextBox'R.Text=''R.ClearTextOnFocus=false R.Font=Enum.Font.Arial R.FontSize= +Enum.FontSize.Size18 R.Position=UDim2.new(0,3,0,3)R.Size=UDim2.new(1,-6,1,-6)R. +TextColor3=Color3I(255,255,255)R.TextXAlignment=Enum.TextXAlignment.Left R. +TextYAlignment=Enum.TextYAlignment.Top R.TextWrap=true R.BackgroundColor3= +Color3I(0,0,0)R.BorderSizePixel=0 R.ZIndex=s+2 R.Parent=Q I=Instance.new +'TextButton'I.Name='SubmitReportBtn'I.Active=false I.Modal=true I.Font=Enum.Font +.Arial I.FontSize=Enum.FontSize.Size18 I.Position=UDim2.new(0.1,0,1,-80)I.Size= +UDim2.new(0.35,0,0,50)I.AutoButtonColor=true I.Style=Enum.ButtonStyle. +RobloxButtonDefault I.Text='Submit Report'I.TextColor3=Color3I(255,255,255)I. +ZIndex=s+2 I.Parent=C I.MouseButton1Click:connect(function()if I.Active then if +H and G then B.Visible=false game.Players:ReportAbuse(G,H,R.Text)if H== +'Cheating/Exploiting'then z.Visible=true elseif H=='Bullying'or H=='Swearing' +then y.Visible=true else A.Visible=true end else w()end end end)local S=Instance +.new'TextButton'S.Name='CancelBtn'S.Font=Enum.Font.Arial S.FontSize=Enum. +FontSize.Size18 S.Position=UDim2.new(0.55,0,1,-80)S.Size=UDim2.new(0.35,0,0,50)S +.AutoButtonColor=true S.Style=Enum.ButtonStyle.RobloxButtonDefault S.Text= +'Cancel'S.TextColor3=Color3I(255,255,255)S.ZIndex=s+2 S.Parent=C w=function() +local T=C:FindFirstChild'PlayersComboBox'if T then T.Parent=nil end G=nil J(nil) +H=nil O(nil)I.Active=false R.Text=''B.Visible=true y.Visible=false z.Visible= +false A.Visible=false v.Visible=false u.Active=true game.GuiService: +RemoveCenterDialog(v)end S.MouseButton1Click:connect(w)u.MouseButton1Click: +connect(function()K().Parent=C table.insert(m,v)game.GuiService:AddCenterDialog( +v,Enum.CenterDialogType.ModalDialog,function()u.Active=false v.Visible=true n. +Visible=false end,function()u.Active=true v.Visible=false end)end)robloxLock(v) +return v end,pcall(function()end)if v then delay(0,function()local w=t()w.Parent +=a game.RequestShutdown=function()table.insert(m,w)game.GuiService: +AddCenterDialog(w,Enum.CenterDialogType.QuitDialog,function()w.Visible=true end, +function()w.Visible=false end)return true end end)end delay(0,function()u(). +Parent=a waitForChild(a,'UserSettingsShield')waitForChild(a.UserSettingsShield, +'Settings')waitForChild(a.UserSettingsShield.Settings,'SettingsStyle') +waitForChild(a.UserSettingsShield.Settings.SettingsStyle,'GameMainMenu') +waitForChild(a.UserSettingsShield.Settings.SettingsStyle.GameMainMenu, +'ReportAbuseButton')a.UserSettingsShield.Settings.SettingsStyle.GameMainMenu. +ReportAbuseButton.Active=true end)pcall(function()return game.GuiService. +UseLuaChat end)local w=41324860 delay(0,function()waitForChild(game, +'NetworkClient')waitForChild(game,'Players')waitForProperty(game.Players, +'LocalPlayer')waitForProperty(game.Players.LocalPlayer,'Character')waitForChild( +game.Players.LocalPlayer.Character,'Humanoid')waitForProperty(game,'PlaceId')if +game.PlaceId==w then game.Players.LocalPlayer.Character.Humanoid: +SetClickToWalkEnabled(false)game.Players.LocalPlayer.CharacterAdded:connect( +function(x)waitForChild(x,'Humanoid')x.Humanoid:SetClickToWalkEnabled(false)end) +end end)end \ No newline at end of file diff --git a/processed/48488235.lua b/processed/48488235.lua index 72fbbf7..53a71de 100644 --- a/processed/48488235.lua +++ b/processed/48488235.lua @@ -194,472 +194,472 @@ TextWrapped=true,TextColor3=Color3.new(1,1,1),TextStrokeColor3=Color3.new(0,0,0) ,TextStrokeTransparency=0,TextXAlignment='Right',TextYAlignment='Center'},true function debugprint(Z)if Y then X.Text=Z end end local Z,_=assert(LoadLibrary 'RbxGui'),8 for aa,ab in pairs(b)do Game:GetService'ContentProvider':Preload( -'http://www.roblox.com/asset/?id='..ab)end local ac,ad,ae,af,ag,ah,ai,aj,ak,al, -am={},0,{},{},nil,{},{},0.03,0,0.25,false pcall(function()am=Game:GetService -'UserInputService'.TouchEnabled end)local an,ao,ap,aq=150,10,UDim2.new(0.5,0,1,0 -),UDim2.new(0.25,0,0.1,0)local ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF= -UDim2.new(0,an,0,800),UDim2.new(1,-an,0.005,0),-4E-2,v.Position.Y.Scale,nil,nil, -false,false,false,false,false,false,false,{},8 if not am then aF=12 end local aG -,aH,aI,aJ,aK,aL,aM=false,nil,{'Bad Words or Threats','Bad Username', +'http://www.roblox.com/asset/?id='..ab)end local ac,ad,ae,af,ag,ah,ai,aj,ak,al={ +},0,{},{},nil,{},{},0,0.25,false pcall(function()al=Game:GetService +'UserInputService'.TouchEnabled end)local am,an,ao,ap=150,10,UDim2.new(0.5,0,1,0 +),UDim2.new(0.25,0,0.1,0)local aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE= +UDim2.new(0,am,0,800),UDim2.new(1,-am,0.005,0),-4E-2,v.Position.Y.Scale,nil,nil, +false,false,false,false,false,false,false,{},8 if not al then aE=12 end local aF +,aG,aH,aI,aJ,aK,aL=false,nil,{'Bad Words or Threats','Bad Username', 'Talking about Dating','Account Trading or Sharing','Asking Personal Questions', 'Rude or Mean Behavior','False Reporting Me'},nil,nil,{Owner=255,Admin=240, Member=128,Visitor=10,Banned=0},not not game.Workspace:FindFirstChild -'PSVariable'game.Workspace.ChildAdded:connect(function(aN)if aN.Name== -'PSVariable'and aN:IsA'BoolValue'then aM=true end end)function -AreAllEntriesOnScreen()return#ai*H.Size.Y.Scale<=1+au end function GetMaxScroll( -)return au*-1 end function GetMinScroll()if AreAllEntriesOnScreen()then return -GetMaxScroll()else return(GetMaxScroll()-(#ai*H.Size.Y.Scale))+(1+au)end end -function AbsoluteToPercent(aN,aO)return Vector2.new(aN,aO)/i.AbsoluteSize end -function TweenProperty(aN,aO,aP,aQ,aR)local aS=tick()while tick()-aSaO -do game:GetService'PersonalServerService':Demote(aN)end end function -OnPrivilegeLevelSelect(aN,aO,aP,aQ,aR,aS)debugprint'setting privilege level' -SetPrivilegeRank(aN,aO)HighlightMyRank(aN,aP,aQ,aR,aS)end function -HighlightMyRank(aN,aO,aP,aQ,aR)aO.Image='http://www.roblox.com/asset/?id='..b[ -'LightPopupMid']aP.Image='http://www.roblox.com/asset/?id='..b['DarkPopupMid']aQ -.Image='http://www.roblox.com/asset/?id='..b['LightPopupMid']aR.Image= -'http://www.roblox.com/asset/?id='..b['DarkPopupBottom']local aS=aN. -PersonalServerRank if aS<=aL['Banned']then aO.Image= -'http://www.roblox.com/asset/?id='..b['LightBluePopupMid']elseif aS<=aL[ -'Visitor']then aP.Image='http://www.roblox.com/asset/?id='..b['DarkBluePopupMid' -]elseif aS<=aL['Member']then aQ.Image='http://www.roblox.com/asset/?id='..b[ -'LightBluePopupMid']elseif aS<=aL['Admin']then aR.Image= +'PSVariable'game.Workspace.ChildAdded:connect(function(aM)if aM.Name== +'PSVariable'and aM:IsA'BoolValue'then aL=true end end)function +AreAllEntriesOnScreen()return#ai*H.Size.Y.Scale<=1+at end function GetMaxScroll( +)return at*-1 end function GetMinScroll()if AreAllEntriesOnScreen()then return +GetMaxScroll()else return(GetMaxScroll()-(#ai*H.Size.Y.Scale))+(1+at)end end +function AbsoluteToPercent(aM,aN)return Vector2.new(aM,aN)/i.AbsoluteSize end +function TweenProperty(aM,aN,aO,aP,aQ)local aR=tick()while tick()-aRaN +do game:GetService'PersonalServerService':Demote(aM)end end function +OnPrivilegeLevelSelect(aM,aN,aO,aP,aQ,aR)debugprint'setting privilege level' +SetPrivilegeRank(aM,aN)HighlightMyRank(aM,aO,aP,aQ,aR)end function +HighlightMyRank(aM,aN,aO,aP,aQ)aN.Image='http://www.roblox.com/asset/?id='..b[ +'LightPopupMid']aO.Image='http://www.roblox.com/asset/?id='..b['DarkPopupMid']aP +.Image='http://www.roblox.com/asset/?id='..b['LightPopupMid']aQ.Image= +'http://www.roblox.com/asset/?id='..b['DarkPopupBottom']local aR=aM. +PersonalServerRank if aR<=aK['Banned']then aN.Image= +'http://www.roblox.com/asset/?id='..b['LightBluePopupMid']elseif aR<=aK[ +'Visitor']then aO.Image='http://www.roblox.com/asset/?id='..b['DarkBluePopupMid' +]elseif aR<=aK['Member']then aP.Image='http://www.roblox.com/asset/?id='..b[ +'LightBluePopupMid']elseif aR<=aK['Admin']then aQ.Image= 'http://www.roblox.com/asset/?id='..b['DarkBluePopupBottom']end end function -OnSubmitAbuse()if N.Active then if aH and aw then L.Visible=false game.Players: -ReportAbuse(aw,aH,Q.Text)if aH=='Rude or Mean Behavior'or aH== +OnSubmitAbuse()if N.Active then if aG and av then L.Visible=false game.Players: +ReportAbuse(av,aG,Q.Text)if aG=='Rude or Mean Behavior'or aG== 'False Reporting Me'then S.Parent=J else debugprint'opening abuse box'T.Parent=J end else CloseAbuseDialog()end end end function OpenAbuseDialog()debugprint -'adding report dialog'M.Text=aw.Name A:TweenPosition(UDim2.new(1,0,0,0),'Out', +'adding report dialog'M.Text=av.Name A:TweenPosition(UDim2.new(1,0,0,0),'Out', 'Linear',c,true)Q=R:Clone()Q.Parent=P J.Parent=i ClosePopUpPanel()end function -CloseAbuseDialog()aH=nil N.Active=false N.Image= +CloseAbuseDialog()aG=nil N.Active=false N.Image= 'http://www.roblox.com/asset/?id=96502438'Q:Destroy()S.Parent=nil T.Parent=nil J -.Parent=nil L.Visible=true end function InitReportAbuse()aJ=function(aN)aH=aN if -aH and aw then N.Active=true N.Image='http://www.roblox.com/asset/?id=96501119' -end end aK,aa=Z.CreateDropDownMenu(aI,aJ,true)aK.Name='AbuseComboBox'aK.Position -=UDim2.new(0.425,0,0,142)aK.Size=UDim2.new(0.55,0,0,32)aK.Parent=L O. +.Parent=nil L.Visible=true end function InitReportAbuse()aI=function(aM)aG=aM if +aG and av then N.Active=true N.Image='http://www.roblox.com/asset/?id=96501119' +end end aJ,aa=Z.CreateDropDownMenu(aH,aI,true)aJ.Name='AbuseComboBox'aJ.Position +=UDim2.new(0.425,0,0,142)aJ.Size=UDim2.new(0.55,0,0,32)aJ.Parent=L O. MouseButton1Click:connect(CloseAbuseDialog)N.MouseButton1Click:connect( OnSubmitAbuse)S:FindFirstChild'OkButton'.MouseButton1Down:connect( CloseAbuseDialog)T:FindFirstChild'OkButton'.MouseButton1Down:connect( -CloseAbuseDialog)end local function GetFriendStatus(aN)if aN==game.Players. -LocalPlayer then return Enum.FriendStatus.NotFriend else local aO,aP=pcall( -function()return game.Players.LocalPlayer:GetFriendStatus(aN)end)if aO then -return aP else return Enum.FriendStatus.NotFriend end end end function -OnFriendButtonSelect()local aN=GetFriendStatus(aw)if aN==Enum.FriendStatus. -Friend then g:RevokeFriendship(aw)elseif aN==Enum.FriendStatus.Unknown or aN== -Enum.FriendStatus.NotFriend or aN==Enum.FriendStatus.FriendRequestSent or aN== -Enum.FriendStatus.FriendRequestReceived then g:RequestFriendship(aw)end -ClosePopUpPanel()end function OnFriendRefuseButtonSelect()g:RevokeFriendship(aw) +CloseAbuseDialog)end local function GetFriendStatus(aM)if aM==game.Players. +LocalPlayer then return Enum.FriendStatus.NotFriend else local aN,aO=pcall( +function()return game.Players.LocalPlayer:GetFriendStatus(aM)end)if aN then +return aO else return Enum.FriendStatus.NotFriend end end end function +OnFriendButtonSelect()local aM=GetFriendStatus(av)if aM==Enum.FriendStatus. +Friend then g:RevokeFriendship(av)elseif aM==Enum.FriendStatus.Unknown or aM== +Enum.FriendStatus.NotFriend or aM==Enum.FriendStatus.FriendRequestSent or aM== +Enum.FriendStatus.FriendRequestReceived then g:RequestFriendship(av)end +ClosePopUpPanel()end function OnFriendRefuseButtonSelect()g:RevokeFriendship(av) ClosePopUpPanel()A:TweenPosition(UDim2.new(1,0,0,0),'Out','Linear',c,true)end -function PlayerSortFunction(aN,aO)if aN['Score']==aO['Score']then return aN[ -'Player'].Name:upper()1 and g.userId>1 then -ActivatePlayerEntryPanel(aU)end end local a_,a0=nil,y.Position local function -dragpoll(a1,a2)if not a_ then a_=AbsoluteToPercent(a1,a2).Y end local a3= -AbsoluteToPercent(a1,a2).Y debugprint('drag dist:'..Vector2.new(aV-a1,aY-a2). -magnitude)if Vector2.new(aV-a1,aY-a2).magnitude>d then aZ=false end local a4= -math.max(math.min(a0.Y.Scale+(a3-a_),GetMaxScroll()),GetMinScroll())y.Position= -UDim2.new(a0.X.Scale,a0.X.Offset,a4,a0.Y.Offset)UpdateScrollPosition()end +UpdateScrollBarSize()local aN,aU=#ai*H.Size.Y.Scale,(v.Position.Y.Scale+1)x.Size +=UDim2.new(1,0,aU/aN,0)end function UpdateScrollPosition()local aN,aU= +GetMinScroll(),GetMaxScroll()local aX,aY=aU-aN,math.max(math.min(y.Position.Y. +Scale,aU),aN)y.Position=UDim2.new(y.Position.X.Scale,y.Position.X.Offset,aY,y. +Position.Y.Offset)local aZ=1-x.Size.Y.Scale x.Position=UDim2.new(0,0,aZ-(aZ*((y. +Position.Y.Scale-aN)/aX)),0)end function StartDrag(aN,aU,aX)local aY=true +WaitForChild(aN['Frame'],'ClickListener')local function dragExit()if aN['Player' +]and av and aY and aN['Player']~=g and av.userId>1 and g.userId>1 then +ActivatePlayerEntryPanel(aN)end end local aZ,a_=nil,y.Position local function +dragpoll(a0,a1)if not aZ then aZ=AbsoluteToPercent(a0,a1).Y end local a2= +AbsoluteToPercent(a0,a1).Y debugprint('drag dist:'..Vector2.new(aU-a0,aX-a1). +magnitude)if Vector2.new(aU-a0,aX-a1).magnitude>d then aY=false end local a3= +math.max(math.min(a_.Y.Scale+(a2-aZ),GetMaxScroll()),GetMinScroll())y.Position= +UDim2.new(a_.X.Scale,a_.X.Offset,a3,a_.Y.Offset)UpdateScrollPosition()end WaitForClick(i,dragpoll,dragExit)end function StartMinimizeDrag()Delay(0, -function()local aU=tick()debugprint'Got Click2'local function dragExit()if tick( -)-aU<0.25 then ToggleMinimize()else aG=true if D.Value then ToggleMinimize()end -end end local aV,aY=nil,au local function dragpoll(aZ,a_)if not D.Value then if -not aV then aV=AbsoluteToPercent(aZ,a_).Y end local a0,a1=AbsoluteToPercent(aZ, -a_).Y,nil a1=math.min(math.max(aY+(a0-aV),-1),-1+(#ai*I.Size.Y.Scale))au=a1 -UpdateMinimize()w.Size=UDim2.new(w.Size.X.Scale,0,(au+v.Size.Y.Scale),0)w. +function()local aN=tick()debugprint'Got Click2'local function dragExit()if tick( +)-aN<0.25 then ToggleMinimize()else aF=true if D.Value then ToggleMinimize()end +end end local aU,aX=nil,at local function dragpoll(aY,aZ)if not D.Value then if +not aU then aU=AbsoluteToPercent(aY,aZ).Y end local a_,a0=AbsoluteToPercent(aY, +aZ).Y,nil a0=math.min(math.max(aX+(a_-aU),-1),-1+(#ai*I.Size.Y.Scale))at=a0 +UpdateMinimize()w.Size=UDim2.new(w.Size.X.Scale,0,(at+v.Size.Y.Scale),0)w. Position=UDim2.new(w.Position.X.Scale,0,1-w.Size.Y.Scale,0)UpdateScrollBarSize() UpdateScrollPosition()UpdateScrollBarVisibility()end end Spawn(function() WaitForClick(i,dragpoll,dragExit)end)end)end E.Value=false D.Value=false E. Changed:connect(UpdateMaximize)D.Changed:connect(UpdateMinimize)s. -MouseButton1Down:connect(function()if(time()-ak1 do aY -=aY-1 aV.FontSize=aU[aY]wait(0.2)end o.FontSize=aV.FontSize aV:Destroy()end)end -i.Changed:connect(UpdateHeaderNameSize)function LeaderstatsAdded(aV)local aY=aV[ -'Player']for aZ,a_ in pairs(aY.leaderstats:GetChildren())do StatAdded(a_,aV)end -aY.leaderstats.ChildAdded:connect(function(a0)StatAdded(a0,aV)end)aY.leaderstats -.ChildRemoved:connect(function(a0)StatRemoved(a0,aV)end)end function -LeaderstatsRemoved(aV,aY)while ax do debugprint('waiting to insert '..aY[ -'Player'].Name)wait(3.333333333333333E-2)end ax=true RemoveAllStats(aY)ax=false -end function ClosePopUpPanel()if av then local aV=av['Frame']Spawn(function() -TweenProperty(aV,'BackgroundTransparency',0.5,1,c)end)end A:TweenPosition(UDim2. -new(1,0,0,0),'Out','Linear',c,true)wait(0.1)aB=false av=nil end function -InitMovingPanel(aV,aY)z.Parent=i if A then A:Destroy()end A=B:Clone()A.Parent=z -local aZ,a_=2,GetFriendStatus(aY)debugprint(tostring(a_))local a0,a1=aM and g. -PersonalServerRank>=aL['Admin']and g.PersonalServerRank>aw.PersonalServerRank, -MakePopupButton(A,'Report Player',0)a1.MouseButton1Click:connect(function() -OpenAbuseDialog()end)local a2=MakePopupButton(A,'Friend',1,not a0 and a_~=Enum. -FriendStatus.FriendRequestReceived)a2.MouseButton1Click:connect( -OnFriendButtonSelect)if a_==Enum.FriendStatus.Friend then a2:FindFirstChild -'ButtonText'.Text='UnFriend Player'elseif a_==Enum.FriendStatus.Unknown or a_== -Enum.FriendStatus.NotFriend then a2:FindFirstChild'ButtonText'.Text= -'Send Request'elseif a_==Enum.FriendStatus.FriendRequestSent then a2: -FindFirstChild'ButtonText'.Text='Revoke Request'elseif a_==Enum.FriendStatus. -FriendRequestReceived then a2:FindFirstChild'ButtonText'.Text='Accept Friend' -local a3=MakePopupButton(A,'Decline Friend',2,not a0)a3.MouseButton1Click: -connect(OnFriendRefuseButtonSelect)aZ=aZ+1 end if a0 then local a3,a4,a5,a6= -MakePopupButton(A,'Ban',aZ),MakePopupButton(A,'Visitor',aZ+1),MakePopupButton(A, -'Member',aZ+2),MakePopupButton(A,'Admin',aZ+3,true)a3.MouseButton1Click:connect( -function()OnPrivilegeLevelSelect(aY,aL['Banned'],a3,a4,a5,a6)end)a4. -MouseButton1Click:connect(function()OnPrivilegeLevelSelect(aY,aL['Visitor'],a3, -a4,a5,a6)end)a5.MouseButton1Click:connect(function()OnPrivilegeLevelSelect(aY,aL -['Member'],a3,a4,a5,a6)end)a6.MouseButton1Click:connect(function() -OnPrivilegeLevelSelect(aY,aL['Admin'],a3,a4,a5,a6)end)HighlightMyRank(aw,a3,a4, -a5,a6)end A:TweenPosition(UDim2.new(0,0,0,0),'Out','Linear',c,true)Delay(0, -function()local a3 a3=h.Button1Down:connect(function()a3:disconnect() -ClosePopUpPanel()end)end)local a3=aV['Frame']Spawn(function()while aB do z. -Position=UDim2.new(0,a3.AbsolutePosition.X-z.Size.X.Offset,0,a3.AbsolutePosition -.Y)wait()end end)end function OnPlayerEntrySelect(aV,aY,aZ)if not aB then av=aV -aw=aV['Player']StartDrag(aV,aY,aZ)end end function ActivatePlayerEntryPanel(aV) -aV['Frame'].BackgroundColor3=Color3.new(0,1,1)Spawn(function()TweenProperty(aV[ -'Frame'],'BackgroundTransparency',1,0.5,0.5)end)aB=true InitMovingPanel(aV,aV[ +local aN={'Size8','Size9','Size10','Size11','Size12','Size14','Size24','Size36', +'Size48'}function ChangeHeaderName(aU)o.Text=aU UpdateHeaderNameSize()end +function UpdateHeaderNameSize()local aU=o:Clone()aU.Position=UDim2.new(2,0,2,0) +aU.Parent=i local aX=7 aU.FontSize=aN[aX]Delay(0.2,function()while aU.TextBounds +.x==0 do wait(3.333333333333333E-2)end while aU.TextBounds.x-aq.X.Offset>1 do aX +=aX-1 aU.FontSize=aN[aX]wait(0.2)end o.FontSize=aU.FontSize aU:Destroy()end)end +i.Changed:connect(UpdateHeaderNameSize)function LeaderstatsAdded(aU)local aX=aU[ +'Player']for aY,aZ in pairs(aX.leaderstats:GetChildren())do StatAdded(aZ,aU)end +aX.leaderstats.ChildAdded:connect(function(a_)StatAdded(a_,aU)end)aX.leaderstats +.ChildRemoved:connect(function(a_)StatRemoved(a_,aU)end)end function +LeaderstatsRemoved(aU,aX)while aw do debugprint('waiting to insert '..aX[ +'Player'].Name)wait(3.333333333333333E-2)end aw=true RemoveAllStats(aX)aw=false +end function ClosePopUpPanel()if au then local aU=au['Frame']Spawn(function() +TweenProperty(aU,'BackgroundTransparency',0.5,1,c)end)end A:TweenPosition(UDim2. +new(1,0,0,0),'Out','Linear',c,true)wait(0.1)aA=false au=nil end function +InitMovingPanel(aU,aX)z.Parent=i if A then A:Destroy()end A=B:Clone()A.Parent=z +local aY,aZ=2,GetFriendStatus(aX)debugprint(tostring(aZ))local a_,a0=aL and g. +PersonalServerRank>=aK['Admin']and g.PersonalServerRank>av.PersonalServerRank, +MakePopupButton(A,'Report Player',0)a0.MouseButton1Click:connect(function() +OpenAbuseDialog()end)local a1=MakePopupButton(A,'Friend',1,not a_ and aZ~=Enum. +FriendStatus.FriendRequestReceived)a1.MouseButton1Click:connect( +OnFriendButtonSelect)if aZ==Enum.FriendStatus.Friend then a1:FindFirstChild +'ButtonText'.Text='UnFriend Player'elseif aZ==Enum.FriendStatus.Unknown or aZ== +Enum.FriendStatus.NotFriend then a1:FindFirstChild'ButtonText'.Text= +'Send Request'elseif aZ==Enum.FriendStatus.FriendRequestSent then a1: +FindFirstChild'ButtonText'.Text='Revoke Request'elseif aZ==Enum.FriendStatus. +FriendRequestReceived then a1:FindFirstChild'ButtonText'.Text='Accept Friend' +local a2=MakePopupButton(A,'Decline Friend',2,not a_)a2.MouseButton1Click: +connect(OnFriendRefuseButtonSelect)aY=aY+1 end if a_ then local a2,a3,a4,a5= +MakePopupButton(A,'Ban',aY),MakePopupButton(A,'Visitor',aY+1),MakePopupButton(A, +'Member',aY+2),MakePopupButton(A,'Admin',aY+3,true)a2.MouseButton1Click:connect( +function()OnPrivilegeLevelSelect(aX,aK['Banned'],a2,a3,a4,a5)end)a3. +MouseButton1Click:connect(function()OnPrivilegeLevelSelect(aX,aK['Visitor'],a2, +a3,a4,a5)end)a4.MouseButton1Click:connect(function()OnPrivilegeLevelSelect(aX,aK +['Member'],a2,a3,a4,a5)end)a5.MouseButton1Click:connect(function() +OnPrivilegeLevelSelect(aX,aK['Admin'],a2,a3,a4,a5)end)HighlightMyRank(av,a2,a3, +a4,a5)end A:TweenPosition(UDim2.new(0,0,0,0),'Out','Linear',c,true)Delay(0, +function()local a2 a2=h.Button1Down:connect(function()a2:disconnect() +ClosePopUpPanel()end)end)local a2=aU['Frame']Spawn(function()while aA do z. +Position=UDim2.new(0,a2.AbsolutePosition.X-z.Size.X.Offset,0,a2.AbsolutePosition +.Y)wait()end end)end function OnPlayerEntrySelect(aU,aX,aY)if not aA then au=aU +av=aU['Player']StartDrag(aU,aX,aY)end end function ActivatePlayerEntryPanel(aU) +aU['Frame'].BackgroundColor3=Color3.new(0,1,1)Spawn(function()TweenProperty(aU[ +'Frame'],'BackgroundTransparency',1,0.5,0.5)end)aA=true InitMovingPanel(aU,aU[ 'Player'])end function PlayerListModeUpdate()RecreateScoreColumns(ae)table.sort( -ae,PlayerSortFunction)for aV,aY in ipairs(ae)do ah[aV]=aY['Frame']end for aZ=#ae -+1,#ah,1 do ah[aZ]=nil end UpdateMinimize()end function InsertPlayerFrame(aV) -while ax do debugprint('waiting to insert '..aV.Name)wait(3.333333333333333E-2) -end ax=true local aY=H:Clone()WaitForChild(WaitForChild(aY,'TitleFrame'),'Title' -).Text=aV.Name aY.Position=UDim2.new(1,0,(#ah*aY.Size.Y.Scale),0)local aZ= -GetFriendStatus(aV)aY:FindFirstChild'BCLabel'.Image=getMembershipTypeIcon(aV. -MembershipType,aV.Name)aY:FindFirstChild'FriendLabel'.Image=getFriendStatusIcon( -aZ)aY.Name=aV.Name WaitForChild(WaitForChild(aY,'TitleFrame'),'Title').Text=aV. -Name aY.FriendLabel.Position=aY.FriendLabel.Position+UDim2.new(0,17,0,0)aY. -TitleFrame.Title.Position=aY.TitleFrame.Title.Position+UDim2.new(0,17,0,0)if aY: -FindFirstChild'FriendLabel'.Image~=''then aY.TitleFrame.Title.Position=aY. -TitleFrame.Title.Position+UDim2.new(0,17,0,0)end if aV.Name==g.Name then aY. -TitleFrame.Title.Font='ArialBold'aY.PlayerScore.Font='ArialBold' -ChangeHeaderName(aV.Name)local a_=aY.TitleFrame.Title:Clone()a_.TextColor3= -Color3.new(0,0,0)a_.TextTransparency=0 a_.ZIndex=2 a_.Position=aY.TitleFrame. -Title.Position+UDim2.new(0,1,0,1)a_.Name='DropShadow'a_.Parent=aY.TitleFrame end -aY.TitleFrame.Title.Font='ArialBold'aY.Parent=y aY:TweenPosition(UDim2.new(0.5,0 -,(#ah*aY.Size.Y.Scale),0),'Out','Linear',c,true)UpdateMinimize()local a_={}a_[ -'Frame']=aY a_['Player']=aV a_['ID']=ad ad=ad+1 table.insert(ae,a_)if#af~=0 then -if aV.Neutral then a_['MyTeam']=nil if not ag then AddNeutralTeam()else -AddPlayerToTeam(ag,a_)end else local a0=false for a1,a2 in ipairs(af)do if a2[ -'MyTeam'].TeamColor==aV.TeamColor then AddPlayerToTeam(a2,a_)a_['MyTeam']=a2 a0= -true end end if not a0 then a_['MyTeam']=nil if not ag then AddNeutralTeam()else -AddPlayerToTeam(ag,a_)end a_['MyTeam']=ag end end end if aV:FindFirstChild -'leaderstats'then LeaderstatsAdded(a_)end aV.ChildAdded:connect(function(a0)if -a0.Name=='leaderstats'then while ax do debugprint'in adding leaderstats lock' -wait(3.333333333333333E-2)end ax=true LeaderstatsAdded(a_)ax=false end end)aV. -ChildRemoved:connect(function(a0)if aV==g and a0.Name=='leaderstats'then -LeaderstatsRemoved(a0,a_)end end)aV.Changed:connect(function(a0)PlayerChanged(a_ -,a0)end)local a0=WaitForChild(aY,'ClickListener')a0.Active=true a0. -MouseButton1Down:connect(function(a1,a2)OnPlayerEntrySelect(a_,a1,a2)end) -AddMiddleBGFrame()BaseUpdate()ax=false end function RemovePlayerFrame(aV)while -ax do debugprint'in removing player frame lock'wait(3.333333333333333E-2)end ax= -true local aY for aZ,a_ in ipairs(ae)do if aV==a_['Player']then if z.Parent==a_[ -'Frame']then z.Parent=nil end a_['Frame']:Destroy()aY=a_['MyTeam']table.remove( -ae,aZ)end end if aY then for a0,a1 in ipairs(aY['MyPlayers'])do if a1['Player'] -==aV then RemovePlayerFromTeam(aY,a0)end end end RemoveMiddleBGFrame() -UpdateMinimize()BaseUpdate()ax=false end f.ChildRemoved:connect( -RemovePlayerFrame)function UnrollTeams(aV,aY)local aZ=0 if ag and not ag[ -'IsHidden']then for a_,a0 in ipairs(ag['MyPlayers'])do aZ=aZ+1 aY[aZ]=a0['Frame' -]end aZ=aZ+1 aY[aZ]=ag['Frame']end for a_,a0 in ipairs(aV)do if not a0[ -'IsHidden']then for a1,a2 in ipairs(a0.MyPlayers)do aZ=aZ+1 aY[aZ]=a2['Frame'] -end aZ=aZ+1 aY[aZ]=a0['Frame']end end for a1=aZ+1,#aY,1 do aY[a1]=nil end end -function TeamSortFunc(aV,aY)if aV['TeamScore']==aY['TeamScore']then return aV[ -'ID']0 -then debugprint(aV['Player'].Name..'could not find team')aV['MyTeam']=nil if not -ag then AddNeutralTeam()else AddPlayerToTeam(ag,aV)end end end function -PlayerChanged(aV,aY)while aC do debugprint'in playerchanged lock'wait( -3.333333333333333E-2)end aC=true if aY=='Neutral'then if aV['Player'].Neutral -and#(game.Teams:GetTeams())>0 then debugprint(aV['Player'].Name.. -'setting to neutral')FindRemovePlayerFromTeam(aV)aV['MyTeam']=nil if not ag then -debugprint(aV['Player'].Name..'creating neutral team')AddNeutralTeam()else -debugprint(aV['Player'].Name..'adding to neutral team')AddPlayerToTeam(ag,aV)end -elseif#(game.Teams:GetTeams())>0 then debugprint(aV['Player'].Name.. -'has been set non-neutral')SetPlayerToTeam(aV)end BaseUpdate()elseif aY== -'TeamColor'and not aV['Player'].Neutral and aV['Player']~=aV['MyTeam']then -debugprint(aV['Player'].Name..'setting to new team')SetPlayerToTeam(aV) -BaseUpdate()elseif aY=='Name'or aY=='MembershipType'then aV['Frame']: -FindFirstChild'BCLabel'.Image=getMembershipTypeIcon(aV['Player'].MembershipType, -aV['Player'].Name)aV['Frame'].Name=aV['Player'].Name aV['Frame'].TitleFrame. -Title.Text=aV['Player'].Name if aV['Frame'].BCLabel.Image~=''then aV['Frame']. -TitleFrame.Title.Position=UDim2.new(0.01,30,0.1,0)end if aV['Player']==g then aV -['Frame'].TitleFrame.DropShadow.Text=aV['Player'].Name ChangeHeaderName(aV[ -'Player'].Name)end BaseUpdate()end aC=false end function OnFriendshipChanged(aV, -aY)Delay(0.5,function()debugprint('friend status changed for:'..aV.Name..' '.. -tostring(aY)..' vs '..tostring(GetFriendStatus(aV)))for aZ,a_ in ipairs(ae)do if -a_['Player']==aV then local a0=getFriendStatusIcon(aY)if a0==''and a_['Frame']. -FriendLabel.Image~=''then a_['Frame'].TitleFrame.Title.Position=a_['Frame']. -TitleFrame.Title.Position-UDim2.new(0,17,0,0)elseif a0~=''and a_['Frame']. -FriendLabel.Image==''then a_['Frame'].TitleFrame.Title.Position=a_['Frame']. -TitleFrame.Title.Position+UDim2.new(0,17,0,0)debugprint('confirmed status:'..aV. -Name)end a_['Frame'].FriendLabel.Image=a0 return end end end)end g. +AddTeamScores(ag)end UnrollTeams(af,ah)end function AddTeamScores(aU)for aX=1,# +ac,1 do local aY,aZ=ac[aX],0 for a_,a0 in ipairs(aU['MyPlayers'])do local a1=a0[ +'Player']:FindFirstChild'leaderstats'and a0['Player'].leaderstats: +FindFirstChild(aY['Name'])if a1 and not a1:IsA'StringValue'then aZ=aZ+ +GetScoreValue((a0['Player'].leaderstats)[aY['Name']])end end if aU['Frame']: +FindFirstChild(aY['Name'])then aU['Frame'][aY['Name']].Text=tostring(aZ)end end +UpdateMinimize()end function FindRemovePlayerFromTeam(aU)if aU['MyTeam']then for +aX,aY in ipairs(aU['MyTeam']['MyPlayers'])do if aY['Player']==aU['Player']then +RemovePlayerFromTeam(aU['MyTeam'],aX)return end end elseif ag then for aX,aY in +ipairs(ag['MyPlayers'])do if aY['Player']==aU['Player']then +RemovePlayerFromTeam(ag,aX)return end end end end function RemovePlayerFromTeam( +aU,aX)table.remove(aU['MyPlayers'],aX)if aU==ag and#aU['MyPlayers']==0 then +RemoveNeutralTeam()end end function AddPlayerToTeam(aU,aX) +FindRemovePlayerFromTeam(aX)table.insert(aU['MyPlayers'],aX)aX['MyTeam']=aU if +aU['IsHidden']then aU['Frame'].Parent=y AddMiddleBGFrame()end aU['IsHidden']= +false end function SetPlayerToTeam(aU)FindRemovePlayerFromTeam(aU)local aX=false +for aY,aZ in ipairs(af)do if aZ['MyTeam'].TeamColor==aU['Player'].TeamColor then +AddPlayerToTeam(aZ,aU)aX=true end end if not aX and#(game.Teams:GetTeams())>0 +then debugprint(aU['Player'].Name..'could not find team')aU['MyTeam']=nil if not +ag then AddNeutralTeam()else AddPlayerToTeam(ag,aU)end end end function +PlayerChanged(aU,aX)while aB do debugprint'in playerchanged lock'wait( +3.333333333333333E-2)end aB=true if aX=='Neutral'then if aU['Player'].Neutral +and#(game.Teams:GetTeams())>0 then debugprint(aU['Player'].Name.. +'setting to neutral')FindRemovePlayerFromTeam(aU)aU['MyTeam']=nil if not ag then +debugprint(aU['Player'].Name..'creating neutral team')AddNeutralTeam()else +debugprint(aU['Player'].Name..'adding to neutral team')AddPlayerToTeam(ag,aU)end +elseif#(game.Teams:GetTeams())>0 then debugprint(aU['Player'].Name.. +'has been set non-neutral')SetPlayerToTeam(aU)end BaseUpdate()elseif aX== +'TeamColor'and not aU['Player'].Neutral and aU['Player']~=aU['MyTeam']then +debugprint(aU['Player'].Name..'setting to new team')SetPlayerToTeam(aU) +BaseUpdate()elseif aX=='Name'or aX=='MembershipType'then aU['Frame']: +FindFirstChild'BCLabel'.Image=getMembershipTypeIcon(aU['Player'].MembershipType, +aU['Player'].Name)aU['Frame'].Name=aU['Player'].Name aU['Frame'].TitleFrame. +Title.Text=aU['Player'].Name if aU['Frame'].BCLabel.Image~=''then aU['Frame']. +TitleFrame.Title.Position=UDim2.new(0.01,30,0.1,0)end if aU['Player']==g then aU +['Frame'].TitleFrame.DropShadow.Text=aU['Player'].Name ChangeHeaderName(aU[ +'Player'].Name)end BaseUpdate()end aB=false end function OnFriendshipChanged(aU, +aX)Delay(0.5,function()debugprint('friend status changed for:'..aU.Name..' '.. +tostring(aX)..' vs '..tostring(GetFriendStatus(aU)))for aY,aZ in ipairs(ae)do if +aZ['Player']==aU then local a_=getFriendStatusIcon(aX)if a_==''and aZ['Frame']. +FriendLabel.Image~=''then aZ['Frame'].TitleFrame.Title.Position=aZ['Frame']. +TitleFrame.Title.Position-UDim2.new(0,17,0,0)elseif a_~=''and aZ['Frame']. +FriendLabel.Image==''then aZ['Frame'].TitleFrame.Title.Position=aZ['Frame']. +TitleFrame.Title.Position+UDim2.new(0,17,0,0)debugprint('confirmed status:'..aU. +Name)end aZ['Frame'].FriendLabel.Image=a_ return end end end)end g. FriendStatusChanged:connect(OnFriendshipChanged)function AddNeutralTeam()while -aD do debugprint'in neutral team 2 lock'wait()end aD=true local aV=Instance.new -'Team'aV.TeamColor=BrickColor.new'White'aV.Name='Neutral'local aY={}aY['MyTeam'] -=aV aY['MyPlayers']={}aY['Frame']=H:Clone()WaitForChild(WaitForChild(aY['Frame'] -,'TitleFrame'),'Title').Text=aV.Name aY['Frame'].TitleFrame.Position=UDim2.new( -aY['Frame'].TitleFrame.Position.X.Scale,aY['Frame'].TitleFrame.Position.X.Offset -,0.1,0)aY['Frame'].TitleFrame.Size=UDim2.new(aY['Frame'].TitleFrame.Size.X.Scale -,aY['Frame'].TitleFrame.Size.X.Offset,0.8,0)aY['Frame'].TitleFrame.Title.Font= -'ArialBold'aY['Frame'].Position=UDim2.new(1,0,(#ah*aY['Frame'].Size.Y.Scale),0) -WaitForChild(aY['Frame'],'ClickListener').MouseButton1Down:connect(function(aZ, -a_)StartDrag(aY,aZ,a_)end)aY['Frame'].ClickListener.BackgroundColor3=Color3.new( -1,1,1)aY['Frame'].ClickListener.BackgroundTransparency=0.7 aY['Frame']. -ClickListener.AutoButtonColor=false aY['AutoHide']=true aY['IsHidden']=true for -aZ,a_ in pairs(ae)do if a_['Player'].Neutral or not a_['MyTeam']then -AddPlayerToTeam(aY,a_)end end if#aY['MyPlayers']>0 then ag=aY UpdateMinimize() -BaseUpdate()end aD=false end function RemoveNeutralTeam()while aD do debugprint -'in neutral team lock'wait()end aD=true ag['Frame']:Destroy()ag=nil -RemoveMiddleBGFrame()aD=false end function TeamScoreChanged(aV,aY)WaitForChild( -aV['Frame'],'PlayerScore').Text=tostring(aY)aV['TeamScore']=aY end function -TeamChildAdded(aV,aY)if aY.Name=='AutoHide'then aV['AutoHide']=true elseif aY. -Name=='TeamScore'then WaitForChild(aV['Frame'],'PlayerScore').Text=tostring(aY. -Value)aV['TeamScore']=aY.Value aY.Changed:connect(function()TeamScoreChanged(aV, -aY.Value)end)end end function TeamChildRemoved(aV,aY)if aY.Name=='AutoHide'then -aV['AutoHide']=false elseif aY.Name=='TeamScore'then WaitForChild(aV['Frame'], -'PlayerScore').Text=''aV['TeamScore']=nil end end function TeamChanged(aV,aY)if -aY=='Name'then WaitForChild(WaitForChild(aV['Frame'],'TitleFrame'),'Title').Text -=aV['MyTeam'].Name elseif aY=='TeamColor'then aV['Frame'].ClickListener. -BackgroundColor3=aV['MyTeam'].TeamColor.Color for aZ,a_ in pairs(af)do if a_[ -'MyTeam'].TeamColor==aV['MyTeam']then RemoveTeamFrame(aV['MyTeam'])end end aV[ -'MyPlayers']={}for a0,a1 in pairs(ae)do SetPlayerToTeam(a1)end BaseUpdate()end -end function InsertTeamFrame(aV)while ax do debugprint -'in adding team frame lock'wait(3.333333333333333E-2)end ax=true local aY={}aY[ -'MyTeam']=aV aY['MyPlayers']={}aY['Frame']=H:Clone()WaitForChild(WaitForChild(aY -['Frame'],'TitleFrame'),'Title').Text=aV.Name aY['Frame'].TitleFrame.Title.Font= -'ArialBold'aY['Frame'].TitleFrame.Title.FontSize='Size18'aY['Frame'].TitleFrame. -Position=UDim2.new(aY['Frame'].TitleFrame.Position.X.Scale,aY['Frame']. -TitleFrame.Position.X.Offset,0.1,0)aY['Frame'].TitleFrame.Size=UDim2.new(aY[ -'Frame'].TitleFrame.Size.X.Scale,aY['Frame'].TitleFrame.Size.X.Offset,0.8,0)aY[ -'Frame'].Position=UDim2.new(1,0,(#ah*aY['Frame'].Size.Y.Scale),0)WaitForChild(aY -['Frame'],'ClickListener').MouseButton1Down:connect(function(a0,a1)StartDrag(aY, -a0,a1)end)aY['Frame'].ClickListener.BackgroundColor3=aV.TeamColor.Color aY[ -'Frame'].ClickListener.BackgroundTransparency=0.7 aY['Frame'].ClickListener. -AutoButtonColor=false ad=ad+1 aY['ID']=ad aY['AutoHide']=false if aV: -FindFirstChild'AutoHide'then aY['AutoHide']=true end if aV:FindFirstChild -'TeamScore'then TeamChildAdded(aY,aV.TeamScore)end aV.ChildAdded:connect( -function(a0)TeamChildAdded(aY,a0)end)aV.ChildRemoved:connect(function(a0) -TeamChildRemoved(aY,a0)end)aV.Changed:connect(function(a0)TeamChanged(aY,a0)end) -for a0,a1 in pairs(ae)do if not a1['Player'].Neutral and a1['Player'].TeamColor -==aV.TeamColor then AddPlayerToTeam(aY,a1)end end aY['IsHidden']=false if not aY -['AutoHide']or#aY['MyPlayers']>0 then aY['Frame'].Parent=y aY['Frame']: -TweenPosition(UDim2.new(0.5,0,(#ah*aY['Frame'].Size.Y.Scale),0),'Out','Linear',c -,true)AddMiddleBGFrame()else aY['IsHidden']=true aY['Frame'].Parent=nil end -table.insert(af,aY)UpdateMinimize()BaseUpdate()if#af==1 and not ag then -AddNeutralTeam()end ax=false end function RemoveTeamFrame(aV)while ax do -debugprint'in removing team frame lock'wait(3.333333333333333E-2)end ax=true -local aY for a0,a1 in ipairs(af)do if aV==a1['MyTeam']then aY=a1 a1['Frame']: -Destroy()table.remove(af,a0)end end if#af==0 then debugprint -'removeteamframe, remove neutral'if ag then RemoveNeutralTeam()end end for a2,a3 -in ipairs(aY['MyPlayers'])do RemovePlayerFromTeam(aY,a2)PlayerChanged(a3, -'TeamColor')end RemoveMiddleBGFrame()BaseUpdate()ax=false end function TeamAdded -(aV)InsertTeamFrame(aV)end function TeamRemoved(aV)RemoveTeamFrame(aV)end -function BaseUpdate()while az do debugprint'in baseupdate lock'wait( -3.333333333333333E-2)end az=true UpdateStatNames()if#af==0 and not ag then -PlayerListModeUpdate()else TeamListModeUpdate()end for aV,aY in ipairs(ah)do if -aY.Parent~=nil then aY:TweenPosition(UDim2.new(0.5,0,((#ah-aV)*aY.Size.Y.Scale), +aC do debugprint'in neutral team 2 lock'wait()end aC=true local aU=Instance.new +'Team'aU.TeamColor=BrickColor.new'White'aU.Name='Neutral'local aX={}aX['MyTeam'] +=aU aX['MyPlayers']={}aX['Frame']=H:Clone()WaitForChild(WaitForChild(aX['Frame'] +,'TitleFrame'),'Title').Text=aU.Name aX['Frame'].TitleFrame.Position=UDim2.new( +aX['Frame'].TitleFrame.Position.X.Scale,aX['Frame'].TitleFrame.Position.X.Offset +,0.1,0)aX['Frame'].TitleFrame.Size=UDim2.new(aX['Frame'].TitleFrame.Size.X.Scale +,aX['Frame'].TitleFrame.Size.X.Offset,0.8,0)aX['Frame'].TitleFrame.Title.Font= +'ArialBold'aX['Frame'].Position=UDim2.new(1,0,(#ah*aX['Frame'].Size.Y.Scale),0) +WaitForChild(aX['Frame'],'ClickListener').MouseButton1Down:connect(function(aY, +aZ)StartDrag(aX,aY,aZ)end)aX['Frame'].ClickListener.BackgroundColor3=Color3.new( +1,1,1)aX['Frame'].ClickListener.BackgroundTransparency=0.7 aX['Frame']. +ClickListener.AutoButtonColor=false aX['AutoHide']=true aX['IsHidden']=true for +aY,aZ in pairs(ae)do if aZ['Player'].Neutral or not aZ['MyTeam']then +AddPlayerToTeam(aX,aZ)end end if#aX['MyPlayers']>0 then ag=aX UpdateMinimize() +BaseUpdate()end aC=false end function RemoveNeutralTeam()while aC do debugprint +'in neutral team lock'wait()end aC=true ag['Frame']:Destroy()ag=nil +RemoveMiddleBGFrame()aC=false end function TeamScoreChanged(aU,aX)WaitForChild( +aU['Frame'],'PlayerScore').Text=tostring(aX)aU['TeamScore']=aX end function +TeamChildAdded(aU,aX)if aX.Name=='AutoHide'then aU['AutoHide']=true elseif aX. +Name=='TeamScore'then WaitForChild(aU['Frame'],'PlayerScore').Text=tostring(aX. +Value)aU['TeamScore']=aX.Value aX.Changed:connect(function()TeamScoreChanged(aU, +aX.Value)end)end end function TeamChildRemoved(aU,aX)if aX.Name=='AutoHide'then +aU['AutoHide']=false elseif aX.Name=='TeamScore'then WaitForChild(aU['Frame'], +'PlayerScore').Text=''aU['TeamScore']=nil end end function TeamChanged(aU,aX)if +aX=='Name'then WaitForChild(WaitForChild(aU['Frame'],'TitleFrame'),'Title').Text +=aU['MyTeam'].Name elseif aX=='TeamColor'then aU['Frame'].ClickListener. +BackgroundColor3=aU['MyTeam'].TeamColor.Color for aY,aZ in pairs(af)do if aZ[ +'MyTeam'].TeamColor==aU['MyTeam']then RemoveTeamFrame(aU['MyTeam'])end end aU[ +'MyPlayers']={}for a_,a0 in pairs(ae)do SetPlayerToTeam(a0)end BaseUpdate()end +end function InsertTeamFrame(aU)while aw do debugprint +'in adding team frame lock'wait(3.333333333333333E-2)end aw=true local aX={}aX[ +'MyTeam']=aU aX['MyPlayers']={}aX['Frame']=H:Clone()WaitForChild(WaitForChild(aX +['Frame'],'TitleFrame'),'Title').Text=aU.Name aX['Frame'].TitleFrame.Title.Font= +'ArialBold'aX['Frame'].TitleFrame.Title.FontSize='Size18'aX['Frame'].TitleFrame. +Position=UDim2.new(aX['Frame'].TitleFrame.Position.X.Scale,aX['Frame']. +TitleFrame.Position.X.Offset,0.1,0)aX['Frame'].TitleFrame.Size=UDim2.new(aX[ +'Frame'].TitleFrame.Size.X.Scale,aX['Frame'].TitleFrame.Size.X.Offset,0.8,0)aX[ +'Frame'].Position=UDim2.new(1,0,(#ah*aX['Frame'].Size.Y.Scale),0)WaitForChild(aX +['Frame'],'ClickListener').MouseButton1Down:connect(function(a_,a0)StartDrag(aX, +a_,a0)end)aX['Frame'].ClickListener.BackgroundColor3=aU.TeamColor.Color aX[ +'Frame'].ClickListener.BackgroundTransparency=0.7 aX['Frame'].ClickListener. +AutoButtonColor=false ad=ad+1 aX['ID']=ad aX['AutoHide']=false if aU: +FindFirstChild'AutoHide'then aX['AutoHide']=true end if aU:FindFirstChild +'TeamScore'then TeamChildAdded(aX,aU.TeamScore)end aU.ChildAdded:connect( +function(a_)TeamChildAdded(aX,a_)end)aU.ChildRemoved:connect(function(a_) +TeamChildRemoved(aX,a_)end)aU.Changed:connect(function(a_)TeamChanged(aX,a_)end) +for a_,a0 in pairs(ae)do if not a0['Player'].Neutral and a0['Player'].TeamColor +==aU.TeamColor then AddPlayerToTeam(aX,a0)end end aX['IsHidden']=false if not aX +['AutoHide']or#aX['MyPlayers']>0 then aX['Frame'].Parent=y aX['Frame']: +TweenPosition(UDim2.new(0.5,0,(#ah*aX['Frame'].Size.Y.Scale),0),'Out','Linear',c +,true)AddMiddleBGFrame()else aX['IsHidden']=true aX['Frame'].Parent=nil end +table.insert(af,aX)UpdateMinimize()BaseUpdate()if#af==1 and not ag then +AddNeutralTeam()end aw=false end function RemoveTeamFrame(aU)while aw do +debugprint'in removing team frame lock'wait(3.333333333333333E-2)end aw=true +local aX for a_,a0 in ipairs(af)do if aU==a0['MyTeam']then aX=a0 a0['Frame']: +Destroy()table.remove(af,a_)end end if#af==0 then debugprint +'removeteamframe, remove neutral'if ag then RemoveNeutralTeam()end end for a1,a2 +in ipairs(aX['MyPlayers'])do RemovePlayerFromTeam(aX,a1)PlayerChanged(a2, +'TeamColor')end RemoveMiddleBGFrame()BaseUpdate()aw=false end function TeamAdded +(aU)InsertTeamFrame(aU)end function TeamRemoved(aU)RemoveTeamFrame(aU)end +function BaseUpdate()while ay do debugprint'in baseupdate lock'wait( +3.333333333333333E-2)end ay=true UpdateStatNames()if#af==0 and not ag then +PlayerListModeUpdate()else TeamListModeUpdate()end for aU,aX in ipairs(ah)do if +aX.Parent~=nil then aX:TweenPosition(UDim2.new(0.5,0,((#ah-aU)*aX.Size.Y.Scale), 0),'Out','Linear',c,true)end end if not D.Value and#ah>_ then UpdateScrollPosition()end UpdateMinimize()UpdateScrollBarSize() -UpdateScrollPosition()UpdateScrollBarVisibility()az=false end game.GuiService: -AddKey'\t'local aV=time()game.GuiService.KeyPressed:connect(function(aY)if aY== -'\t'then debugprint'caught tab key'local a2,a3=pcall(function()return game. -GuiService.IsModalDialog end)if a2==false or(a2 and a3==false)then if time()-aV> -0.4 then aV=time()if F.Value then if not E.Value then i:TweenPosition(UDim2.new( +UpdateScrollPosition()UpdateScrollBarVisibility()ay=false end game.GuiService: +AddKey'\t'local aU=time()game.GuiService.KeyPressed:connect(function(aX)if aX== +'\t'then debugprint'caught tab key'local a1,a2=pcall(function()return game. +GuiService.IsModalDialog end)if a1==false or(a1 and a2==false)then if time()-aU> +0.4 then aU=time()if F.Value then if not E.Value then i:TweenPosition(UDim2.new( 0,0,0,0),'Out','Linear',c*1.2,true)E.Value=true else i:TweenPosition(UDim2.new( -ar.X.Scale,ar.X.Offset-10,0,0),'Out','Linear',c*1.2,true)E.Value=false D.Value= -true end else ToggleMaximize()end end end end end)function PlayersChildAdded(aY) -if aY:IsA'Player'then Spawn(function()debugPlayerAdd(aY)end)else -BlowThisPopsicleStand()end end function coreGuiChanged(aY,a2)if aY==Enum. -CoreGuiType.All or aY==Enum.CoreGuiType.PlayerList then j.Visible=a2 end end -function TeamsChildAdded(aY)if aY:IsA'Team'then TeamAdded(aY)else -BlowThisPopsicleStand()end end function TeamsChildRemoved(aY)if aY:IsA'Team'then -TeamRemoved(aY)else BlowThisPopsicleStand()end end function debugPlayerAdd(aY) -InsertPlayerFrame(aY)end pcall(function()coreGuiChanged(Enum.CoreGuiType. +aq.X.Scale,aq.X.Offset-10,0,0),'Out','Linear',c*1.2,true)E.Value=false D.Value= +true end else ToggleMaximize()end end end end end)function PlayersChildAdded(aX) +if aX:IsA'Player'then Spawn(function()debugPlayerAdd(aX)end)else +BlowThisPopsicleStand()end end function coreGuiChanged(aX,a1)if aX==Enum. +CoreGuiType.All or aX==Enum.CoreGuiType.PlayerList then j.Visible=a1 end end +function TeamsChildAdded(aX)if aX:IsA'Team'then TeamAdded(aX)else +BlowThisPopsicleStand()end end function TeamsChildRemoved(aX)if aX:IsA'Team'then +TeamRemoved(aX)else BlowThisPopsicleStand()end end function debugPlayerAdd(aX) +InsertPlayerFrame(aX)end pcall(function()coreGuiChanged(Enum.CoreGuiType. PlayerList,Game.StarterGui:GetCoreGuiEnabled(Enum.CoreGuiType.PlayerList))Game. StarterGui.CoreGuiChangedSignal:connect(coreGuiChanged)end)while not game: GetService'Teams'do wait(3.333333333333333E-2)debugprint'Waiting For Teams'end -for aY,a2 in pairs(game.Teams:GetTeams())do TeamAdded(a2)end for a3,a4 in pairs( -f:GetPlayers())do Spawn(function()debugPlayerAdd(a4)end)end game.Teams. +for aX,a1 in pairs(game.Teams:GetTeams())do TeamAdded(a1)end for a2,a3 in pairs( +f:GetPlayers())do Spawn(function()debugPlayerAdd(a3)end)end game.Teams. ChildAdded:connect(TeamsChildAdded)game.Teams.ChildRemoved:connect( TeamsChildRemoved)f.ChildAdded:connect(PlayersChildAdded)InitReportAbuse()G. -Value=true BaseUpdate()wait(2)aM=not not game.Workspace:FindFirstChild +Value=true BaseUpdate()wait(2)aL=not not game.Workspace:FindFirstChild 'PSVariable'if g.Name=='newplayerlistisbad'or g.Name=='imtotallyadmin'then V. -Parent=i Spawn(function()while true do local a5=''for a6,a7 in pairs(game. -Players:GetPlayers())do a5=a5..' '..a7.Name end W.Text=a5 wait(0.5)end end)end \ No newline at end of file +Parent=i Spawn(function()while true do local a4=''for a5,a6 in pairs(game. +Players:GetPlayers())do a4=a4..' '..a6.Name end W.Text=a4 wait(0.5)end end)end \ No newline at end of file diff --git a/processed/53878057.lua b/processed/53878057.lua index a67ae7c..fcbb6b6 100644 --- a/processed/53878057.lua +++ b/processed/53878057.lua @@ -18,225 +18,223 @@ LocalPlayer waitForChild(i,'PlayerGui')Spawn(function()moveHealthBar(i.PlayerGui 'Humanoid')j.Died:connect(function()f.Visible=false end)waitForChild(game, 'LocalBackpack')game.LocalBackpack:SetOldSchoolBackpack(false)waitForChild(a. Parent,'Backpack')local k=a.Parent.Backpack local l=waitForChild(k, -'CoreScripts/BackpackScripts/BackpackManager')local m,n,o,p,q,r=waitForChild(l, +'CoreScripts/BackpackScripts/BackpackManager')local m,n,o,p,q=waitForChild(l, 'BackpackOpenEvent'),waitForChild(l,'BackpackCloseEvent'),waitForChild(l, -'TabClickedEvent'),waitForChild(l,'ResizeEvent'),true,10 if d.AbsoluteSize.Y<= -320 then r=4 end local s,t,u,v=nil,nil,false,1.18 local w,x,y,z,A,B,C=UDim2.new( -1*v,0,1*v,0),UDim2.new(1,0,1,0),true,0.5,false,{},{}for D=1,r do C[D]='empty'end -local D=false local function backpackIsOpen()if k then return k.Visible end -return false end local function kill(E,F,G)if F then F:disconnect()end if E== -true and G then reorganizeLoadout(G,false)end end function registerNumberKeys() -for E=0,9 do game:GetService'GuiService':AddKey(tostring(E))end end function -unregisterNumberKeys()pcall(function()for E=0,9 do game:GetService'GuiService': -RemoveKey(tostring(E))end end)end function characterInWorkspace()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 end end end end return false end function removeGear(E) -local F=nil for G=1,#C do if C[G]==E and E.Parent~=nil then F=G break end end if -F then if C[F].GearReference.Value then if C[F].GearReference.Value.Parent==game -.Players.LocalPlayer.Character then C[F].GearReference.Value.Parent=game.Players -.LocalPlayer.Backpack end if C[F].GearReference.Value:IsA'HopperBin'and C[F]. -GearReference.Value.Active then C[F].GearReference.Value:Disable()C[F]. -GearReference.Value.Active=false end end C[F]='empty'delay(0,function()E:remove( -)end)Spawn(function()while backpackIsOpen()do wait(0.03)end waitForChild(i, -'Backpack')local G=true for H=1,#C do if C[H]~='empty'then G=false end end if G -then if#i.Backpack:GetChildren()<1 then f.Visible=false else f.Position=UDim2. -new(0.5,-60,1,-44)end h.Visible=false end end)end end function insertGear(E,F) -local G=nil if not F then for H=1,#C do if C[H]=='empty'then G=H break end end -if G==1 and C[1]~='empty'then E:remove()return end else G=F local H=1 for I=1,#C -do if C[I]=='empty'then H=I break end end for I=H,G+1,-1 do C[I]=C[I-1]if I==10 -then C[I].SlotNumber.Text='0'C[I].SlotNumberDownShadow.Text='0'C[I]. -SlotNumberUpShadow.Text='0'else C[I].SlotNumber.Text=I C[I].SlotNumberDownShadow -.Text=I C[I].SlotNumberUpShadow.Text=I end end end C[G]=E if G~=r then if type( -tostring(G))=='string'then local H=tostring(G)E.SlotNumber.Text=H E. -SlotNumberDownShadow.Text=H E.SlotNumberUpShadow.Text=H end else E.SlotNumber. -Text='0'E.SlotNumberDownShadow.Text='0'E.SlotNumberUpShadow.Text='0'end E. -Visible=true local H=nil H=E.Kill.Changed:connect(function(I)kill(I,H,E)end)end -function reorganizeLoadout(E,F,G,H)if F then insertGear(E,H)else removeGear(E) -end if E~='empty'then E.ZIndex=1 end end function checkToolAncestry(E,F)if E: -FindFirstChild'RobloxBuildTool'then return end if E:IsA'Tool'or E:IsA'HopperBin' -then for G=1,#C do if C[G]~='empty'and C[G].GearReference.Value==E then if F== -nil then C[G].Kill.Value=true return false elseif E.Parent==i.Character then C[G -].Selected=true return true elseif E.Parent==i.Backpack then if E:IsA'Tool'or E: -IsA'HopperBin'then C[G].Selected=false end return true else C[G].Kill.Value=true -return false end return true end end end end function removeAllEquippedGear(E) -local F=i.Character:GetChildren()for G=1,#F do if(F[G]:IsA'Tool'or F[G]:IsA -'HopperBin')and F[G]~=E then if F[G]:IsA'Tool'then F[G].Parent=i.Backpack end if -F[G]:IsA'HopperBin'then F[G]:Disable()end end end end function hopperBinSwitcher -(E,F)if not F then return end F:ToggleSelect()if C[E]=='empty'then return end if -not F.Active then C[E].Selected=false normalizeButton(C[E])else C[E].Selected= -true enlargeButton(C[E])end end function toolSwitcher(E)if not C[E]then return -end local F=C[E].GearReference.Value if F==nil then return end -removeAllEquippedGear(F)local G=E if E==0 then G=10 end for H=1,#C do if C[H]and -C[H]~='empty'and H~=G then normalizeButton(C[H])C[H].Selected=false if C[H]. -GearReference and C[H].GearReference.Value and C[H].GearReference.Value:IsA -'HopperBin'and C[H].GearReference.Value.Active then C[H].GearReference.Value: -ToggleSelect()end end end if F:IsA'HopperBin'then hopperBinSwitcher(E,F)else if -F.Parent==i.Character then F.Parent=i.Backpack if C[E]~='empty'then C[E]. -Selected=false normalizeButton(C[E])end else F.Parent=i.Character C[E].Selected= -true enlargeButton(C[E])end end end function activateGear(E)local F=nil if E== -'0'then F=10 else F=tonumber(E)end if F==nil then return end if C[F]~='empty' -then toolSwitcher(F)end end enlargeButton=function(E)if E.Size.Y.Scale>1 then -return end if not E.Parent then return end if not E.Selected then return end for -F=1,#C do if C[F]=='empty'then break end if C[F]~=E then normalizeButton(C[F]) -end end if not y then return end if E:FindFirstChild'Highlight'then E.Highlight. -Visible=true end if E:IsA'ImageButton'or E:IsA'TextButton'then E.ZIndex=5 local -F,G=-(w.X.Scale-E.Size.X.Scale)/2,-(w.Y.Scale-E.Size.Y.Scale)/2 E: -TweenSizeAndPosition(w,UDim2.new(E.Position.X.Scale+F,E.Position.X.Offset,E. -Position.Y.Scale+G,E.Position.Y.Offset),Enum.EasingDirection.Out,Enum. -EasingStyle.Quad,z/5,y)end end normalizeAllButtons=function()for E=1,#C do if C[ -E]=='empty'then break end if C[E]~=button then normalizeButton(C[E],0.1)end end -end normalizeButton=function(E,F)if not E then return end if E.Size.Y.Scale<=1 -then return end if E.Selected then return end if not E.Parent then return end -local G=F if G==nil or type(G)~='number'then G=z/5 end if E:FindFirstChild -'Highlight'then E.Highlight.Visible=false end if E:IsA'ImageButton'or E:IsA -'TextButton'then E.ZIndex=1 local H,I,J=1/v,-(x.X.Scale-E.Size.X.Scale)/2,-(x.Y. -Scale-E.Size.Y.Scale)/2 E:TweenSizeAndPosition(x,UDim2.new(E.Position.X.Scale+I, -E.Position.X.Offset,E.Position.Y.Scale+J,E.Position.Y.Offset),Enum. -EasingDirection.Out,Enum.EasingStyle.Quad,G,y)end end local E=function()while u -do wait()end end function pointInRectangle(F,G,H)if F.x>G.x and F.x<(G.x+H.x) -then if F.y>G.y and F.y<(G.y+H.y)then return true end end return false end -function swapGear(F,G)local H=G:GetChildren()if#H==1 then if H[1]:FindFirstChild -'SlotNumber'then local I,J=tonumber(H[1].SlotNumber.Text),tonumber(F.SlotNumber. -Text)if I==0 then I=10 end if J==0 then J=10 end C[I]=F C[J]=H[1]H[1].SlotNumber -.Text=F.SlotNumber.Text H[1].SlotNumberDownShadow.Text=F.SlotNumber.Text H[1]. -SlotNumberUpShadow.Text=F.SlotNumber.Text local K=string.sub(G.Name,5)F. -SlotNumber.Text=K F.SlotNumberDownShadow.Text=K F.SlotNumberUpShadow.Text=K F. -Position=UDim2.new(F.Position.X.Scale,0,F.Position.Y.Scale,0)H[1].Position=UDim2 -.new(H[1].Position.X.Scale,0,H[1].Position.Y.Scale,0)H[1].Parent=F.Parent F. -Parent=G end else local I=tonumber(F.SlotNumber.Text)if I==0 then I=10 end C[I]= -'empty'local J=string.sub(G.Name,5)F.SlotNumber.Text=J F.SlotNumberDownShadow. -Text=J F.SlotNumberUpShadow.Text=J local K=tonumber(F.SlotNumber.Text)if K==0 -then K=10 end C[K]=F F.Position=UDim2.new(F.Position.X.Scale,0,F.Position.Y. -Scale,0)F.Parent=G end end function resolveDrag(F,G,H)local I,J=Vector2.new(G,H) -,F.Parent local K=J.Parent:GetChildren()for L=1,#K do if K[L]:IsA'Frame'then if -pointInRectangle(I,K[L].AbsolutePosition,K[L].AbsoluteSize)then swapGear(F,K[L]) -return true end end end if G(J.AbsolutePosition.x+J. -AbsoluteSize.x)then reorganizeLoadout(F,false)return false elseif H(J.AbsolutePosition.y+J.AbsoluteSize.y)then -reorganizeLoadout(F,false)return false else if dragBeginPos then F.Position= -dragBeginPos end return-1 end end function unequipAllItems(F)for G=1,#C do if C[ -G]=='empty'then break end if C[G].GearReference.Value and C[G].GearReference. -Value~=F then if C[G].GearReference.Value:IsA'HopperBin'then C[G].GearReference. -Value:Disable()elseif C[G].GearReference.Value:IsA'Tool'then C[G].GearReference. -Value.Parent=game.Players.LocalPlayer.Backpack end C[G].Selected=false end end -end function showToolTip(F,G)if F and F:FindFirstChild'ToolTipLabel'and F. -ToolTipLabel:IsA'TextLabel'and not IsTouchDevice()then F.ToolTipLabel.Text= -tostring(G)local H=F.ToolTipLabel.TextBounds.X+6 F.ToolTipLabel.Size=UDim2.new(0 -,H,0,20)F.ToolTipLabel.Position=UDim2.new(0.5,-H/2,0,-30)F.ToolTipLabel.Visible= -true end end function hideToolTip(F,G)if F and F:FindFirstChild'ToolTipLabel'and -F.ToolTipLabel:IsA'TextLabel'then F.ToolTipLabel.Visible=false end end local F= -function(F,G,H,I)E()u=true if F:FindFirstChild'RobloxBuildTool'then u=false -return end if not F:IsA'Tool'then if not F:IsA'HopperBin'then u=false return end -end if not H then for J=1,#C do if C[J]~='empty'and C[J].GearReference.Value==F -then u=false return end end end local J=a.TempSlot:clone()J.Name=F.Name J. -GearImage.Image=F.TextureId if J.GearImage.Image==''then J.GearText.Text=F.Name -end J.GearReference.Value=F J.MouseEnter:connect(function()if J.GearReference -and J.GearReference.Value['ToolTip']and J.GearReference.Value.ToolTip~=''then -showToolTip(J,J.GearReference.Value.ToolTip)end end)J.MouseLeave:connect( -function()if J.GearReference and J.GearReference.Value['ToolTip']and J. -GearReference.Value.ToolTip~=''then hideToolTip(J,J.GearReference.Value.ToolTip) -end end)J.RobloxLocked=true local K=-1 if not H then for L=1,#C do if C[L]== -'empty'then K=L break end end else K=H end if K==-1 then u=false return end -local L=K%10 local M=a:FindFirstChild('Slot'..tostring(L))J.Parent=M if I then -local N,O=I.AbsolutePosition,J.AbsolutePosition local P=N-O J.Position=UDim2. -new(J.Position.X.Scale,P.x,J.Position.Y.Scale,P.y)J.ZIndex=4 end if H then -reorganizeLoadout(J,true,G,H)else reorganizeLoadout(J,true)end if J.Parent==nil -then u=false return end if G then J.Selected=true unequipAllItems(F)delay(z+0.01 -,function()if J:FindFirstChild'GearReference'and((J.GearReference.Value:IsA -'Tool'and J.GearReference.Value.Parent==i.Character)or(J.GearReference.Value:IsA -'HopperBin'and J.GearReference.Value.Active==true))then enlargeButton(J)end end) -end local N,O,P,Q,R,S,T=nil,nil O=J.MouseButton1Click:connect(function()if -characterInWorkspace()then if not J.Draggable then activateGear(J.SlotNumber. -Text)end end end)Q=J.MouseEnter:connect(function()if k.Visible then J.Draggable= -true end end)T=J.DragBegin:connect(function(U)N=U J.ZIndex=7 local V=J: -GetChildren()for W=1,#V do if V[W]:IsA'TextLabel'then if string.find(V[W].Name, -'Shadow')then V[W].ZIndex=8 else V[W].ZIndex=9 end elseif V[W]:IsA'Frame'or V[W] -:IsA'ImageLabel'then V[W].ZIndex=7 end end end)S=J.DragStopped:connect(function( -U,V)if J.Selected then J.ZIndex=4 else J.ZIndex=3 end local W=J:GetChildren()for -X=1,#W do if W[X]:IsA'TextLabel'then if string.find(W[X].Name,'Shadow')then W[X] -.ZIndex=3 else W[X].ZIndex=4 end elseif W[X]:IsA'Frame'or W[X]:IsA'ImageLabel' -then W[X].ZIndex=2 end end resolveDrag(J,U,V)end)R=J.MouseLeave:connect(function -()J.Draggable=false end)P=J.AncestryChanged:connect(function()if J.Parent and J. -Parent.Parent==a then return end if O then O:disconnect()end if P then P: -disconnect()end if Q then Q:disconnect()end if R then R:disconnect()end if S -then S:disconnect()end if T then T:disconnect()end end)local U,V=nil,nil U=F. -AncestryChanged:connect(function(W,X)if not checkToolAncestry(W,X)then if U then -U:disconnect()end if V then V:disconnect()end removeFromInventory(F)elseif X== -game.Players.LocalPlayer.Backpack then normalizeButton(J)end end)V=F.Changed: -connect(function(W)if W=='Name'then if J and J.GearImage.Image==''then J. -GearText.Text=F.Name end elseif W=='Active'then if F and F:IsA'HopperBin'then if -not F.Active then J.Selected=false normalizeButton(J)end end elseif W== -'TextureId'then J.GearImage.Image=F.TextureId end end)u=false Spawn(function() -while backpackIsOpen()do wait(0.03)end for W=1,#C do if C[W]~='empty'then f. +'TabClickedEvent'),true,10 if d.AbsoluteSize.Y<=320 then q=4 end local r,s,t,u= +nil,nil,false,1.18 local v,w,x,y,z,A,B=UDim2.new(1*u,0,1*u,0),UDim2.new(1,0,1,0) +,true,0.5,false,{},{}for C=1,q do B[C]='empty'end local C=false local function +backpackIsOpen()if k then return k.Visible end return false end local function +kill(D,E,F)if E then E:disconnect()end if D==true and F then reorganizeLoadout(F +,false)end end function registerNumberKeys()for D=0,9 do game:GetService +'GuiService':AddKey(tostring(D))end end function unregisterNumberKeys()pcall( +function()for D=0,9 do game:GetService'GuiService':RemoveKey(tostring(D))end end +)end function characterInWorkspace()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 end end +end end return false end function removeGear(D)local E=nil for F=1,#B do if B[F] +==D and D.Parent~=nil then E=F break end end if E then if B[E].GearReference. +Value then if B[E].GearReference.Value.Parent==game.Players.LocalPlayer. +Character then B[E].GearReference.Value.Parent=game.Players.LocalPlayer.Backpack +end if B[E].GearReference.Value:IsA'HopperBin'and B[E].GearReference.Value. +Active then B[E].GearReference.Value:Disable()B[E].GearReference.Value.Active= +false end end B[E]='empty'delay(0,function()D:remove()end)Spawn(function()while +backpackIsOpen()do wait(0.03)end waitForChild(i,'Backpack')local F=true for G=1, +#B do if B[G]~='empty'then F=false end end if F then if#i.Backpack:GetChildren() +<1 then f.Visible=false else f.Position=UDim2.new(0.5,-60,1,-44)end h.Visible= +false end end)end end function insertGear(D,E)local F=nil if not E then for G=1, +#B do if B[G]=='empty'then F=G break end end if F==1 and B[1]~='empty'then D: +remove()return end else F=E local G=1 for H=1,#B do if B[H]=='empty'then G=H +break end end for H=G,F+1,-1 do B[H]=B[H-1]if H==10 then B[H].SlotNumber.Text= +'0'B[H].SlotNumberDownShadow.Text='0'B[H].SlotNumberUpShadow.Text='0'else B[H]. +SlotNumber.Text=H B[H].SlotNumberDownShadow.Text=H B[H].SlotNumberUpShadow.Text= +H end end end B[F]=D if F~=q then if type(tostring(F))=='string'then local G= +tostring(F)D.SlotNumber.Text=G D.SlotNumberDownShadow.Text=G D. +SlotNumberUpShadow.Text=G end else D.SlotNumber.Text='0'D.SlotNumberDownShadow. +Text='0'D.SlotNumberUpShadow.Text='0'end D.Visible=true local G=nil G=D.Kill. +Changed:connect(function(H)kill(H,G,D)end)end function reorganizeLoadout(D,E,F,G +)if E then insertGear(D,G)else removeGear(D)end if D~='empty'then D.ZIndex=1 end +end function checkToolAncestry(D,E)if D:FindFirstChild'RobloxBuildTool'then +return end if D:IsA'Tool'or D:IsA'HopperBin'then for F=1,#B do if B[F]~='empty' +and B[F].GearReference.Value==D then if E==nil then B[F].Kill.Value=true return +false elseif D.Parent==i.Character then B[F].Selected=true return true elseif D. +Parent==i.Backpack then if D:IsA'Tool'or D:IsA'HopperBin'then B[F].Selected= +false end return true end B[F].Kill.Value=true return false end end end end +function removeAllEquippedGear(D)local E=i.Character:GetChildren()for F=1,#E do +if(E[F]:IsA'Tool'or E[F]:IsA'HopperBin')and E[F]~=D then if E[F]:IsA'Tool'then E +[F].Parent=i.Backpack end if E[F]:IsA'HopperBin'then E[F]:Disable()end end end +end function hopperBinSwitcher(D,E)if not E then return end E:ToggleSelect()if B +[D]=='empty'then return end if not E.Active then B[D].Selected=false +normalizeButton(B[D])else B[D].Selected=true enlargeButton(B[D])end end function +toolSwitcher(D)if not B[D]then return end local E=B[D].GearReference.Value if E +==nil then return end removeAllEquippedGear(E)local F=D if D==0 then F=10 end +for G=1,#B do if B[G]and B[G]~='empty'and G~=F then normalizeButton(B[G])B[G]. +Selected=false if B[G].GearReference and B[G].GearReference.Value and B[G]. +GearReference.Value:IsA'HopperBin'and B[G].GearReference.Value.Active then B[G]. +GearReference.Value:ToggleSelect()end end end if E:IsA'HopperBin'then +hopperBinSwitcher(D,E)else if E.Parent==i.Character then E.Parent=i.Backpack if +B[D]~='empty'then B[D].Selected=false normalizeButton(B[D])end else E.Parent=i. +Character B[D].Selected=true enlargeButton(B[D])end end end function +activateGear(D)local E=nil if D=='0'then E=10 else E=tonumber(D)end if E==nil +then return end if B[E]~='empty'then toolSwitcher(E)end end enlargeButton= +function(D)if D.Size.Y.Scale>1 then return end if not D.Parent then return end +if not D.Selected then return end for E=1,#B do if B[E]=='empty'then break end +if B[E]~=D then normalizeButton(B[E])end end if not x then return end if D: +FindFirstChild'Highlight'then D.Highlight.Visible=true end if D:IsA'ImageButton' +or D:IsA'TextButton'then D.ZIndex=5 local E,F=-(v.X.Scale-D.Size.X.Scale)/2,-(v. +Y.Scale-D.Size.Y.Scale)/2 D:TweenSizeAndPosition(v,UDim2.new(D.Position.X.Scale+ +E,D.Position.X.Offset,D.Position.Y.Scale+F,D.Position.Y.Offset),Enum. +EasingDirection.Out,Enum.EasingStyle.Quad,y/5,x)end end normalizeAllButtons= +function()for D=1,#B do if B[D]=='empty'then break end if B[D]~=button then +normalizeButton(B[D],0.1)end end end normalizeButton=function(D,E)if not D then +return end if D.Size.Y.Scale<=1 then return end if D.Selected then return end if +not D.Parent then return end local F=E if F==nil or type(F)~='number'then F=y/5 +end if D:FindFirstChild'Highlight'then D.Highlight.Visible=false end if D:IsA +'ImageButton'or D:IsA'TextButton'then D.ZIndex=1 local G,H=-(w.X.Scale-D.Size.X. +Scale)/2,-(w.Y.Scale-D.Size.Y.Scale)/2 D:TweenSizeAndPosition(w,UDim2.new(D. +Position.X.Scale+G,D.Position.X.Offset,D.Position.Y.Scale+H,D.Position.Y.Offset) +,Enum.EasingDirection.Out,Enum.EasingStyle.Quad,F,x)end end local D=function() +while t do wait()end end function pointInRectangle(E,F,G)if E.x>F.x and E.x<(F.x ++G.x)then if E.y>F.y and E.y<(F.y+G.y)then return true end end return false end +function swapGear(E,F)local G=F:GetChildren()if#G==1 then if G[1]:FindFirstChild +'SlotNumber'then local H,I=tonumber(G[1].SlotNumber.Text),tonumber(E.SlotNumber. +Text)if H==0 then H=10 end if I==0 then I=10 end B[H]=E B[I]=G[1]G[1].SlotNumber +.Text=E.SlotNumber.Text G[1].SlotNumberDownShadow.Text=E.SlotNumber.Text G[1]. +SlotNumberUpShadow.Text=E.SlotNumber.Text local J=string.sub(F.Name,5)E. +SlotNumber.Text=J E.SlotNumberDownShadow.Text=J E.SlotNumberUpShadow.Text=J E. +Position=UDim2.new(E.Position.X.Scale,0,E.Position.Y.Scale,0)G[1].Position=UDim2 +.new(G[1].Position.X.Scale,0,G[1].Position.Y.Scale,0)G[1].Parent=E.Parent E. +Parent=F end else local H=tonumber(E.SlotNumber.Text)if H==0 then H=10 end B[H]= +'empty'local I=string.sub(F.Name,5)E.SlotNumber.Text=I E.SlotNumberDownShadow. +Text=I E.SlotNumberUpShadow.Text=I local J=tonumber(E.SlotNumber.Text)if J==0 +then J=10 end B[J]=E E.Position=UDim2.new(E.Position.X.Scale,0,E.Position.Y. +Scale,0)E.Parent=F end end function resolveDrag(E,F,G)local H,I=Vector2.new(F,G) +,E.Parent local J=I.Parent:GetChildren()for K=1,#J do if J[K]:IsA'Frame'then if +pointInRectangle(H,J[K].AbsolutePosition,J[K].AbsoluteSize)then swapGear(E,J[K]) +return true end end end if(F(I.AbsolutePosition.x+I. +AbsoluteSize.x))or(G(I.AbsolutePosition.y+I. +AbsoluteSize.y))then reorganizeLoadout(E,false)return false else if dragBeginPos +then E.Position=dragBeginPos end return-1 end end function unequipAllItems(E)for +F=1,#B do if B[F]=='empty'then break end if B[F].GearReference.Value and B[F]. +GearReference.Value~=E then if B[F].GearReference.Value:IsA'HopperBin'then B[F]. +GearReference.Value:Disable()elseif B[F].GearReference.Value:IsA'Tool'then B[F]. +GearReference.Value.Parent=game.Players.LocalPlayer.Backpack end B[F].Selected= +false end end end function showToolTip(E,F)if E and E:FindFirstChild +'ToolTipLabel'and E.ToolTipLabel:IsA'TextLabel'and not IsTouchDevice()then E. +ToolTipLabel.Text=tostring(F)local G=E.ToolTipLabel.TextBounds.X+6 E. +ToolTipLabel.Size=UDim2.new(0,G,0,20)E.ToolTipLabel.Position=UDim2.new(0.5,-G/2, +0,-30)E.ToolTipLabel.Visible=true end end function hideToolTip(E,F)if E and E: +FindFirstChild'ToolTipLabel'and E.ToolTipLabel:IsA'TextLabel'then E.ToolTipLabel +.Visible=false end end local E=function(E,F,G,H)D()t=true if E:FindFirstChild +'RobloxBuildTool'then t=false return end if not E:IsA'Tool'then if not E:IsA +'HopperBin'then t=false return end end if not G then for I=1,#B do if B[I]~= +'empty'and B[I].GearReference.Value==E then t=false return end end end local I=a +.TempSlot:clone()I.Name=E.Name I.GearImage.Image=E.TextureId if I.GearImage. +Image==''then I.GearText.Text=E.Name end I.GearReference.Value=E I.MouseEnter: +connect(function()if I.GearReference and I.GearReference.Value['ToolTip']and I. +GearReference.Value.ToolTip~=''then showToolTip(I,I.GearReference.Value.ToolTip) +end end)I.MouseLeave:connect(function()if I.GearReference and I.GearReference. +Value['ToolTip']and I.GearReference.Value.ToolTip~=''then hideToolTip(I,I. +GearReference.Value.ToolTip)end end)I.RobloxLocked=true local J=-1 if not G then +for K=1,#B do if B[K]=='empty'then J=K break end end else J=G end if J==-1 then +t=false return end local K=J%10 local L=a:FindFirstChild('Slot'..tostring(K))I. +Parent=L if H then local M,N=H.AbsolutePosition,I.AbsolutePosition local O=M-N I +.Position=UDim2.new(I.Position.X.Scale,O.x,I.Position.Y.Scale,O.y)I.ZIndex=4 end +if G then reorganizeLoadout(I,true,F,G)else reorganizeLoadout(I,true)end if I. +Parent==nil then t=false return end if F then I.Selected=true unequipAllItems(E) +delay(y+0.01,function()if I:FindFirstChild'GearReference'and((I.GearReference. +Value:IsA'Tool'and I.GearReference.Value.Parent==i.Character)or(I.GearReference. +Value:IsA'HopperBin'and I.GearReference.Value.Active==true))then enlargeButton(I +)end end)end local M,N,O,P,Q,R,S=nil,nil N=I.MouseButton1Click:connect(function( +)if characterInWorkspace()then if not I.Draggable then activateGear(I.SlotNumber +.Text)end end end)P=I.MouseEnter:connect(function()if k.Visible then I.Draggable +=true end end)S=I.DragBegin:connect(function(T)M=T I.ZIndex=7 local U=I: +GetChildren()for V=1,#U do if U[V]:IsA'TextLabel'then if string.find(U[V].Name, +'Shadow')then U[V].ZIndex=8 else U[V].ZIndex=9 end elseif U[V]:IsA'Frame'or U[V] +:IsA'ImageLabel'then U[V].ZIndex=7 end end end)R=I.DragStopped:connect(function( +T,U)if I.Selected then I.ZIndex=4 else I.ZIndex=3 end local V=I:GetChildren()for +W=1,#V do if V[W]:IsA'TextLabel'then if string.find(V[W].Name,'Shadow')then V[W] +.ZIndex=3 else V[W].ZIndex=4 end elseif V[W]:IsA'Frame'or V[W]:IsA'ImageLabel' +then V[W].ZIndex=2 end end resolveDrag(I,T,U)end)Q=I.MouseLeave:connect(function +()I.Draggable=false end)O=I.AncestryChanged:connect(function()if I.Parent and I. +Parent.Parent==a then return end if N then N:disconnect()end if O then O: +disconnect()end if P then P:disconnect()end if Q then Q:disconnect()end if R +then R:disconnect()end if S then S:disconnect()end end)local T,U=nil,nil T=E. +AncestryChanged:connect(function(V,W)if not checkToolAncestry(V,W)then if T then +T:disconnect()end if U then U:disconnect()end removeFromInventory(E)elseif W== +game.Players.LocalPlayer.Backpack then normalizeButton(I)end end)U=E.Changed: +connect(function(V)if V=='Name'then if I and I.GearImage.Image==''then I. +GearText.Text=E.Name end elseif V=='Active'then if E and E:IsA'HopperBin'then if +not E.Active then I.Selected=false normalizeButton(I)end end elseif V== +'TextureId'then I.GearImage.Image=E.TextureId end end)t=false Spawn(function() +while backpackIsOpen()do wait(0.03)end for V=1,#B do if B[V]~='empty'then f. Position=UDim2.new(0.5,-60,1,-108)if c then f.Visible=true h.Visible=true end -end end end)end function addToInventory(G)if not G:IsA'Tool'or not G:IsA -'HopperBin'then return end local H=nil for I=1,#B do if B[I]and B[I]==G then -return end if not B[I]then H=I end end if H then B[H]=G elseif#B<1 then B[1]=G -else B[#B+1]=G end end function removeFromInventory(G)for H=1,#B do if B[H]==G -then table.remove(B,H)B[H]=nil end end end local G,H=function()loadoutChildren=a -:GetChildren()for G=1,#loadoutChildren do if loadoutChildren[G]:IsA'Frame'then -loadoutChildren[G].BackgroundTransparency=0.5 local H=tonumber(string.sub( -loadoutChildren[G].Name,5))if H==0 then H=10 end if d.AbsoluteSize.Y<=320 then -loadoutChildren[G]:TweenPosition(UDim2.new(0,(H-1)*60,0,0),Enum.EasingDirection. -Out,Enum.EasingStyle.Quad,0.25,true)else loadoutChildren[G]:TweenPosition(UDim2. -new((H-1)/10,0,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.Quad,0.25,true)end -end end end,function()loadoutChildren=a:GetChildren()local G,H={},nil for I=1,# -loadoutChildren do if loadoutChildren[I]:IsA'Frame'then if#loadoutChildren[I]: -GetChildren()>0 then if loadoutChildren[I].Name=='Slot0'then H=loadoutChildren[I -]else table.insert(G,loadoutChildren[I])end end loadoutChildren[I]. -BackgroundTransparency=1 end end if H then table.insert(G,H)end local I=(1-(#G* -0.1))/2 for J=1,#G do if d.AbsoluteSize.Y<=320 then I=(0.5-(#G*0.333)/2)G[J]: -TweenPosition(UDim2.new(I+(J-1)*0.33,0,0,0),Enum.EasingDirection.Out,Enum. -EasingStyle.Quad,0.25,true)else G[J]:TweenPosition(UDim2.new(I+((J-1)*0.1),0,0,0 +end end end)end function addToInventory(F)if not F:IsA'Tool'or not F:IsA +'HopperBin'then return end local G=nil for H=1,#A do if A[H]and A[H]==F then +return end if not A[H]then G=H end end if G then A[G]=F elseif#A<1 then A[1]=F +else A[#A+1]=F end end function removeFromInventory(F)for G=1,#A do if A[G]==F +then table.remove(A,G)A[G]=nil end end end local F,G=function()loadoutChildren=a +:GetChildren()for F=1,#loadoutChildren do if loadoutChildren[F]:IsA'Frame'then +loadoutChildren[F].BackgroundTransparency=0.5 local G=tonumber(string.sub( +loadoutChildren[F].Name,5))if G==0 then G=10 end if d.AbsoluteSize.Y<=320 then +loadoutChildren[F]:TweenPosition(UDim2.new(0,(G-1)*60,0,0),Enum.EasingDirection. +Out,Enum.EasingStyle.Quad,0.25,true)else loadoutChildren[F]:TweenPosition(UDim2. +new((G-1)/10,0,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.Quad,0.25,true)end +end end end,function()loadoutChildren=a:GetChildren()local F,G={},nil for H=1,# +loadoutChildren do if loadoutChildren[H]:IsA'Frame'then if#loadoutChildren[H]: +GetChildren()>0 then if loadoutChildren[H].Name=='Slot0'then G=loadoutChildren[H +]else table.insert(F,loadoutChildren[H])end end loadoutChildren[H]. +BackgroundTransparency=1 end end if G then table.insert(F,G)end local H=(1-(#F* +0.1))/2 for I=1,#F do if d.AbsoluteSize.Y<=320 then H=(0.5-(#F*0.333)/2)F[I]: +TweenPosition(UDim2.new(H+(I-1)*0.33,0,0,0),Enum.EasingDirection.Out,Enum. +EasingStyle.Quad,0.25,true)else F[I]:TweenPosition(UDim2.new(H+((I-1)*0.1),0,0,0 ),Enum.EasingDirection.Out,Enum.EasingStyle.Quad,0.25,true)end end end function -editLoadout()D=true if q then G()end end function readonlyLoadout()if not q then -H()end end function setupBackpackListener()if t then t:disconnect()t=nil end t=i -.Backpack.ChildAdded:connect(function(I)if not A then A=true if c then f.Visible -=true h.Visible=true end end F(I)addToInventory(I)end)end function -playerCharacterChildAdded(I)F(I,true)addToInventory(I)end function +editLoadout()C=true if p then F()end end function readonlyLoadout()if not p then +G()end end function setupBackpackListener()if s then s:disconnect()s=nil end s=i +.Backpack.ChildAdded:connect(function(H)if not z then z=true if c then f.Visible +=true h.Visible=true end end E(H)addToInventory(H)end)end function +playerCharacterChildAdded(H)E(H,true)addToInventory(H)end function activateLoadout()a.Visible=true end function deactivateLoadout()a.Visible=false -end function tabHandler(I)q=I if I then editLoadout()else readonlyLoadout()end -end function coreGuiChanged(I,J)if I==Enum.CoreGuiType.Backpack or I==Enum. -CoreGuiType.All then f.Visible=J h.Visible=J c=J if J then registerNumberKeys() -else unregisterNumberKeys()end end if I==Enum.CoreGuiType.Health or I==Enum. -CoreGuiType.All then setHealthBarVisible(game.Players.LocalPlayer.PlayerGui,J) +end function tabHandler(H)p=H if H then editLoadout()else readonlyLoadout()end +end function coreGuiChanged(H,I)if H==Enum.CoreGuiType.Backpack or H==Enum. +CoreGuiType.All then f.Visible=I h.Visible=I c=I if I then registerNumberKeys() +else unregisterNumberKeys()end end if H==Enum.CoreGuiType.Health or H==Enum. +CoreGuiType.All then setHealthBarVisible(game.Players.LocalPlayer.PlayerGui,I) end end registerNumberKeys()pcall(function()coreGuiChanged(Enum.CoreGuiType. Backpack,Game.StarterGui:GetCoreGuiEnabled(Enum.CoreGuiType.Backpack)) coreGuiChanged(Enum.CoreGuiType.Health,Game.StarterGui:GetCoreGuiEnabled(Enum. CoreGuiType.Health))Game.StarterGui.CoreGuiChangedSignal:connect(coreGuiChanged) end)wait()waitForChild(i,'Backpack')waitForProperty(i,'Character')delay(1, -function()local I=i.Backpack:GetChildren()local J=math.min(10,#I)for K=1,J do if -c then f.Visible=true h.Visible=true end F(I[K],false)end setupBackpackListener( -)end)delay(2,function()if not D then if d.AbsoluteSize.Y<=320 then local I=a: -GetChildren()for J=1,#I do local K=tonumber(string.sub(I[J].Name,5,string.len(I[ -J].Name)))if type(K)=='number'then I[J].Position=UDim2.new(0,(K-1)*60,0,0)end -end end end wait(0.25)end)i.ChildAdded:connect(function(I)if I:IsA'PlayerGui' -then moveHealthBar(I)end end)waitForProperty(i,'Character')for I,J in ipairs(i. -Character:GetChildren())do playerCharacterChildAdded(J)end s=i.Character. -ChildAdded:connect(function(K)playerCharacterChildAdded(K)end)waitForChild(i. +function()local H=i.Backpack:GetChildren()local I=math.min(10,#H)for J=1,I do if +c then f.Visible=true h.Visible=true end E(H[J],false)end setupBackpackListener( +)end)delay(2,function()if not C then if d.AbsoluteSize.Y<=320 then local H=a: +GetChildren()for I=1,#H do local J=tonumber(string.sub(H[I].Name,5,string.len(H[ +I].Name)))if type(J)=='number'then H[I].Position=UDim2.new(0,(J-1)*60,0,0)end +end end end wait(0.25)end)i.ChildAdded:connect(function(H)if H:IsA'PlayerGui' +then moveHealthBar(H)end end)waitForProperty(i,'Character')for H,I in ipairs(i. +Character:GetChildren())do playerCharacterChildAdded(I)end r=i.Character. +ChildAdded:connect(function(J)playerCharacterChildAdded(J)end)waitForChild(i. Character,'Humanoid')humanoidDiedCon=i.Character.Humanoid.Died:connect(function( )if humanoidDiedCon then humanoidDiedCon:disconnect()humanoidDiedCon=nil end -deactivateLoadout()if t then t:disconnect()t=nil end D=false end)i. -CharacterRemoving:connect(function()for K=1,#C do if C[K]~='empty'then C[K]. -Parent=nil C[K]='empty'end end end)i.CharacterAdded:connect(function() +deactivateLoadout()if s then s:disconnect()s=nil end C=false end)i. +CharacterRemoving:connect(function()for J=1,#B do if B[J]~='empty'then B[J]. +Parent=nil B[J]='empty'end end end)i.CharacterAdded:connect(function() waitForProperty(game.Players,'LocalPlayer')i=game.Players.LocalPlayer -waitForChild(i,'Backpack')delay(1,function()local K=i.Backpack:GetChildren() -local L=math.min(10,#K)for M=1,L do if c then f.Visible=true h.Visible=true end -F(K[M],false)end setupBackpackListener()end)activateLoadout()if s then s: -disconnect()s=nil end s=i.Character.ChildAdded:connect(function(K)F(K,true)end) +waitForChild(i,'Backpack')delay(1,function()local J=i.Backpack:GetChildren() +local K=math.min(10,#J)for L=1,K do if c then f.Visible=true h.Visible=true end +E(J[L],false)end setupBackpackListener()end)activateLoadout()if r then r: +disconnect()r=nil end r=i.Character.ChildAdded:connect(function(J)E(J,true)end) waitForChild(i.Character,'Humanoid')if g.Visible then m:Fire()end humanoidDiedCon=i.Character.Humanoid.Died:connect(function()if c then f.Visible= -false h.Visible=false end A=false deactivateLoadout()if humanoidDiedCon then -humanoidDiedCon:disconnect()humanoidDiedCon=nil end if t then t:disconnect()t= +false h.Visible=false end z=false deactivateLoadout()if humanoidDiedCon then +humanoidDiedCon:disconnect()humanoidDiedCon=nil end if s then s:disconnect()s= nil end end)waitForChild(i,'PlayerGui')moveHealthBar(i.PlayerGui)delay(2, -function()if not D then if d.AbsoluteSize.Y<=320 then local K=a:GetChildren()for -L=1,#K do local M=tonumber(string.sub(K[L].Name,5,string.len(K[L].Name)))if -type(M)=='number'then K[L].Position=UDim2.new(0,(M-1)*60,0,0)end end end end +function()if not C then if d.AbsoluteSize.Y<=320 then local J=a:GetChildren()for +K=1,#J do local L=tonumber(string.sub(J[K].Name,5,string.len(J[K].Name)))if +type(L)=='number'then J[K].Position=UDim2.new(0,(L-1)*60,0,0)end end end end wait(0.25)end)end)waitForChild(k,'SwapSlot')k.SwapSlot.Changed:connect(function( -)if k.SwapSlot.Value then local K=k.SwapSlot local L=K.Slot.Value if L==0 then L -=10 end if C[L]then reorganizeLoadout(C[L],false)end if K.GearButton.Value then -F(K.GearButton.Value.GearReference.Value,false,L)end k.SwapSlot.Value=false end -end)game:GetService'GuiService'.KeyPressed:connect(function(K)if -characterInWorkspace()then activateGear(K)end end)m.Event:connect(editLoadout)n. -Event:connect(H)o.Event:connect(function(K)tabHandler(K==b)end) \ No newline at end of file +)if k.SwapSlot.Value then local J=k.SwapSlot local K=J.Slot.Value if K==0 then K +=10 end if B[K]then reorganizeLoadout(B[K],false)end if J.GearButton.Value then +E(J.GearButton.Value.GearReference.Value,false,K)end k.SwapSlot.Value=false end +end)game:GetService'GuiService'.KeyPressed:connect(function(J)if +characterInWorkspace()then activateGear(J)end end)m.Event:connect(editLoadout)n. +Event:connect(G)o.Event:connect(function(J)tabHandler(J==b)end) \ No newline at end of file diff --git a/processed/60595411.lua b/processed/60595411.lua index 685836f..043d6f2 100644 --- a/processed/60595411.lua +++ b/processed/60595411.lua @@ -1,154 +1,159 @@ -local a,b,c,d,e,f,g,h,i,j,k,l,m,n={},string,math,table,error,tonumber,tostring, -type,setmetatable,pairs,ipairs,assert,Chipmunk,{buffer={}}function n:New()local -o={}i(o,self)self.__index=self o.buffer={}return o end function n:Append(o)self. -buffer[#self.buffer+1]=o end function n:ToString()return d.concat(self.buffer) -end local o={backslashes={['\b']='\\b',['\t']='\\t',['\n']='\\n',['\f']='\\f',[ -'\r']='\\r',['"']='\\"',['\\']='\\\\',['/']='\\/'}}function o:New()local p={}p. -writer=n:New()i(p,self)self.__index=self return p end function o:Append(p)self. -writer:Append(p)end function o:ToString()return self.writer:ToString()end -function o:Write(p)local q=h(p)if q=='nil'then self:WriteNil()elseif q== -'boolean'or q=='number'then self:WriteString(p)elseif q=='string'then self: -ParseString(p)elseif q=='table'then self:WriteTable(p)elseif q=='function'then -self:WriteFunction(p)elseif q=='thread'or q=='userdata'then self:WriteError(p) -end end function o:WriteNil()self:Append'null'end function o:WriteString(p)self: -Append(g(p))end function o:ParseString(p)self:Append'"'self:Append(b.gsub(p, -'[%z%c\\"/]',function(q)local r=self.backslashes[q]if r then return r end return -b.format('\\u%.4X',b.byte(q))end))self:Append'"'end function o:IsArray(p)local q -,r=0,function(q)if h(q)=='number'and q>0 then if c.floor(q)==q then return true -end end return false end for s,t in j(p)do if not r(s)then return false,'{','}' -else q=c.max(q,s)end end return true,'[',']',q end function o:WriteTable(p)local -q,r,s,t=self:IsArray(p)self:Append(r)if q then for u=1,t do self:Write(p[u])if u -0 then if c.floor(p)==p then return true end +end return false end for r,s in j(o)do if not q(r)then return false,'{','}'else +p=c.max(p,r)end end return true,'[',']',p end function n:WriteTable(o)local p,q, +r,s=self:IsArray(o)self:Append(q)if p then for t=1,s do self:Write(o[t])if t0 then K=G[1]['part']L=G[1]['box']d. -remove(G,1)L.Visible=true else K=H:Clone()K.Archivable=false L=I:Clone()L. -Archivable=false L.Adornee=K L.Parent=A L.Adornee=K L.Parent=A end if J then L. -Color=J end return K,L end function cleanUpAdornments()for J,K in j(F)do if K. -KeepAlive~=C then K.SelectionBox.Visible=false d.insert(G,{part=K.SelectionPart, -box=K.SelectionBox})F[J]=nil end end end function incrementAliveCounter()D=D+1 -if D>1000000 then D=0 end return D end function adornFullCellsInRegion(J,K)local -L,M=J.CFrame.p-(J.Size/2)+Vector3.new(2,2,2),J.CFrame.p+(J.Size/2)-Vector3.new(2 -,2,2)local N,O=x(v,L),x(v,M)C=incrementAliveCounter()for P=N.y,O.y do for Q=N.z, -O.z do for R=N.x,O.x do local S=w(v,R,P,Q)if S~=z then local T,U,V=y(v,R,P,Q), -Vector3int16.new(R,P,Q),false for W,X in j(F)do if W==U then X.KeepAlive=C if K -then X.SelectionBox.Color=K end V=true break end end if not V then local Y,Z= -createAdornment(K)Y.Size=Vector3.new(4,4,4)Y.CFrame=CFrame.new(T)local _={ -SelectionPart=Y,SelectionBox=Z,KeepAlive=C}F[U]=_ end end end end end -cleanUpAdornments()end E=r if t then local J,K=createAdornment(s)J.Size=r.Size J -.CFrame=r.CFrame F.SelectionPart=J F.SelectionBox=K B=function(L,M)if L and L~=E -then E=L J.Size=L.Size J.CFrame=L.CFrame end if M then K.Color=M end end else -adornFullCellsInRegion(r,s)B=function(J,K)if J and J~=E then E=J -adornFullCellsInRegion(J,K)end end end local J=function()B=nil if A then A: -Destroy()end F=nil end return B,J end function a.CreateSignal()local r,s,t={}, -Instance.new'BindableEvent',{}function r:connect(u)if self~=r then e( -'connect must be called with `:`, not `.`',2)end if h(u)~='function'then e( -'Argument #1 of connect must be a function, got a '..h(u),2)end local v=s.Event: -connect(u)t[v]=true local w={}function w:disconnect()v:disconnect()t[v]=nil end -return w end function r:disconnect()if self~=r then e( -'disconnect must be called with `:`, not `.`',2)end for u,v in j(t)do u: -disconnect()t[u]=nil end end function r:wait()if self~=r then e( -'wait must be called with `:`, not `.`',2)end return s.Event:wait()end function -r:fire(...)if self~=r then e('fire must be called with `:`, not `.`',2)end s: -Fire(...)end return r end local function Create_PrivImpl(r)if h(r)~='string'then -e('Argument of Create must be a string',2)end return function(s)s=s or{}local t, -u=Instance.new(r),nil for v,w in j(s)do if h(v)=='string'then t[v]=w elseif h(v) -=='number'then if h(w)~='userdata'then e( +function(q)pcall(function()warn +[[RbxUtility.EncodeJSON is deprecated, please use Game:GetService('HttpService'):JSONEncode() instead.]] +end)return Encode(q)end a.MakeWedge=function(q,r,s,t)return game:GetService +'Terrain':AutoWedgeCell(q,r,s)end a.SelectTerrainRegion=function(q,r,s,t)local u +=game.Workspace:FindFirstChild'Terrain'if not u then return end l(q)l(r)if not +h(q)=='Region3'then e( +[[regionToSelect (first arg), should be of type Region3, but is type]],h(q))end +if not h(r)=='BrickColor'then e( +[[color (second arg), should be of type BrickColor, but is type]],h(r))end local +v,w,x,y,z=u.GetCell,u.WorldToCellPreferSolid,u.CellCenterToWorld,Enum. +CellMaterial.Empty,Instance.new'Model'z.Name='SelectionContainer'z.Archivable= +false if t then z.Parent=t else z.Parent=game.Workspace end local A,B,C,D,E,F,G= +nil,nil,0,nil,{},{},Instance.new'Part'G.Name='SelectionPart'G.Transparency=1 G. +Anchored=true G.Locked=true G.CanCollide=false G.Size=Vector3.new(4.2,4.2,4.2) +local H=Instance.new'SelectionBox'function createAdornment(I)local J,K=nil,nil +if#F>0 then J=F[1]['part']K=F[1]['box']d.remove(F,1)K.Visible=true else J=G: +Clone()J.Archivable=false K=H:Clone()K.Archivable=false K.Adornee=J K.Parent=z K +.Adornee=J K.Parent=z end if I then K.Color=I end return J,K end function +cleanUpAdornments()for I,J in j(E)do if J.KeepAlive~=B then J.SelectionBox. +Visible=false d.insert(F,{part=J.SelectionPart,box=J.SelectionBox})E[I]=nil end +end end function incrementAliveCounter()C=C+1 if C>1000000 then C=0 end return C +end function adornFullCellsInRegion(I,J)local K,L=I.CFrame.p-(I.Size/2)+Vector3. +new(2,2,2),I.CFrame.p+(I.Size/2)-Vector3.new(2,2,2)local M,N=w(u,K),w(u,L)B= +incrementAliveCounter()for O=M.y,N.y do for P=M.z,N.z do for Q=M.x,N.x do local +R=v(u,Q,O,P)if R~=y then local S,T,U=x(u,Q,O,P),Vector3int16.new(Q,O,P),false +for V,W in j(E)do if V==T then W.KeepAlive=B if J then W.SelectionBox.Color=J +end U=true break end end if not U then local X,Y=createAdornment(J)X.Size= +Vector3.new(4,4,4)X.CFrame=CFrame.new(S)local Z={SelectionPart=X,SelectionBox=Y, +KeepAlive=B}E[T]=Z end end end end end cleanUpAdornments()end D=q if s then +local I,J=createAdornment(r)I.Size=q.Size I.CFrame=q.CFrame E.SelectionPart=I E. +SelectionBox=J A=function(K,L)if K and K~=D then D=K I.Size=K.Size I.CFrame=K. +CFrame end if L then J.Color=L end end else adornFullCellsInRegion(q,r)A= +function(I,J)if I and I~=D then D=I adornFullCellsInRegion(I,J)end end end local +I=function()A=nil if z then z:Destroy()end E=nil end return A,I end function a. +CreateSignal()local q,r,s={},Instance.new'BindableEvent',{}function q:connect(t) +if self~=q then e('connect must be called with `:`, not `.`',2)end if h(t)~= +'function'then e('Argument #1 of connect must be a function, got a '..h(t),2)end +local u=r.Event:connect(t)s[u]=true local v={}function v:disconnect()u: +disconnect()s[u]=nil end v.Disconnect=v.disconnect return v end function q: +disconnect()if self~=q then e('disconnect must be called with `:`, not `.`',2) +end for t,u in j(s)do t:disconnect()s[t]=nil end end function q:wait()if self~=q +then e('wait must be called with `:`, not `.`',2)end return r.Event:wait()end +function q:fire(...)if self~=q then e('fire must be called with `:`, not `.`',2) +end r:Fire(...)end q.Connect=q.connect q.Disconnect=q.disconnect q.Wait=q.wait q +.Fire=q.fire return q end local function Create_PrivImpl(q)if h(q)~='string'then +e('Argument of Create must be a string',2)end return function(r)r=r or{}local s, +t,u=Instance.new(q),nil,nil for v,w in j(r)do if h(v)=='string'then if v== +'Parent'then t=w else s[v]=w end elseif h(v)=='number'then if h(w)~='userdata' +then e( [[Bad entry in Create body: Numeric keys must be paired with children, got a: ]] -..h(w),2)end w.Parent=t elseif h(v)=='table'and v.__eventname then if h(w)~= +..h(w),2)end w.Parent=s elseif h(v)=='table'and v.__eventname then if h(w)~= 'function'then e("Bad entry in Create body: Key `[Create.E'"..v.__eventname.. -"']` must have a function value, got: "..g(w),2)end t[v.__eventname]:connect(w) +"']` must have a function value, got: "..g(w),2)end s[v.__eventname]:connect(w) elseif v==a.Create then if h(w)~='function'then e( [[Bad entry in Create body: Key `[Create]` should be paired with a constructor function, got: ]] ..g(w),2)elseif u then e( [[Bad entry in Create body: Only one constructor function is allowed]],2)end u=w else e('Bad entry ('..g(v)..' => '..g(w)..') in Create body',2)end end if u then -u(t)end return t end end a.Create=i({},{__call=function(r,...)return -Create_PrivImpl(...)end})a.Create.E=function(r)return{__eventname=r}end a.Help= -function(r)if r=='DecodeJSON'or r==a.DecodeJSON then return +u(s)end if t then s.Parent=t end return s end end a.Create=i({},{__call=function +(q,...)return Create_PrivImpl(...)end})a.Create.E=function(q)return{__eventname= +q}end a.Help=function(q)if q=='DecodeJSON'or q==a.DecodeJSON then return [[Function DecodeJSON. Arguments: (string). Side effect: returns a table with all parsed JSON values]] -end if r=='EncodeJSON'or r==a.EncodeJSON then return +end if q=='EncodeJSON'or q==a.EncodeJSON then return [[Function EncodeJSON. Arguments: (table). Side effect: returns a string composed of argument table in JSON data format]] -end if r=='MakeWedge'or r==a.MakeWedge then return +end if q=='MakeWedge'or q==a.MakeWedge then return [[Function MakeWedge. Arguments: (x, y, z, [default material]). Description: Makes a wedge at location x, y, z. Sets cell x, y, z to default material if parameter is provided, if not sets cell x, y, z to be whatever material it previously was. Returns true if made a wedge, false if the cell remains a block ]] -end if r=='SelectTerrainRegion'or r==a.SelectTerrainRegion then return +end if q=='SelectTerrainRegion'or q==a.SelectTerrainRegion then return [[Function SelectTerrainRegion. Arguments: (regionToSelect, color, selectEmptyCells, selectionParent). Description: Selects all terrain via a series of selection boxes within the regionToSelect (this should be a region3 value). The selection box color is detemined by the color argument (should be a brickcolor value). SelectionParent is the parent that the selection model gets placed to (optional).SelectEmptyCells is bool, when true will select all cells in the region, otherwise we only select non-empty cells. Returns a function that can update the selection,arguments to said function are a new region3 to select, and the adornment color (color arg is optional). Also returns a second function that takes no arguments and destroys the selection]] -end if r=='CreateSignal'or r==a.CreateSignal then return +end if q=='CreateSignal'or q==a.CreateSignal then return [[Function CreateSignal. Arguments: None. Returns: The newly created Signal object. This object is identical to the RBXScriptSignal class used for events in Objects, but is a Lua-side object so it can be used to create custom events inLua code. Methods of the Signal object: :connect, :wait, :fire, :disconnect. For more info you can pass the method name to the Help function, or view the wiki page for this library. EG: Help('Signal:connect').]] -end if r=='Signal:connect'then return +end if q=='Signal:connect'then return [[Method Signal:connect. Arguments: (function handler). Return: A connection object which can be used to disconnect the connection to this handler. Description: Connectes a handler function to this Signal, so that when |fire| is called the handler function will be called with the arguments passed to |fire|.]] -end if r=='Signal:wait'then return +end if q=='Signal:wait'then return [[Method Signal:wait. Arguments: None. Returns: The arguments passed to the next call to |fire|. Description: This call does not return until the next call to |fire| is made, at which point it will return the values which were passed as arguments to that |fire| call.]] -end if r=='Signal:fire'then return +end if q=='Signal:fire'then return [[Method Signal:fire. Arguments: Any number of arguments of any type. Returns: None. Description: This call will invoke any connected handler functions, and notify any waiting code attached to this Signal to continue, with the arguments passed to this function. Note: The calls to handlers are made asynchronously, so this call will return immediately regardless of how long it takes the connected handler functions to complete.]] -end if r=='Signal:disconnect'then return +end if q=='Signal:disconnect'then return [[Method Signal:disconnect. Arguments: None. Returns: None. Description: This call disconnects all handlers attacched to this function, note however, it does NOT make waiting code continue, as is the behavior of normal Roblox events. This method can also be called on the connection object which is returned from Signal:connect to only disconnect a single handler, as opposed to this method, which will disconnect all handlers.]] -end if r=='Create'then return +end if q=='Create'then return [[Function Create. Arguments: A table containing information about how to construct a collection of objects. Returns: The constructed objects. Descrition: Create is a very powerfull function, whose description is too long to fit here, and is best described via example, please see the wiki page for a description of how to use it.]] end end return a \ No newline at end of file diff --git a/processed/73157242.lua b/processed/73157242.lua index f3d9806..a1670c9 100644 --- a/processed/73157242.lua +++ b/processed/73157242.lua @@ -50,40 +50,38 @@ q=2*l else q=3*m end end return q end local function getBoundingBox2(c)local d,e =Vector3.new(math.huge,math.huge,math.huge),Vector3.new(-math.huge,-math.huge,- math.huge)if c:IsA'Terrain'then d=Vector3.new(-2,-2,-2)e=Vector3.new(2,2,2) elseif c:IsA'BasePart'then d=-0.5*c.Size e=-d else e=c:GetModelSize()*0.5 d=-e -end local f=c:FindFirstChild'Justification'if f~=nil then justify=f.Value two= -Vector3.new(2,2,2)actualBox=e-d-Vector3.new(0.01,0.01,0.01)containingGridBox= -Vector3.new(4*math.ceil(actualBox.x/4),4*math.ceil(actualBox.y/4),4*math.ceil( -actualBox.z/4))adjustment=containingGridBox-actualBox d=d-0.5*adjustment*justify -e=e+0.5*adjustment*(two-justify)end return d,e end local function -getBoundingBoxInWorldCoordinates(c)local d,e=Vector3.new(math.huge,math.huge, -math.huge),Vector3.new(-math.huge,-math.huge,-math.huge)if c:IsA'BasePart'and -not c:IsA'Terrain'then vec1=c.CFrame:pointToWorldSpace(-0.5*c.Size)vec2=c.CFrame -:pointToWorldSpace(0.5*c.Size)d=Vector3.new(math.min(vec1.X,vec2.X),math.min( -vec1.Y,vec2.Y),math.min(vec1.Z,vec2.Z))e=Vector3.new(math.max(vec1.X,vec2.X), -math.max(vec1.Y,vec2.Y),math.max(vec1.Z,vec2.Z))elseif c:IsA'Terrain'then else -vec1=c:GetModelCFrame():pointToWorldSpace(-0.5*c:GetModelSize())vec2=c: -GetModelCFrame():pointToWorldSpace(0.5*c:GetModelSize())d=Vector3.new(math.min( -vec1.X,vec2.X),math.min(vec1.Y,vec2.Y),math.min(vec1.Z,vec2.Z))e=Vector3.new( -math.max(vec1.X,vec2.X),math.max(vec1.Y,vec2.Y),math.max(vec1.Z,vec2.Z))end -return d,e end local function getTargetPartBoundingBox(c)if c.Parent: -FindFirstChild'RobloxModel'~=nil then return getBoundingBox2(c.Parent)else -return getBoundingBox2(c)end end local function getMouseTargetCFrame(c)if c. -Parent:FindFirstChild'RobloxModel'~=nil then if c.Parent:IsA'Tool'then return c. -Parent.Handle.CFrame else return c.Parent:GetModelCFrame()end else return c. -CFrame end end local function isBlocker(c)if not c then return false end if not -c.Parent then return false end if c:FindFirstChild'Humanoid'then return false -end if c:FindFirstChild'RobloxStamper'or c:FindFirstChild'RobloxModel'then -return true end if c:IsA'Part'and not c.CanCollide then return false end if c== -game.Lighting then return false end return isBlocker(c.Parent)end local function -spaceAboveCharacter(c,d,e)local f=game.Workspace:FindPartsInRegion3(Region3.new( -Vector3.new(c.Position.X,d,c.Position.Z)-Vector3.new(0.75,2.75,0.75),Vector3. -new(c.Position.X,d,c.Position.Z)+Vector3.new(0.75,1.75,0.75)),c.Parent,100)for g -=1,#f do if f[g].CanCollide and not f[g]:IsDescendantOf(e.CurrentParts)then -return false end end if clusterPartsInRegion(Vector3.new(c.Position.X,d,c. +end local f=c:FindFirstChild'Justification'if f~=nil then local g,h,i=f.Value, +Vector3.new(2,2,2),e-d-Vector3.new(0.01,0.01,0.01)local j=Vector3.new(4*math. +ceil(i.x/4),4*math.ceil(i.y/4),4*math.ceil(i.z/4))local k=j-i d=d-0.5*k*g e=e+ +0.5*k*(h-g)end return d,e end local function getBoundingBoxInWorldCoordinates(c) +local d,e=Vector3.new(math.huge,math.huge,math.huge),Vector3.new(-math.huge,- +math.huge,-math.huge)if c:IsA'BasePart'and not c:IsA'Terrain'then local f,g=c. +CFrame:pointToWorldSpace(-0.5*c.Size),c.CFrame:pointToWorldSpace(0.5*c.Size)d= +Vector3.new(math.min(f.X,g.X),math.min(f.Y,g.Y),math.min(f.Z,g.Z))e=Vector3.new( +math.max(f.X,g.X),math.max(f.Y,g.Y),math.max(f.Z,g.Z))elseif not c:IsA'Terrain' +then local f,g=c:GetModelCFrame():pointToWorldSpace(-0.5*c:GetModelSize()),c: +GetModelCFrame():pointToWorldSpace(0.5*c:GetModelSize())d=Vector3.new(math.min(f +.X,g.X),math.min(f.Y,g.Y),math.min(f.Z,g.Z))e=Vector3.new(math.max(f.X,g.X),math +.max(f.Y,g.Y),math.max(f.Z,g.Z))end return d,e end local function +getTargetPartBoundingBox(c)if c.Parent:FindFirstChild'RobloxModel'~=nil then +return getBoundingBox2(c.Parent)else return getBoundingBox2(c)end end +local function getMouseTargetCFrame(c)if c.Parent:FindFirstChild'RobloxModel'~= +nil then if c.Parent:IsA'Tool'then return c.Parent.Handle.CFrame else return c. +Parent:GetModelCFrame()end else return c.CFrame end end local function isBlocker +(c)if not c then return false end if not c.Parent then return false end if c: +FindFirstChild'Humanoid'then return false end if c:FindFirstChild'RobloxStamper' +or c:FindFirstChild'RobloxModel'then return true end if c:IsA'Part'and not c. +CanCollide then return false end if c==game.Lighting then return false end +return isBlocker(c.Parent)end local function spaceAboveCharacter(c,d,e)local f= +game.Workspace:FindPartsInRegion3(Region3.new(Vector3.new(c.Position.X,d,c. Position.Z)-Vector3.new(0.75,2.75,0.75),Vector3.new(c.Position.X,d,c.Position.Z) -+Vector3.new(0.75,1.75,0.75))then return false end return true end -local function findConfigAtMouseTarget(c,d)if not c then return nil end if not d -then error'findConfigAtMouseTarget: stampData is nil'return nil end if not d[ ++Vector3.new(0.75,1.75,0.75)),c.Parent,100)for g=1,#f do if f[g].CanCollide and +not f[g]:IsDescendantOf(e.CurrentParts)then return false end end if +clusterPartsInRegion(Vector3.new(c.Position.X,d,c.Position.Z)-Vector3.new(0.75, +2.75,0.75),Vector3.new(c.Position.X,d,c.Position.Z)+Vector3.new(0.75,1.75,0.75)) +then return false end return true end local function findConfigAtMouseTarget(c,d +)if not c then return nil end if not d then error +'findConfigAtMouseTarget: stampData is nil'return nil end if not d[ 'CurrentParts']then return nil end local e,f,g,h,i=4,false,CFrame.new(0,0,0), getBoundingBox2(d.CurrentParts)local j,k=i-h,nil if d.CurrentParts:IsA'Model'or d.CurrentParts:IsA'Tool'then k=d.CurrentParts:GetModelCFrame()else k=d. @@ -156,26 +154,26 @@ end if g==2 or g==3 then k=0 end i.CFrame=CFrame.Angles(0,math.pi/2*h+k,j)if g== 3 then local l=Instance.new'SpecialMesh'l.MeshType='FileMesh'l.MeshId= 'http://www.roblox.com/asset?id=66832495'l.Scale=Vector3.new(2,2,2)l.Parent=i end local l=Instance.new'Vector3Value'l.Value=Vector3.new(f,g,h)l.Name= -'ClusterMaterial'l.Parent=i return i end local f,g loading=true if e then g= -coroutine.create(function()f=game:GetService'InsertService':LoadAssetVersion(c) -loading=false end)coroutine.resume(g)else g=coroutine.create(function()f=game: -GetService'InsertService':LoadAsset(c)loading=false end)coroutine.resume(g)end -local h,i,j=0,0,8 while loading and i=j then return nil,'Load Time Fail'end if f==nil then return -nil,'Load Asset Fail'end if not f:IsA'Model'then return nil,'Load Type Fail'end -local k=f:GetChildren()if#k==0 then return nil,'Empty Model Fail'end -UnlockInstances(f)f=f:GetChildren()[1]for l,m in pairs(k)do if m:IsA'Team'then m -.Parent=game:GetService'Teams'elseif m:IsA'Sky'then local n=game:GetService -'Lighting'for o,p in pairs(n:GetChildren())do if p:IsA'Sky'then p:Remove()end -end m.Parent=n return end end if f:FindFirstChild'RobloxModel'==nil then local n -=Instance.new'BoolValue'n.Name='RobloxModel'n.Parent=f if f:FindFirstChild -'RobloxStamper'==nil then local o=Instance.new'BoolValue'o.Name='RobloxStamper'o -.Parent=f end end if d then if f.Name=='MegaClusterCube'then if d==6 then local -n=Instance.new'BoolValue'n.Name='AutoWedge'n.Parent=f else local n=f: -FindFirstChild'ClusterMaterial'if n then if n:IsA'Vector3Value'then f= -setupFakeTerrainPart(n.Value.X,d,n.Value.Z)else f=setupFakeTerrainPart(n.Value,d -,0)end else f=setupFakeTerrainPart(1,d,0)end end end end return f end a. -SetupStamperDragger=function(c,d,e,f,g)if not c then error +'ClusterMaterial'l.Parent=i return i end local f,g,h=nil,nil,true if e then g= +coroutine.create(function()f=game:GetService'InsertService':LoadAssetVersion(c)h +=false end)coroutine.resume(g)else g=coroutine.create(function()f=game: +GetService'InsertService':LoadAsset(c)h=false end)coroutine.resume(g)end local i +,j,k=0,0,8 while h and j=k +then return nil,'Load Time Fail'end if f==nil then return nil,'Load Asset Fail' +end if not f:IsA'Model'then return nil,'Load Type Fail'end local l=f: +GetChildren()if#l==0 then return nil,'Empty Model Fail'end UnlockInstances(f)f=f +:GetChildren()[1]for m,n in pairs(l)do if n:IsA'Team'then n.Parent=game: +GetService'Teams'elseif n:IsA'Sky'then local o=game:GetService'Lighting'for p,q +in pairs(o:GetChildren())do if q:IsA'Sky'then q:Remove()end end n.Parent=o +return end end if f:FindFirstChild'RobloxModel'==nil then local o=Instance.new +'BoolValue'o.Name='RobloxModel'o.Parent=f if f:FindFirstChild'RobloxStamper'== +nil then local p=Instance.new'BoolValue'p.Name='RobloxStamper'p.Parent=f end end +if d then if f.Name=='MegaClusterCube'then if d==6 then local o=Instance.new +'BoolValue'o.Name='AutoWedge'o.Parent=f else local o=f:FindFirstChild +'ClusterMaterial'if o then if o:IsA'Vector3Value'then f=setupFakeTerrainPart(o. +Value.X,d,o.Value.Z)else f=setupFakeTerrainPart(o.Value,d,0)end else f= +setupFakeTerrainPart(1,d,0)end end end end return f end a.SetupStamperDragger= +function(c,d,e,f,g)if not c then error [[SetupStamperDragger: modelToStamp (first arg) is nil! Should be a stamper model]] return nil end if not c:IsA'Model'and not c:IsA'BasePart'then error [[SetupStamperDragger: modelToStamp (first arg) is neither a Model or Part!]] @@ -205,33 +203,32 @@ FindFirstChild'MegaClusterCube'if not A then if not l.CurrentParts.Name== 'MegaClusterCube'then return else A=l.CurrentParts end end q.End=A.CFrame.p local B,C,D=nil,Vector3.new(0,0,0),Vector3.new(0,0,0)if q.Dimensions==1 then B=( q.End-q.Start)if math.abs(B.X)math.abs(B.Z)then E,F=truncateToCircleEighth(B.Y -,B.Z)else F,E=truncateToCircleEighth(B.Z,B.Y)end B=Vector3.new(0,E,F)else local -E,F=truncateToCircleEighth(B.Y,B.X)B=Vector3.new(F,E,0)end else if math.abs(B.Y) -math.abs(B.Z)then E,F= -truncateToCircleEighth(B.X,B.Z)else F,E=truncateToCircleEighth(B.Z,B.X)end B= -Vector3.new(E,0,F)else local E,F=truncateToCircleEighth(B.X,B.Y)B=Vector3.new(E, -F,0)end end q.InternalLine=B elseif q.Dimensions==2 then B=q.MoreLines[1]C=q.End +then local G,H if math.abs(B.Y)>math.abs(B.Z)then G,H=truncateToCircleEighth(B.Y +,B.Z)else H,G=truncateToCircleEighth(B.Z,B.Y)end B=Vector3.new(0,G,H)else local +G,H=truncateToCircleEighth(B.Y,B.X)B=Vector3.new(H,G,0)end else if math.abs(B.Y) +math.abs(B.Z)then G,H= +truncateToCircleEighth(B.X,B.Z)else H,G=truncateToCircleEighth(B.Z,B.X)end B= +Vector3.new(G,0,H)else local G,H=truncateToCircleEighth(B.X,B.Y)B=Vector3.new(G, +H,0)end end q.InternalLine=B elseif q.Dimensions==2 then B=q.MoreLines[1]C=q.End -q.MorePoints[1]C=C-B.unit*B.unit:Dot(C)tempCFrame=CFrame.new(q.Start,q.Start+B) -local E,F=tempCFrame:vectorToWorldSpace(Vector3.new(0,1,0)),tempCFrame: -vectorToWorldSpace(Vector3.new(1,0,0))local G,H=F:Dot(C),E:Dot(C)if math.abs(H)> -math.abs(G)then C=C-F*G else C=C-E*H end q.InternalLine=C elseif q.Dimensions==3 +local G,H=tempCFrame:vectorToWorldSpace(Vector3.new(0,1,0)),tempCFrame: +vectorToWorldSpace(Vector3.new(1,0,0))local I,J=H:Dot(C),G:Dot(C)if math.abs(J)> +math.abs(I)then C=C-H*I else C=C-G*J end q.InternalLine=C elseif q.Dimensions==3 then B=q.MoreLines[1]C=q.MoreLines[2]D=q.End-q.MorePoints[2]D=D-B.unit*B.unit: Dot(D)D=D-C.unit*C.unit:Dot(D)q.InternalLine=D end tempCFrame=CFrame.new(q.Start ,q.Start+B)if q.Dimensions==1 then q.AdornPart.Size=Vector3.new(4,4,B.magnitude+ 4)q.AdornPart.CFrame=tempCFrame+tempCFrame:vectorToWorldSpace(Vector3.new(2,2,2) --q.AdornPart.Size/2)else local E=tempCFrame:vectorToObjectSpace(B+C+D)q. -AdornPart.Size=Vector3.new(4,4,4)+Vector3.new(math.abs(E.X),math.abs(E.Y),math. -abs(E.Z))q.AdornPart.CFrame=tempCFrame+tempCFrame:vectorToWorldSpace(E/2)end -local E=nil if game.Players['LocalPlayer']then E=game.Players.LocalPlayer: -FindFirstChild'PlayerGui'if E and E:IsA'PlayerGui'then if q.Dimensions==1 and B. -magnitude>3 then q.Adorn.Parent=E elseif q.Dimensions>1 then q.Adorn.Parent=E -end end end if E==nil then E=game:GetService'CoreGui'if q.Dimensions==1 and B. -magnitude>3 then q.Adorn.Parent=E elseif q.Dimensions>1 then q.Adorn.Parent=E -end end end local function DoStamperMouseMove(A)if not A then error -'Error: RbxStamper.DoStamperMouseMove: Mouse is nil'return end if not A:IsA -'Mouse'then error('Error: RbxStamper.DoStamperMouseMove: Mouse is of type',A. -className,'should be of type Mouse')return end if not A.Target then local B= +-q.AdornPart.Size/2)else local G=tempCFrame:vectorToObjectSpace(B+C+D)q. +AdornPart.Size=Vector3.new(4,4,4)+Vector3.new(math.abs(G.X),math.abs(G.Y),math. +abs(G.Z))q.AdornPart.CFrame=tempCFrame+tempCFrame:vectorToWorldSpace(G/2)end +local G=nil if game.Players['LocalPlayer']then G=game.Players.LocalPlayer: +FindFirstChild'PlayerGui'if G and G:IsA'PlayerGui'then if(q.Dimensions==1 and B. +magnitude>3)or q.Dimensions>1 then q.Adorn.Parent=G end end end if G==nil then G +=game:GetService'CoreGui'if(q.Dimensions==1 and B.magnitude>3)or q.Dimensions>1 +then q.Adorn.Parent=G end end end local function DoStamperMouseMove(A)if not A +then error'Error: RbxStamper.DoStamperMouseMove: Mouse is nil'return end if not +A:IsA'Mouse'then error('Error: RbxStamper.DoStamperMouseMove: Mouse is of type', +A.className,'should be of type Mouse')return end if not A.Target then local B= GetTerrainForMouse(A)if nil==B then return end end if not l then return end configFound,targetCFrame,targetSurface=findConfigAtMouseTarget(A,l)if not configFound then error'RbxStamper.DoStamperMouseMove No configFound, returning' @@ -242,30 +239,30 @@ elseif targetSurface==5 then B=3-k+autoAlignToFace(l.CurrentParts)elseif targetSurface==2 then B=1-k+autoAlignToFace(l.CurrentParts)end end local C=math. pi/2 k=k+B if l.CurrentParts:IsA'Model'or l.CurrentParts:IsA'Tool'then modelRotate(l.CurrentParts,C*B)else l.CurrentParts.CFrame=CFrame. -fromEulerAnglesXYZ(0,C*B,0)*l.CurrentParts.CFrame end local D,E= -getBoundingBoxInWorldCoordinates(l.CurrentParts)local F=nil if l.CurrentParts: -IsA'Model'then F=l.CurrentParts:GetModelCFrame()else F=l.CurrentParts.CFrame end -D=D+targetCFrame.p-F.p E=E+targetCFrame.p-F.p if clusterPartsInRegion(D+b,E-b) +fromEulerAnglesXYZ(0,C*B,0)*l.CurrentParts.CFrame end local D,G= +getBoundingBoxInWorldCoordinates(l.CurrentParts)local H=nil if l.CurrentParts: +IsA'Model'then H=l.CurrentParts:GetModelCFrame()else H=l.CurrentParts.CFrame end +D=D+targetCFrame.p-H.p G=G+targetCFrame.p-H.p if clusterPartsInRegion(D+b,G-b) then if y.CFrame then if l.CurrentParts:FindFirstChild('ClusterMaterial',true) -then local G=l.CurrentParts:FindFirstChild('ClusterMaterial',true)if G:IsA -'Vector3Value'then local H=l.CurrentParts:FindFirstChild('ClusterMaterial',true) -if H then H=clusterMat end end end end return end if isMegaClusterPart()then -local G=game.Workspace.Terrain:WorldToCell(targetCFrame.p)local H,I,J,K,L,M,N,O, -P,Q,R,S,T=game.Workspace.Terrain:CellCenterToWorld(G.X,G.Y,G.Z),targetCFrame: -components()targetCFrame=CFrame.new(H.X,H.Y,H.Z,L,M,N,O,P,Q,R,S,T)end +then local I=l.CurrentParts:FindFirstChild('ClusterMaterial',true)if I:IsA +'Vector3Value'then local J=l.CurrentParts:FindFirstChild('ClusterMaterial',true) +if J then J=clusterMat end end end end return end if isMegaClusterPart()then +local I=game.Workspace.Terrain:WorldToCell(targetCFrame.p)local J,K,L,M,N,O,P,Q, +R,S,T,U,V=game.Workspace.Terrain:CellCenterToWorld(I.X,I.Y,I.Z),targetCFrame: +components()targetCFrame=CFrame.new(J.X,J.Y,J.Z,N,O,P,Q,R,S,T,U,V)end positionPartsAtCFrame3(targetCFrame,l.CurrentParts)y.CFrame=targetCFrame if l. -CurrentParts:FindFirstChild('ClusterMaterial',true)then local G=l.CurrentParts: -FindFirstChild('ClusterMaterial',true)if G:IsA'Vector3Value'then y. -TerrainOrientation=G.Value.Z end end if A and A.Target and A.Target.Parent then -local G=A.Target:FindFirstChild'RobloxModel'if not G then G=A.Target.Parent: -FindFirstChild'RobloxModel'end local H=l.CurrentParts:FindFirstChild -'UnstampableFaces'do local I,J='',''if G and G.Parent:FindFirstChild -'UnstampableFaces'then I=G.Parent.UnstampableFaces.Value end if H then J=H.Value -end local K=0 if G then K=modelTargetSurface(G.Parent,game.Workspace. -CurrentCamera.CoordinateFrame.p,A.Hit.p)end for L in string.gmatch(I,'[^,]+')do -if K==tonumber(L)then u=true game.JointsService:ClearJoinAfterMoveJoints()return -end end K=modelTargetSurface(l.CurrentParts,A.Hit.p,game.Workspace.CurrentCamera -.CoordinateFrame.p)for M in string.gmatch(J,'[^,]+')do if K==tonumber(M)then u= +CurrentParts:FindFirstChild('ClusterMaterial',true)then local I=l.CurrentParts: +FindFirstChild('ClusterMaterial',true)if I:IsA'Vector3Value'then y. +TerrainOrientation=I.Value.Z end end if A and A.Target and A.Target.Parent then +local I=A.Target:FindFirstChild'RobloxModel'if not I then I=A.Target.Parent: +FindFirstChild'RobloxModel'end local J=l.CurrentParts:FindFirstChild +'UnstampableFaces'do local M,N='',''if I and I.Parent:FindFirstChild +'UnstampableFaces'then M=I.Parent.UnstampableFaces.Value end if J then N=J.Value +end local O=0 if I then O=modelTargetSurface(I.Parent,game.Workspace. +CurrentCamera.CoordinateFrame.p,A.Hit.p)end for P in string.gmatch(M,'[^,]+')do +if O==tonumber(P)then u=true game.JointsService:ClearJoinAfterMoveJoints()return +end end O=modelTargetSurface(l.CurrentParts,A.Hit.p,game.Workspace.CurrentCamera +.CoordinateFrame.p)for Q in string.gmatch(N,'[^,]+')do if O==tonumber(Q)then u= true game.JointsService:ClearJoinAfterMoveJoints()return end end end end u=false game.JointsService:SetJoinAfterMoveInstance(l.CurrentParts)if not pcall(function ()if A and A.Target and A.Target.Parent:FindFirstChild'RobloxModel'==nil then @@ -311,175 +308,173 @@ loadSurfaceTypes(A,B)A.TopSurface=B[1]A.BottomSurface=B[2]A.LeftSurface=B[3]A. RightSurface=B[4]A.FrontSurface=B[5]A.BackSurface=B[6]end local function saveSurfaceTypes(A,B)local C={}C[1]=A.TopSurface C[2]=A.BottomSurface C[3]=A. LeftSurface C[4]=A.RightSurface C[5]=A.FrontSurface C[6]=A.BackSurface B[A]=C -end local function makeSurfaceUnjoinable(A,B)end local function prepareModel(A) -if not A then return nil end local B,C,D,E,F,G=0.7,1,A:Clone(),{},{},{}l={}l. -DisabledScripts={}l.TransparencyTable={}l.MaterialTable={}l.CanCollideTable={}l. -AnchoredTable={}l.ArchivableTable={}l.DecalTransparencyTable={}l. -SurfaceTypeTable={}collectParts(D,F,E,G)if#F<=0 then return nil, -'no parts found in modelToStamp'end for H,I in pairs(E)do if not I.Disabled then -I.Disabled=true l.DisabledScripts[#l.DisabledScripts+1]=I end end for J,K in -pairs(F)do l.TransparencyTable[K]=K.Transparency K.Transparency=C+(1-C)*K. -Transparency l.MaterialTable[K]=K.Material K.Material=Enum.Material.Plastic l. -CanCollideTable[K]=K.CanCollide K.CanCollide=false l.AnchoredTable[K]=K.Anchored -K.Anchored=true l.ArchivableTable[K]=K.Archivable K.Archivable=false -saveSurfaceTypes(K,l.SurfaceTypeTable)local M,N=0.5,0.5 delay(0,function()wait(M -)local O=tick()local P=O while(P-O)B do local Q=1-(((P-O)/N)*(C-B))if l['TransparencyTable']and l. -TransparencyTable[K]then K.Transparency=Q+(1-Q)*l.TransparencyTable[K]end wait( -0.03)P=tick()end if K and K:IsA'BasePart'then if l['TransparencyTable']and l. -TransparencyTable[K]then K.Transparency=B+(1-B)*l.TransparencyTable[K]end end -end)end for M,N in pairs(G)do l.DecalTransparencyTable[N]=N.Transparency N. -Transparency=B+(1-B)*N.Transparency end setSeatEnabledStatus(D,true) +end local function prepareModel(A)if not A then return nil end local B,C,D,G,H,I +=0.7,1,A:Clone(),{},{},{}l={}l.DisabledScripts={}l.TransparencyTable={}l. +MaterialTable={}l.CanCollideTable={}l.AnchoredTable={}l.ArchivableTable={}l. +DecalTransparencyTable={}l.SurfaceTypeTable={}collectParts(D,H,G,I)if#H<=0 then +return nil,'no parts found in modelToStamp'end for J,M in pairs(G)do if not M. +Disabled then M.Disabled=true l.DisabledScripts[#l.DisabledScripts+1]=M end end +for N,O in pairs(H)do l.TransparencyTable[O]=O.Transparency O.Transparency=C+(1- +C)*O.Transparency l.MaterialTable[O]=O.Material O.Material=Enum.Material.Plastic +l.CanCollideTable[O]=O.CanCollide O.CanCollide=false l.AnchoredTable[O]=O. +Anchored O.Anchored=true l.ArchivableTable[O]=O.Archivable O.Archivable=false +saveSurfaceTypes(O,l.SurfaceTypeTable)local Q,R=0.5,0.5 delay(0,function()wait(Q +)local S=tick()local T=S while(T-S)B do local U=1-(((T-S)/R)*(C-B))if l['TransparencyTable']and l. +TransparencyTable[O]then O.Transparency=U+(1-U)*l.TransparencyTable[O]end wait( +0.03)T=tick()end if O and O:IsA'BasePart'then if l['TransparencyTable']and l. +TransparencyTable[O]then O.Transparency=B+(1-B)*l.TransparencyTable[O]end end +end)end for Q,R in pairs(I)do l.DecalTransparencyTable[R]=R.Transparency R. +Transparency=B+(1-B)*R.Transparency end setSeatEnabledStatus(D,true) setSeatEnabledStatus(D,false)l.CurrentParts=D if autoAlignToFace(D)then l. -CurrentParts:ResetOrientationToIdentity()k=0 else local O=k*math.pi/2 if l. +CurrentParts:ResetOrientationToIdentity()k=0 else local S=k*math.pi/2 if l. CurrentParts:IsA'Model'or l.CurrentParts:IsA'Tool'then modelRotate(l. -CurrentParts,O)else l.CurrentParts.CFrame=CFrame.fromEulerAnglesXYZ(0,O,0)*l. -CurrentParts.CFrame end end local O=l.CurrentParts:FindFirstChild( -'ClusterMaterial',true)if O and O:IsA'Vector3Value'then O.Value=Vector3.new(O. -Value.X,O.Value.Y,(O.Value.Z+k)%4)end local P,Q=findConfigAtMouseTarget(d,l)if P -then l.CurrentParts=positionPartsAtCFrame3(Q,l.CurrentParts)end game. -JointsService:SetJoinAfterMoveInstance(l.CurrentParts)return D,F end +CurrentParts,S)else l.CurrentParts.CFrame=CFrame.fromEulerAnglesXYZ(0,S,0)*l. +CurrentParts.CFrame end end local S=l.CurrentParts:FindFirstChild( +'ClusterMaterial',true)if S and S:IsA'Vector3Value'then S.Value=Vector3.new(S. +Value.X,S.Value.Y,(S.Value.Z+k)%4)end local T,U=findConfigAtMouseTarget(d,l)if T +then l.CurrentParts=positionPartsAtCFrame3(U,l.CurrentParts)end game. +JointsService:SetJoinAfterMoveInstance(l.CurrentParts)return D,H end local function checkTerrainBlockCollisions(A,B)local C=game.Workspace.Terrain. -CellCenterToWorld local D=C(game.Workspace.Terrain,A.X,A.Y,A.Z)local E,F=game. +CellCenterToWorld local D=C(game.Workspace.Terrain,A.X,A.Y,A.Z)local G,H=game. Workspace:FindPartsInRegion3(Region3.new(D-Vector3.new(2,2,2)+b,D+Vector3.new(2, -2,2)-b),l.CurrentParts,100),false for G=1,#E do if isBlocker(E[G])then F=true -break end end if not F then local G={}for I=1,#E do if E[I].Parent and not G[E[I -].Parent]and E[I].Parent:FindFirstChild'Humanoid'and E[I].Parent:FindFirstChild -'Humanoid':IsA'Humanoid'then local K=E[I].Parent:FindFirstChild'Torso'G[E[I]. -Parent]=true if K then local M=D.Y+5 if spaceAboveCharacter(K,M,l)then K.CFrame= -K.CFrame+Vector3.new(0,M-K.CFrame.p.Y,0)else F=true break end end end end end if -not F then local G=true if B then if i then local I=C(game.Workspace.Terrain,A.X -,A.Y,A.Z)if I.X+2>i.CFrame.p.X+i.Size.X/2 then G=false elseif I.X-2i.CFrame.p.Y+i.Size.Y/2 then G=false -elseif I.Y-2i.CFrame.p.Z+i. -Size.Z/2 then G=false elseif I.Z-21)or(D and D.magnitude>0))then local N,O,P,Q,R,S,T,U,V= -game.Workspace.Terrain:WorldToCell(q.Start),{0,0,0},{0,0,0},{0,0,0},game. -Workspace.Terrain,{nil,nil,nil},{Vector3.new(0,0,0),Vector3.new(0,0,0),Vector3. -new(0,0,0)},{Vector3.new(1,0,0),Vector3.new(0,1,0),Vector3.new(0,0,1)},{}if q. -Dimensions>1 then table.insert(V,q.MoreLines[1])end if D and D.magnitude>0 then -table.insert(V,D)end if q.Dimensions>2 then table.insert(V,q.MoreLines[2])end -for W=1,#V do V[W]=Vector3.new(math.floor(V[W].X+0.5),math.floor(V[W].Y+0.5), -math.floor(V[W].Z+0.5))if V[W].X>0 then O[W]=1 elseif V[W].X<0 then O[W]=-1 end -if V[W].Y>0 then P[W]=1 elseif V[W].Y<0 then P[W]=-1 end if V[W].Z>0 then Q[W]=1 -elseif V[W].Z<0 then Q[W]=-1 end S[W]=Vector3.new(O[W],P[W],Q[W])if S[W]. -magnitude<0.9 then S[W]=nil end end if not V[2]then V[2]=Vector3.new(0,0,0)end -if not V[3]then V[3]=Vector3.new(0,0,0)end local W,X=l.CurrentParts: -FindFirstChild('WaterForceTag',true),l.CurrentParts:FindFirstChild( -'WaterForceDirectionTag',true)while T[3].magnitude*4<=V[3].magnitude do local Y= -1 while Y<4 do T[2]=Vector3.new(0,0,0)while T[2].magnitude*4<=V[2].magnitude do -local Z=1 while Z<4 do T[1]=Vector3.new(0,0,0)while T[1].magnitude*4<=V[1]. -magnitude do local _=T[1]+T[2]+T[3]local aa=Vector3int16.new(N.X+_.X,N.Y+_.Y,N.Z -+_.Z)if aa.X>=F.X and aa.Y>=F.Y and aa.Z>=F.Z and aa.XV[2 -].magnitude then Z=4 end end end if S[3]then while Y<4 and U[Y]:Dot(S[3])==0 do -Y=Y+1 end if Y<4 then T[3]=T[3]+U[Y]*U[Y]:Dot(S[3])end Y=Y+1 else T[3]=Vector3. -new(1,0,0)Y=4 end if T[3].magnitude*4>V[3].magnitude then Y=4 end end end end q. -Start=nil q.Adorn.Parent=nil if B then l.CurrentParts.Parent=nil pcall(function( -)game:GetService'ChangeHistoryService':SetWaypoint'StamperMulti'end)end return B -end local function DoStamperMouseUp(aa)if not aa then error +2,2)-b),l.CurrentParts,100),false for I=1,#G do if isBlocker(G[I])then H=true +break end end if not H then local I={}for M=1,#G do if G[M].Parent and not I[G[M +].Parent]and G[M].Parent:FindFirstChild'Humanoid'and G[M].Parent:FindFirstChild +'Humanoid':IsA'Humanoid'then local O=G[M].Parent:FindFirstChild'Torso'I[G[M]. +Parent]=true if O then local Q=D.Y+5 if spaceAboveCharacter(O,Q,l)then O.CFrame= +O.CFrame+Vector3.new(0,Q-O.CFrame.p.Y,0)else H=true break end end end end end if +not H then local I=true if B then if i then local M=C(game.Workspace.Terrain,A.X +,A.Y,A.Z)if(M.X+2>i.CFrame.p.X+i.Size.X/2)or(M.X-2i.CFrame.p.Y+i.Size.Y/2)or(M.Y-2i.CFrame.p +.Z+i.Size.Z/2)or(M.Z-21)or(D and D.magnitude>0))then local R,S,T,U,V,W,X,Y= +game.Workspace.Terrain:WorldToCell(q.Start),{0,0,0},{0,0,0},{0,0,0},{nil,nil,nil +},{Vector3.new(0,0,0),Vector3.new(0,0,0),Vector3.new(0,0,0)},{Vector3.new(1,0,0) +,Vector3.new(0,1,0),Vector3.new(0,0,1)},{}if q.Dimensions>1 then table.insert(Y, +q.MoreLines[1])end if D and D.magnitude>0 then table.insert(Y,D)end if q. +Dimensions>2 then table.insert(Y,q.MoreLines[2])end for Z=1,#Y do Y[Z]=Vector3. +new(math.floor(Y[Z].X+0.5),math.floor(Y[Z].Y+0.5),math.floor(Y[Z].Z+0.5))if Y[Z] +.X>0 then S[Z]=1 elseif Y[Z].X<0 then S[Z]=-1 end if Y[Z].Y>0 then T[Z]=1 elseif +Y[Z].Y<0 then T[Z]=-1 end if Y[Z].Z>0 then U[Z]=1 elseif Y[Z].Z<0 then U[Z]=-1 +end V[Z]=Vector3.new(S[Z],T[Z],U[Z])if V[Z].magnitude<0.9 then V[Z]=nil end end +if not Y[2]then Y[2]=Vector3.new(0,0,0)end if not Y[3]then Y[3]=Vector3.new(0,0, +0)end local Z,_=l.CurrentParts:FindFirstChild('WaterForceTag',true),l. +CurrentParts:FindFirstChild('WaterForceDirectionTag',true)while W[3].magnitude*4 +<=Y[3].magnitude do local aa=1 while aa<4 do W[2]=Vector3.new(0,0,0)while W[2]. +magnitude*4<=Y[2].magnitude do local ab=1 while ab<4 do W[1]=Vector3.new(0,0,0) +while W[1].magnitude*4<=Y[1].magnitude do local ac=W[1]+W[2]+W[3]local ad= +Vector3int16.new(R.X+ac.X,R.Y+ac.Y,R.Z+ac.Z)if ad.X>=H.X and ad.Y>=H.Y and ad.Z +>=H.Z and ad.XY[2].magnitude +then ab=4 end end end if V[3]then while aa<4 and X[aa]:Dot(V[3])==0 do aa=aa+1 +end if aa<4 then W[3]=W[3]+X[aa]*X[aa]:Dot(V[3])end aa=aa+1 else W[3]=Vector3. +new(1,0,0)aa=4 end if W[3].magnitude*4>Y[3].magnitude then aa=4 end end end end +q.Start=nil q.Adorn.Parent=nil if B then l.CurrentParts.Parent=nil pcall( +function()game:GetService'ChangeHistoryService':SetWaypoint'StamperMulti'end)end +return B end local function DoStamperMouseUp(aa)if not aa then error 'Error: RbxStamper.DoStamperMouseUp: Mouse is nil'return false end if not aa:IsA 'Mouse'then error('Error: RbxStamper.DoStamperMouseUp: Mouse is of type',aa. className,'should be of type Mouse')return false end if not l.Dragger then error [[Error: RbxStamper.DoStamperMouseUp: stampData.Dragger is nil]]return false end -if not q then return false end local ab=nil if h then local A,B=nil, -isMegaClusterPart()if B and q and q.Start and q.InternalLine and q.InternalLine. -magnitude>0 then A=true ab=true else A,ab=a.CanEditRegion(l.CurrentParts,i)end -if not A then if j then j()end return false end end if u then flashRedBox() +if not q then return false end local ab=nil if h then local ac,ad=nil, +isMegaClusterPart()if ad and q and q.Start and q.InternalLine and q.InternalLine +.magnitude>0 then ac=true ab=true else ac,ab=a.CanEditRegion(l.CurrentParts,i) +end if not ac then if j then j()end return false end end if u then flashRedBox() return false end canStamp,ab=a.CanEditRegion(l.CurrentParts,i)if not canStamp -then if j then j()end return false end local A,B= +then if j then j()end return false end local ac,ad= getBoundingBoxInWorldCoordinates(l.CurrentParts)configFound,targetCFrame= findConfigAtMouseTarget(aa,l)if configFound and not q.Adorn.Parent then if -clusterPartsInRegion(A+b,B-b)then flashRedBox()return false end local C=game. -Workspace:FindPartsInRegion3(Region3.new(A+b,B-b),l.CurrentParts,100)for D=1,#C -do if isBlocker(C[D])then flashRedBox()return false end end local D={}for E=1,#C -do if C[E].Parent and not D[C[E].Parent]and C[E].Parent:FindFirstChild'Humanoid' -and C[E].Parent:FindFirstChild'Humanoid':IsA'Humanoid'then local F=C[E].Parent: -FindFirstChild'Torso'D[C[E].Parent]=true if F then local G=B.Y+3 if -spaceAboveCharacter(F,G,l)then F.CFrame=F.CFrame+Vector3.new(0,G-F.CFrame.p.Y,0) +clusterPartsInRegion(ac+b,ad-b)then flashRedBox()return false end local ae=game. +Workspace:FindPartsInRegion3(Region3.new(ac+b,ad-b),l.CurrentParts,100)for A=1,# +ae do if isBlocker(ae[A])then flashRedBox()return false end end local A={}for B= +1,#ae do if ae[B].Parent and not A[ae[B].Parent]and ae[B].Parent:FindFirstChild +'Humanoid'and ae[B].Parent:FindFirstChild'Humanoid':IsA'Humanoid'then local C=ae +[B].Parent:FindFirstChild'Torso'A[ae[B].Parent]=true if C then local D=ad.Y+3 if +spaceAboveCharacter(C,D,l)then C.CFrame=C.CFrame+Vector3.new(0,D-C.CFrame.p.Y,0) else flashRedBox()return false end end end end elseif(not configFound)and not(q. Start and q.Adorn.Parent)then resetHighScalabilityLine()return false end if game :FindFirstChild'Players'then if game.Players['LocalPlayer']then if game.Players. -LocalPlayer['Character']then local C=game.Players.LocalPlayer.Character local D= -C:FindFirstChild'StampTracker'if D and not D.Value then D.Value=true end end end -end if q.Start and q.Adorn.Parent and isMegaClusterPart()then if +LocalPlayer['Character']then local ae=game.Players.LocalPlayer.Character local A +=ae:FindFirstChild'StampTracker'if A and not A.Value then A.Value=true end end +end end if q.Start and q.Adorn.Parent and isMegaClusterPart()then if ResolveMegaClusterStamp(ab)or ab then l.CurrentParts.Parent=nil return true end -end q.Start=nil q.Adorn.Parent=nil local C=game.Workspace.Terrain if -isMegaClusterPart()then local D if l.CurrentParts:IsA'Model'then D=C: -WorldToCell(l.CurrentParts:GetModelCFrame().p)else D=C:WorldToCell(l. -CurrentParts.CFrame.p)end local E,F=game.Workspace.Terrain.MaxExtents.Max,game. -Workspace.Terrain.MaxExtents.Min if checkTerrainBlockCollisions(D,false)then -local G,I,K=l.CurrentParts:FindFirstChild('ClusterMaterial',true),l.CurrentParts +end q.Start=nil q.Adorn.Parent=nil local ae=game.Workspace.Terrain if +isMegaClusterPart()then local A if l.CurrentParts:IsA'Model'then A=ae: +WorldToCell(l.CurrentParts:GetModelCFrame().p)else A=ae:WorldToCell(l. +CurrentParts.CFrame.p)end local B,C=game.Workspace.Terrain.MaxExtents.Max,game. +Workspace.Terrain.MaxExtents.Min if checkTerrainBlockCollisions(A,false)then +local D,G,H=l.CurrentParts:FindFirstChild('ClusterMaterial',true),l.CurrentParts :FindFirstChild('WaterForceTag',true),l.CurrentParts:FindFirstChild( -'WaterForceDirectionTag',true)if D.X>=F.X and D.Y>=F.Y and D.Z>=F.Z and D.X=C.X and A.Y>=C.Y and A.Z>=C.Z and A.Xmath.abs(P.Y)then if math.abs(P.X)>math. -abs(P.Z)then if P.X>0 then N.RightSurface='Unjoinable'else N.LeftSurface= -'Unjoinable'end else if P.Z>0 then N.BackSurface='Unjoinable'else N.FrontSurface -='Unjoinable'end end else if math.abs(P.Y)>math.abs(P.Z)then if P.Y>0 then N. -TopSurface='Unjoinable'else N.BottomSurface='Unjoinable'end else if P.Z>0 then N -.BackSurface='Unjoinable'else N.FrontSurface='Unjoinable'end end end end end +prepareUnjoinableSurfaces(aa,ab,ac)local ad,ae={Vector3.new(1,0,0),Vector3.new(0 +,1,0),Vector3.new(0,0,1)},1 if ac<0 then ae=ae*-1 ac=ac*-1 end local D=ae*aa: +vectorToWorldSpace(ad[ac])for H=1,#ab do local M=ab[H]local Q=M.CFrame: +vectorToObjectSpace(D)if math.abs(Q.X)>math.abs(Q.Y)then if math.abs(Q.X)>math. +abs(Q.Z)then if Q.X>0 then M.RightSurface='Unjoinable'else M.LeftSurface= +'Unjoinable'end else if Q.Z>0 then M.BackSurface='Unjoinable'else M.FrontSurface +='Unjoinable'end end else if math.abs(Q.Y)>math.abs(Q.Z)then if Q.Y>0 then M. +TopSurface='Unjoinable'else M.BottomSurface='Unjoinable'end else if Q.Z>0 then M +.BackSurface='Unjoinable'else M.FrontSurface='Unjoinable'end end end end end local function resumeStamper()clone,parts=prepareModel(c)if not clone or not parts then return end local aa=clone:FindFirstChild('UnjoinableFaces',true)if aa then for ab in string.gmatch(aa.Value,'[^,]*')do if tonumber(ab)then if clone: @@ -493,13 +488,13 @@ clusterOrientation=clusterMaterial.Value.Z elseif clusterMaterial:IsA'IntValue' then z.Material=clusterMaterial.Value end end pcall(function()m=d.Target end)if m and m.Parent:FindFirstChild'RobloxModel'==nil then game.JointsService: SetJoinAfterMoveTarget(m)else game.JointsService:SetJoinAfterMoveTarget(nil)end -game.JointsService:ShowPermissibleJoints()for ab,A in pairs(l.DisabledScripts)do -if A.Name=='GhostRemovalScript'then A.Parent=l.CurrentParts end end l.Dragger= -Instance.new'Dragger'l.Dragger:MouseDown(parts[1],Vector3.new(0,0,0),parts)l. -Dragger:MouseUp()DoStamperMouseMove(d)table.insert(v,d.Move:connect(function()if -s or t then return end s=true DoStamperMouseMove(d)s=false end))table.insert(v,d -.Button1Down:connect(function()DoStamperMouseDown(d)end))table.insert(v,d. -Button1Up:connect(function()t=true while s do wait()end x.Value= +game.JointsService:ShowPermissibleJoints()for ab,ac in pairs(l.DisabledScripts) +do if ac.Name=='GhostRemovalScript'then ac.Parent=l.CurrentParts end end l. +Dragger=Instance.new'Dragger'l.Dragger:MouseDown(parts[1],Vector3.new(0,0,0), +parts)l.Dragger:MouseUp()DoStamperMouseMove(d)table.insert(v,d.Move:connect( +function()if s or t then return end s=true DoStamperMouseMove(d)s=false end)) +table.insert(v,d.Button1Down:connect(function()DoStamperMouseDown(d)end))table. +insert(v,d.Button1Up:connect(function()t=true while s do wait()end x.Value= DoStamperMouseUp(d)resetHighScalabilityLine()t=false end))x.Value=false end local function resetStamperState(aa)if aa then if not aa:IsA'Model'and not aa: IsA'BasePart'then error diff --git a/processed/89449008.lua b/processed/89449008.lua index 261150c..32c7a4c 100644 --- a/processed/89449008.lua +++ b/processed/89449008.lua @@ -100,20 +100,17 @@ return end for R,S in pairs(f)do if g[S]then if aa:FindFirstChild'GearReference' and g[S]:FindFirstChild'GearReference'then if g[S].GearReference.Value==aa. GearReference.Value then g[S].Active=Q break end end end end end function clearPreview()p.GearImage.Image=''p.GearStats.GearName.Text=''end function -removeAllEquippedGear(aa)local Q=a.Character:GetChildren()for R=1,#Q do if(Q[R]: -IsA'Tool'or Q[R]:IsA'HopperBin')and Q[R]~=aa then Q[R].Parent=o end end end -function equipGear(aa)removeAllEquippedGear(aa)aa.Parent=a.Character -updateGridActive()end function unequipGear(aa)aa.Parent=o updateGridActive()end -function highlight(aa)aa.TextColor3=Color3.new(0,0,0)aa.BackgroundColor3=Color3. -new(0.8,0.8,0.8)end function clearHighlight(aa)aa.TextColor3=Color3.new(1,1,1)aa -.BackgroundColor3=Color3.new(0,0,0)end function swapGearSlot(aa,Q)if not u.Value -then u.Slot.Value=aa u.GearButton.Value=Q u.Value=true updateGridActive()end end -local aa=function(aa,Q)if type(aa.Action)~='number'then return end local R=aa. -Action if R==1 then unequipGear(Q.Parent.GearReference.Value)local S=Q.Parent -local T,U,W=S.GearReference.Value,r:GetChildren(),-1 for X=1,#U do if U[X]:IsA -'Frame'then local Y=U[X]:GetChildren()if Y[1]and Y[1].GearReference.Value==T -then W=Y[1].SlotNumber.Text break end end end swapGearSlot(W,nil)end end -function setupCharacterConnections()if n then n:disconnect()end n=game.Players. +unequipGear(aa)aa.Parent=o updateGridActive()end function highlight(aa)aa. +TextColor3=Color3.new(0,0,0)aa.BackgroundColor3=Color3.new(0.8,0.8,0.8)end +function clearHighlight(aa)aa.TextColor3=Color3.new(1,1,1)aa.BackgroundColor3= +Color3.new(0,0,0)end function swapGearSlot(aa,Q)if not u.Value then u.Slot.Value +=aa u.GearButton.Value=Q u.Value=true updateGridActive()end end local aa= +function(aa,Q)if type(aa.Action)~='number'then return end local R=aa.Action if R +==1 then unequipGear(Q.Parent.GearReference.Value)local S=Q.Parent local T,U,W=S +.GearReference.Value,r:GetChildren(),-1 for X=1,#U do if U[X]:IsA'Frame'then +local Y=U[X]:GetChildren()if Y[1]and Y[1].GearReference.Value==T then W=Y[1]. +SlotNumber.Text break end end end swapGearSlot(W,nil)end end function +setupCharacterConnections()if n then n:disconnect()end n=game.Players. LocalPlayer.Backpack.ChildAdded:connect(function(Q)addToGrid(Q)end)local Q=game. Players.LocalPlayer.Backpack:GetChildren()for R=1,#Q do addToGrid(Q[R])end if l then l:disconnect()end l=game.Players.LocalPlayer.Character.ChildAdded:connect( @@ -128,15 +125,14 @@ table.insert(R,g[T])break end end end end return R end function splitByWhitespace(Q)if type(Q)~='string'then return nil end local R={}for S in string.gmatch(Q,'[^%s]+')do if string.len(S)>0 then table.insert(R,S)end end return R end function showSearchGear(Q)if not e.Gear.Visible then return end -local R=splitByWhitespace(Q)if R and(#R>0)then currSearchTerms=R else -currSearchTerms=nil end if R==nil then showEntireGrid()return end local S= -filterGear(currSearchTerms)showPartialGrid(S)end function nukeBackpack()while#g> -0 do table.remove(g)end g={}while#f>0 do table.remove(f)end f={}local Q=s. -ScrollingFrame:GetChildren()for R=1,#Q do Q[R]:remove()end end function -getGearContextMenu()local Q=Instance.new'Frame'Q.Active=true Q.Name= -'UnequipContextMenu'Q.Size=UDim2.new(0,115,0,70)Q.Position=UDim2.new(0,-16,0,-16 -)Q.BackgroundTransparency=1 Q.Visible=false local R=Instance.new'TextButton'R. -Name='UnequipContextMenuButton'R.Text=''R.Style=Enum.ButtonStyle. +local R,S=splitByWhitespace(Q),nil if R and(#R>0)then S=R else S=nil end if R== +nil then showEntireGrid()return end local T=filterGear(S)showPartialGrid(T)end +function nukeBackpack()while#g>0 do table.remove(g)end g={}while#f>0 do table. +remove(f)end f={}local Q=s.ScrollingFrame:GetChildren()for R=1,#Q do Q[R]: +remove()end end function getGearContextMenu()local Q=Instance.new'Frame'Q.Active +=true Q.Name='UnequipContextMenu'Q.Size=UDim2.new(0,115,0,70)Q.Position=UDim2. +new(0,-16,0,-16)Q.BackgroundTransparency=1 Q.Visible=false local R=Instance.new +'TextButton'R.Name='UnequipContextMenuButton'R.Text=''R.Style=Enum.ButtonStyle. RobloxButtonDefault R.ZIndex=8 R.Size=UDim2.new(1,0,1,-20)R.Visible=true R. Parent=Q local S,T,U=12,{},{'Remove Hotkey'}for W=1,#U do local X={}X.Type= 'Button'X.Text=U[W]X.Action=W X.DoIt=aa table.insert(T,X)end for W,X in ipairs(T diff --git a/processed/89449093.lua b/processed/89449093.lua index 5548425..ccd8849 100644 --- a/processed/89449093.lua +++ b/processed/89449093.lua @@ -72,13 +72,12 @@ splitByWhitespace(F)if type(F)~='string'then return nil end local G={}for H in string.gmatch(F,'[^%s]+')do if string.len(H)>0 then table.insert(G,H)end end return G end function resetSearchBoxGui()k.Visible=false i.Text=v end function doSearch()local F=i.Text if F==''then resetSearch()return end F=trim(F)k.Visible -=true termTable=splitByWhitespace(F)D:Fire(F)end function resetSearch() -resetSearchBoxGui()D:Fire()end local F=function()p=true end function -coreGuiChanged(G,H)if G==Enum.CoreGuiType.Backpack or G==Enum.CoreGuiType.All -then r=H s=not H if s then pcall(function()game:GetService'GuiService': -RemoveKey(w)game:GetService'GuiService':RemoveKey(x)end)else game:GetService -'GuiService':AddKey(w)game:GetService'GuiService':AddKey(x)end resetSearch()h. -Visible=H and q m.Visible=H a.Visible=H f.Visible=H end end +=true D:Fire(F)end function resetSearch()resetSearchBoxGui()D:Fire()end local F= +function()p=true end function coreGuiChanged(G,H)if G==Enum.CoreGuiType.Backpack +or G==Enum.CoreGuiType.All then r=H s=not H if s then pcall(function()game: +GetService'GuiService':RemoveKey(w)game:GetService'GuiService':RemoveKey(x)end) +else game:GetService'GuiService':AddKey(w)game:GetService'GuiService':AddKey(x) +end resetSearch()h.Visible=H and q m.Visible=H a.Visible=H f.Visible=H end end createPublicFunction('CloseBackpack',E)createPublicFunction('BackpackReady',F) pcall(function()coreGuiChanged(Enum.CoreGuiType.Backpack,Game.StarterGui: GetCoreGuiEnabled(Enum.CoreGuiType.Backpack))Game.StarterGui. diff --git a/processed/97188756.lua b/processed/97188756.lua index 79333b1..4e2a850 100644 --- a/processed/97188756.lua +++ b/processed/97188756.lua @@ -265,26 +265,26 @@ then n=k:FindButtonTree(l,m[o])end end return n end function k: ToggleSafeChatMenu(l)local m=k:FindButtonTree(l,self.SafeChatTree)if m then for n,o in pairs(m)do if n:IsA'TextButton'or n:IsA'ImageButton'then n.Visible=not n. Visible end end return true end return false end function k: -CreateSafeChatOptions(l,m)local n={}level=level or 0 local o=0 n[m]={}n[m][1]=l[ -1]m=m or self.SafeChatButton for p,q in pairs(l)do if type(p)=='string'then -local r=d.Create'TextButton'{Name=p,Text=p,Size=UDim2.new(0,100,0,20), -TextXAlignment=Enum.TextXAlignment.Center,TextColor3=Color3.new(0.2,0.1,0.1), -BackgroundTransparency=0.5,BackgroundColor3=Color3.new(1,1,1),Parent=self. -SafeChatFrame,Visible=false,Position=UDim2.new(0,m.Position.X.Scale+105,0,m. -Position.Y.Scale-((o-3)*100))}o=o+1 if type(l[p])=='table'then n[m][r]=k: -CreateSafeChatOptions(l[p],r)end r.MouseEnter:connect(function()k: -ToggleSafeChatMenu(r)end)r.MouseLeave:connect(function()k:ToggleSafeChatMenu(r) -end)r.MouseButton1Click:connect(function()local s=k:FindButtonTree(r)pcall( -function()g:Chat(s[1])end)end)end end return n end function k:CreateSafeChatGui( -)self.SafeChatFrame=d.Create'Frame'{Name='SafeChatFrame',Size=UDim2.new(1,0,1,0) -,Parent=self.Gui,BackgroundTransparency=1,d.Create'ImageButton'{Name= -'SafeChatButton',Size=UDim2.new(0,44,0,31),Position=UDim2.new(0,1,0.35,0), -BackgroundTransparency=1,Image='http://www.roblox.com/asset/?id=97080365'}}self. -SafeChatButton=self.SafeChatFrame.SafeChatButton self.SafeChatTree[self. -SafeChatButton]=k:CreateSafeChatOptions(self.SafeChat_List,self.SafeChatButton) -self.SafeChatButton.MouseButton1Click:connect(function()k:ToggleSafeChatMenu( -self.SafeChatButton)end)end function k:FocusOnChatBar()if self.ClickToChatButton -then self.ClickToChatButton.Visible=false end self.GotFocus=true if self.Frame[ +CreateSafeChatOptions(l,m)local n,o={},0 n[m]={}n[m][1]=l[1]m=m or self. +SafeChatButton for p,q in pairs(l)do if type(p)=='string'then local r=d.Create +'TextButton'{Name=p,Text=p,Size=UDim2.new(0,100,0,20),TextXAlignment=Enum. +TextXAlignment.Center,TextColor3=Color3.new(0.2,0.1,0.1),BackgroundTransparency= +0.5,BackgroundColor3=Color3.new(1,1,1),Parent=self.SafeChatFrame,Visible=false, +Position=UDim2.new(0,m.Position.X.Scale+105,0,m.Position.Y.Scale-((o-3)*100))}o= +o+1 if type(l[p])=='table'then n[m][r]=k:CreateSafeChatOptions(l[p],r)end r. +MouseEnter:connect(function()k:ToggleSafeChatMenu(r)end)r.MouseLeave:connect( +function()k:ToggleSafeChatMenu(r)end)r.MouseButton1Click:connect(function()local +s=k:FindButtonTree(r)pcall(function()g:Chat(s[1])end)end)end end return n end +function k:CreateSafeChatGui()self.SafeChatFrame=d.Create'Frame'{Name= +'SafeChatFrame',Size=UDim2.new(1,0,1,0),Parent=self.Gui,BackgroundTransparency=1 +,d.Create'ImageButton'{Name='SafeChatButton',Size=UDim2.new(0,44,0,31),Position= +UDim2.new(0,1,0.35,0),BackgroundTransparency=1,Image= +'http://www.roblox.com/asset/?id=97080365'}}self.SafeChatButton=self. +SafeChatFrame.SafeChatButton self.SafeChatTree[self.SafeChatButton]=k: +CreateSafeChatOptions(self.SafeChat_List,self.SafeChatButton)self.SafeChatButton +.MouseButton1Click:connect(function()k:ToggleSafeChatMenu(self.SafeChatButton) +end)end function k:FocusOnChatBar()if self.ClickToChatButton then self. +ClickToChatButton.Visible=false end self.GotFocus=true if self.Frame[ 'Background']then self.Frame.Background.Visible=false end self.ChatBar: CaptureFocus()end function k:CreateTouchButton()self.ChatTouchFrame=d.Create 'Frame'{Name='ChatTouchFrame',Size=UDim2.new(0,128,0,32),Position=UDim2.new(0,88 @@ -351,8 +351,8 @@ FindMessageInSafeChat(l,m)local n=false for o,p in pairs(m)do if o==l then return true end if type(m[o])=='table'then n=k:FindMessageInSafeChat(l,m[o])if n then return true end end end return n end function k:PlayerChatted(...)local l,m ,n={...},nil,nil if l[2]then m=l[2]end if l[3]then n=l[3]if string.sub(n,1,1)== -'%'then n='(TEAM) '..string.sub(n,2,#n)end end if g.ClassicChat then if string. -sub(n,1,3)=='/e 'or string.sub(n,1,7)=='/emote 'then elseif(a or b.ChatMode== +'%'then n='(TEAM) '..string.sub(n,2,#n)end end if g.ClassicChat then if not( +string.sub(n,1,3)=='/e 'or string.sub(n,1,7)=='/emote ')and(a or b.ChatMode== Enum.ChatMode.TextAndMenu)or(b.ChatMode==Enum.ChatMode.Menu and string.sub(n,1,3 )=='/sc')or(k:FindMessageInSafeChat(n,self.SafeChat_List))then k:UpdateChat(m,n) end end end function k:CullThread()while true do if#self.MessageQueue>0 then for