Further optimisations of corescripts

This commit is contained in:
Lewin Kelly 2023-04-13 01:57:56 +01:00
parent 3cc782a49c
commit 5a6acac25c
29 changed files with 3415 additions and 3468 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

File diff suppressed because it is too large Load Diff

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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.X<aa.TextBounds.X do V=V..' 'W.Text=V end V=V..' 'W.Text=''return V
end function startSpinner()u=true Spawn(function()local aa=0 while u do local V=
0 while V<8 do if V==aa or V==((aa+1)%8)then v[V+1].Image=
function startSpinner()u=true Spawn(function()local aa=0 while u do local V=0
while V<8 do if V==aa or V==((aa+1)%8)then v[V+1].Image=
'http://www.roblox.com/Asset/?id=45880668'else v[V+1].Image=
'http://www.roblox.com/Asset/?id=45880710'end V=V+1 end aa=(aa+1)%8 wait(
6.666666666666666E-2)end end)end function stopSpinner()u=false end function

View File

@ -31,18 +31,16 @@ x-v.x,t.y-v.y)local A=(y.x*w.y)-(y.y*w.x)local B=math.atan2(A,dotProduct(y,w))
local C=B*math.min(z.magnitude/x.magnitude,1)if math.abs(C)>0.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

View File

@ -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 af<ah.X or af>ah.X+ai.X or ag<ah.y or ag>ah.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 ag<ai.X or ag>ai.X+aj.X or ah<ai.y or ah>ai.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
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

View File

@ -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.01<d.MaxHealth then d.Health=o elseif p>0 then d.
Health=d.MaxHealth end end end
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.01<d.MaxHealth then d.
Health=p elseif q>0 then d.Health=d.MaxHealth end end end

View File

@ -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<B.Name end)if#sortedDialogChoices
==0 then normalEndDialog()return end local A,B=1,0 d={}for C,D in pairs(b)do D.
Visible=false end for E,F in pairs(sortedDialogChoices)do if A<=#b then b[A].
Size=UDim2.new(1,0,0,72)b[A].UserPrompt.Text=F.UserDialog local G=math.ceil(b[A]
.UserPrompt.TextBounds.Y/24)*24 b[A].Position=UDim2.new(0,0,0,B)b[A].Size=UDim2.
new(1,0,0,G)b[A].Visible=true d[b[A]]=F B=B+G A=A+1 end end c.Position=UDim2.
new(0,0,0,B)c.Number.Text=A..')'a.Size=UDim2.new(0,350,0,B+24+32)a.Position=
UDim2.new(0,20,0,-a.Size.Y.Offset-20)styleMainFrame(currentTone())a.Visible=true
end function doDialog(w)while not Instance.Lock(w,n)do wait()end if w.InUse then
Instance.Unlock(w)return else w.InUse=true Instance.Unlock(w)end e=w game.Chat:
Chat(w.Parent,w.InitialPrompt,getChatColor(w.Tone))variableDelay(w.InitialPrompt
)presentDialogChoices(w.Parent,w:GetChildren())end function renewKillswitch(w)if
g then g:Remove()g=nil end g=q:Clone()g.archivable=false g.Disabled=false g.
Parent=w end function checkForLeaveArea()while e do if e.Parent and(n:
DistanceFromCharacter(e.Parent.Position)>=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<C.Name end)if#y==0 then
normalEndDialog()return end local B,C=1,0 d={}for D,E in pairs(b)do E.Visible=
false end for F,G in pairs(y)do if B<=#b then b[B].Size=UDim2.new(1,0,0,72)b[B].
UserPrompt.Text=G.UserDialog local H=math.ceil(b[B].UserPrompt.TextBounds.Y/24)*
24 b[B].Position=UDim2.new(0,0,0,C)b[B].Size=UDim2.new(1,0,0,H)b[B].Visible=true
d[b[B]]=G C=C+H B=B+1 end end c.Position=UDim2.new(0,0,0,C)c.Number.Text=B..')'a
.Size=UDim2.new(0,350,0,C+24+32)a.Position=UDim2.new(0,20,0,-a.Size.Y.Offset-20)
styleMainFrame(currentTone())a.Visible=true end function doDialog(w)while not
Instance.Lock(w,n)do wait()end if w.InUse then Instance.Unlock(w)return else w.
InUse=true Instance.Unlock(w)end e=w game.Chat:Chat(w.Parent,w.InitialPrompt,
getChatColor(w.Tone))variableDelay(w.InitialPrompt)presentDialogChoices(w.Parent
,w:GetChildren())end function renewKillswitch(w)if g then g:Remove()g=nil end g=
q:Clone()g.archivable=false g.Disabled=false g.Parent=w end function
checkForLeaveArea()while e do if e.Parent and(n:DistanceFromCharacter(e.Parent.
Position)>=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()
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()

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -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()-aS<aR do aN[aO
]=((aQ-aP)*((tick()-aS)/aR))+aP wait(3.333333333333333E-2)end aN[aO]=aQ end
function WaitForClick(aN,aO,aP)if aA then return end aA=true local aQ,aR aQ=U.
MouseButton1Up:connect(function(aS,aT)aP(aS,aT)U.Visible=false aQ:disconnect()if
aR then aR:disconnect()end end)aR=U.MouseMoved:connect(function(aS,aT)aO(aS,aT)
end)U.Visible=true U.Active=true U.Parent=aN aN.AncestryChanged:connect(function
(aS,aT)if aS==aN and aT==nil then aP(nx,ny)U.Visible=false aQ:disconnect()aR:
disconnect()debugprint'forced out of wait for click'end end)aA=false end
function SetPrivilegeRank(aN,aO)while aN.PersonalServerRank<aO do game:
GetService'PersonalServerService':Promote(aN)end while aN.PersonalServerRank>aO
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()-aR<aQ do aM[aN
]=((aP-aO)*((tick()-aR)/aQ))+aO wait(3.333333333333333E-2)end aM[aN]=aP end
function WaitForClick(aM,aN,aO)if az then return end az=true local aP,aQ aP=U.
MouseButton1Up:connect(function(aR,aS)aO(aR,aS)U.Visible=false aP:disconnect()if
aQ then aQ:disconnect()end end)aQ=U.MouseMoved:connect(function(aR,aS)aN(aR,aS)
end)U.Visible=true U.Active=true U.Parent=aM aM.AncestryChanged:connect(function
(aR,aS)if aR==aM and aS==nil then aO(nx,ny)U.Visible=false aP:disconnect()aQ:
disconnect()debugprint'forced out of wait for click'end end)az=false end
function SetPrivilegeRank(aM,aN)while aM.PersonalServerRank<aN do game:
GetService'PersonalServerService':Promote(aM)end while aM.PersonalServerRank>aN
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()<aO['Player'].Name:upper()end if not aN['Score']then
return false end if not aO['Score']then return true end return aN['Score']<aO[
'Score']end function BlowThisPopsicleStand()Tabify()end function StatSort(aN,aO)
if aN.IsPrimary~=aO.IsPrimary then return aN.IsPrimary end if aN.Priority==aO.
Priority then return aN.AddId<aO.AddId end return aN.Priority<aO.Priority end
function StatChanged(aN,aO)BaseUpdate()end function StatAdded(aO,aP)while ay do
debugprint'in stat added function lock'wait(3.333333333333333E-2)end ay=true if
not(aO:IsA'StringValue'or aO:IsA'IntValue'or aO:IsA'BoolValue'or aO:IsA
'NumberValue'or aO:IsA'DoubleConstrainedValue'or aO:IsA'IntConstrainedValue')
then BlowThisPopsicleStand()else local aQ=false for aR,aS in pairs(ac)do if aS[
'Name']==aO.Name then aQ=true end end if not aQ then local aT={}aT['Name']=aO.
Name aT['Priority']=0 if aO:FindFirstChild'Priority'then aT['Priority']=aO.
Priority end aT['IsPrimary']=false if aO:FindFirstChild'IsPrimary'then aT[
'IsPrimary']=true end aT.AddId=ad ad=ad+1 table.insert(ac,aT)table.sort(ac,
StatSort)if not C:FindFirstChild(aT['Name'])then CreateStatTitle(aT['Name'])end
UpdateMaximize()end end ay=false StatChanged(aP)aO.Changed:connect(function(aQ)
StatChanged(aP,aQ)end)end function DoesStatExist(aO,aP)for aQ,aR in pairs(ae)do
if aR['Player']~=aP and aR['Player']:FindFirstChild'leaderstats'and aR['Player']
.leaderstats:FindFirstChild(aO)then return true end end return false end
function StatRemoved(aO,aP)while ay do debugprint'In Adding Stat Lock1'wait(
3.333333333333333E-2)end ay=true if aP['Frame']:FindFirstChild(aO.Name)then
debugprint'Destroyed frame!'aP['Frame'][aO.Name].Parent=nil end if not
DoesStatExist(aO.Name,aP['Player'])then for aQ,aR in ipairs(ac)do if aR['Name']
==aO.Name then table.remove(ac,aQ)if C:FindFirstChild(aO.Name)then C[aO.Name]:
Destroy()end for aS,aT in pairs(af)do if aT['Frame']:FindFirstChild(aO.Name)then
aT['Frame'][aO.Name]:Destroy()end end end end end ay=false StatChanged(aP)end
function RemoveAllStats(aO)for aP,aQ in ipairs(ac)do StatRemoved(aQ,aO)end end
function GetScoreValue(aO)if aO:IsA'DoubleConstrainedValue'or aO:IsA
'IntConstrainedValue'then return aO.ConstrainedValue elseif aO:IsA'BoolValue'
then if aO.Value then return 1 else return 0 end else return aO.Value end end
function MakeScoreEntry(aO,aP,aQ)if not aQ:FindFirstChild'PlayerScore'then
return end local aR,aS=aQ:FindFirstChild'PlayerScore':Clone(),nil wait()if aO[
'Player']:FindFirstChild'leaderstats'and aO['Player'].leaderstats:
FindFirstChild(aP['Name'])then aS=aO['Player']:FindFirstChild'leaderstats':
FindFirstChild(aP['Name'])else return end if not aO['Player'].Parent then return
end aR.Name=aP['Name']aR.Text=tostring(GetScoreValue(aS))if aP['Name']==ac[1][
'Name']then debugprint'changing score'aO['Score']=GetScoreValue(aS)if aO[
'Player']==g then p.Text=tostring(GetScoreValue(aS))end end aS.Changed:connect(
function()if not aS.Parent then return end if aP['Name']==ac[1]['Name']then aO[
'Score']=GetScoreValue(aS)if aO['Player']==g then p.Text=tostring(GetScoreValue(
aS))end end aR.Text=tostring(GetScoreValue(aS))BaseUpdate()end)return aR end
function CreateStatTitle(aO)local aP=H:FindFirstChild'PlayerScore':Clone()aP.
Name=aO aP.Text=aO if E.Value then aP.TextTransparency=0 else aP.
TextTransparency=1 end aP.Parent=C end function RecreateScoreColumns(aO)while ay
do debugprint'In Adding Stat Lock2'wait(3.333333333333333E-2)end ay=true local
aP=5 local aQ,aR=aP,0 for aS=#ac,1,-1 do local aT=ac[aS]aR=0 for aU,aV in
ipairs(aO)do local aW,aX=aV['Frame'],aV['Player']if not aW:FindFirstChild(aT[
'Name'])then local aY=MakeScoreEntry(aV,aT,aW)if aY then debugprint('adding '..
aY.Name..' to '..aV['Player'].Name)aY.Parent=aW if aV['MyTeam']and aV['MyTeam']
~=ag and not aV['MyTeam']['Frame']:FindFirstChild(aT['Name'])then local aZ=aY:
Clone()aZ.Parent=aV['MyTeam']['Frame']end end end aT['XOffset']=aP if aW:
FindFirstChild(aT['Name'])then aR=math.max(aR,aW[aT['Name']].TextBounds.X)end
end if G.Value then aR=math.max(aR,C[aT['Name']].TextBounds.X)C[aT['Name']]:
TweenPosition(UDim2.new(at,-aP,0,0),'Out','Linear',c,true)else C[aT['Name']]:
TweenPosition(UDim2.new((0.4+((0.6/#ac)*(aS-1)))-1,0,0,0),'Out','Linear',c,true)
end aT['ColumnSize']=aR aP=aP+ao+aR aQ=math.max(aP,aQ)end ar=UDim2.new(0,an+aQ-
ao,0,800)as=UDim2.new(1,-ar.X.Offset,as.Y.Scale,0)UpdateHeaderNameSize()
UpdateMaximize()ay=false end function ToggleMinimize()D.Value=not D.Value
function PlayerSortFunction(aM,aN)if aM['Score']==aN['Score']then return aM[
'Player'].Name:upper()<aN['Player'].Name:upper()end if not aM['Score']then
return false end if not aN['Score']then return true end return aM['Score']<aN[
'Score']end function BlowThisPopsicleStand()Tabify()end function StatSort(aM,aN)
if aM.IsPrimary~=aN.IsPrimary then return aM.IsPrimary end if aM.Priority==aN.
Priority then return aM.AddId<aN.AddId end return aM.Priority<aN.Priority end
function StatChanged(aM,aN)BaseUpdate()end function StatAdded(aN,aO)while ax do
debugprint'in stat added function lock'wait(3.333333333333333E-2)end ax=true if
not(aN:IsA'StringValue'or aN:IsA'IntValue'or aN:IsA'BoolValue'or aN:IsA
'NumberValue'or aN:IsA'DoubleConstrainedValue'or aN:IsA'IntConstrainedValue')
then BlowThisPopsicleStand()else local aP=false for aQ,aR in pairs(ac)do if aR[
'Name']==aN.Name then aP=true end end if not aP then local aS={}aS['Name']=aN.
Name aS['Priority']=0 if aN:FindFirstChild'Priority'then aS['Priority']=aN.
Priority end aS['IsPrimary']=false if aN:FindFirstChild'IsPrimary'then aS[
'IsPrimary']=true end aS.AddId=ad ad=ad+1 table.insert(ac,aS)table.sort(ac,
StatSort)if not C:FindFirstChild(aS['Name'])then CreateStatTitle(aS['Name'])end
UpdateMaximize()end end ax=false StatChanged(aO)aN.Changed:connect(function(aP)
StatChanged(aO,aP)end)end function DoesStatExist(aN,aO)for aP,aQ in pairs(ae)do
if aQ['Player']~=aO and aQ['Player']:FindFirstChild'leaderstats'and aQ['Player']
.leaderstats:FindFirstChild(aN)then return true end end return false end
function StatRemoved(aN,aO)while ax do debugprint'In Adding Stat Lock1'wait(
3.333333333333333E-2)end ax=true if aO['Frame']:FindFirstChild(aN.Name)then
debugprint'Destroyed frame!'aO['Frame'][aN.Name].Parent=nil end if not
DoesStatExist(aN.Name,aO['Player'])then for aP,aQ in ipairs(ac)do if aQ['Name']
==aN.Name then table.remove(ac,aP)if C:FindFirstChild(aN.Name)then C[aN.Name]:
Destroy()end for aR,aS in pairs(af)do if aS['Frame']:FindFirstChild(aN.Name)then
aS['Frame'][aN.Name]:Destroy()end end end end end ax=false StatChanged(aO)end
function RemoveAllStats(aN)for aO,aP in ipairs(ac)do StatRemoved(aP,aN)end end
function GetScoreValue(aN)if aN:IsA'DoubleConstrainedValue'or aN:IsA
'IntConstrainedValue'then return aN.ConstrainedValue elseif aN:IsA'BoolValue'
then if aN.Value then return 1 else return 0 end else return aN.Value end end
function MakeScoreEntry(aN,aO,aP)if not aP:FindFirstChild'PlayerScore'then
return end local aQ,aR=aP:FindFirstChild'PlayerScore':Clone(),nil wait()if aN[
'Player']:FindFirstChild'leaderstats'and aN['Player'].leaderstats:
FindFirstChild(aO['Name'])then aR=aN['Player']:FindFirstChild'leaderstats':
FindFirstChild(aO['Name'])else return end if not aN['Player'].Parent then return
end aQ.Name=aO['Name']aQ.Text=tostring(GetScoreValue(aR))if aO['Name']==ac[1][
'Name']then debugprint'changing score'aN['Score']=GetScoreValue(aR)if aN[
'Player']==g then p.Text=tostring(GetScoreValue(aR))end end aR.Changed:connect(
function()if not aR.Parent then return end if aO['Name']==ac[1]['Name']then aN[
'Score']=GetScoreValue(aR)if aN['Player']==g then p.Text=tostring(GetScoreValue(
aR))end end aQ.Text=tostring(GetScoreValue(aR))BaseUpdate()end)return aQ end
function CreateStatTitle(aN)local aO=H:FindFirstChild'PlayerScore':Clone()aO.
Name=aN aO.Text=aN if E.Value then aO.TextTransparency=0 else aO.
TextTransparency=1 end aO.Parent=C end function RecreateScoreColumns(aN)while ax
do debugprint'In Adding Stat Lock2'wait(3.333333333333333E-2)end ax=true local
aO=5 local aP,aQ=aO,0 for aR=#ac,1,-1 do local aS=ac[aR]aQ=0 for aT,aU in
ipairs(aN)do local aV,aW=aU['Frame'],aU['Player']if not aV:FindFirstChild(aS[
'Name'])then local aX=MakeScoreEntry(aU,aS,aV)if aX then debugprint('adding '..
aX.Name..' to '..aU['Player'].Name)aX.Parent=aV if aU['MyTeam']and aU['MyTeam']
~=ag and not aU['MyTeam']['Frame']:FindFirstChild(aS['Name'])then local aY=aX:
Clone()aY.Parent=aU['MyTeam']['Frame']end end end aS['XOffset']=aO if aV:
FindFirstChild(aS['Name'])then aQ=math.max(aQ,aV[aS['Name']].TextBounds.X)end
end if G.Value then aQ=math.max(aQ,C[aS['Name']].TextBounds.X)C[aS['Name']]:
TweenPosition(UDim2.new(as,-aO,0,0),'Out','Linear',c,true)else C[aS['Name']]:
TweenPosition(UDim2.new((0.4+((0.6/#ac)*(aR-1)))-1,0,0,0),'Out','Linear',c,true)
end aS['ColumnSize']=aQ aO=aO+an+aQ aP=math.max(aO,aP)end aq=UDim2.new(0,am+aP-
an,0,800)ar=UDim2.new(1,-aq.X.Offset,ar.Y.Scale,0)UpdateHeaderNameSize()
UpdateMaximize()ax=false end function ToggleMinimize()D.Value=not D.Value
UpdateStatNames()end function ToggleMaximize()E.Value=not E.Value
RecreateScoreColumns(ae)end function Tabify()F.Value=true E.Value=false D.Value=
true UpdateMinimize()F.Value=true i:TweenPosition(UDim2.new(ar.X.Scale,ar.X.
true UpdateMinimize()F.Value=true i:TweenPosition(UDim2.new(aq.X.Scale,aq.X.
Offset-10,0,0),'Out','Linear',c*1.2,true)end function UnTabify()if F.Value then
F.Value=false i:TweenPosition(UDim2.new(0,0,0,0),'Out','Linear',c*1.2,true)end
end function UpdateMinimize()if D.Value then if E.Value then ToggleMaximize()end
if not F.Value then j:TweenSizeAndPosition(UDim2.new(0.01,o.TextBounds.X,ar.Y.
Scale,ar.Y.Offset),UDim2.new(0.99,-o.TextBounds.X,as.Y.Scale,0),'Out','Linear',c
*1.2,true)else j:TweenSizeAndPosition(ar,as,'Out','Linear',c*1.2,true)end v:
if not F.Value then j:TweenSizeAndPosition(UDim2.new(0.01,o.TextBounds.X,aq.Y.
Scale,aq.Y.Offset),UDim2.new(0.99,-o.TextBounds.X,ar.Y.Scale,0),'Out','Linear',c
*1.2,true)else j:TweenSizeAndPosition(aq,ar,'Out','Linear',c*1.2,true)end v:
TweenPosition(UDim2.new(0,0,-1,0),'Out','Linear',c*1.2,true)r:TweenPosition(
UDim2.new(0,0,0,0),'Out','Linear',c*1.2,true)k.Size=UDim2.new(1,0,m,0)t.Image=
'http://www.roblox.com/asset/?id=94692731'else if not E.Value then j:
TweenSizeAndPosition(ar,as,'Out','Linear',c*1.2,true)end au=math.min(math.max(au
,-1),-1+(#ai*I.Size.Y.Scale))UpdateScrollPosition()v.Position=UDim2.new(0,0,au,0
)local aO=(au+v.Size.Y.Scale)r.Position=UDim2.new(0,0,aO,0)k.Size=UDim2.new(1,0,
aO+m,0)t.Image='http://www.roblox.com/asset/?id=94825585'end end function
UpdateMaximize()if E.Value then for aO=1,#ac,1 do local aP=ac[aO]C[aP['Name']]:
TweenPosition(UDim2.new(0.4+((0.6/#ac)*(aO-1))-1,0,0,0),'Out','Linear',c,true)
TweenSizeAndPosition(aq,ar,'Out','Linear',c*1.2,true)end at=math.min(math.max(at
,-1),-1+(#ai*I.Size.Y.Scale))UpdateScrollPosition()v.Position=UDim2.new(0,0,at,0
)local aN=(at+v.Size.Y.Scale)r.Position=UDim2.new(0,0,aN,0)k.Size=UDim2.new(1,0,
aN+m,0)t.Image='http://www.roblox.com/asset/?id=94825585'end end function
UpdateMaximize()if E.Value then for aN=1,#ac,1 do local aO=ac[aN]C[aO['Name']]:
TweenPosition(UDim2.new(0.4+((0.6/#ac)*(aN-1))-1,0,0,0),'Out','Linear',c,true)
end if D.Value then ToggleMinimize()else UpdateMinimize()end j:
TweenSizeAndPosition(ap,aq,'Out','Linear',c*1.2,true)p:TweenPosition(UDim2.new(0
TweenSizeAndPosition(ao,ap,'Out','Linear',c*1.2,true)p:TweenPosition(UDim2.new(0
,0,o.Position.Y.Scale,0),'Out','Linear',c*1.2,true)o:TweenPosition(UDim2.new(-
0.1,-p.TextBounds.x,o.Position.Y.Scale,0),'Out','Linear',c*1.2,true)l.Background
.Image='http://www.roblox.com/asset/?id='..b['LargeHeader']r.Background.Image=
'http://www.roblox.com/asset/?id='..b['LargeBottom']for aO,aP in ipairs(ai)do if
(aO%2)~=1 then aP.Background.Image='http://www.roblox.com/asset/?id='..b[
'LargeDark']else aP.Background.Image='http://www.roblox.com/asset/?id='..b[
'LargeLight']end end for aQ,aR in ipairs(ah)do if aR:FindFirstChild
'ClickListener'then aR.ClickListener.Size=UDim2.new(0.974,0,aR.ClickListener.
Size.Y.Scale,0)end for aS=1,#ac,1 do local aT=ac[aS]if aR:FindFirstChild(aT[
'Name'])then aR[aT['Name']]:TweenPosition(UDim2.new(0.4+((0.6/#ac)*(aS-1))-1,0,0
,0),'Out','Linear',c,true)end end end for aS,aT in ipairs(ae)do WaitForChild(aT[
'Frame'],'TitleFrame').Size=UDim2.new(0.38,0,aT['Frame'].TitleFrame.Size.Y.Scale
,0)end for aU,aV in ipairs(af)do WaitForChild(aV['Frame'],'TitleFrame').Size=
UDim2.new(0.38,0,aV['Frame'].TitleFrame.Size.Y.Scale,0)end else if not D.Value
then j:TweenSizeAndPosition(ar,as,'Out','Linear',c*1.2,true)end p:TweenPosition(
'http://www.roblox.com/asset/?id='..b['LargeBottom']for aN,aO in ipairs(ai)do if
(aN%2)~=1 then aO.Background.Image='http://www.roblox.com/asset/?id='..b[
'LargeDark']else aO.Background.Image='http://www.roblox.com/asset/?id='..b[
'LargeLight']end end for aP,aQ in ipairs(ah)do if aQ:FindFirstChild
'ClickListener'then aQ.ClickListener.Size=UDim2.new(0.974,0,aQ.ClickListener.
Size.Y.Scale,0)end for aR=1,#ac,1 do local aS=ac[aR]if aQ:FindFirstChild(aS[
'Name'])then aQ[aS['Name']]:TweenPosition(UDim2.new(0.4+((0.6/#ac)*(aR-1))-1,0,0
,0),'Out','Linear',c,true)end end end for aR,aS in ipairs(ae)do WaitForChild(aS[
'Frame'],'TitleFrame').Size=UDim2.new(0.38,0,aS['Frame'].TitleFrame.Size.Y.Scale
,0)end for aT,aU in ipairs(af)do WaitForChild(aU['Frame'],'TitleFrame').Size=
UDim2.new(0.38,0,aU['Frame'].TitleFrame.Size.Y.Scale,0)end else if not D.Value
then j:TweenSizeAndPosition(aq,ar,'Out','Linear',c*1.2,true)end p:TweenPosition(
UDim2.new(0,0,0.4,0),'Out','Linear',c*1.2,true)o:TweenPosition(UDim2.new(0,0,o.
Position.Y.Scale,0),'Out','Linear',c*1.2,true)l.Background.Image=
'http://www.roblox.com/asset/?id='..b['NormalHeader']r.Background.Image=
'http://www.roblox.com/asset/?id='..b['NormalBottom']for aO,aR in ipairs(ai)do
if aO%2~=1 then aR.Background.Image='http://www.roblox.com/asset/?id='..b[
'midDark']else aR.Background.Image='http://www.roblox.com/asset/?id='..b[
'midLight']end end for aU,aV in ipairs(ah)do if aV:FindFirstChild'ClickListener'
then aV.ClickListener.Size=UDim2.new(0.96,0,aV.ClickListener.Size.Y.Scale,0)for
aW=1,#ac,1 do local aX=ac[aW]if aV:FindFirstChild(aX['Name'])and aX['XOffset']
then aV[aX['Name']]:TweenPosition(UDim2.new(at,-aX['XOffset'],0,0),'Out',
'Linear',c,true)end end end end for aW,aX in ipairs(af)do WaitForChild(aX[
'Frame'],'TitleFrame').Size=UDim2.new(0,an*0.9,aX['Frame'].TitleFrame.Size.Y.
Scale,0)end for aY,aZ in ipairs(ae)do WaitForChild(aZ['Frame'],'TitleFrame').
Size=UDim2.new(0,an*0.9,aZ['Frame'].TitleFrame.Size.Y.Scale,0)end end end
function ExpandNames()if#ac~=0 then for aU,aV in pairs(C:GetChildren())do Spawn(
function()TweenProperty(aV,'TextTransparency',aV.TextTransparency,0,c)end)end m=
'http://www.roblox.com/asset/?id='..b['NormalBottom']for aN,aQ in ipairs(ai)do
if aN%2~=1 then aQ.Background.Image='http://www.roblox.com/asset/?id='..b[
'midDark']else aQ.Background.Image='http://www.roblox.com/asset/?id='..b[
'midLight']end end for aT,aU in ipairs(ah)do if aU:FindFirstChild'ClickListener'
then aU.ClickListener.Size=UDim2.new(0.96,0,aU.ClickListener.Size.Y.Scale,0)for
aV=1,#ac,1 do local aW=ac[aV]if aU:FindFirstChild(aW['Name'])and aW['XOffset']
then aU[aW['Name']]:TweenPosition(UDim2.new(as,-aW['XOffset'],0,0),'Out',
'Linear',c,true)end end end end for aV,aW in ipairs(af)do WaitForChild(aW[
'Frame'],'TitleFrame').Size=UDim2.new(0,am*0.9,aW['Frame'].TitleFrame.Size.Y.
Scale,0)end for aX,aY in ipairs(ae)do WaitForChild(aY['Frame'],'TitleFrame').
Size=UDim2.new(0,am*0.9,aY['Frame'].TitleFrame.Size.Y.Scale,0)end end end
function ExpandNames()if#ac~=0 then for aN,aU in pairs(C:GetChildren())do Spawn(
function()TweenProperty(aU,'TextTransparency',aU.TextTransparency,0,c)end)end m=
0.09 l:TweenSizeAndPosition(UDim2.new(l.Size.X.Scale,l.Size.X.Offset,m,0),l.
Position,'Out','Linear',c*1.2,true)u:TweenPosition(UDim2.new(u.Position.X.Scale,
0,m,0),'Out','Linear',c*1.2,true)q:TweenPosition(UDim2.new(0,0,m,0),'Out',
'Linear',c*1.2,true)end end function CloseNames()if#ac~=0 then m=0.07 if not E.
Value then for aU,aV in pairs(C:GetChildren())do Spawn(function()TweenProperty(
aV,'TextTransparency',aV.TextTransparency,1,c)end)end end q:TweenPosition(UDim2.
Value then for aN,aU in pairs(C:GetChildren())do Spawn(function()TweenProperty(
aU,'TextTransparency',aU.TextTransparency,1,c)end)end end q:TweenPosition(UDim2.
new(0,0,m,0),'Out','Linear',c*1.2,true)l:TweenSizeAndPosition(UDim2.new(l.Size.X
.Scale,l.Size.X.Offset,m,0),l.Position,'Out','Linear',c*1.2,true)u:
TweenPosition(UDim2.new(u.Position.X.Scale,0,m,0),'Out','Linear',c*1.2,true)end
end function UpdateStatNames()if not G.Value or D.Value then CloseNames()else
ExpandNames()end end function OnScrollWheelMove(aU)if not(F.Value or D.Value or
aB)then local aV=y.Position local aY=math.max(math.min(aV.Y.Scale+aU,
GetMaxScroll()),GetMinScroll())y.Position=UDim2.new(aV.X.Scale,aV.X.Offset,aY,aV
.Y.Offset)UpdateScrollPosition()end end function AttachScrollWheel()if aE then
return end aE={}table.insert(aE,h.WheelForward:connect(function()
OnScrollWheelMove(0.05)end))table.insert(aE,h.WheelBackward:connect(function()
OnScrollWheelMove(-5E-2)end))end function DetachScrollWheel()if aE then for aU,
aV in pairs(aE)do aV:disconnect()end end aE=nil end k.MouseEnter:connect(
ExpandNames()end end function OnScrollWheelMove(aN)if not(F.Value or D.Value or
aA)then local aU=y.Position local aX=math.max(math.min(aU.Y.Scale+aN,
GetMaxScroll()),GetMinScroll())y.Position=UDim2.new(aU.X.Scale,aU.X.Offset,aX,aU
.Y.Offset)UpdateScrollPosition()end end function AttachScrollWheel()if aD then
return end aD={}table.insert(aD,h.WheelForward:connect(function()
OnScrollWheelMove(0.05)end))table.insert(aD,h.WheelBackward:connect(function()
OnScrollWheelMove(-5E-2)end))end function DetachScrollWheel()if aD then for aN,
aU in pairs(aD)do aU:disconnect()end end aD=nil end k.MouseEnter:connect(
function()if not(D.Value or F.Value)then AttachScrollWheel()end end)k.MouseLeave
:connect(function()DetachScrollWheel()end)function UpdateScrollBarVisibility()if
AreAllEntriesOnScreen()then x.BackgroundTransparency=1 else x.
BackgroundTransparency=0 UpdateScrollBarSize()end end function
UpdateScrollBarSize()local aU,aV=#ai*H.Size.Y.Scale,(v.Position.Y.Scale+1)x.Size
=UDim2.new(1,0,aV/aU,0)end function UpdateScrollPosition()local aU,aV=
GetMinScroll(),GetMaxScroll()local aY,aZ=aV-aU,math.max(math.min(y.Position.Y.
Scale,aV),aU)y.Position=UDim2.new(y.Position.X.Scale,y.Position.X.Offset,aZ,y.
Position.Y.Offset)local a_=1-x.Size.Y.Scale x.Position=UDim2.new(0,0,a_-(a_*((y.
Position.Y.Scale-aU)/aY)),0)end function StartDrag(aU,aV,aY)local aZ=true
WaitForChild(aU['Frame'],'ClickListener')local function dragExit()if aU['Player'
]and aw and aZ and aU['Player']~=g and aw.userId>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()-ak<al)or aB then return end ak=
MouseButton1Down:connect(function()if(time()-aj<ak)or aA then return end aj=
time()if F.Value then UnTabify()else StartMinimizeDrag()end end)n.
MouseButton1Click:connect(function()if(time()-ak<al)or aB then return end ak=
MouseButton1Click:connect(function()if(time()-aj<ak)or aA then return end aj=
time()if F.Value then UnTabify()elseif not G.Value then G.Value=true BaseUpdate(
)else ToggleMaximize()end end)n.MouseButton2Click:connect(function()if(time()-ak
<al)or aB then return end ak=time()if F.Value then UnTabify()elseif E.Value then
)else ToggleMaximize()end end)n.MouseButton2Click:connect(function()if(time()-aj
<ak)or aA then return end aj=time()if F.Value then UnTabify()elseif E.Value then
ToggleMaximize()elseif G.Value then G.Value=false BaseUpdate()else Tabify()end
end)function AddMiddleBGFrame()local aU=I:Clone()aU.Position=UDim2.new(0.5,0,(#
ai*aU.Size.Y.Scale),0)if(#ai+1)%2~=1 then if E.Value then aU.Background.Image=
'http://www.roblox.com/asset/?id='..b['LargeDark']else aU.Background.Image=
'http://www.roblox.com/asset/?id='..b['midDark']end else if E.Value then aU.
Background.Image='http://www.roblox.com/asset/?id='..b['LargeLight']else aU.
Background.Image='http://www.roblox.com/asset/?id='..b['midLight']end end aU.
Parent=y table.insert(ai,aU)if#ai<aF and not aG then au=-1+(#ai*I.Size.Y.Scale)
end)function AddMiddleBGFrame()local aN=I:Clone()aN.Position=UDim2.new(0.5,0,(#
ai*aN.Size.Y.Scale),0)if(#ai+1)%2~=1 then if E.Value then aN.Background.Image=
'http://www.roblox.com/asset/?id='..b['LargeDark']else aN.Background.Image=
'http://www.roblox.com/asset/?id='..b['midDark']end else if E.Value then aN.
Background.Image='http://www.roblox.com/asset/?id='..b['LargeLight']else aN.
Background.Image='http://www.roblox.com/asset/?id='..b['midLight']end end aN.
Parent=y table.insert(ai,aN)if#ai<aE and not aF then at=-1+(#ai*I.Size.Y.Scale)
end if not D.Value then UpdateMinimize()end end function RemoveMiddleBGFrame()ai
[#ai]:Destroy()table.remove(ai,#ai)if not D.Value then UpdateMinimize()end end
local aU={'Size8','Size9','Size10','Size11','Size12','Size14','Size24','Size36',
'Size48'}function ChangeHeaderName(aV)o.Text=aV UpdateHeaderNameSize()end
function UpdateHeaderNameSize()local aV=o:Clone()aV.Position=UDim2.new(2,0,2,0)
aV.Parent=i local aY=7 aV.FontSize=aU[aY]Delay(0.2,function()while aV.TextBounds
.x==0 do wait(3.333333333333333E-2)end while aV.TextBounds.x-ar.X.Offset>1 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']<aY['ID']end if not aV['TeamScore']then return false end if not aY[
'TeamScore']then return true end return aV['TeamScore']<aY['TeamScore']end
function SortTeams(aV)for aY,aZ in ipairs(aV)do table.sort(aZ['MyPlayers'],
PlayerSortFunction)AddTeamScores(aZ)end table.sort(aV,TeamSortFunc)end function
ae,PlayerSortFunction)for aU,aX in ipairs(ae)do ah[aU]=aX['Frame']end for aY=#ae
+1,#ah,1 do ah[aY]=nil end UpdateMinimize()end function InsertPlayerFrame(aU)
while aw do debugprint('waiting to insert '..aU.Name)wait(3.333333333333333E-2)
end aw=true local aX=H:Clone()WaitForChild(WaitForChild(aX,'TitleFrame'),'Title'
).Text=aU.Name aX.Position=UDim2.new(1,0,(#ah*aX.Size.Y.Scale),0)local aY=
GetFriendStatus(aU)aX:FindFirstChild'BCLabel'.Image=getMembershipTypeIcon(aU.
MembershipType,aU.Name)aX:FindFirstChild'FriendLabel'.Image=getFriendStatusIcon(
aY)aX.Name=aU.Name WaitForChild(WaitForChild(aX,'TitleFrame'),'Title').Text=aU.
Name aX.FriendLabel.Position=aX.FriendLabel.Position+UDim2.new(0,17,0,0)aX.
TitleFrame.Title.Position=aX.TitleFrame.Title.Position+UDim2.new(0,17,0,0)if aX:
FindFirstChild'FriendLabel'.Image~=''then aX.TitleFrame.Title.Position=aX.
TitleFrame.Title.Position+UDim2.new(0,17,0,0)end if aU.Name==g.Name then aX.
TitleFrame.Title.Font='ArialBold'aX.PlayerScore.Font='ArialBold'
ChangeHeaderName(aU.Name)local aZ=aX.TitleFrame.Title:Clone()aZ.TextColor3=
Color3.new(0,0,0)aZ.TextTransparency=0 aZ.ZIndex=2 aZ.Position=aX.TitleFrame.
Title.Position+UDim2.new(0,1,0,1)aZ.Name='DropShadow'aZ.Parent=aX.TitleFrame end
aX.TitleFrame.Title.Font='ArialBold'aX.Parent=y aX:TweenPosition(UDim2.new(0.5,0
,(#ah*aX.Size.Y.Scale),0),'Out','Linear',c,true)UpdateMinimize()local aZ={}aZ[
'Frame']=aX aZ['Player']=aU aZ['ID']=ad ad=ad+1 table.insert(ae,aZ)if#af~=0 then
if aU.Neutral then aZ['MyTeam']=nil if not ag then AddNeutralTeam()else
AddPlayerToTeam(ag,aZ)end else local a_=false for a0,a1 in ipairs(af)do if a1[
'MyTeam'].TeamColor==aU.TeamColor then AddPlayerToTeam(a1,aZ)aZ['MyTeam']=a1 a_=
true end end if not a_ then aZ['MyTeam']=nil if not ag then AddNeutralTeam()else
AddPlayerToTeam(ag,aZ)end aZ['MyTeam']=ag end end end if aU:FindFirstChild
'leaderstats'then LeaderstatsAdded(aZ)end aU.ChildAdded:connect(function(a_)if
a_.Name=='leaderstats'then while aw do debugprint'in adding leaderstats lock'
wait(3.333333333333333E-2)end aw=true LeaderstatsAdded(aZ)aw=false end end)aU.
ChildRemoved:connect(function(a_)if aU==g and a_.Name=='leaderstats'then
LeaderstatsRemoved(a_,aZ)end end)aU.Changed:connect(function(a_)PlayerChanged(aZ
,a_)end)local a_=WaitForChild(aX,'ClickListener')a_.Active=true a_.
MouseButton1Down:connect(function(a0,a1)OnPlayerEntrySelect(aZ,a0,a1)end)
AddMiddleBGFrame()BaseUpdate()aw=false end function RemovePlayerFrame(aU)while
aw do debugprint'in removing player frame lock'wait(3.333333333333333E-2)end aw=
true local aX for aY,aZ in ipairs(ae)do if aU==aZ['Player']then if z.Parent==aZ[
'Frame']then z.Parent=nil end aZ['Frame']:Destroy()aX=aZ['MyTeam']table.remove(
ae,aY)end end if aX then for a_,a0 in ipairs(aX['MyPlayers'])do if a0['Player']
==aU then RemovePlayerFromTeam(aX,a_)end end end RemoveMiddleBGFrame()
UpdateMinimize()BaseUpdate()aw=false end f.ChildRemoved:connect(
RemovePlayerFrame)function UnrollTeams(aU,aX)local aY=0 if ag and not ag[
'IsHidden']then for aZ,a_ in ipairs(ag['MyPlayers'])do aY=aY+1 aX[aY]=a_['Frame'
]end aY=aY+1 aX[aY]=ag['Frame']end for aZ,a_ in ipairs(aU)do if not a_[
'IsHidden']then for a0,a1 in ipairs(a_.MyPlayers)do aY=aY+1 aX[aY]=a1['Frame']
end aY=aY+1 aX[aY]=a_['Frame']end end for a0=aY+1,#aX,1 do aX[a0]=nil end end
function TeamSortFunc(aU,aX)if aU['TeamScore']==aX['TeamScore']then return aU[
'ID']<aX['ID']end if not aU['TeamScore']then return false end if not aX[
'TeamScore']then return true end return aU['TeamScore']<aX['TeamScore']end
function SortTeams(aU)for aX,aY in ipairs(aU)do table.sort(aY['MyPlayers'],
PlayerSortFunction)AddTeamScores(aY)end table.sort(aU,TeamSortFunc)end function
TeamListModeUpdate()RecreateScoreColumns(ae)SortTeams(af)if ag then
AddTeamScores(ag)end UnrollTeams(af,ah)end function AddTeamScores(aV)for aY=1,#
ac,1 do local aZ,a_=ac[aY],0 for a0,a1 in ipairs(aV['MyPlayers'])do local a2=a1[
'Player']:FindFirstChild'leaderstats'and a1['Player'].leaderstats:
FindFirstChild(aZ['Name'])if a2 and not a2:IsA'StringValue'then a_=a_+
GetScoreValue((a1['Player'].leaderstats)[aZ['Name']])end end if aV['Frame']:
FindFirstChild(aZ['Name'])then aV['Frame'][aZ['Name']].Text=tostring(a_)end end
UpdateMinimize()end function FindRemovePlayerFromTeam(aV)if aV['MyTeam']then for
aY,aZ in ipairs(aV['MyTeam']['MyPlayers'])do if aZ['Player']==aV['Player']then
RemovePlayerFromTeam(aV['MyTeam'],aY)return end end elseif ag then for aY,aZ in
ipairs(ag['MyPlayers'])do if aZ['Player']==aV['Player']then
RemovePlayerFromTeam(ag,aY)return end end end end function RemovePlayerFromTeam(
aV,aY)table.remove(aV['MyPlayers'],aY)if aV==ag and#aV['MyPlayers']==0 then
RemoveNeutralTeam()end end function AddPlayerToTeam(aV,aY)
FindRemovePlayerFromTeam(aY)table.insert(aV['MyPlayers'],aY)aY['MyTeam']=aV if
aV['IsHidden']then aV['Frame'].Parent=y AddMiddleBGFrame()end aV['IsHidden']=
false end function SetPlayerToTeam(aV)FindRemovePlayerFromTeam(aV)local aY=false
for aZ,a_ in ipairs(af)do if a_['MyTeam'].TeamColor==aV['Player'].TeamColor then
AddPlayerToTeam(a_,aV)aY=true end end if not aY and#(game.Teams:GetTeams())>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
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

View File

@ -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 or G>(J.AbsolutePosition.x+J.
AbsoluteSize.x)then reorganizeLoadout(F,false)return false elseif H<J.
AbsolutePosition.y or 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 or F>(I.AbsolutePosition.x+I.
AbsoluteSize.x))or(G<I.AbsolutePosition.y 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)
)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)

View File

@ -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
<t then self:Append','end end else local u=true for v,w in j(p)do if not u then
self:Append','end u=false self:ParseString(v)self:Append':'self:Write(w)end end
self:Append(s)end function o:WriteError(p)e(b.format(
'Encoding of %s unsupported',g(p)))end function o:WriteFunction(p)if p==Null
then self:WriteNil()else self:WriteError(p)end end local p={s='',i=0}function p:
New(q)local r={}i(r,self)self.__index=self r.s=q or r.s return r end function p:
Peek()local q=self.i+1 if q<=#self.s then return b.sub(self.s,q,q)end return nil
end function p:Next()self.i=self.i+1 if self.i<=#self.s then return b.sub(self.s
,self.i,self.i)end return nil end function p:All()return self.s end local q={
escapes={['t']='\t',['n']='\n',['f']='\f',['r']='\r',['b']='\b'}}function q:New(
r)local s={}s.reader=p:New(r)i(s,self)self.__index=self return s end function q:
Read()self:SkipWhiteSpace()local r=self:Peek()if r==nil then e(b.format(
"Nil string: '%s'",self:All()))elseif r=='{'then return self:ReadObject()elseif
r=='['then return self:ReadArray()elseif r=='"'then return self:ReadString()
elseif b.find(r,'[%+%-%d]')then return self:ReadNumber()elseif r=='t'then return
self:ReadTrue()elseif r=='f'then return self:ReadFalse()elseif r=='n'then return
self:ReadNull()elseif r=='/'then self:ReadComment()return self:Read()else return
nil end end function q:ReadTrue()self:TestReservedWord{'t','r','u','e'}return
true end function q:ReadFalse()self:TestReservedWord{'f','a','l','s','e'}return
false end function q:ReadNull()self:TestReservedWord{'n','u','l','l'}return nil
end function q:TestReservedWord(r)for s,t in k(r)do if self:Next()~=t then e(b.
format("Error reading '%s': %s",d.concat(r),self:All()))end end end function q:
ReadNumber()local r,s=self:Next(),self:Peek()while s~=nil and b.find(s,
'[%+%-%d%.eE]')do r=r..self:Next()s=self:Peek()end r=f(r)if r==nil then e(b.
format("Invalid number: '%s'",r))else return r end end function q:ReadString()
local r=''l(self:Next()=='"')while self:Peek()~='"'do local s=self:Next()if s==
'\\'then s=self:Next()if self.escapes[s]then s=self.escapes[s]end end r=r..s end
l(self:Next()=='"')local s=function(s)return b.char(f(s,16))end return b.gsub(r,
'u%x%x(%x%x)',s)end function q:ReadComment()l(self:Next()=='/')local r=self:
Next()if r=='/'then self:ReadSingleLineComment()elseif r=='*'then self:
local a,b,c,d,e,f,g,h,i,j,k,l,m={},string,math,table,error,tonumber,tostring,
type,setmetatable,pairs,ipairs,assert,{buffer={}}function m:New()local n={}i(n,
self)self.__index=self n.buffer={}return n end function m:Append(n)self.buffer[#
self.buffer+1]=n end function m:ToString()return d.concat(self.buffer)end local
n={backslashes={['\b']='\\b',['\t']='\\t',['\n']='\\n',['\f']='\\f',['\r']='\\r'
,['"']='\\"',['\\']='\\\\',['/']='\\/'}}function n:New()local o={}o.writer=m:
New()i(o,self)self.__index=self return o end function n:Append(o)self.writer:
Append(o)end function n:ToString()return self.writer:ToString()end function n:
Write(o)local p=h(o)if p=='nil'then self:WriteNil()elseif p=='boolean'or p==
'number'then self:WriteString(o)elseif p=='string'then self:ParseString(o)elseif
p=='table'then self:WriteTable(o)elseif p=='function'then self:WriteFunction(o)
elseif p=='thread'or p=='userdata'then self:WriteError(o)end end function n:
WriteNil()self:Append'null'end function n:WriteString(o)self:Append(g(o))end
function n:ParseString(o)self:Append'"'self:Append(b.gsub(o,'[%z%c\\"/]',
function(p)local q=self.backslashes[p]if q then return q end return b.format(
'\\u%.4X',b.byte(p))end))self:Append'"'end function n:IsArray(o)local p,q=0,
function(p)if h(p)=='number'and p>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 t<s
then self:Append','end end else local t=true for u,v in j(o)do if not t then
self:Append','end t=false self:ParseString(u)self:Append':'self:Write(v)end end
self:Append(r)end function n:WriteError(o)e(b.format(
'Encoding of %s unsupported',g(o)))end function n:WriteFunction(o)if o==Null
then self:WriteNil()else self:WriteError(o)end end local o={s='',i=0}function o:
New(p)local q={}i(q,self)self.__index=self q.s=p or q.s return q end function o:
Peek()local p=self.i+1 if p<=#self.s then return b.sub(self.s,p,p)end return nil
end function o:Next()self.i=self.i+1 if self.i<=#self.s then return b.sub(self.s
,self.i,self.i)end return nil end function o:All()return self.s end local p={
escapes={['t']='\t',['n']='\n',['f']='\f',['r']='\r',['b']='\b'}}function p:New(
q)local r={}r.reader=o:New(q)i(r,self)self.__index=self return r end function p:
Read()self:SkipWhiteSpace()local q=self:Peek()if q==nil then e(b.format(
"Nil string: '%s'",self:All()))elseif q=='{'then return self:ReadObject()elseif
q=='['then return self:ReadArray()elseif q=='"'then return self:ReadString()
elseif b.find(q,'[%+%-%d]')then return self:ReadNumber()elseif q=='t'then return
self:ReadTrue()elseif q=='f'then return self:ReadFalse()elseif q=='n'then return
self:ReadNull()elseif q=='/'then self:ReadComment()return self:Read()else return
nil end end function p:ReadTrue()self:TestReservedWord{'t','r','u','e'}return
true end function p:ReadFalse()self:TestReservedWord{'f','a','l','s','e'}return
false end function p:ReadNull()self:TestReservedWord{'n','u','l','l'}return nil
end function p:TestReservedWord(q)for r,s in k(q)do if self:Next()~=s then e(b.
format("Error reading '%s': %s",d.concat(q),self:All()))end end end function p:
ReadNumber()local q,r=self:Next(),self:Peek()while r~=nil and b.find(r,
'[%+%-%d%.eE]')do q=q..self:Next()r=self:Peek()end q=f(q)if q==nil then e(b.
format("Invalid number: '%s'",q))else return q end end function p:ReadString()
local q=''l(self:Next()=='"')while self:Peek()~='"'do local r=self:Next()if r==
'\\'then r=self:Next()if self.escapes[r]then r=self.escapes[r]end end q=q..r end
l(self:Next()=='"')local r=function(r)return b.char(f(r,16))end return b.gsub(q,
'u%x%x(%x%x)',r)end function p:ReadComment()l(self:Next()=='/')local q=self:
Next()if q=='/'then self:ReadSingleLineComment()elseif q=='*'then self:
ReadBlockComment()else e(b.format('Invalid comment: %s',self:All()))end end
function q:ReadBlockComment()local r=false while not r do local s=self:Next()if
s=='*'and self:Peek()=='/'then r=true end if not r and s=='/'and self:Peek()==
function p:ReadBlockComment()local q=false while not q do local r=self:Next()if
r=='*'and self:Peek()=='/'then q=true end if not q and r=='/'and self:Peek()==
'*'then e(b.format("Invalid comment: %s, '/*' illegal.",self:All()))end end self
:Next()end function q:ReadSingleLineComment()local r=self:Next()while r~='\r'and
r~='\n'do r=self:Next()end end function q:ReadArray()local r={}l(self:Next()==
'[')local s=false if self:Peek()==']'then s=true end while not s do local t=self
:Read()r[#r+1]=t self:SkipWhiteSpace()if self:Peek()==']'then s=true end if not
s then local u=self:Next()if u~=','then e(b.format(
"Invalid array: '%s' due to: '%s'",self:All(),u))end end end l(']'==self:Next())
return r end function q:ReadObject()local r={}l(self:Next()=='{')local s=false
if self:Peek()=='}'then s=true end while not s do local t=self:Read()if h(t)~=
'string'then e(b.format('Invalid non-string object key: %s',t))end self:
SkipWhiteSpace()local u=self:Next()if u~=':'then e(b.format(
"Invalid object: '%s' due to: '%s'",self:All(),u))end self:SkipWhiteSpace()local
v=self:Read()r[t]=v self:SkipWhiteSpace()if self:Peek()=='}'then s=true end if
not s then u=self:Next()if u~=','then e(b.format(
"Invalid array: '%s' near: '%s'",self:All(),u))end end end l(self:Next()=='}')
return r end function q:SkipWhiteSpace()local r=self:Peek()while r~=nil and b.
find(r,'[%s/]')do if r=='/'then self:ReadComment()else self:Next()end r=self:
Peek()end end function q:Peek()return self.reader:Peek()end function q:Next()
return self.reader:Next()end function q:All()return self.reader:All()end
function Encode(r)local s=o:New()s:Write(r)return s:ToString()end function
Decode(r)local s=q:New(r)return s:Read()end function Null()return Null end a.
DecodeJSON=function(r)if h(r)=='string'then return Decode(r)end print
:Next()end function p:ReadSingleLineComment()local q=self:Next()while q~='\r'and
q~='\n'do q=self:Next()end end function p:ReadArray()local q={}l(self:Next()==
'[')local r=false if self:Peek()==']'then r=true end while not r do local s=self
:Read()q[#q+1]=s self:SkipWhiteSpace()if self:Peek()==']'then r=true end if not
r then local t=self:Next()if t~=','then e(b.format(
"Invalid array: '%s' due to: '%s'",self:All(),t))end end end l(']'==self:Next())
return q end function p:ReadObject()local q={}l(self:Next()=='{')local r=false
if self:Peek()=='}'then r=true end while not r do local s=self:Read()if h(s)~=
'string'then e(b.format('Invalid non-string object key: %s',s))end self:
SkipWhiteSpace()local t=self:Next()if t~=':'then e(b.format(
"Invalid object: '%s' due to: '%s'",self:All(),t))end self:SkipWhiteSpace()local
u=self:Read()q[s]=u self:SkipWhiteSpace()if self:Peek()=='}'then r=true end if
not r then t=self:Next()if t~=','then e(b.format(
"Invalid array: '%s' near: '%s'",self:All(),t))end end end l(self:Next()=='}')
return q end function p:SkipWhiteSpace()local q=self:Peek()while q~=nil and b.
find(q,'[%s/]')do if q=='/'then self:ReadComment()else self:Next()end q=self:
Peek()end end function p:Peek()return self.reader:Peek()end function p:Next()
return self.reader:Next()end function p:All()return self.reader:All()end
function Encode(q)local r=n:New()r:Write(q)return r:ToString()end function
Decode(q)local r=p:New(q)return r:Read()end function Null()return Null end a.
DecodeJSON=function(q)pcall(function()warn
[[RbxUtility.DecodeJSON is deprecated, please use Game:GetService('HttpService'):JSONDecode() instead.]]
end)if h(q)=='string'then return Decode(q)end print
'RbxUtil.DecodeJSON expects string argument!'return nil end a.EncodeJSON=
function(r)return Encode(r)end a.MakeWedge=function(r,s,t,u)return game:
GetService'Terrain':AutoWedgeCell(r,s,t)end a.SelectTerrainRegion=function(r,s,t
,u)local v=game.Workspace:FindFirstChild'Terrain'if not v then return end l(r)l(
s)if not h(r)=='Region3'then e(
[[regionToSelect (first arg), should be of type Region3, but is type]],h(r))end
if not h(s)=='BrickColor'then e(
[[color (second arg), should be of type BrickColor, but is type]],h(s))end local
w,x,y,z,A=v.GetCell,v.WorldToCellPreferSolid,v.CellCenterToWorld,Enum.
CellMaterial.Empty,Instance.new'Model'A.Name='SelectionContainer'A.Archivable=
false if u then A.Parent=u else A.Parent=game.Workspace end local B,C,D,E,F,G,H=
nil,nil,0,nil,{},{},Instance.new'Part'H.Name='SelectionPart'H.Transparency=1 H.
Anchored=true H.Locked=true H.CanCollide=false H.FormFactor=Enum.FormFactor.
Custom H.Size=Vector3.new(4.2,4.2,4.2)local I=Instance.new'SelectionBox'function
createAdornment(J)local K,L=nil,nil if#G>0 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

View File

@ -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 do h=tick()wait(1)i=i+tick()-h end
loading=false if 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 do i=tick()wait(1)j=j+tick()-i end h=false if 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.Y)then if math.abs(B.X)<math.abs(B.Z)
then local E,F if math.abs(B.Y)>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 local E,F if math.abs(B.X)>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 local G,H if math.abs(B.X)>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)<N and K and K:IsA'BasePart'and K.
Transparency>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)<R and O and O:IsA'BasePart'and O.
Transparency>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-2<i.CFrame.p.X
-i.Size.X/2 then G=false elseif I.Y+2>i.CFrame.p.Y+i.Size.Y/2 then G=false
elseif I.Y-2<i.CFrame.p.Y-i.Size.Y/2 then G=false elseif I.Z+2>i.CFrame.p.Z+i.
Size.Z/2 then G=false elseif I.Z-2<i.CFrame.p.Z-i.Size.Z/2 then G=false end end
end return G end return false end local function ResolveMegaClusterStamp(A)local
B,C,D,E,F,G,I,K,M=false,game.Workspace.Terrain,q.InternalLine,game.Workspace.
Terrain.MaxExtents.Max,game.Workspace.Terrain.MaxExtents.Min,1,0,0,false if l.
CurrentParts:FindFirstChild'AutoWedge'then M=true end if l.CurrentParts:
FindFirstChild('ClusterMaterial',true)then G=l.CurrentParts:FindFirstChild(
'ClusterMaterial',true)if G:IsA'Vector3Value'then I=G.Value.Y K=G.Value.Z G=G.
Value.X elseif G:IsA'IntValue'then G=G.Value end end if q.Adorn.Parent and q.
Start and((q.Dimensions>1)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.X<E.X and aa.Y<E.Y and aa.Z
<E.Z then local ab=checkTerrainBlockCollisions(aa,A)if ab then if W then R:
SetWaterCell(aa.X,aa.Y,aa.Z,Enum.WaterForce[W.Value],Enum.WaterDirection[X.Value
])else R:SetCell(aa.X,aa.Y,aa.Z,G,I,K)end B=true if M then game.Workspace.
Terrain:AutowedgeCells(Region3int16.new(Vector3int16.new(aa.x-1,aa.y-1,aa.z-1),
Vector3int16.new(aa.x+1,aa.y+1,aa.z+1)))end end end T[1]=T[1]+S[1]end if S[2]
then while Z<4 and U[Z]:Dot(S[2])==0 do Z=Z+1 end if Z<4 then T[2]=T[2]+U[Z]*U[Z
]:Dot(S[2])end Z=Z+1 else T[2]=Vector3.new(1,0,0)Z=4 end if T[2].magnitude*4>V[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-2<i.CFrame.p.X-i.Size.X/2)or(M.
Y+2>i.CFrame.p.Y+i.Size.Y/2)or(M.Y-2<i.CFrame.p.Y-i.Size.Y/2)or(M.Z+2>i.CFrame.p
.Z+i.Size.Z/2)or(M.Z-2<i.CFrame.p.Z-i.Size.Z/2)then I=false end end end return I
end return false end local function ResolveMegaClusterStamp(A)local B,C,D,G,H,I,
M,O,Q=false,game.Workspace.Terrain,q.InternalLine,game.Workspace.Terrain.
MaxExtents.Max,game.Workspace.Terrain.MaxExtents.Min,1,0,0,false if l.
CurrentParts:FindFirstChild'AutoWedge'then Q=true end if l.CurrentParts:
FindFirstChild('ClusterMaterial',true)then I=l.CurrentParts:FindFirstChild(
'ClusterMaterial',true)if I:IsA'Vector3Value'then M=I.Value.Y O=I.Value.Z I=I.
Value.X elseif I:IsA'IntValue'then I=I.Value end end if q.Adorn.Parent and q.
Start and((q.Dimensions>1)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.X<G.X and ad.Y<G.Y and ad.Z<G.Z then local ae=
checkTerrainBlockCollisions(ad,A)if ae then if Z then C:SetWaterCell(ad.X,ad.Y,
ad.Z,Enum.WaterForce[Z.Value],Enum.WaterDirection[_.Value])else C:SetCell(ad.X,
ad.Y,ad.Z,I,M,O)end B=true if Q then game.Workspace.Terrain:AutowedgeCells(
Region3int16.new(Vector3int16.new(ad.x-1,ad.y-1,ad.z-1),Vector3int16.new(ad.x+1,
ad.y+1,ad.z+1)))end end end W[1]=W[1]+V[1]end if V[2]then while ab<4 and X[ab]:
Dot(V[2])==0 do ab=ab+1 end if ab<4 then W[2]=W[2]+X[ab]*X[ab]:Dot(V[2])end ab=
ab+1 else W[2]=Vector3.new(1,0,0)ab=4 end if W[2].magnitude*4>Y[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<E.X
and D.Y<E.Y and D.Z<E.Z then if I then C:SetWaterCell(D.X,D.Y,D.Z,Enum.
WaterForce[I.Value],Enum.WaterDirection[K.Value])elseif not G then C:SetCell(D.X
,D.Y,D.Z,z.Material,z.clusterType,k%4)elseif G:IsA'Vector3Value'then C:SetCell(D
.X,D.Y,D.Z,G.Value.X,G.Value.Y,G.Value.Z)else C:SetCell(D.X,D.Y,D.Z,G.Value,0,0)
end local M=false if l.CurrentParts:FindFirstChild'AutoWedge'then M=true end if
M then game.Workspace.Terrain:AutowedgeCells(Region3int16.new(Vector3int16.new(D
.x-1,D.y-1,D.z-1),Vector3int16.new(D.x+1,D.y+1,D.z+1)))end l.CurrentParts.Parent
=nil pcall(function()game:GetService'ChangeHistoryService':SetWaypoint
'StamperSingle'end)return true end else flashRedBox()return false end end
local function getPlayer()if game:FindFirstChild'Players'then if game.Players[
'LocalPlayer']then return game.Players.LocalPlayer end end return nil end if l.
CurrentParts:IsA'Model'or l.CurrentParts:IsA'Tool'then if l.CurrentParts:IsA
'Model'then local D,E={},{}saveTheWelds(l.CurrentParts,D,E)l.CurrentParts:
BreakJoints()l.CurrentParts:MakeJoints()restoreTheWelds(D,E)end playerIdTag=l.
CurrentParts:FindFirstChild'PlayerIdTag'playerNameTag=l.CurrentParts:
FindFirstChild'PlayerNameTag'if playerIdTag~=nil then tempPlayerValue=getPlayer(
)if tempPlayerValue~=nil then playerIdTag.Value=tempPlayerValue.userId end end
if playerNameTag~=nil then if game:FindFirstChild'Players'and game.Players[
'LocalPlayer']then tempPlayerValue=game.Players.LocalPlayer if tempPlayerValue~=
nil then playerNameTag.Value=tempPlayerValue.Name end end end if l.CurrentParts:
FindFirstChild'RobloxModel'==nil then local D=Instance.new'BoolValue'D.Name=
'RobloxModel'D.Parent=l.CurrentParts if l.CurrentParts:FindFirstChild
'RobloxStamper'==nil then local E=Instance.new'BoolValue'E.Name='RobloxStamper'E
.Parent=l.CurrentParts end end else l.CurrentParts:BreakJoints()if l.
CurrentParts:FindFirstChild'RobloxStamper'==nil then local D=Instance.new
'BoolValue'D.Name='RobloxStamper'D.Parent=l.CurrentParts end end if not
createJoints then game.JointsService:CreateJoinAfterMoveJoints()end for D,E in
pairs(l.TransparencyTable)do D.Transparency=E end for F,G in pairs(l.
ArchivableTable)do F.Archivable=G end for I,K in pairs(l.MaterialTable)do I.
Material=K end for M,N in pairs(l.CanCollideTable)do M.CanCollide=N end for O,P
in pairs(l.AnchoredTable)do O.Anchored=P end for Q,R in pairs(l.
DecalTransparencyTable)do Q.Transparency=R end for S,T in pairs(l.
SurfaceTypeTable)do loadSurfaceTypes(S,T)end if isMegaClusterPart()then l.
CurrentParts.Transparency=0 end setSeatEnabledStatus(l.CurrentParts,true)l.
TransparencyTable=nil l.ArchivableTable=nil l.MaterialTable=nil l.
CanCollideTable=nil l.AnchoredTable=nil l.SurfaceTypeTable=nil if l.CurrentParts
:FindFirstChild'RobloxModel'==nil then local U=Instance.new'BoolValue'U.Name=
'RobloxModel'U.Parent=l.CurrentParts end if ghostRemovalScript then
ghostRemovalScript.Parent=nil end for U,V in pairs(l.DisabledScripts)do V.
Disabled=false end for W,X in pairs(l.DisabledScripts)do local Y=X.Parent X.
Parent=nil X:Clone().Parent=Y end l.DisabledScripts=nil l.Dragger=nil l.
'WaterForceDirectionTag',true)if A.X>=C.X and A.Y>=C.Y and A.Z>=C.Z and A.X<B.X
and A.Y<B.Y and A.Z<B.Z then if G then ae:SetWaterCell(A.X,A.Y,A.Z,Enum.
WaterForce[G.Value],Enum.WaterDirection[H.Value])elseif not D then ae:SetCell(A.
X,A.Y,A.Z,z.Material,z.clusterType,k%4)elseif D:IsA'Vector3Value'then ae:
SetCell(A.X,A.Y,A.Z,D.Value.X,D.Value.Y,D.Value.Z)else ae:SetCell(A.X,A.Y,A.Z,D.
Value,0,0)end local I=false if l.CurrentParts:FindFirstChild'AutoWedge'then I=
true end if I then game.Workspace.Terrain:AutowedgeCells(Region3int16.new(
Vector3int16.new(A.x-1,A.y-1,A.z-1),Vector3int16.new(A.x+1,A.y+1,A.z+1)))end l.
CurrentParts.Parent=nil pcall(function()game:GetService'ChangeHistoryService':
SetWaypoint'StamperSingle'end)return true end else flashRedBox()return false end
end local function getPlayer()if game:FindFirstChild'Players'then if game.
Players['LocalPlayer']then return game.Players.LocalPlayer end end return nil
end if l.CurrentParts:IsA'Model'or l.CurrentParts:IsA'Tool'then if l.
CurrentParts:IsA'Model'then local A,B={},{}saveTheWelds(l.CurrentParts,A,B)l.
CurrentParts:BreakJoints()l.CurrentParts:MakeJoints()restoreTheWelds(A,B)end
playerIdTag=l.CurrentParts:FindFirstChild'PlayerIdTag'playerNameTag=l.
CurrentParts:FindFirstChild'PlayerNameTag'if playerIdTag~=nil then
tempPlayerValue=getPlayer()if tempPlayerValue~=nil then playerIdTag.Value=
tempPlayerValue.userId end end if playerNameTag~=nil then if game:FindFirstChild
'Players'and game.Players['LocalPlayer']then tempPlayerValue=game.Players.
LocalPlayer if tempPlayerValue~=nil then playerNameTag.Value=tempPlayerValue.
Name end end end if l.CurrentParts:FindFirstChild'RobloxModel'==nil then local A
=Instance.new'BoolValue'A.Name='RobloxModel'A.Parent=l.CurrentParts if l.
CurrentParts:FindFirstChild'RobloxStamper'==nil then local B=Instance.new
'BoolValue'B.Name='RobloxStamper'B.Parent=l.CurrentParts end end else l.
CurrentParts:BreakJoints()if l.CurrentParts:FindFirstChild'RobloxStamper'==nil
then local A=Instance.new'BoolValue'A.Name='RobloxStamper'A.Parent=l.
CurrentParts end end if not createJoints then game.JointsService:
CreateJoinAfterMoveJoints()end for A,B in pairs(l.TransparencyTable)do A.
Transparency=B end for C,D in pairs(l.ArchivableTable)do C.Archivable=D end for
G,H in pairs(l.MaterialTable)do G.Material=H end for I,M in pairs(l.
CanCollideTable)do I.CanCollide=M end for O,Q in pairs(l.AnchoredTable)do O.
Anchored=Q end for R,S in pairs(l.DecalTransparencyTable)do R.Transparency=S end
for T,U in pairs(l.SurfaceTypeTable)do loadSurfaceTypes(T,U)end if
isMegaClusterPart()then l.CurrentParts.Transparency=0 end setSeatEnabledStatus(l
.CurrentParts,true)l.TransparencyTable=nil l.ArchivableTable=nil l.MaterialTable
=nil l.CanCollideTable=nil l.AnchoredTable=nil l.SurfaceTypeTable=nil if l.
CurrentParts:FindFirstChild'RobloxModel'==nil then local V=Instance.new
'BoolValue'V.Name='RobloxModel'V.Parent=l.CurrentParts end if ghostRemovalScript
then ghostRemovalScript.Parent=nil end for V,W in pairs(l.DisabledScripts)do W.
Disabled=false end for X,Y in pairs(l.DisabledScripts)do local Z=Y.Parent Y.
Parent=nil Y:Clone().Parent=Z end l.DisabledScripts=nil l.Dragger=nil l.
CurrentParts=nil pcall(function()game:GetService'ChangeHistoryService':
SetWaypoint'StampedObject'end)return true end local function pauseStamper()for
aa=1,#v do v[aa]:disconnect()v[aa]=nil end v={}if l and l.CurrentParts then l.
CurrentParts.Parent=nil l.CurrentParts:Remove()end resetHighScalabilityLine()
game.JointsService:ClearJoinAfterMoveJoints()end local function
prepareUnjoinableSurfaces(aa,ab,A)local B,C={Vector3.new(1,0,0),Vector3.new(0,1,
0),Vector3.new(0,0,1)},1 if A<0 then C=C*-1 A=A*-1 end local G=C*aa:
vectorToWorldSpace(B[A])for K=1,#ab do local N=ab[K]local P=N.CFrame:
vectorToObjectSpace(G)if math.abs(P.X)>math.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

View File

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

View File

@ -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.

View File

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