Minify processed corescripts and remove original Lua scripts

This commit is contained in:
Lewin Kelly 2023-04-24 22:40:09 +01:00
parent 28074e82b9
commit 355a040a37
47 changed files with 4700 additions and 42485 deletions

View File

@ -1 +1 @@
yue ./yue && darklua process ./yue ./processed
yue ./yue && darklua process ./yue ./processed && rm -f ./yue/*.lua

File diff suppressed because it is too large Load Diff

View File

@ -1,278 +0,0 @@
-- ContextActionTouch.lua
-- 2014, created by Ben Tkacheff
-- this script controls ui and firing of lua functions that are bound in ContextActionService for touch inputs
-- Essentially a user can bind a lua function to a key code, input type (mousebutton1 etc.) and this
-- Variables
local contextActionService = Game:GetService "ContextActionService"
local isTouchDevice = Game:GetService("UserInputService").TouchEnabled
local functionTable = {}
local buttonVector = {}
local buttonScreenGui = nil
local buttonFrame = nil
local ContextDownImage = "http://www.banland.xyz/asset/?id=97166756"
local ContextUpImage = "http://www.banland.xyz/asset/?id=97166444"
local oldTouches = {}
local buttonPositionTable = {
[1] = UDim2.new(0, 123, 0, 70),
[2] = UDim2.new(0, 30, 0, 60),
[3] = UDim2.new(0, 180, 0, 160),
[4] = UDim2.new(0, 85, 0, -25),
[5] = UDim2.new(0, 185, 0, -25),
[6] = UDim2.new(0, 185, 0, 260),
[7] = UDim2.new(0, 216, 0, 65),
}
local maxButtons = #buttonPositionTable
-- Preload images
Game:GetService("ContentProvider"):Preload(ContextDownImage)
Game:GetService("ContentProvider"):Preload(ContextUpImage)
while not Game.Players do
wait()
end
while not Game.Players.LocalPlayer do
wait()
end
function createContextActionGui()
if not buttonScreenGui and isTouchDevice then
buttonScreenGui = Instance.new "ScreenGui"
buttonScreenGui.Name = "ContextActionGui"
buttonFrame = Instance.new "Frame"
buttonFrame.BackgroundTransparency = 1
buttonFrame.Size = UDim2.new(0.3, 0, 0.5, 0)
buttonFrame.Position = UDim2.new(0.7, 0, 0.5, 0)
buttonFrame.Name = "ContextButtonFrame"
buttonFrame.Parent = buttonScreenGui
end
end
-- functions
-- function setButtonSizeAndPosition(object)
-- local buttonSize = 55
-- local xOffset = 10
-- local yOffset = 95
-- -- todo: better way to determine mobile sized screens
-- local onSmallScreen = (game.CoreGui.RobloxGui.AbsoluteSize.X < 600)
-- if not onSmallScreen then
-- buttonSize = 85
-- xOffset = 40
-- end
-- object.Size = UDim2.new(0, buttonSize, 0, buttonSize)
-- end
function contextButtonDown(button, inputObject, actionName)
if inputObject.UserInputType == Enum.UserInputType.Touch then
button.Image = ContextDownImage
contextActionService:CallFunction(actionName, Enum.UserInputState.Begin, inputObject)
end
end
function contextButtonMoved(button, inputObject, actionName)
if inputObject.UserInputType == Enum.UserInputType.Touch then
button.Image = ContextDownImage
contextActionService:CallFunction(actionName, Enum.UserInputState.Change, inputObject)
end
end
function contextButtonUp(button, inputObject, actionName)
button.Image = ContextUpImage
if
inputObject.UserInputType == Enum.UserInputType.Touch
and inputObject.UserInputState == Enum.UserInputState.End
then
contextActionService:CallFunction(actionName, Enum.UserInputState.End, inputObject)
end
end
function isSmallScreenDevice()
return Game:GetService("GuiService"):GetScreenResolution().y <= 320
end
function createNewButton(actionName, functionInfoTable)
local contextButton = Instance.new "ImageButton"
contextButton.Name = "ContextActionButton"
contextButton.BackgroundTransparency = 1
contextButton.Size = UDim2.new(0, 90, 0, 90)
contextButton.Active = true
if isSmallScreenDevice() then
contextButton.Size = UDim2.new(0, 70, 0, 70)
end
contextButton.Image = ContextUpImage
contextButton.Parent = buttonFrame
local currentButtonTouch = nil
Game:GetService("UserInputService").InputEnded:connect(function(inputObject)
oldTouches[inputObject] = nil
end)
contextButton.InputBegan:connect(function(inputObject)
if oldTouches[inputObject] then
return
end
if inputObject.UserInputState == Enum.UserInputState.Begin and currentButtonTouch == nil then
currentButtonTouch = inputObject
contextButtonDown(contextButton, inputObject, actionName)
end
end)
contextButton.InputChanged:connect(function(inputObject)
if oldTouches[inputObject] then
return
end
if currentButtonTouch ~= inputObject then
return
end
contextButtonMoved(contextButton, inputObject, actionName)
end)
contextButton.InputEnded:connect(function(inputObject)
if oldTouches[inputObject] then
return
end
if currentButtonTouch ~= inputObject then
return
end
currentButtonTouch = nil
oldTouches[inputObject] = true
contextButtonUp(contextButton, inputObject, actionName)
end)
local actionIcon = Instance.new "ImageLabel"
actionIcon.Name = "ActionIcon"
actionIcon.Position = UDim2.new(0.175, 0, 0.175, 0)
actionIcon.Size = UDim2.new(0.65, 0, 0.65, 0)
actionIcon.BackgroundTransparency = 1
if functionInfoTable["image"] and type(functionInfoTable["image"]) == "string" then
actionIcon.Image = functionInfoTable["image"]
end
actionIcon.Parent = contextButton
local actionTitle = Instance.new "TextLabel"
actionTitle.Name = "ActionTitle"
actionTitle.Size = UDim2.new(1, 0, 1, 0)
actionTitle.BackgroundTransparency = 1
actionTitle.Font = Enum.Font.SourceSansBold
actionTitle.TextColor3 = Color3.new(1, 1, 1)
actionTitle.TextStrokeTransparency = 0
actionTitle.FontSize = Enum.FontSize.Size18
actionTitle.TextWrapped = true
actionTitle.Text = ""
if functionInfoTable["title"] and type(functionInfoTable["title"]) == "string" then
actionTitle.Text = functionInfoTable["title"]
end
actionTitle.Parent = contextButton
return contextButton
end
function createButton(actionName, functionInfoTable)
local button = createNewButton(actionName, functionInfoTable)
local position = nil
for i = 1, #buttonVector do
if buttonVector[i] == "empty" then
position = i
break
end
end
if not position then
position = #buttonVector + 1
end
if position > maxButtons then
return -- todo: let user know we have too many buttons already?
end
buttonVector[position] = button
functionTable[actionName]["button"] = button
button.Position = buttonPositionTable[position]
button.Parent = buttonFrame
if buttonScreenGui and buttonScreenGui.Parent == nil then
buttonScreenGui.Parent = Game.Players.LocalPlayer.PlayerGui
end
end
function removeAction(actionName)
if not functionTable[actionName] then
return
end
local actionButton = functionTable[actionName]["button"]
if actionButton then
actionButton.Parent = nil
for i = 1, #buttonVector do
if buttonVector[i] == actionButton then
buttonVector[i] = "empty"
break
end
end
actionButton:Destroy()
end
functionTable[actionName] = nil
end
function addAction(actionName, createTouchButton, functionInfoTable)
if functionTable[actionName] then
removeAction(actionName)
end
functionTable[actionName] = { functionInfoTable }
if createTouchButton and isTouchDevice then
createContextActionGui()
createButton(actionName, functionInfoTable)
end
end
-- Connections
contextActionService.BoundActionChanged:connect(function(actionName, changeName, changeTable)
if functionTable[actionName] and changeTable then
local button = functionTable[actionName]["button"]
if button then
if changeName == "image" then
button.ActionIcon.Image = changeTable[changeName]
elseif changeName == "title" then
button.ActionTitle.Text = changeTable[changeName]
-- elseif changeName == "description" then
-- -- todo: add description to menu
elseif changeName == "position" then
button.Position = changeTable[changeName]
end
end
end
end)
contextActionService.BoundActionAdded:connect(function(actionName, createTouchButton, functionInfoTable)
addAction(actionName, createTouchButton, functionInfoTable)
end)
contextActionService.BoundActionRemoved:connect(function(actionName, _)
removeAction(actionName)
end)
contextActionService.GetActionButtonEvent:connect(function(actionName)
if functionTable[actionName] then
contextActionService:FireActionButtonFoundSignal(actionName, functionTable[actionName]["button"])
end
end)
-- make sure any bound data before we setup connections is handled
local boundActions = contextActionService:GetAllBoundActionInfo()
for actionName, actionData in pairs(boundActions) do
addAction(actionName, actionData["createTouchButton"], actionData)
end

View File

@ -1,647 +0,0 @@
-- This is responsible for all touch controls we show (as of this writing, only on iOS)
-- this includes character move thumbsticks, and buttons for jump, use of items, camera, etc.
-- Written by Ben Tkacheff, 2013
-- obligatory stuff to make sure we don't access nil data
while not Game do
wait()
end
while not Game:FindFirstChild "Players" do
wait()
end
while not Game.Players.LocalPlayer do
wait()
end
while not Game:FindFirstChild "CoreGui" do
wait()
end
while not Game.CoreGui:FindFirstChild "RobloxGui" do
wait()
end
local userInputService = Game:GetService "UserInputService"
local success = pcall(function()
userInputService:IsLuaTouchControls()
end)
if not success then
script:Destroy()
end
----------------------------------------------------------------------------
----------------------------------------------------------------------------
-- Variables
local screenResolution = Game:GetService("GuiService"):GetScreenResolution()
function isSmallScreenDevice()
return screenResolution.y <= 320
end
local localPlayer = Game.Players.LocalPlayer
local thumbstickSize = 120
if isSmallScreenDevice() then
thumbstickSize = 70
end
local touchControlsSheet = "rbxasset://textures/ui/TouchControlsSheet.png"
local ThumbstickDeadZone = 5
local ThumbstickMaxPercentGive = 0.92
local thumbstickTouches = {}
local jumpButtonSize = 90
if isSmallScreenDevice() then
jumpButtonSize = 70
end
local oldJumpTouches = {}
local currentJumpTouch = nil
local CameraRotateSensitivity = 0.007
local CameraRotateDeadZone = CameraRotateSensitivity * 16
local CameraZoomSensitivity = 0.03
local PinchZoomDelay = 0.2
local cameraTouch = nil
-- make sure all of our images are good to go
Game:GetService("ContentProvider"):Preload(touchControlsSheet)
----------------------------------------------------------------------------
----------------------------------------------------------------------------
-- Functions
function DistanceBetweenTwoPoints(point1, point2)
local dx = point2.x - point1.x
local dy = point2.y - point1.y
return math.sqrt((dx * dx) + (dy * dy))
end
function transformFromCenterToTopLeft(pointToTranslate, guiObject)
return UDim2.new(
0,
pointToTranslate.x - guiObject.AbsoluteSize.x / 2,
0,
pointToTranslate.y - guiObject.AbsoluteSize.y / 2
)
end
function rotatePointAboutLocation(pointToRotate, pointToRotateAbout, radians)
local sinAnglePercent = math.sin(radians)
local cosAnglePercent = math.cos(radians)
local transformedPoint = pointToRotate
-- translate point back to origin:
transformedPoint = Vector2.new(transformedPoint.x - pointToRotateAbout.x, transformedPoint.y - pointToRotateAbout.y)
-- rotate point
local xNew = transformedPoint.x * cosAnglePercent - transformedPoint.y * sinAnglePercent
local yNew = transformedPoint.x * sinAnglePercent + transformedPoint.y * cosAnglePercent
-- translate point back:
transformedPoint = Vector2.new(xNew + pointToRotateAbout.x, yNew + pointToRotateAbout.y)
return transformedPoint
end
function dotProduct(v1, v2)
return ((v1.x * v2.x) + (v1.y * v2.y))
end
function stationaryThumbstickTouchMove(thumbstickFrame, thumbstickOuter, touchLocation)
local thumbstickOuterCenterPosition = Vector2.new(
thumbstickOuter.Position.X.Offset + thumbstickOuter.AbsoluteSize.x / 2,
thumbstickOuter.Position.Y.Offset + thumbstickOuter.AbsoluteSize.y / 2
)
local centerDiff = DistanceBetweenTwoPoints(touchLocation, thumbstickOuterCenterPosition)
-- thumbstick is moving outside our region, need to cap its distance
if centerDiff > (thumbstickSize / 2) then
local thumbVector = Vector2.new(
touchLocation.x - thumbstickOuterCenterPosition.x,
touchLocation.y - thumbstickOuterCenterPosition.y
)
local normal = thumbVector.unit
if normal.x == math.nan or normal.x == math.inf then
normal = Vector2.new(0, normal.y)
end
if normal.y == math.nan or normal.y == math.inf then
normal = Vector2.new(normal.x, 0)
end
local newThumbstickInnerPosition = thumbstickOuterCenterPosition + (normal * (thumbstickSize / 2))
thumbstickFrame.Position = transformFromCenterToTopLeft(newThumbstickInnerPosition, thumbstickFrame)
else
thumbstickFrame.Position = transformFromCenterToTopLeft(touchLocation, thumbstickFrame)
end
return Vector2.new(
thumbstickFrame.Position.X.Offset - thumbstickOuter.Position.X.Offset,
thumbstickFrame.Position.Y.Offset - thumbstickOuter.Position.Y.Offset
)
end
function followThumbstickTouchMove(thumbstickFrame, thumbstickOuter, touchLocation)
local thumbstickOuterCenter = Vector2.new(
thumbstickOuter.Position.X.Offset + thumbstickOuter.AbsoluteSize.x / 2,
thumbstickOuter.Position.Y.Offset + thumbstickOuter.AbsoluteSize.y / 2
)
-- thumbstick is moving outside our region, need to position outer thumbstick texture carefully (to make look and feel like actual joystick controller)
if DistanceBetweenTwoPoints(touchLocation, thumbstickOuterCenter) > thumbstickSize / 2 then
local thumbstickInnerCenter = Vector2.new(
thumbstickFrame.Position.X.Offset + thumbstickFrame.AbsoluteSize.x / 2,
thumbstickFrame.Position.Y.Offset + thumbstickFrame.AbsoluteSize.y / 2
)
local movementVectorUnit =
Vector2.new(touchLocation.x - thumbstickInnerCenter.x, touchLocation.y - thumbstickInnerCenter.y).unit
local outerToInnerVectorCurrent = Vector2.new(
thumbstickInnerCenter.x - thumbstickOuterCenter.x,
thumbstickInnerCenter.y - thumbstickOuterCenter.y
)
local outerToInnerVectorCurrentUnit = outerToInnerVectorCurrent.unit
local movementVector =
Vector2.new(touchLocation.x - thumbstickInnerCenter.x, touchLocation.y - thumbstickInnerCenter.y)
-- First, find the angle between the new thumbstick movement vector,
-- and the vector between thumbstick inner and thumbstick outer.
-- We will use this to pivot thumbstick outer around thumbstick inner, gives a nice joystick feel
local crossOuterToInnerWithMovement = (outerToInnerVectorCurrentUnit.x * movementVectorUnit.y)
- (outerToInnerVectorCurrentUnit.y * movementVectorUnit.x)
local angle =
math.atan2(crossOuterToInnerWithMovement, dotProduct(outerToInnerVectorCurrentUnit, movementVectorUnit))
local anglePercent = angle * math.min(movementVector.magnitude / outerToInnerVectorCurrent.magnitude, 1.0)
-- If angle is significant, rotate about the inner thumbsticks current center
if math.abs(anglePercent) > 0.00001 then
local outerThumbCenter =
rotatePointAboutLocation(thumbstickOuterCenter, thumbstickInnerCenter, anglePercent)
thumbstickOuter.Position =
transformFromCenterToTopLeft(Vector2.new(outerThumbCenter.x, outerThumbCenter.y), thumbstickOuter)
end
-- now just translate outer thumbstick to make sure it stays nears inner thumbstick
thumbstickOuter.Position = UDim2.new(
0,
thumbstickOuter.Position.X.Offset + movementVector.x,
0,
thumbstickOuter.Position.Y.Offset + movementVector.y
)
end
thumbstickFrame.Position = transformFromCenterToTopLeft(touchLocation, thumbstickFrame)
-- a bit of error checking to make sure thumbsticks stay close to eachother
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(
0,
thumbstickFramePosition.x + vectorWithLength.x,
0,
thumbstickFramePosition.y + vectorWithLength.y
)
end
return Vector2.new(
thumbstickFrame.Position.X.Offset - thumbstickOuter.Position.X.Offset,
thumbstickFrame.Position.Y.Offset - thumbstickOuter.Position.Y.Offset
)
end
function movementOutsideDeadZone(movementVector)
return ((math.abs(movementVector.x) > ThumbstickDeadZone) or (math.abs(movementVector.y) > ThumbstickDeadZone))
end
function constructThumbstick(defaultThumbstickPos, updateFunction, stationaryThumbstick)
local thumbstickFrame = Instance.new "Frame"
thumbstickFrame.Name = "ThumbstickFrame"
thumbstickFrame.Active = true
thumbstickFrame.Size = UDim2.new(0, thumbstickSize, 0, thumbstickSize)
thumbstickFrame.Position = defaultThumbstickPos
thumbstickFrame.BackgroundTransparency = 1
local outerThumbstick = Instance.new "ImageLabel"
outerThumbstick.Name = "OuterThumbstick"
outerThumbstick.Image = touchControlsSheet
outerThumbstick.ImageRectOffset = Vector2.new(0, 0)
outerThumbstick.ImageRectSize = Vector2.new(220, 220)
outerThumbstick.BackgroundTransparency = 1
outerThumbstick.Size = UDim2.new(0, thumbstickSize, 0, thumbstickSize)
outerThumbstick.Position = defaultThumbstickPos
outerThumbstick.Parent = Game.CoreGui.RobloxGui
local innerThumbstick = Instance.new "ImageLabel"
innerThumbstick.Name = "InnerThumbstick"
innerThumbstick.Image = touchControlsSheet
innerThumbstick.ImageRectOffset = Vector2.new(220, 0)
innerThumbstick.ImageRectSize = Vector2.new(111, 111)
innerThumbstick.BackgroundTransparency = 1
innerThumbstick.Size = UDim2.new(0, thumbstickSize / 2, 0, thumbstickSize / 2)
innerThumbstick.Position = UDim2.new(
0,
thumbstickFrame.Size.X.Offset / 2 - thumbstickSize / 4,
0,
thumbstickFrame.Size.Y.Offset / 2 - thumbstickSize / 4
)
innerThumbstick.Parent = thumbstickFrame
innerThumbstick.ZIndex = 2
local thumbstickTouch = nil
local userInputServiceTouchMovedCon = nil
local userInputSeviceTouchEndedCon = nil
local startInputTracking = function(inputObject)
if thumbstickTouch then
return
end
if inputObject == cameraTouch then
return
end
if inputObject == currentJumpTouch then
return
end
if inputObject.UserInputType ~= Enum.UserInputType.Touch then
return
end
thumbstickTouch = inputObject
table.insert(thumbstickTouches, thumbstickTouch)
thumbstickFrame.Position = transformFromCenterToTopLeft(thumbstickTouch.Position, thumbstickFrame)
outerThumbstick.Position = thumbstickFrame.Position
userInputServiceTouchMovedCon = userInputService.TouchMoved:connect(function(movedInput)
if movedInput == thumbstickTouch then
local movementVector = nil
if stationaryThumbstick then
movementVector = stationaryThumbstickTouchMove(
thumbstickFrame,
outerThumbstick,
Vector2.new(movedInput.Position.x, movedInput.Position.y)
)
else
movementVector = followThumbstickTouchMove(
thumbstickFrame,
outerThumbstick,
Vector2.new(movedInput.Position.x, movedInput.Position.y)
)
end
if updateFunction then
updateFunction(movementVector, outerThumbstick.Size.X.Offset / 2)
end
end
end)
userInputSeviceTouchEndedCon = userInputService.TouchEnded:connect(function(endedInput)
if endedInput == thumbstickTouch then
if updateFunction then
updateFunction(Vector2.new(0, 0), 1)
end
userInputSeviceTouchEndedCon:disconnect()
userInputServiceTouchMovedCon:disconnect()
thumbstickFrame.Position = defaultThumbstickPos
outerThumbstick.Position = defaultThumbstickPos
for i, object in pairs(thumbstickTouches) do
if object == thumbstickTouch then
table.remove(thumbstickTouches, i)
break
end
end
thumbstickTouch = nil
end
end)
end
userInputService.Changed:connect(function(prop)
if prop == "ModalEnabled" then
thumbstickFrame.Visible = not userInputService.ModalEnabled
outerThumbstick.Visible = not userInputService.ModalEnabled
end
end)
thumbstickFrame.InputBegan:connect(startInputTracking)
return thumbstickFrame
end
function setupCharacterMovement(parentFrame)
local lastMovementVector, lastMaxMovement = nil
local moveCharacterFunc = localPlayer.MoveCharacter
local moveCharacterFunction = function(movementVector, maxMovement)
if localPlayer then
if movementOutsideDeadZone(movementVector) then
lastMovementVector = movementVector
lastMaxMovement = maxMovement
-- sometimes rounding error will not allow us to go max speed at some
-- thumbstick angles, fix this with a bit of fudging near 100% throttle
if movementVector.magnitude / maxMovement > ThumbstickMaxPercentGive then
maxMovement = movementVector.magnitude - 1
end
moveCharacterFunc(localPlayer, movementVector, maxMovement)
else
lastMovementVector = Vector2.new(0, 0)
lastMaxMovement = 1
moveCharacterFunc(localPlayer, lastMovementVector, lastMaxMovement)
end
end
end
local thumbstickPos = UDim2.new(0, thumbstickSize / 2, 1, -thumbstickSize * 1.75)
if isSmallScreenDevice() then
thumbstickPos = UDim2.new(0, (thumbstickSize / 2) - 10, 1, -thumbstickSize - 20)
end
local characterThumbstick = constructThumbstick(thumbstickPos, moveCharacterFunction, false)
characterThumbstick.Name = "CharacterThumbstick"
characterThumbstick.Parent = parentFrame
local refreshCharacterMovement = function()
if localPlayer and moveCharacterFunc and lastMovementVector and lastMaxMovement then
moveCharacterFunc(localPlayer, lastMovementVector, lastMaxMovement)
end
end
return refreshCharacterMovement
end
function setupJumpButton(parentFrame)
local jumpButton = Instance.new "ImageButton"
jumpButton.Name = "JumpButton"
jumpButton.BackgroundTransparency = 1
jumpButton.Image = touchControlsSheet
jumpButton.ImageRectOffset = Vector2.new(176, 222)
jumpButton.ImageRectSize = Vector2.new(174, 174)
jumpButton.Size = UDim2.new(0, jumpButtonSize, 0, jumpButtonSize)
if isSmallScreenDevice() then
jumpButton.Position = UDim2.new(1, -(jumpButtonSize * 2.25), 1, -jumpButtonSize - 20)
else
jumpButton.Position = UDim2.new(1, -(jumpButtonSize * 2.75), 1, -jumpButtonSize - 120)
end
local playerJumpFunc = localPlayer.JumpCharacter
local doJumpLoop = function()
while currentJumpTouch do
if localPlayer then
playerJumpFunc(localPlayer)
end
wait(1 / 60)
end
end
jumpButton.InputBegan:connect(function(inputObject)
if inputObject.UserInputType ~= Enum.UserInputType.Touch then
return
end
if currentJumpTouch then
return
end
if inputObject == cameraTouch then
return
end
for _, touch in pairs(oldJumpTouches) do
if touch == inputObject then
return
end
end
currentJumpTouch = inputObject
jumpButton.ImageRectOffset = Vector2.new(0, 222)
jumpButton.ImageRectSize = Vector2.new(174, 174)
doJumpLoop()
end)
jumpButton.InputEnded:connect(function(inputObject)
if inputObject.UserInputType ~= Enum.UserInputType.Touch then
return
end
jumpButton.ImageRectOffset = Vector2.new(176, 222)
jumpButton.ImageRectSize = Vector2.new(174, 174)
if inputObject == currentJumpTouch then
table.insert(oldJumpTouches, currentJumpTouch)
currentJumpTouch = nil
end
end)
userInputService.InputEnded:connect(function(globalInputObject)
for i, touch in pairs(oldJumpTouches) do
if touch == globalInputObject then
table.remove(oldJumpTouches, i)
break
end
end
end)
userInputService.Changed:connect(function(prop)
if prop == "ModalEnabled" then
jumpButton.Visible = not userInputService.ModalEnabled
end
end)
jumpButton.Parent = parentFrame
end
function isTouchUsedByJumpButton(touch)
if touch == currentJumpTouch then
return true
end
for _, touchToCompare in pairs(oldJumpTouches) do
if touch == touchToCompare then
return true
end
end
return false
end
function isTouchUsedByThumbstick(touch)
for _, touchToCompare in pairs(thumbstickTouches) do
if touch == touchToCompare then
return true
end
end
return false
end
function setupCameraControl(parentFrame, refreshCharacterMoveFunc)
local lastPos = nil
local hasRotatedCamera = false
local rotateCameraFunc = userInputService.RotateCamera
local pinchTime = -1
local shouldPinch = false
local lastPinchScale = nil
local zoomCameraFunc = userInputService.ZoomCamera
local pinchTouches = {}
local pinchFrame = nil
local resetCameraRotateState = function()
cameraTouch = nil
hasRotatedCamera = false
lastPos = nil
end
local resetPinchState = function()
pinchTouches = {}
lastPinchScale = nil
shouldPinch = false
pinchFrame:Destroy()
pinchFrame = nil
end
local startPinch = function(firstTouch, secondTouch)
-- track pinching in new frame
if pinchFrame then
pinchFrame:Destroy()
end -- make sure we didn't track in any mud
pinchFrame = Instance.new "Frame"
pinchFrame.Name = "PinchFrame"
pinchFrame.BackgroundTransparency = 1
pinchFrame.Parent = parentFrame
pinchFrame.Size = UDim2.new(1, 0, 1, 0)
pinchFrame.InputChanged:connect(function(inputObject)
if not shouldPinch then
resetPinchState()
return
end
resetCameraRotateState()
if lastPinchScale == nil then -- first pinch move, just set up scale
if inputObject == firstTouch then
lastPinchScale = (inputObject.Position - secondTouch.Position).magnitude
firstTouch = inputObject
elseif inputObject == secondTouch then
lastPinchScale = (inputObject.Position - firstTouch.Position).magnitude
secondTouch = inputObject
end
else -- we are now actually pinching, do comparison to last pinch size
local newPinchDistance = 0
if inputObject == firstTouch then
newPinchDistance = (inputObject.Position - secondTouch.Position).magnitude
firstTouch = inputObject
elseif inputObject == secondTouch then
newPinchDistance = (inputObject.Position - firstTouch.Position).magnitude
secondTouch = inputObject
end
if newPinchDistance ~= 0 then
local pinchDiff = newPinchDistance - lastPinchScale
if pinchDiff ~= 0 then
zoomCameraFunc(userInputService, (pinchDiff * CameraZoomSensitivity))
end
lastPinchScale = newPinchDistance
end
end
end)
pinchFrame.InputEnded:connect(function(inputObject) -- pinch is over, destroy all
if inputObject == firstTouch or inputObject == secondTouch then
resetPinchState()
end
end)
end
local pinchGestureReceivedTouch = function(inputObject)
if #pinchTouches < 1 then
table.insert(pinchTouches, inputObject)
pinchTime = tick()
shouldPinch = false
elseif #pinchTouches == 1 then
shouldPinch = ((tick() - pinchTime) <= PinchZoomDelay)
if shouldPinch then
table.insert(pinchTouches, inputObject)
startPinch(pinchTouches[1], pinchTouches[2])
else -- shouldn't ever get here, but just in case
pinchTouches = {}
end
end
end
parentFrame.InputBegan:connect(function(inputObject)
if inputObject.UserInputType ~= Enum.UserInputType.Touch then
return
end
if isTouchUsedByJumpButton(inputObject) then
return
end
local usedByThumbstick = isTouchUsedByThumbstick(inputObject)
if not usedByThumbstick then
pinchGestureReceivedTouch(inputObject)
end
if cameraTouch == nil and not usedByThumbstick then
cameraTouch = inputObject
lastPos = Vector2.new(cameraTouch.Position.x, cameraTouch.Position.y)
-- lastTick = tick()
end
end)
userInputService.InputChanged:connect(function(inputObject)
if inputObject.UserInputType ~= Enum.UserInputType.Touch then
return
end
if cameraTouch ~= inputObject then
return
end
local newPos = Vector2.new(cameraTouch.Position.x, cameraTouch.Position.y)
local touchDiff = (lastPos - newPos) * CameraRotateSensitivity
-- first time rotating outside deadzone, just setup for next changed event
if not hasRotatedCamera and (touchDiff.magnitude > CameraRotateDeadZone) then
hasRotatedCamera = true
lastPos = newPos
end
-- fire everytime after we have rotated out of deadzone
if hasRotatedCamera and (lastPos ~= newPos) then
rotateCameraFunc(userInputService, touchDiff)
refreshCharacterMoveFunc()
lastPos = newPos
end
end)
userInputService.InputEnded:connect(function(inputObject)
if cameraTouch == inputObject or cameraTouch == nil then
resetCameraRotateState()
end
for i, touch in pairs(pinchTouches) do
if touch == inputObject then
table.remove(pinchTouches, i)
end
end
end)
end
function setupTouchControls()
local touchControlFrame = Instance.new "Frame"
touchControlFrame.Name = "TouchControlFrame"
touchControlFrame.Size = UDim2.new(1, 0, 1, 0)
touchControlFrame.BackgroundTransparency = 1
touchControlFrame.Parent = Game.CoreGui.RobloxGui
local refreshCharacterMoveFunc = setupCharacterMovement(touchControlFrame)
setupJumpButton(touchControlFrame)
setupCameraControl(touchControlFrame, refreshCharacterMoveFunc)
userInputService.ProcessedEvent:connect(function(inputObject, processed)
if not processed then
return
end
-- kill camera pan if the touch is used by some user controls
if inputObject == cameraTouch and inputObject.UserInputState == Enum.UserInputState.Begin then
cameraTouch = nil
end
end)
end
----------------------------------------------------------------------------
----------------------------------------------------------------------------
-- Start of Script
if true then --userInputService:IsLuaTouchControls() then
setupTouchControls()
else
script:Destroy()
end

File diff suppressed because it is too large Load Diff

View File

@ -1,110 +0,0 @@
local controlFrame = script.Parent:FindFirstChild "ControlFrame"
if not controlFrame then
return
end
local bottomLeftControl = controlFrame:FindFirstChild "BottomLeftControl"
local bottomRightControl = controlFrame:FindFirstChild "BottomRightControl"
local frameTip = Instance.new "TextLabel"
frameTip.Name = "ToolTip"
frameTip.Text = ""
frameTip.Font = Enum.Font.ArialBold
frameTip.FontSize = Enum.FontSize.Size12
frameTip.TextColor3 = Color3.new(1, 1, 1)
frameTip.BorderSizePixel = 0
frameTip.ZIndex = 10
frameTip.Size = UDim2.new(2, 0, 1, 0)
frameTip.Position = UDim2.new(1, 0, 0, 0)
frameTip.BackgroundColor3 = Color3.new(0, 0, 0)
frameTip.BackgroundTransparency = 1
frameTip.TextTransparency = 1
frameTip.TextWrap = true
local inside = Instance.new "BoolValue"
inside.Name = "inside"
inside.Value = false
inside.Parent = frameTip
function setUpListeners(frameToListen)
local fadeSpeed = 0.1
frameToListen.Parent.MouseEnter:connect(function()
if frameToListen:FindFirstChild "inside" then
frameToListen.inside.Value = true
wait(1.2)
if frameToListen.inside.Value then
while frameToListen.inside.Value and frameToListen.BackgroundTransparency > 0 do
frameToListen.BackgroundTransparency = frameToListen.BackgroundTransparency - fadeSpeed
frameToListen.TextTransparency = frameToListen.TextTransparency - fadeSpeed
wait()
end
end
end
end)
function killTip(killFrame)
killFrame.inside.Value = false
killFrame.BackgroundTransparency = 1
killFrame.TextTransparency = 1
end
frameToListen.Parent.MouseLeave:connect(function()
killTip(frameToListen)
end)
frameToListen.Parent.MouseButton1Click:connect(function()
killTip(frameToListen)
end)
end
function createSettingsButtonTip(parent)
if parent == nil then
parent = bottomLeftControl:FindFirstChild "SettingsButton"
end
local toolTip = frameTip:clone()
toolTip.RobloxLocked = true
toolTip.Text = "Settings/Leave Game"
toolTip.Position = UDim2.new(0, 0, 0, -18)
toolTip.Size = UDim2.new(0, 120, 0, 20)
toolTip.Parent = parent
setUpListeners(toolTip)
end
wait(5) -- make sure we are loaded in, won't need tool tips for first 5 seconds anyway
---------------- set up Bottom Left Tool Tips -------------------------
local bottomLeftChildren = bottomLeftControl:GetChildren()
for i = 1, #bottomLeftChildren do
if bottomLeftChildren[i].Name == "Exit" then
local exitTip = frameTip:clone()
exitTip.RobloxLocked = true
exitTip.Text = "Leave Place"
exitTip.Position = UDim2.new(0, 0, -1, 0)
exitTip.Size = UDim2.new(1, 0, 1, 0)
exitTip.Parent = bottomLeftChildren[i]
setUpListeners(exitTip)
elseif bottomLeftChildren[i].Name == "SettingsButton" then
createSettingsButtonTip(bottomLeftChildren[i])
end
end
---------------- set up Bottom Right Tool Tips -------------------------
local bottomRightChildren = bottomRightControl:GetChildren()
for i = 1, #bottomRightChildren do
if bottomRightChildren[i].Name:find "Camera" ~= nil then
local cameraTip = frameTip:clone()
cameraTip.RobloxLocked = true
cameraTip.Text = "Camera View"
if bottomRightChildren[i].Name:find "Zoom" then
cameraTip.Position = UDim2.new(-1, 0, -1.5)
else
cameraTip.Position = UDim2.new(0, 0, -1.5, 0)
end
cameraTip.Size = UDim2.new(2, 0, 1.25, 0)
cameraTip.Parent = bottomRightChildren[i]
setUpListeners(cameraTip)
end
end

View File

@ -1,108 +0,0 @@
-- Creates all neccessary scripts for the gui on initial load, everything except build tools
-- Created by Ben T. 10/29/10
-- Please note that these are loaded in a specific order to diminish errors/perceived load time by user
local scriptContext = game:GetService "ScriptContext"
local touchEnabled = false
pcall(function()
touchEnabled = game:GetService("UserInputService").TouchEnabled
end)
-- library registration
scriptContext:AddCoreScript(60595695, scriptContext, "/Libraries/LibraryRegistration/LibraryRegistration")
local function waitForChild(instance, name)
while not instance:FindFirstChild(name) do
instance.ChildAdded:wait()
end
end
-- local function waitForProperty(instance, property)
-- while not instance[property] do
-- instance.Changed:wait()
-- end
-- end
-- Responsible for tracking logging items
local scriptContext = game:GetService "ScriptContext"
scriptContext:AddCoreScript(59002209, scriptContext, "CoreScripts/Sections")
waitForChild(game:GetService "CoreGui", "RobloxGui")
local screenGui = game:GetService("CoreGui"):FindFirstChild "RobloxGui"
if not touchEnabled then
-- ToolTipper (creates tool tips for gui)
scriptContext:AddCoreScript(36868950, screenGui, "CoreScripts/ToolTip")
-- SettingsScript
scriptContext:AddCoreScript(46295863, screenGui, "CoreScripts/Settings")
else
scriptContext:AddCoreScript(153556783, screenGui, "CoreScripts/TouchControls")
end
-- MainBotChatScript
scriptContext:AddCoreScript(39250920, screenGui, "CoreScripts/MainBotChatScript")
-- Popup Script
scriptContext:AddCoreScript(48488451, screenGui, "CoreScripts/PopupScript")
-- Friend Notification Script (probably can use this script to expand out to other notifications)
scriptContext:AddCoreScript(48488398, screenGui, "CoreScripts/NotificationScript")
-- Chat script
scriptContext:AddCoreScript(97188756, screenGui, "CoreScripts/ChatScript")
-- Purchase Prompt Script
scriptContext:AddCoreScript(107893730, screenGui, "CoreScripts/PurchasePromptScript")
if not touchEnabled or screenGui.AbsoluteSize.Y > 600 then
-- New Player List
scriptContext:AddCoreScript(48488235, screenGui, "CoreScripts/PlayerListScript")
else
delay(5, function()
if screenGui.AbsoluteSize.Y >= 600 then
-- New Player List
scriptContext:AddCoreScript(48488235, screenGui, "CoreScripts/PlayerListScript")
end
end)
end
if game.CoreGui.Version >= 3 and game.PlaceId ~= 130815926 then --todo: remove placeid hack for halloween
-- Backpack Builder, creates most of the backpack gui
scriptContext:AddCoreScript(53878047, screenGui, "CoreScripts/BackpackScripts/BackpackBuilder")
waitForChild(screenGui, "CurrentLoadout")
waitForChild(screenGui, "Backpack")
local Backpack = screenGui.Backpack
-- Manager handles all big backpack state changes, other scripts subscribe to this and do things accordingly
if game.CoreGui.Version >= 7 then
scriptContext:AddCoreScript(89449093, Backpack, "CoreScripts/BackpackScripts/BackpackManager")
end
-- Backpack Gear (handles all backpack gear tab stuff)
game:GetService("ScriptContext"):AddCoreScript(89449008, Backpack, "CoreScripts/BackpackScripts/BackpackGear")
-- Loadout Script, used for gear hotkeys
scriptContext:AddCoreScript(53878057, screenGui.CurrentLoadout, "CoreScripts/BackpackScripts/LoadoutScript")
if game.CoreGui.Version >= 8 then
-- Wardrobe script handles all character dressing operations
scriptContext:AddCoreScript(-1, Backpack, "CoreScripts/BackpackScripts/BackpackWardrobe")
end
end
local IsPersonalServer = not not game.Workspace:FindFirstChild "PSVariable"
if IsPersonalServer then
game:GetService("ScriptContext"):AddCoreScript(64164692, game.Players.LocalPlayer, "BuildToolManager")
end
game.Workspace.ChildAdded:connect(function(nchild)
if nchild.Name == "PSVariable" and nchild:IsA "BoolValue" then
IsPersonalServer = true
game:GetService("ScriptContext"):AddCoreScript(64164692, game.Players.LocalPlayer, "BuildToolManager")
end
end)
if touchEnabled then -- touch devices don't use same control frame
-- only used for touch device button generation
scriptContext:AddCoreScript(152908679, screenGui, "CoreScripts/ContextActionTouch")
waitForChild(screenGui, "ControlFrame")
waitForChild(screenGui.ControlFrame, "BottomLeftControl")
screenGui.ControlFrame.BottomLeftControl.Visible = false
waitForChild(screenGui.ControlFrame, "TopLeftControl")
screenGui.ControlFrame.TopLeftControl.Visible = false
end

View File

@ -1,239 +0,0 @@
local damageGuiWidth = 5.0
local damageGuiHeight = 5.0
function waitForChild(parent, childName)
local child = parent:findFirstChild(childName)
if child then
return child
end
while true do
child = parent.ChildAdded:wait()
if child.Name == childName then
return child
end
end
end
-- declarations
local Figure = script.Parent
local Humanoid = waitForChild(Figure, "Humanoid")
local Torso = waitForChild(Figure, "Torso")
local config = Figure:FindFirstChild "PlayerStats"
local inCharTag = Instance.new "BoolValue"
inCharTag.Name = "InCharTag"
local hider = Instance.new "BoolValue"
hider.Name = "RobloxBuildTool"
local currentChildren
local backpackTools
if config == nil then
config = Instance.new "Configuration"
config.Parent = Figure
config.Name = "PlayerStats"
end
local myHealth = config:FindFirstChild "MaxHealth"
if myHealth == nil then
myHealth = Instance.new "NumberValue"
myHealth.Parent = config
myHealth.Value = 100
myHealth.Name = "MaxHealth"
end
Humanoid.MaxHealth = myHealth.Value
Humanoid.Health = myHealth.Value
function onMaxHealthChange()
Humanoid.MaxHealth = myHealth.Value
Humanoid.Health = myHealth.Value
end
myHealth.Changed:connect(onMaxHealthChange)
--Humanoid.MaxHealth = myHealth.Value
--Humanoid.Health = Humanoid.MaxHealth
local vPlayer = game.Players:GetPlayerFromCharacter(script.Parent)
local dotGui = vPlayer.PlayerGui:FindFirstChild "DamageOverTimeGui"
if dotGui == nil then
dotGui = Instance.new "BillboardGui"
dotGui.Name = "DamageOverTimeGui"
dotGui.Parent = vPlayer.PlayerGui
dotGui.Adornee = script.Parent:FindFirstChild "Head"
dotGui.Active = true
dotGui.size = UDim2.new(damageGuiWidth, 0, damageGuiHeight, 0.0)
dotGui.StudsOffset = Vector3.new(0, 2.0, 0.0)
end
print "newHealth declarations finished"
function billboardHealthChange(dmg)
local textLabel = Instance.new "TextLabel"
if dmg > 0 then
textLabel.Text = tostring(dmg)
textLabel.TextColor3 = Color3.new(0, 1, 0)
else
textLabel.Text = tostring(dmg)
textLabel.TextColor3 = Color3.new(1, 0, 1)
end
textLabel.size = UDim2.new(1, 0, 1, 0.0)
textLabel.Active = true
textLabel.FontSize = 6
textLabel.BackgroundTransparency = 1
textLabel.Parent = dotGui
for t = 1, 10 do
wait(0.1)
textLabel.TextTransparency = t / 10
textLabel.Position = UDim2.new(0, 0, 0, -t * 5)
textLabel.FontSize = 6 - t * 0.6
end
textLabel:remove()
end
function setMaxHealth()
--print(Humanoid.Health)
if myHealth.Value >= 0 then
Humanoid.MaxHealth = myHealth.Value
print(Humanoid.MaxHealth)
if Humanoid.Health > Humanoid.MaxHealth then
Humanoid.Health = Humanoid.MaxHealth
end
end
end
myHealth.Changed:connect(setMaxHealth)
-- Visual Effects --
local fireEffect = Instance.new "Fire"
fireEffect.Heat = 0.1
fireEffect.Size = 3.0
fireEffect.Name = "FireEffect"
fireEffect.Enabled = false
--
-- regeneration
while true do
local s = wait(1)
local health = Humanoid.Health
if health > 0 then -- and health < Humanoid.MaxHealth then
local delta = 0
if config then
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
regen.Value = Vector3.new(regen.Value.X + regen.Value.Z, regen.Value.Y - s, regen.Value.Z) -- maybe have 3rd parameter be an increaser/decreaser?
elseif regen.Value.Y == -1 then
regen.Value = Vector3.new(regen.Value.X + regen.Value.Z, -1, regen.Value.Z)
else
regen:remove()
end -- infinity is -1
end
if poison then
delta = delta - poison.Value.X
if poison.Value.Y >= 0 then
poison.Value = Vector3.new(poison.Value.X + poison.Value.Z, poison.Value.Y - s, 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 -- infinity is -1
end
if ice then
--print("IN ICE")
delta = delta - ice.Value.X
if ice.Value.Y >= 0 then
ice.Value = Vector3.new(ice.Value.X, ice.Value.Y - s, ice.Value.Z)
else
ice:remove()
end
end
if fire then
fireEffect.Enabled = true
fireEffect.Parent = Figure.Torso
delta = delta - fire.Value.X
if fire.Value.Y >= 0 then
fire.Value = Vector3.new(fire.Value.X, fire.Value.Y - s, fire.Value.Z)
else
fire:remove()
fireEffect.Enabled = false
fireEffect.Parent = nil
end
end
if stun then
if stun.Value > 0 then
Torso.Anchored = true
currentChildren = script.Parent:GetChildren()
backpackTools = game.Players:GetPlayerFromCharacter(script.Parent).Backpack:GetChildren()
for i = 1, #currentChildren do
if currentChildren[i].className == "Tool" then
inCharTag:Clone().Parent = currentChildren[i]
print(backpackTools)
table.insert(backpackTools, currentChildren[i])
end
end
for i = 1, #backpackTools do
if backpackTools[i]:FindFirstChild "RobloxBuildTool" == nil then
hider:Clone().Parent = backpackTools[i]
backpackTools[i].Parent = game.Lighting
end
end
wait(0.2)
for i = 1, #backpackTools do
backpackTools[i].Parent = game.Players:GetPlayerFromCharacter(script.Parent).Backpack
end
stun.Value = stun.Value - s
else
Torso.Anchored = false
for i = 1, #backpackTools do
local rbTool = backpackTools[i]:FindFirstChild "RobloxBuildTool"
if rbTool then
rbTool:Remove()
end
backpackTools[i].Parent = game.Lighting
end
wait(0.2)
for i = 1, #backpackTools do
local wasInChar = backpackTools[i]:FindFirstChild "InCharTag"
if wasInChar then
wasInChar:Remove()
backpackTools[i].Parent = script.Parent
else
backpackTools[i].Parent = game.Players:GetPlayerFromCharacter(script.Parent).Backpack
end
end
stun:Remove()
end
end
if delta ~= 0 then
coroutine.resume(coroutine.create(billboardHealthChange), delta)
end
--delta = delta * .01
end
--health = health + delta * s * Humanoid.MaxHealth
health = Humanoid.Health + delta * s
if health * 1.01 < Humanoid.MaxHealth then
Humanoid.Health = health
--myHealth.Value = math.floor(Humanoid.Health)
elseif delta > 0 then
Humanoid.Health = Humanoid.MaxHealth
--myHealth.Value = Humanoid.Health
end
end
end

View File

@ -1,588 +0,0 @@
function waitForProperty(instance, name)
while not instance[name] do
instance.Changed:wait()
end
end
function waitForChild(instance, name)
while not instance:FindFirstChild(name) do
instance.ChildAdded:wait()
end
end
local mainFrame
local choices = {}
local lastChoice
local choiceMap = {}
local currentConversationDialog
local currentConversationPartner
local currentAbortDialogScript
local tooFarAwayMessage = "You are too far away to chat!"
local tooFarAwaySize = 300
local characterWanderedOffMessage = "Chat ended because you walked away"
local characterWanderedOffSize = 350
local conversationTimedOut = "Chat ended because you didn't reply"
local conversationTimedOutSize = 350
local player
local chatNotificationGui
local messageDialog
local timeoutScript
local reenableDialogScript
local dialogMap = {}
local dialogConnections = {}
local gui = nil
waitForChild(game, "CoreGui")
waitForChild(game.CoreGui, "RobloxGui")
if game.CoreGui.RobloxGui:FindFirstChild "ControlFrame" then
gui = game.CoreGui.RobloxGui.ControlFrame
else
gui = game.CoreGui.RobloxGui
end
function currentTone()
if currentConversationDialog then
return currentConversationDialog.Tone
else
return Enum.DialogTone.Neutral
end
end
function createChatNotificationGui()
chatNotificationGui = Instance.new "BillboardGui"
chatNotificationGui.Name = "ChatNotificationGui"
chatNotificationGui.ExtentsOffset = Vector3.new(0, 1, 0)
chatNotificationGui.Size = UDim2.new(4, 0, 5.42857122, 0)
chatNotificationGui.SizeOffset = Vector2.new(0, 0)
chatNotificationGui.StudsOffset = Vector3.new(0.4, 4.3, 0)
chatNotificationGui.Enabled = true
chatNotificationGui.RobloxLocked = true
chatNotificationGui.Active = true
local image = Instance.new "ImageLabel"
image.Name = "Image"
image.Active = false
image.BackgroundTransparency = 1
image.Position = UDim2.new(0, 0, 0, 0)
image.Size = UDim2.new(1, 0, 1, 0)
image.Image = ""
image.RobloxLocked = true
image.Parent = chatNotificationGui
local button = Instance.new "ImageButton"
button.Name = "Button"
button.AutoButtonColor = false
button.Position = UDim2.new(0.0879999995, 0, 0.0529999994, 0)
button.Size = UDim2.new(0.829999983, 0, 0.460000008, 0)
button.Image = ""
button.BackgroundTransparency = 1
button.RobloxLocked = true
button.Parent = image
end
function getChatColor(tone)
if tone == Enum.DialogTone.Neutral then
return Enum.ChatColor.Blue
elseif tone == Enum.DialogTone.Friendly then
return Enum.ChatColor.Green
elseif tone == Enum.DialogTone.Enemy then
return Enum.ChatColor.Red
end
end
function styleChoices(tone)
for _, obj in pairs(choices) do
resetColor(obj, tone)
end
resetColor(lastChoice, tone)
end
function styleMainFrame(tone)
if tone == Enum.DialogTone.Neutral then
mainFrame.Style = Enum.FrameStyle.ChatBlue
mainFrame.Tail.Image = "rbxasset://textures/chatBubble_botBlue_tailRight.png"
elseif tone == Enum.DialogTone.Friendly then
mainFrame.Style = Enum.FrameStyle.ChatGreen
mainFrame.Tail.Image = "rbxasset://textures/chatBubble_botGreen_tailRight.png"
elseif tone == Enum.DialogTone.Enemy then
mainFrame.Style = Enum.FrameStyle.ChatRed
mainFrame.Tail.Image = "rbxasset://textures/chatBubble_botRed_tailRight.png"
end
styleChoices(tone)
end
function setChatNotificationTone(gui, purpose, tone)
if tone == Enum.DialogTone.Neutral then
gui.Image.Image = "rbxasset://textures/chatBubble_botBlue_notify_bkg.png"
elseif tone == Enum.DialogTone.Friendly then
gui.Image.Image = "rbxasset://textures/chatBubble_botGreen_notify_bkg.png"
elseif tone == Enum.DialogTone.Enemy then
gui.Image.Image = "rbxasset://textures/chatBubble_botRed_notify_bkg.png"
end
if purpose == Enum.DialogPurpose.Quest then
gui.Image.Button.Image = "rbxasset://textures/chatBubble_bot_notify_bang.png"
elseif purpose == Enum.DialogPurpose.Help then
gui.Image.Button.Image = "rbxasset://textures/chatBubble_bot_notify_question.png"
elseif purpose == Enum.DialogPurpose.Shop then
gui.Image.Button.Image = "rbxasset://textures/chatBubble_bot_notify_money.png"
end
end
function createMessageDialog()
messageDialog = Instance.new "Frame"
messageDialog.Name = "DialogScriptMessage"
messageDialog.Style = Enum.FrameStyle.RobloxRound
messageDialog.Visible = false
local text = Instance.new "TextLabel"
text.Name = "Text"
text.Position = UDim2.new(0, 0, 0, -1)
text.Size = UDim2.new(1, 0, 1, 0)
text.FontSize = Enum.FontSize.Size14
text.BackgroundTransparency = 1
text.TextColor3 = Color3.new(1, 1, 1)
text.RobloxLocked = true
text.Parent = messageDialog
end
function showMessage(msg, size)
messageDialog.Text.Text = msg
messageDialog.Size = UDim2.new(0, size, 0, 40)
messageDialog.Position = UDim2.new(0.5, -size / 2, 0.5, -40)
messageDialog.Visible = true
wait(2)
messageDialog.Visible = false
end
function variableDelay(str)
local length = math.min(string.len(str), 100)
wait(0.75 + ((length / 75) * 1.5))
end
function resetColor(frame, tone)
if tone == Enum.DialogTone.Neutral then
frame.BackgroundColor3 = Color3.new(0 / 255, 0 / 255, 179 / 255)
frame.Number.TextColor3 = Color3.new(45 / 255, 142 / 255, 245 / 255)
elseif tone == Enum.DialogTone.Friendly then
frame.BackgroundColor3 = Color3.new(0 / 255, 77 / 255, 0 / 255)
frame.Number.TextColor3 = Color3.new(0 / 255, 190 / 255, 0 / 255)
elseif tone == Enum.DialogTone.Enemy then
frame.BackgroundColor3 = Color3.new(140 / 255, 0 / 255, 0 / 255)
frame.Number.TextColor3 = Color3.new(255 / 255, 88 / 255, 79 / 255)
end
end
function highlightColor(frame, tone)
if tone == Enum.DialogTone.Neutral then
frame.BackgroundColor3 = Color3.new(2 / 255, 108 / 255, 255 / 255)
frame.Number.TextColor3 = Color3.new(1, 1, 1)
elseif tone == Enum.DialogTone.Friendly then
frame.BackgroundColor3 = Color3.new(0 / 255, 128 / 255, 0 / 255)
frame.Number.TextColor3 = Color3.new(1, 1, 1)
elseif tone == Enum.DialogTone.Enemy then
frame.BackgroundColor3 = Color3.new(204 / 255, 0 / 255, 0 / 255)
frame.Number.TextColor3 = Color3.new(1, 1, 1)
end
end
function endDialog()
if currentAbortDialogScript then
currentAbortDialogScript:Remove()
currentAbortDialogScript = nil
end
local dialog = currentConversationDialog
currentConversationDialog = nil
if dialog and dialog.InUse then
local reenableScript = reenableDialogScript:Clone()
reenableScript.archivable = false
reenableScript.Disabled = false
reenableScript.Parent = dialog
end
for dialog, gui in pairs(dialogMap) do
if dialog and gui then
gui.Enabled = not dialog.InUse
end
end
currentConversationPartner = nil
end
function wanderDialog()
print "Wander"
mainFrame.Visible = false
endDialog()
showMessage(characterWanderedOffMessage, characterWanderedOffSize)
end
function timeoutDialog()
print "Timeout"
mainFrame.Visible = false
endDialog()
showMessage(conversationTimedOut, conversationTimedOutSize)
end
function normalEndDialog()
print "Done"
endDialog()
end
function sanitizeMessage(msg)
if string.len(msg) == 0 then
return "..."
else
return msg
end
end
function selectChoice(choice)
renewKillswitch(currentConversationDialog)
--First hide the Gui
mainFrame.Visible = false
if choice == lastChoice then
game.Chat:Chat(game.Players.LocalPlayer.Character, "Goodbye!", getChatColor(currentTone()))
normalEndDialog()
else
local dialogChoice = choiceMap[choice]
game.Chat:Chat(
game.Players.LocalPlayer.Character,
sanitizeMessage(dialogChoice.UserDialog),
getChatColor(currentTone())
)
wait(1)
currentConversationDialog:SignalDialogChoiceSelected(player, dialogChoice)
game.Chat:Chat(
currentConversationPartner,
sanitizeMessage(dialogChoice.ResponseDialog),
getChatColor(currentTone())
)
variableDelay(dialogChoice.ResponseDialog)
presentDialogChoices(currentConversationPartner, dialogChoice:GetChildren())
end
end
function newChoice(numberText)
local frame = Instance.new "TextButton"
frame.BackgroundColor3 = Color3.new(0 / 255, 0 / 255, 179 / 255)
frame.AutoButtonColor = false
frame.BorderSizePixel = 0
frame.Text = ""
frame.MouseEnter:connect(function()
highlightColor(frame, currentTone())
end)
frame.MouseLeave:connect(function()
resetColor(frame, currentTone())
end)
frame.MouseButton1Click:connect(function()
selectChoice(frame)
end)
frame.RobloxLocked = true
local number = Instance.new "TextLabel"
number.Name = "Number"
number.TextColor3 = Color3.new(127 / 255, 212 / 255, 255 / 255)
number.Text = numberText
number.FontSize = Enum.FontSize.Size14
number.BackgroundTransparency = 1
number.Position = UDim2.new(0, 4, 0, 2)
number.Size = UDim2.new(0, 20, 0, 24)
number.TextXAlignment = Enum.TextXAlignment.Left
number.TextYAlignment = Enum.TextYAlignment.Top
number.RobloxLocked = true
number.Parent = frame
local prompt = Instance.new "TextLabel"
prompt.Name = "UserPrompt"
prompt.BackgroundTransparency = 1
prompt.TextColor3 = Color3.new(1, 1, 1)
prompt.FontSize = Enum.FontSize.Size14
prompt.Position = UDim2.new(0, 28, 0, 2)
prompt.Size = UDim2.new(1, -32, 1, -4)
prompt.TextXAlignment = Enum.TextXAlignment.Left
prompt.TextYAlignment = Enum.TextYAlignment.Top
prompt.TextWrap = true
prompt.RobloxLocked = true
prompt.Parent = frame
return frame
end
function initialize(parent)
choices[1] = newChoice "1)"
choices[2] = newChoice "2)"
choices[3] = newChoice "3)"
choices[4] = newChoice "4)"
lastChoice = newChoice "5)"
lastChoice.UserPrompt.Text = "Goodbye!"
lastChoice.Size = UDim2.new(1, 0, 0, 28)
mainFrame = Instance.new "Frame"
mainFrame.Name = "UserDialogArea"
mainFrame.Size = UDim2.new(0, 350, 0, 200)
mainFrame.Style = Enum.FrameStyle.ChatBlue
mainFrame.Visible = false
local 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 = mainFrame
for _, obj in pairs(choices) do
obj.RobloxLocked = true
obj.Parent = mainFrame
end
lastChoice.RobloxLocked = true
lastChoice.Parent = mainFrame
mainFrame.RobloxLocked = true
mainFrame.Parent = parent
end
function presentDialogChoices(talkingPart, dialogChoices)
if not currentConversationDialog then
return
end
currentConversationPartner = talkingPart
local sortedDialogChoices = {}
for _, obj in pairs(dialogChoices) do
if obj:IsA "DialogChoice" then
table.insert(sortedDialogChoices, obj)
end
end
table.sort(sortedDialogChoices, function(a, b)
return a.Name < b.Name
end)
if #sortedDialogChoices == 0 then
normalEndDialog()
return
end
local pos = 1
local yPosition = 0
choiceMap = {}
for _, obj in pairs(choices) do
obj.Visible = false
end
for _, obj in pairs(sortedDialogChoices) do
if pos <= #choices then
--3 lines is the maximum, set it to that temporarily
choices[pos].Size = UDim2.new(1, 0, 0, 24 * 3)
choices[pos].UserPrompt.Text = obj.UserDialog
local height = math.ceil(choices[pos].UserPrompt.TextBounds.Y / 24) * 24
choices[pos].Position = UDim2.new(0, 0, 0, yPosition)
choices[pos].Size = UDim2.new(1, 0, 0, height)
choices[pos].Visible = true
choiceMap[choices[pos]] = obj
yPosition = yPosition + height
pos = pos + 1
end
end
lastChoice.Position = UDim2.new(0, 0, 0, yPosition)
lastChoice.Number.Text = pos .. ")"
mainFrame.Size = UDim2.new(0, 350, 0, yPosition + 24 + 32)
mainFrame.Position = UDim2.new(0, 20, 0, -mainFrame.Size.Y.Offset - 20)
styleMainFrame(currentTone())
mainFrame.Visible = true
end
function doDialog(dialog)
while not Instance.Lock(dialog, player) do
wait()
end
if dialog.InUse then
Instance.Unlock(dialog)
return
else
dialog.InUse = true
Instance.Unlock(dialog)
end
currentConversationDialog = dialog
game.Chat:Chat(dialog.Parent, dialog.InitialPrompt, getChatColor(dialog.Tone))
variableDelay(dialog.InitialPrompt)
presentDialogChoices(dialog.Parent, dialog:GetChildren())
end
function renewKillswitch(dialog)
if currentAbortDialogScript then
currentAbortDialogScript:Remove()
currentAbortDialogScript = nil
end
currentAbortDialogScript = timeoutScript:Clone()
currentAbortDialogScript.archivable = false
currentAbortDialogScript.Disabled = false
currentAbortDialogScript.Parent = dialog
end
function checkForLeaveArea()
while currentConversationDialog do
if
currentConversationDialog.Parent
and (
player:DistanceFromCharacter(currentConversationDialog.Parent.Position)
>= currentConversationDialog.ConversationDistance
)
then
wanderDialog()
end
wait(1)
end
end
function startDialog(dialog)
if dialog.Parent and dialog.Parent:IsA "BasePart" then
if player:DistanceFromCharacter(dialog.Parent.Position) >= dialog.ConversationDistance then
showMessage(tooFarAwayMessage, tooFarAwaySize)
return
end
for dialog, gui in pairs(dialogMap) do
if dialog and gui then
gui.Enabled = false
end
end
renewKillswitch(dialog)
delay(1, checkForLeaveArea)
doDialog(dialog)
end
end
function removeDialog(dialog)
if dialogMap[dialog] then
dialogMap[dialog]:Remove()
dialogMap[dialog] = nil
end
if dialogConnections[dialog] then
dialogConnections[dialog]:disconnect()
dialogConnections[dialog] = nil
end
end
function addDialog(dialog)
if dialog.Parent then
if dialog.Parent:IsA "BasePart" then
local chatGui = chatNotificationGui:clone()
chatGui.Enabled = not dialog.InUse
chatGui.Adornee = dialog.Parent
chatGui.RobloxLocked = true
chatGui.Parent = game.CoreGui
chatGui.Image.Button.MouseButton1Click:connect(function()
startDialog(dialog)
end)
setChatNotificationTone(chatGui, dialog.Purpose, dialog.Tone)
dialogMap[dialog] = chatGui
dialogConnections[dialog] = dialog.Changed:connect(function(prop)
if prop == "Parent" and dialog.Parent then
--This handles the reparenting case, seperate from removal case
removeDialog(dialog)
addDialog(dialog)
elseif prop == "InUse" then
chatGui.Enabled = not currentConversationDialog and not dialog.InUse
if dialog == currentConversationDialog then
timeoutDialog()
end
elseif prop == "Tone" or prop == "Purpose" then
setChatNotificationTone(chatGui, dialog.Purpose, dialog.Tone)
end
end)
else -- still need to listen to parent changes even if current parent is not a BasePart
dialogConnections[dialog] = dialog.Changed:connect(function(prop)
if prop == "Parent" and dialog.Parent then
--This handles the reparenting case, seperate from removal case
removeDialog(dialog)
addDialog(dialog)
end
end)
end
end
end
function fetchScripts()
local model = game:GetService("InsertService"):LoadAsset(39226062)
if type(model) == "string" then -- load failed, lets try again
wait(0.1)
model = game:GetService("InsertService"):LoadAsset(39226062)
end
if type(model) == "string" then -- not going to work, lets bail
return
end
waitForChild(model, "TimeoutScript")
timeoutScript = model.TimeoutScript
waitForChild(model, "ReenableDialogScript")
reenableDialogScript = model.ReenableDialogScript
end
function onLoad()
waitForProperty(game.Players, "LocalPlayer")
player = game.Players.LocalPlayer
waitForProperty(player, "Character")
--print("Fetching Scripts")
fetchScripts()
--print("Creating Guis")
createChatNotificationGui()
--print("Creating MessageDialog")
createMessageDialog()
messageDialog.RobloxLocked = true
messageDialog.Parent = gui
--print("Waiting for BottomLeftControl")
waitForChild(gui, "BottomLeftControl")
--print("Initializing Frame")
local frame = Instance.new "Frame"
frame.Name = "DialogFrame"
frame.Position = UDim2.new(0, 0, 0, 0)
frame.Size = UDim2.new(0, 0, 0, 0)
frame.BackgroundTransparency = 1
frame.RobloxLocked = true
frame.Parent = gui.BottomLeftControl
initialize(frame)
--print("Adding Dialogs")
game.CollectionService.ItemAdded:connect(function(obj)
if obj:IsA "Dialog" then
addDialog(obj)
end
end)
game.CollectionService.ItemRemoved:connect(function(obj)
if obj:IsA "Dialog" then
removeDialog(obj)
end
end)
for _, obj in pairs(game.CollectionService:GetCollection "Dialog") do
if obj:IsA "Dialog" then
addDialog(obj)
end
end
end
onLoad()

File diff suppressed because it is too large Load Diff

View File

@ -1,20 +0,0 @@
local t = {}
t.Foo = function()
print "foo"
end
t.Bar = function()
print "bar"
end
t.Help = function(funcNameOrFunc)
--input argument can be a string or a function. Should return a description (of arguments and expected side effects)
if funcNameOrFunc == "Foo" or funcNameOrFunc == t.Foo then
return "Function Foo. Arguments: None. Side effect: prints foo"
elseif funcNameOrFunc == "Bar" or funcNameOrFunc == t.Bar then
return "Function Bar. Arguments: None. Side effect: prints bar"
end
end
return t

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,354 +0,0 @@
function waitForProperty(instance, property)
while not instance[property] do
instance.Changed:wait()
end
end
function waitForChild(instance, name)
while not instance:FindFirstChild(name) do
instance.ChildAdded:wait()
end
end
waitForProperty(game.Players, "LocalPlayer")
waitForChild(script.Parent, "Popup")
waitForChild(script.Parent.Popup, "AcceptButton")
script.Parent.Popup.AcceptButton.Modal = true
local localPlayer = game.Players.LocalPlayer
local teleportUI = nil
local friendRequestBlacklist = {}
local teleportEnabled = true
local makePopupInvisible = function()
if script.Parent.Popup then
script.Parent.Popup.Visible = false
end
end
function makeFriend(fromPlayer, toPlayer)
local popup = script.Parent:FindFirstChild "Popup"
if popup == nil then
return
end -- there is no popup!
if popup.Visible then
return
end -- currently popping something, abort!
if friendRequestBlacklist[fromPlayer] then
return
end -- previously cancelled friend request, we don't want it!
popup.PopupText.Text = "Accept Friend Request from " .. tostring(fromPlayer.Name) .. "?"
popup.PopupImage.Image = "http://www.roblox.com/thumbs/avatar.ashx?userId="
.. tostring(fromPlayer.userId)
.. "&x=352&y=352"
showTwoButtons()
popup.Visible = true
popup.AcceptButton.Text = "Accept"
popup.DeclineButton.Text = "Decline"
popup:TweenSize(UDim2.new(0, 330, 0, 350), Enum.EasingDirection.Out, Enum.EasingStyle.Quart, 1, true)
local yesCon, noCon
yesCon = popup.AcceptButton.MouseButton1Click:connect(function()
popup.Visible = false
toPlayer:RequestFriendship(fromPlayer)
if yesCon then
yesCon:disconnect()
end
if noCon then
noCon:disconnect()
end
popup:TweenSize(
UDim2.new(0, 0, 0, 0),
Enum.EasingDirection.Out,
Enum.EasingStyle.Quart,
1,
true,
makePopupInvisible()
)
end)
noCon = popup.DeclineButton.MouseButton1Click:connect(function()
popup.Visible = false
toPlayer:RevokeFriendship(fromPlayer)
friendRequestBlacklist[fromPlayer] = true
print "pop up blacklist"
if yesCon then
yesCon:disconnect()
end
if noCon then
noCon:disconnect()
end
popup:TweenSize(
UDim2.new(0, 0, 0, 0),
Enum.EasingDirection.Out,
Enum.EasingStyle.Quart,
1,
true,
makePopupInvisible()
)
end)
end
game.Players.FriendRequestEvent:connect(function(fromPlayer, toPlayer, event)
-- if this doesn't involve me, then do nothing
if fromPlayer ~= localPlayer and toPlayer ~= localPlayer then
return
end
if fromPlayer == localPlayer then
if event == Enum.FriendRequestEvent.Accept then
game:GetService("GuiService"):SendNotification(
"You are Friends",
"With " .. toPlayer.Name .. "!",
"http://www.roblox.com/thumbs/avatar.ashx?userId=" .. tostring(toPlayer.userId) .. "&x=48&y=48",
5,
function() end
)
end
elseif toPlayer == localPlayer then
if event == Enum.FriendRequestEvent.Issue then
if friendRequestBlacklist[fromPlayer] then
return
end -- previously cancelled friend request, we don't want it!
game:GetService("GuiService"):SendNotification(
"Friend Request",
"From " .. fromPlayer.Name,
"http://www.roblox.com/thumbs/avatar.ashx?userId=" .. tostring(fromPlayer.userId) .. "&x=48&y=48",
8,
function()
makeFriend(fromPlayer, toPlayer)
end
)
elseif event == Enum.FriendRequestEvent.Accept then
game:GetService("GuiService"):SendNotification(
"You are Friends",
"With " .. fromPlayer.Name .. "!",
"http://www.roblox.com/thumbs/avatar.ashx?userId=" .. tostring(fromPlayer.userId) .. "&x=48&y=48",
5,
function() end
)
end
end
end)
function showOneButton()
local popup = script.Parent:FindFirstChild "Popup"
if popup then
popup.OKButton.Visible = true
popup.DeclineButton.Visible = false
popup.AcceptButton.Visible = false
end
end
function showTwoButtons()
local popup = script.Parent:FindFirstChild "Popup"
if popup then
popup.OKButton.Visible = false
popup.DeclineButton.Visible = true
popup.AcceptButton.Visible = true
end
end
function showTeleportUI(message, timer)
if teleportUI ~= nil then
teleportUI:Remove()
end
waitForChild(localPlayer, "PlayerGui")
teleportUI = Instance.new "Message"
teleportUI.Text = message
teleportUI.Parent = localPlayer.PlayerGui
if timer > 0 then
wait(timer)
teleportUI:Remove()
end
end
function onTeleport(teleportState, _, _)
if game:GetService("TeleportService").CustomizedTeleportUI == false then
if teleportState == Enum.TeleportState.Started then
showTeleportUI("Teleport started...", 0)
elseif teleportState == Enum.TeleportState.WaitingForServer then
showTeleportUI("Requesting server...", 0)
elseif teleportState == Enum.TeleportState.InProgress then
showTeleportUI("Teleporting...", 0)
elseif teleportState == Enum.TeleportState.Failed then
showTeleportUI("Teleport failed. Insufficient privileges or target place does not exist.", 3)
end
end
end
if teleportEnabled then
localPlayer.OnTeleport:connect(onTeleport)
game:GetService("TeleportService").ErrorCallback = function(message)
local popup = script.Parent:FindFirstChild "Popup"
showOneButton()
popup.PopupText.Text = message
local clickCon
clickCon = popup.OKButton.MouseButton1Click:connect(function()
game:GetService("TeleportService"):TeleportCancel()
if clickCon then
clickCon:disconnect()
end
game.GuiService:RemoveCenterDialog(script.Parent:FindFirstChild "Popup")
popup:TweenSize(
UDim2.new(0, 0, 0, 0),
Enum.EasingDirection.Out,
Enum.EasingStyle.Quart,
1,
true,
makePopupInvisible()
)
end)
game.GuiService:AddCenterDialog(
script.Parent:FindFirstChild "Popup",
Enum.CenterDialogType.QuitDialog,
--ShowFunction
function()
showOneButton()
script.Parent:FindFirstChild("Popup").Visible = true
popup:TweenSize(UDim2.new(0, 330, 0, 350), Enum.EasingDirection.Out, Enum.EasingStyle.Quart, 1, true)
end,
--HideFunction
function()
popup:TweenSize(
UDim2.new(0, 0, 0, 0),
Enum.EasingDirection.Out,
Enum.EasingStyle.Quart,
1,
true,
makePopupInvisible()
)
end
)
end
game:GetService("TeleportService").ConfirmationCallback = function(message, placeId, spawnName)
local popup = script.Parent:FindFirstChild "Popup"
popup.PopupText.Text = message
popup.PopupImage.Image = ""
local yesCon, noCon
local function killCons()
if yesCon then
yesCon:disconnect()
end
if noCon then
noCon:disconnect()
end
game.GuiService:RemoveCenterDialog(script.Parent:FindFirstChild "Popup")
popup:TweenSize(
UDim2.new(0, 0, 0, 0),
Enum.EasingDirection.Out,
Enum.EasingStyle.Quart,
1,
true,
makePopupInvisible()
)
end
yesCon = popup.AcceptButton.MouseButton1Click:connect(function()
killCons()
local success, err = pcall(function()
game:GetService("TeleportService"):TeleportImpl(placeId, spawnName)
end)
if not success then
showOneButton()
popup.PopupText.Text = err
local clickCon
clickCon = popup.OKButton.MouseButton1Click:connect(function()
if clickCon then
clickCon:disconnect()
end
game.GuiService:RemoveCenterDialog(script.Parent:FindFirstChild "Popup")
popup:TweenSize(
UDim2.new(0, 0, 0, 0),
Enum.EasingDirection.Out,
Enum.EasingStyle.Quart,
1,
true,
makePopupInvisible()
)
end)
game.GuiService:AddCenterDialog(
script.Parent:FindFirstChild "Popup",
Enum.CenterDialogType.QuitDialog,
--ShowFunction
function()
showOneButton()
script.Parent:FindFirstChild("Popup").Visible = true
popup:TweenSize(
UDim2.new(0, 330, 0, 350),
Enum.EasingDirection.Out,
Enum.EasingStyle.Quart,
1,
true
)
end,
--HideFunction
function()
popup:TweenSize(
UDim2.new(0, 0, 0, 0),
Enum.EasingDirection.Out,
Enum.EasingStyle.Quart,
1,
true,
makePopupInvisible()
)
end
)
end
end)
noCon = popup.DeclineButton.MouseButton1Click:connect(function()
killCons()
pcall(function()
game:GetService("TeleportService"):TeleportCancel()
end)
end)
local centerDialogSuccess = pcall(function()
game.GuiService:AddCenterDialog(
script.Parent:FindFirstChild "Popup",
Enum.CenterDialogType.QuitDialog,
--ShowFunction
function()
showTwoButtons()
popup.AcceptButton.Text = "Leave"
popup.DeclineButton.Text = "Stay"
script.Parent:FindFirstChild("Popup").Visible = true
popup:TweenSize(
UDim2.new(0, 330, 0, 350),
Enum.EasingDirection.Out,
Enum.EasingStyle.Quart,
1,
true
)
end,
--HideFunction
function()
popup:TweenSize(
UDim2.new(0, 0, 0, 0),
Enum.EasingDirection.Out,
Enum.EasingStyle.Quart,
1,
true,
makePopupInvisible()
)
end
)
end)
if centerDialogSuccess == false then
script.Parent:FindFirstChild("Popup").Visible = true
popup.AcceptButton.Text = "Leave"
popup.DeclineButton.Text = "Stay"
popup:TweenSize(UDim2.new(0, 330, 0, 350), Enum.EasingDirection.Out, Enum.EasingStyle.Quart, 1, true)
end
return true
end
end

View File

@ -1,72 +0,0 @@
--build our gui
local popupFrame = Instance.new "Frame"
popupFrame.Position = UDim2.new(0.5, -165, 0.5, -175)
popupFrame.Size = UDim2.new(0, 330, 0, 350)
popupFrame.Style = Enum.FrameStyle.RobloxRound
popupFrame.ZIndex = 4
popupFrame.Name = "Popup"
popupFrame.Visible = false
popupFrame.Parent = script.Parent
local darken = popupFrame:clone()
darken.Size = UDim2.new(1, 16, 1, 16)
darken.Position = UDim2.new(0, -8, 0, -8)
darken.Name = "Darken"
darken.ZIndex = 1
darken.Parent = popupFrame
local acceptButton = Instance.new "TextButton"
acceptButton.Position = UDim2.new(0, 20, 0, 270)
acceptButton.Size = UDim2.new(0, 100, 0, 50)
acceptButton.Font = Enum.Font.ArialBold
acceptButton.FontSize = Enum.FontSize.Size24
acceptButton.Style = Enum.ButtonStyle.RobloxButton
acceptButton.TextColor3 = Color3.new(248 / 255, 248 / 255, 248 / 255)
acceptButton.Text = "Yes"
acceptButton.ZIndex = 5
acceptButton.Name = "AcceptButton"
acceptButton.Parent = popupFrame
local declineButton = acceptButton:clone()
declineButton.Position = UDim2.new(1, -120, 0, 270)
declineButton.Text = "No"
declineButton.Name = "DeclineButton"
declineButton.Parent = popupFrame
local okButton = acceptButton:clone()
okButton.Name = "OKButton"
okButton.Text = "OK"
okButton.Position = UDim2.new(0.5, -50, 0, 270)
okButton.Visible = false
okButton.Parent = popupFrame
local popupImage = Instance.new "ImageLabel"
popupImage.BackgroundTransparency = 1
popupImage.Position = UDim2.new(0.5, -140, 0, 0)
popupImage.Size = UDim2.new(0, 280, 0, 280)
popupImage.ZIndex = 3
popupImage.Name = "PopupImage"
popupImage.Parent = popupFrame
local backing = Instance.new "ImageLabel"
backing.BackgroundTransparency = 1
backing.Size = UDim2.new(1, 0, 1, 0)
backing.Image = "http://www.roblox.com/asset/?id=47574181"
backing.Name = "Backing"
backing.ZIndex = 2
backing.Parent = popupImage
local popupText = Instance.new "TextLabel"
popupText.Name = "PopupText"
popupText.Size = UDim2.new(1, 0, 0.8, 0)
popupText.Font = Enum.Font.ArialBold
popupText.FontSize = Enum.FontSize.Size36
popupText.BackgroundTransparency = 1
popupText.Text = "Hello I'm a popup"
popupText.TextColor3 = Color3.new(248 / 255, 248 / 255, 248 / 255)
popupText.TextWrap = true
popupText.ZIndex = 5
popupText.Parent = popupFrame
script:remove()

View File

@ -1,959 +0,0 @@
-- This script creates almost all gui elements found in the backpack (warning: there are a lot!)
-- TODO: automate this process
if game.CoreGui.Version < 3 then
return
end -- peace out if we aren't using the right client
local gui = script.Parent
-- A couple of necessary functions
local function waitForChild(instance, name)
while not instance:FindFirstChild(name) do
instance.ChildAdded:wait()
end
end
local function waitForProperty(instance, property)
while not instance[property] do
instance.Changed:wait()
end
end
local function IsTouchDevice()
local touchEnabled = false
pcall(function()
touchEnabled = Game:GetService("UserInputService").TouchEnabled
end)
return touchEnabled
end
local function IsPhone()
if gui.AbsoluteSize.Y <= 320 then
return true
end
return false
end
waitForChild(game, "Players")
waitForProperty(game.Players, "LocalPlayer")
-- First up is the current loadout
local CurrentLoadout = Instance.new "Frame"
CurrentLoadout.Name = "CurrentLoadout"
CurrentLoadout.Position = UDim2.new(0.5, -300, 1, -85)
CurrentLoadout.Size = UDim2.new(0, 600, 0, 54)
CurrentLoadout.BackgroundTransparency = 1
CurrentLoadout.RobloxLocked = true
CurrentLoadout.Parent = gui
local CLBackground = Instance.new "ImageLabel"
CLBackground.Name = "Background"
CLBackground.Size = UDim2.new(1.2, 0, 1.2, 0)
CLBackground.Image = "http://www.roblox.com/asset/?id=96536002"
CLBackground.BackgroundTransparency = 1
CLBackground.Position = UDim2.new(-0.1, 0, -0.1, 0)
CLBackground.ZIndex = 0.0
CLBackground.Parent = CurrentLoadout
CLBackground.Visible = false
local BackgroundUp = Instance.new "ImageLabel"
BackgroundUp.Size = UDim2.new(1, 0, 0.025, 1)
BackgroundUp.Position = UDim2.new(0, 0, 0, 0)
BackgroundUp.Image = "http://www.roblox.com/asset/?id=97662207"
BackgroundUp.BackgroundTransparency = 1
BackgroundUp.Parent = CLBackground
local Debounce = Instance.new "BoolValue"
Debounce.Name = "Debounce"
Debounce.RobloxLocked = true
Debounce.Parent = CurrentLoadout
local BackpackButton = Instance.new "ImageButton"
BackpackButton.RobloxLocked = true
BackpackButton.Visible = false
BackpackButton.Name = "BackpackButton"
BackpackButton.BackgroundTransparency = 1
BackpackButton.Image = "http://www.roblox.com/asset/?id=97617958"
BackpackButton.Position = UDim2.new(0.5, -60, 1, -108)
BackpackButton.Size = UDim2.new(0, 120, 0, 18)
waitForChild(gui, "ControlFrame")
BackpackButton.Parent = gui.ControlFrame
local NumSlots = 9
if IsPhone() then
NumSlots = 3
CurrentLoadout.Size = UDim2.new(0, 180, 0, 54)
CurrentLoadout.Position = UDim2.new(0.5, -90, 1, -85)
end
for i = 0, NumSlots do
local slotFrame = Instance.new "Frame"
slotFrame.RobloxLocked = true
slotFrame.BackgroundColor3 = Color3.new(0, 0, 0)
slotFrame.BackgroundTransparency = 1
slotFrame.BorderColor3 = Color3.new(1, 1, 1)
slotFrame.Name = "Slot" .. tostring(i)
slotFrame.ZIndex = 4.0
if i == 0 then
slotFrame.Position = UDim2.new(0.9, 0, 0, 0)
else
slotFrame.Position = UDim2.new((i - 1) * 0.1, (i - 1) * 6, 0, 0)
end
slotFrame.Size = UDim2.new(0, 54, 1, 0)
slotFrame.Parent = CurrentLoadout
if gui.AbsoluteSize.Y <= 320 then
slotFrame.Position = UDim2.new(0, (i - 1) * 60, 0, -50)
print("Well got here", slotFrame, slotFrame.Position.X.Scale, slotFrame.Position.X.Offset)
end
if gui.AbsoluteSize.Y <= 320 and i == 0 then
slotFrame:Destroy()
end
end
local TempSlot = Instance.new "ImageButton"
TempSlot.Name = "TempSlot"
TempSlot.Active = true
TempSlot.Size = UDim2.new(1, 0, 1, 0)
TempSlot.BackgroundTransparency = 1
TempSlot.Style = "Custom"
TempSlot.Visible = false
TempSlot.RobloxLocked = true
TempSlot.Parent = CurrentLoadout
TempSlot.ZIndex = 3.0
local slotBackground = Instance.new "ImageLabel"
slotBackground.Name = "Background"
slotBackground.BackgroundTransparency = 1
slotBackground.Image = "http://www.roblox.com/asset/?id=97613075"
slotBackground.Size = UDim2.new(1, 0, 1, 0)
slotBackground.Parent = TempSlot
local HighLight = Instance.new "ImageLabel"
HighLight.Name = "Highlight"
HighLight.BackgroundTransparency = 1
HighLight.Image = "http://www.roblox.com/asset/?id=97643886"
HighLight.Size = UDim2.new(1, 0, 1, 0)
--HighLight.Parent = TempSlot
HighLight.Visible = false
-- TempSlot Children
local GearReference = Instance.new "ObjectValue"
GearReference.Name = "GearReference"
GearReference.RobloxLocked = true
GearReference.Parent = TempSlot
local ToolTipLabel = Instance.new "TextLabel"
ToolTipLabel.Name = "ToolTipLabel"
ToolTipLabel.RobloxLocked = true
ToolTipLabel.Text = ""
ToolTipLabel.BackgroundTransparency = 0.5
ToolTipLabel.BorderSizePixel = 0
ToolTipLabel.Visible = false
ToolTipLabel.TextColor3 = Color3.new(1, 1, 1)
ToolTipLabel.BackgroundColor3 = Color3.new(0, 0, 0)
ToolTipLabel.TextStrokeTransparency = 0
ToolTipLabel.Font = Enum.Font.ArialBold
ToolTipLabel.FontSize = Enum.FontSize.Size14
--ToolTipLabel.TextWrap = true
ToolTipLabel.Size = UDim2.new(1, 60, 0, 20)
ToolTipLabel.Position = UDim2.new(0, -30, 0, -30)
ToolTipLabel.Parent = TempSlot
local Kill = Instance.new "BoolValue"
Kill.Name = "Kill"
Kill.RobloxLocked = true
Kill.Parent = TempSlot
local GearImage = Instance.new "ImageLabel"
GearImage.Name = "GearImage"
GearImage.BackgroundTransparency = 1
GearImage.Position = UDim2.new(0, 0, 0, 0)
GearImage.Size = UDim2.new(1, 0, 1, 0)
GearImage.ZIndex = 5.0
GearImage.RobloxLocked = true
GearImage.Parent = TempSlot
local SlotNumber = Instance.new "TextLabel"
SlotNumber.Name = "SlotNumber"
SlotNumber.BackgroundTransparency = 1
SlotNumber.BorderSizePixel = 0
SlotNumber.Font = Enum.Font.ArialBold
SlotNumber.FontSize = Enum.FontSize.Size18
SlotNumber.Position = UDim2.new(0, 0, 0, 0)
SlotNumber.Size = UDim2.new(0, 10, 0, 15)
SlotNumber.TextColor3 = Color3.new(1, 1, 1)
SlotNumber.TextTransparency = 0
SlotNumber.TextXAlignment = Enum.TextXAlignment.Left
SlotNumber.TextYAlignment = Enum.TextYAlignment.Bottom
SlotNumber.RobloxLocked = true
SlotNumber.Parent = TempSlot
SlotNumber.ZIndex = 5
if IsTouchDevice() then
SlotNumber.Visible = false
end
local SlotNumberDownShadow = SlotNumber:Clone()
SlotNumberDownShadow.Name = "SlotNumberDownShadow"
SlotNumberDownShadow.TextColor3 = Color3.new(0, 0, 0)
SlotNumberDownShadow.Position = UDim2.new(0, 1, 0, -1)
SlotNumberDownShadow.Parent = TempSlot
SlotNumberDownShadow.ZIndex = 2
local SlotNumberUpShadow = SlotNumberDownShadow:Clone()
SlotNumberUpShadow.Name = "SlotNumberUpShadow"
SlotNumberUpShadow.Position = UDim2.new(0, -1, 0, -1)
SlotNumberUpShadow.Parent = TempSlot
local GearText = Instance.new "TextLabel"
GearText.RobloxLocked = true
GearText.Name = "GearText"
GearText.BackgroundTransparency = 1
GearText.Font = Enum.Font.Arial
GearText.FontSize = Enum.FontSize.Size14
GearText.Position = UDim2.new(0, -8, 0, -8)
GearText.Size = UDim2.new(1, 16, 1, 16)
GearText.Text = ""
GearText.TextColor3 = Color3.new(1, 1, 1)
GearText.TextWrap = true
GearText.Parent = TempSlot
GearText.ZIndex = 5.0
--- Great, now lets make the inventory!
local Backpack = Instance.new "Frame"
Backpack.RobloxLocked = true
Backpack.Visible = false
Backpack.Name = "Backpack"
Backpack.Position = UDim2.new(0.5, 0, 0.5, 0)
Backpack.BackgroundColor3 = Color3.new(32 / 255, 32 / 255, 32 / 255)
Backpack.BackgroundTransparency = 0.0
Backpack.BorderSizePixel = 0
Backpack.Parent = gui
Backpack.Active = true
-- Backpack Children
local SwapSlot = Instance.new "BoolValue"
SwapSlot.RobloxLocked = true
SwapSlot.Name = "SwapSlot"
SwapSlot.Parent = Backpack
-- SwapSlot Children
local Slot = Instance.new "IntValue"
Slot.RobloxLocked = true
Slot.Name = "Slot"
Slot.Parent = SwapSlot
local GearButton = Instance.new "ObjectValue"
GearButton.RobloxLocked = true
GearButton.Name = "GearButton"
GearButton.Parent = SwapSlot
local Tabs = Instance.new "Frame"
Tabs.Name = "Tabs"
Tabs.Visible = false
Tabs.Active = false
Tabs.RobloxLocked = true
Tabs.BackgroundColor3 = Color3.new(0, 0, 0)
Tabs.BackgroundTransparency = 0.08
Tabs.BorderSizePixel = 0
Tabs.Position = UDim2.new(0, 0, -0.1, -4)
Tabs.Size = UDim2.new(1, 0, 0.1, 4)
Tabs.Parent = Backpack
-- Tabs Children
local tabLine = Instance.new "Frame"
tabLine.RobloxLocked = true
tabLine.Name = "TabLine"
tabLine.BackgroundColor3 = Color3.new(53 / 255, 53 / 255, 53 / 255)
tabLine.BorderSizePixel = 0
tabLine.Position = UDim2.new(0, 5, 1, -4)
tabLine.Size = UDim2.new(1, -10, 0, 4)
tabLine.ZIndex = 2
tabLine.Parent = Tabs
local InventoryButton = Instance.new "TextButton"
InventoryButton.RobloxLocked = true
InventoryButton.Name = "InventoryButton"
InventoryButton.Size = UDim2.new(0, 60, 0, 30)
InventoryButton.Position = UDim2.new(0, 7, 1, -31)
InventoryButton.BackgroundColor3 = Color3.new(1, 1, 1)
InventoryButton.BorderColor3 = Color3.new(1, 1, 1)
InventoryButton.Font = Enum.Font.ArialBold
InventoryButton.FontSize = Enum.FontSize.Size18
InventoryButton.Text = "Gear"
InventoryButton.AutoButtonColor = false
InventoryButton.TextColor3 = Color3.new(0, 0, 0)
InventoryButton.Selected = true
InventoryButton.Active = true
InventoryButton.ZIndex = 3
InventoryButton.Parent = Tabs
if game.CoreGui.Version >= 8 then
local WardrobeButton = Instance.new "TextButton"
WardrobeButton.RobloxLocked = true
WardrobeButton.Name = "WardrobeButton"
WardrobeButton.Size = UDim2.new(0, 90, 0, 30)
WardrobeButton.Position = UDim2.new(0, 77, 1, -31)
WardrobeButton.BackgroundColor3 = Color3.new(0, 0, 0)
WardrobeButton.BorderColor3 = Color3.new(1, 1, 1)
WardrobeButton.Font = Enum.Font.ArialBold
WardrobeButton.FontSize = Enum.FontSize.Size18
WardrobeButton.Text = "Wardrobe"
WardrobeButton.AutoButtonColor = false
WardrobeButton.TextColor3 = Color3.new(1, 1, 1)
WardrobeButton.Selected = false
WardrobeButton.Active = true
WardrobeButton.Parent = Tabs
end
local closeButton = Instance.new "TextButton"
closeButton.RobloxLocked = true
closeButton.Name = "CloseButton"
closeButton.Font = Enum.Font.ArialBold
closeButton.FontSize = Enum.FontSize.Size24
closeButton.Position = UDim2.new(1, -33, 0, 4)
closeButton.Size = UDim2.new(0, 30, 0, 30)
closeButton.Style = Enum.ButtonStyle.RobloxButton
closeButton.Text = ""
closeButton.TextColor3 = Color3.new(1, 1, 1)
closeButton.Parent = Tabs
closeButton.Modal = true
--closeButton child
local XImage = Instance.new "ImageLabel"
XImage.RobloxLocked = true
XImage.Name = "XImage"
game:GetService("ContentProvider"):Preload "http://www.roblox.com/asset/?id=75547445"
XImage.Image = "http://www.roblox.com/asset/?id=75547445" --TODO: move to rbxasset
XImage.BackgroundTransparency = 1
XImage.Position = UDim2.new(-0.25, -1, -0.25, -1)
XImage.Size = UDim2.new(1.5, 2, 1.5, 2)
XImage.ZIndex = 2
XImage.Parent = closeButton
-- Generic Search gui used across backpack
local SearchFrame = Instance.new "Frame"
SearchFrame.RobloxLocked = true
SearchFrame.Name = "SearchFrame"
SearchFrame.BackgroundTransparency = 1
SearchFrame.Position = UDim2.new(1, -220, 0, 2)
SearchFrame.Size = UDim2.new(0, 220, 0, 24)
SearchFrame.Parent = Backpack
-- SearchFrame Children
local SearchButton = Instance.new "ImageButton"
SearchButton.RobloxLocked = true
SearchButton.Name = "SearchButton"
SearchButton.Size = UDim2.new(0, 25, 0, 25)
SearchButton.BackgroundTransparency = 1
SearchButton.Image = "rbxasset://textures/ui/SearchIcon.png"
SearchButton.Parent = SearchFrame
local SearchBoxFrame = Instance.new "TextButton"
SearchBoxFrame.RobloxLocked = true
SearchBoxFrame.Position = UDim2.new(0, 25, 0, 0)
SearchBoxFrame.Size = UDim2.new(1, -28, 0, 26)
SearchBoxFrame.Name = "SearchBoxFrame"
SearchBoxFrame.Text = ""
SearchBoxFrame.Style = Enum.ButtonStyle.RobloxButton
SearchBoxFrame.Parent = SearchFrame
-- SearchBoxFrame Children
local SearchBox = Instance.new "TextBox"
SearchBox.RobloxLocked = true
SearchBox.Name = "SearchBox"
SearchBox.BackgroundTransparency = 1
SearchBox.Font = Enum.Font.ArialBold
SearchBox.FontSize = Enum.FontSize.Size12
SearchBox.Position = UDim2.new(0, -5, 0, -5)
SearchBox.Size = UDim2.new(1, 10, 1, 10)
SearchBox.TextColor3 = Color3.new(1, 1, 1)
SearchBox.TextXAlignment = Enum.TextXAlignment.Left
SearchBox.ZIndex = 2
SearchBox.TextWrap = true
SearchBox.Text = "Search..."
SearchBox.Parent = SearchBoxFrame
local ResetButton = Instance.new "TextButton"
ResetButton.RobloxLocked = true
ResetButton.Visible = false
ResetButton.Name = "ResetButton"
ResetButton.Position = UDim2.new(1, -26, 0, 3)
ResetButton.Size = UDim2.new(0, 20, 0, 20)
ResetButton.Style = Enum.ButtonStyle.RobloxButtonDefault
ResetButton.Text = "X"
ResetButton.TextColor3 = Color3.new(1, 1, 1)
ResetButton.Font = Enum.Font.ArialBold
ResetButton.FontSize = Enum.FontSize.Size18
ResetButton.ZIndex = 3
ResetButton.Parent = SearchFrame
------------------------------- GEAR -------------------------------------------------------
local Gear = Instance.new "Frame"
Gear.Name = "Gear"
Gear.RobloxLocked = true
Gear.BackgroundTransparency = 1
Gear.Size = UDim2.new(1, 0, 1, 0)
Gear.ClipsDescendants = true
Gear.Parent = Backpack
-- Gear Children
local AssetsList = Instance.new "Frame"
AssetsList.RobloxLocked = true
AssetsList.Name = "AssetsList"
AssetsList.BackgroundTransparency = 1
AssetsList.Size = UDim2.new(0.2, 0, 1, 0)
AssetsList.Style = Enum.FrameStyle.RobloxSquare
AssetsList.Visible = false
AssetsList.Parent = Gear
local GearGrid = Instance.new "Frame"
GearGrid.RobloxLocked = true
GearGrid.Name = "GearGrid"
GearGrid.Size = UDim2.new(0.95, 0, 1, 0)
GearGrid.BackgroundTransparency = 1
GearGrid.Parent = Gear
local GearButton = Instance.new "ImageButton"
GearButton.RobloxLocked = true
GearButton.Visible = false
GearButton.Name = "GearButton"
GearButton.Size = UDim2.new(0, 54, 0, 54)
GearButton.Style = "Custom"
GearButton.BackgroundTransparency = 1
GearButton.Parent = GearGrid
local slotBackground = Instance.new "ImageLabel"
slotBackground.Name = "Background"
slotBackground.BackgroundTransparency = 1
slotBackground.Image = "http://www.roblox.com/asset/?id=97613075"
slotBackground.Size = UDim2.new(1, 0, 1, 0)
slotBackground.Parent = GearButton
-- GearButton Children
local GearReference = Instance.new "ObjectValue"
GearReference.RobloxLocked = true
GearReference.Name = "GearReference"
GearReference.Parent = GearButton
local GreyOutButton = Instance.new "Frame"
GreyOutButton.RobloxLocked = true
GreyOutButton.Name = "GreyOutButton"
GreyOutButton.BackgroundTransparency = 0.5
GreyOutButton.Size = UDim2.new(1, 0, 1, 0)
GreyOutButton.Active = true
GreyOutButton.Visible = false
GreyOutButton.ZIndex = 3
GreyOutButton.Parent = GearButton
local GearText = Instance.new "TextLabel"
GearText.RobloxLocked = true
GearText.Name = "GearText"
GearText.BackgroundTransparency = 1
GearText.Font = Enum.Font.Arial
GearText.FontSize = Enum.FontSize.Size14
GearText.Position = UDim2.new(0, -8, 0, -8)
GearText.Size = UDim2.new(1, 16, 1, 16)
GearText.Text = ""
GearText.ZIndex = 2
GearText.TextColor3 = Color3.new(1, 1, 1)
GearText.TextWrap = true
GearText.Parent = GearButton
local GearGridScrollingArea = Instance.new "Frame"
GearGridScrollingArea.RobloxLocked = true
GearGridScrollingArea.Name = "GearGridScrollingArea"
GearGridScrollingArea.Position = UDim2.new(1, -19, 0, 35)
GearGridScrollingArea.Size = UDim2.new(0, 17, 1, -45)
GearGridScrollingArea.BackgroundTransparency = 1
GearGridScrollingArea.Parent = Gear
local GearLoadouts = Instance.new "Frame"
GearLoadouts.RobloxLocked = true
GearLoadouts.Name = "GearLoadouts"
GearLoadouts.BackgroundTransparency = 1
GearLoadouts.Position = UDim2.new(0.7, 23, 0.5, 1)
GearLoadouts.Size = UDim2.new(0.3, -23, 0.5, -1)
GearLoadouts.Parent = Gear
GearLoadouts.Visible = false
-- GearLoadouts Children
local GearLoadoutsHeader = Instance.new "Frame"
GearLoadoutsHeader.RobloxLocked = true
GearLoadoutsHeader.Name = "GearLoadoutsHeader"
GearLoadoutsHeader.BackgroundColor3 = Color3.new(0, 0, 0)
GearLoadoutsHeader.BackgroundTransparency = 0.2
GearLoadoutsHeader.BorderColor3 = Color3.new(1, 0, 0)
GearLoadoutsHeader.Size = UDim2.new(1, 2, 0.15, -1)
GearLoadoutsHeader.Parent = GearLoadouts
-- GearLoadoutsHeader Children
local LoadoutsHeaderText = Instance.new "TextLabel"
LoadoutsHeaderText.RobloxLocked = true
LoadoutsHeaderText.Name = "LoadoutsHeaderText"
LoadoutsHeaderText.BackgroundTransparency = 1
LoadoutsHeaderText.Font = Enum.Font.ArialBold
LoadoutsHeaderText.FontSize = Enum.FontSize.Size18
LoadoutsHeaderText.Size = UDim2.new(1, 0, 1, 0)
LoadoutsHeaderText.Text = "Loadouts"
LoadoutsHeaderText.TextColor3 = Color3.new(1, 1, 1)
LoadoutsHeaderText.Parent = GearLoadoutsHeader
local GearLoadoutsScrollingArea = GearGridScrollingArea:clone()
GearLoadoutsScrollingArea.RobloxLocked = true
GearLoadoutsScrollingArea.Name = "GearLoadoutsScrollingArea"
GearLoadoutsScrollingArea.Position = UDim2.new(1, -15, 0.15, 2)
GearLoadoutsScrollingArea.Size = UDim2.new(0, 17, 0.85, -2)
GearLoadoutsScrollingArea.Parent = GearLoadouts
local LoadoutsList = Instance.new "Frame"
LoadoutsList.RobloxLocked = true
LoadoutsList.Name = "LoadoutsList"
LoadoutsList.Position = UDim2.new(0, 0, 0.15, 2)
LoadoutsList.Size = UDim2.new(1, -17, 0.85, -2)
LoadoutsList.Style = Enum.FrameStyle.RobloxSquare
LoadoutsList.Parent = GearLoadouts
local GearPreview = Instance.new "Frame"
GearPreview.RobloxLocked = true
GearPreview.Name = "GearPreview"
GearPreview.Position = UDim2.new(0.7, 23, 0, 0)
GearPreview.Size = UDim2.new(0.3, -28, 0.5, -1)
GearPreview.BackgroundTransparency = 1
GearPreview.ZIndex = 7
GearPreview.Parent = Gear
-- GearPreview Children
local GearStats = Instance.new "Frame"
GearStats.RobloxLocked = true
GearStats.Name = "GearStats"
GearStats.BackgroundTransparency = 1
GearStats.Position = UDim2.new(0, 0, 0.75, 0)
GearStats.Size = UDim2.new(1, 0, 0.25, 0)
GearStats.ZIndex = 8
GearStats.Parent = GearPreview
-- GearStats Children
local GearName = Instance.new "TextLabel"
GearName.RobloxLocked = true
GearName.Name = "GearName"
GearName.BackgroundTransparency = 1
GearName.Font = Enum.Font.ArialBold
GearName.FontSize = Enum.FontSize.Size18
GearName.Position = UDim2.new(0, -3, 0, 0)
GearName.Size = UDim2.new(1, 6, 1, 5)
GearName.Text = ""
GearName.TextColor3 = Color3.new(1, 1, 1)
GearName.TextWrap = true
GearName.ZIndex = 9
GearName.Parent = GearStats
local GearImage = Instance.new "ImageLabel"
GearImage.RobloxLocked = true
GearImage.Name = "GearImage"
GearImage.Image = ""
GearImage.BackgroundTransparency = 1
GearImage.Position = UDim2.new(0.125, 0, 0, 0)
GearImage.Size = UDim2.new(0.75, 0, 0.75, 0)
GearImage.ZIndex = 8
GearImage.Parent = GearPreview
--GearImage Children
local GearIcons = Instance.new "Frame"
GearIcons.BackgroundColor3 = Color3.new(0, 0, 0)
GearIcons.BackgroundTransparency = 0.5
GearIcons.BorderSizePixel = 0
GearIcons.RobloxLocked = true
GearIcons.Name = "GearIcons"
GearIcons.Position = UDim2.new(0.4, 2, 0.85, -2)
GearIcons.Size = UDim2.new(0.6, 0, 0.15, 0)
GearIcons.Visible = false
GearIcons.ZIndex = 9
GearIcons.Parent = GearImage
-- GearIcons Children
local GenreImage = Instance.new "ImageLabel"
GenreImage.RobloxLocked = true
GenreImage.Name = "GenreImage"
GenreImage.BackgroundColor3 = Color3.new(102 / 255, 153 / 255, 1)
GenreImage.BackgroundTransparency = 0.5
GenreImage.BorderSizePixel = 0
GenreImage.Size = UDim2.new(0.25, 0, 1, 0)
GenreImage.Parent = GearIcons
local AttributeOneImage = GenreImage:clone()
AttributeOneImage.RobloxLocked = true
AttributeOneImage.Name = "AttributeOneImage"
AttributeOneImage.BackgroundColor3 = Color3.new(1, 51 / 255, 0)
AttributeOneImage.Position = UDim2.new(0.25, 0, 0, 0)
AttributeOneImage.Parent = GearIcons
local AttributeTwoImage = GenreImage:clone()
AttributeTwoImage.RobloxLocked = true
AttributeTwoImage.Name = "AttributeTwoImage"
AttributeTwoImage.BackgroundColor3 = Color3.new(153 / 255, 1, 153 / 255)
AttributeTwoImage.Position = UDim2.new(0.5, 0, 0, 0)
AttributeTwoImage.Parent = GearIcons
local AttributeThreeImage = GenreImage:clone()
AttributeThreeImage.RobloxLocked = true
AttributeThreeImage.Name = "AttributeThreeImage"
AttributeThreeImage.BackgroundColor3 = Color3.new(0, 0.5, 0.5)
AttributeThreeImage.Position = UDim2.new(0.75, 0, 0, 0)
AttributeThreeImage.Parent = GearIcons
------------------------------- WARDROBE -------------------------------------------------------
if game.CoreGui.Version < 8 then
-- no need for this to stick around, we aren't ready for wardrobe
script:remove()
return
end
local function makeCharFrame(frameName, parent)
local frame = Instance.new "Frame"
frame.RobloxLocked = true
frame.Size = UDim2.new(1, 0, 1, -70)
frame.Position = UDim2.new(0, 0, 0, 20)
frame.Name = frameName
frame.BackgroundTransparency = 1
frame.Parent = parent
frame.Visible = false
return frame
end
local function makeZone(zoneName, image, size, position, parent)
local zone = Instance.new "ImageLabel"
zone.RobloxLocked = true
zone.Name = zoneName
zone.Image = image
zone.Size = size
zone.BackgroundTransparency = 1
zone.Position = position
zone.Parent = parent
return zone
end
local function makeStyledButton(buttonName, size, position, parent, buttonStyle)
local button = Instance.new "ImageButton"
button.RobloxLocked = true
button.Name = buttonName
button.Size = size
button.Position = position
if buttonStyle then
button.Style = buttonStyle
else
button.BackgroundColor3 = Color3.new(0, 0, 0)
button.BorderColor3 = Color3.new(1, 1, 1)
end
button.Parent = parent
return button
end
local function makeTextLabel(TextLabelName, text, position, parent)
local label = Instance.new "TextLabel"
label.RobloxLocked = true
label.BackgroundTransparency = 1
label.Size = UDim2.new(0, 32, 0, 14)
label.Name = TextLabelName
label.Font = Enum.Font.Arial
label.TextColor3 = Color3.new(1, 1, 1)
label.FontSize = Enum.FontSize.Size14
label.Text = text
label.Position = position
label.Parent = parent
end
local Wardrobe = Instance.new "Frame"
Wardrobe.Name = "Wardrobe"
Wardrobe.RobloxLocked = true
Wardrobe.BackgroundTransparency = 1
Wardrobe.Visible = false
Wardrobe.Size = UDim2.new(1, 0, 1, 0)
Wardrobe.Parent = Backpack
local AssetList = Instance.new "Frame"
AssetList.RobloxLocked = true
AssetList.Name = "AssetList"
AssetList.Position = UDim2.new(0, 4, 0, 5)
AssetList.Size = UDim2.new(0, 85, 1, -5)
AssetList.BackgroundTransparency = 1
AssetList.Visible = true
AssetList.Parent = Wardrobe
local PreviewAssetFrame = Instance.new "Frame"
PreviewAssetFrame.RobloxLocked = true
PreviewAssetFrame.Name = "PreviewAssetFrame"
PreviewAssetFrame.BackgroundTransparency = 1
PreviewAssetFrame.Position = UDim2.new(1, -240, 0, 30)
PreviewAssetFrame.Size = UDim2.new(0, 250, 0, 250)
PreviewAssetFrame.Parent = Wardrobe
local PreviewAssetBacking = Instance.new "TextButton"
PreviewAssetBacking.RobloxLocked = true
PreviewAssetBacking.Name = "PreviewAssetBacking"
PreviewAssetBacking.Active = false
PreviewAssetBacking.Text = ""
PreviewAssetBacking.AutoButtonColor = false
PreviewAssetBacking.Size = UDim2.new(1, 0, 1, 0)
PreviewAssetBacking.Style = Enum.ButtonStyle.RobloxButton
PreviewAssetBacking.Visible = false
PreviewAssetBacking.ZIndex = 9
PreviewAssetBacking.Parent = PreviewAssetFrame
local PreviewAssetImage = Instance.new "ImageLabel"
PreviewAssetImage.RobloxLocked = true
PreviewAssetImage.Name = "PreviewAssetImage"
PreviewAssetImage.BackgroundTransparency = 0.8
PreviewAssetImage.Position = UDim2.new(0.5, -100, 0, 0)
PreviewAssetImage.Size = UDim2.new(0, 200, 0, 200)
PreviewAssetImage.BorderSizePixel = 0
PreviewAssetImage.ZIndex = 10
PreviewAssetImage.Parent = PreviewAssetBacking
local AssetNameLabel = Instance.new "TextLabel"
AssetNameLabel.Name = "AssetNameLabel"
AssetNameLabel.RobloxLocked = true
AssetNameLabel.BackgroundTransparency = 1
AssetNameLabel.Position = UDim2.new(0, 0, 1, -20)
AssetNameLabel.Size = UDim2.new(0.5, 0, 0, 24)
AssetNameLabel.ZIndex = 10
AssetNameLabel.Font = Enum.Font.Arial
AssetNameLabel.Text = ""
AssetNameLabel.TextColor3 = Color3.new(1, 1, 1)
AssetNameLabel.TextScaled = true
AssetNameLabel.Parent = PreviewAssetBacking
local AssetTypeLabel = AssetNameLabel:clone()
AssetTypeLabel.RobloxLocked = true
AssetTypeLabel.Name = "AssetTypeLabel"
AssetTypeLabel.TextScaled = false
AssetTypeLabel.FontSize = Enum.FontSize.Size18
AssetTypeLabel.Position = UDim2.new(0.5, 3, 1, -20)
AssetTypeLabel.Parent = PreviewAssetBacking
local PreviewButton = Instance.new "TextButton"
PreviewButton.RobloxLocked = true
PreviewButton.Name = "PreviewButton"
PreviewButton.Text = "Rotate"
PreviewButton.BackgroundColor3 = Color3.new(0, 0, 0)
PreviewButton.BackgroundTransparency = 0.5
PreviewButton.BorderColor3 = Color3.new(1, 1, 1)
PreviewButton.Position = UDim2.new(1.2, -62, 1, -50)
PreviewButton.Size = UDim2.new(0, 125, 0, 50)
PreviewButton.Font = Enum.Font.ArialBold
PreviewButton.FontSize = Enum.FontSize.Size24
PreviewButton.TextColor3 = Color3.new(1, 1, 1)
PreviewButton.TextWrapped = true
PreviewButton.TextStrokeTransparency = 0
PreviewButton.Parent = Wardrobe
local CharacterPane = Instance.new "Frame"
CharacterPane.RobloxLocked = true
CharacterPane.Name = "CharacterPane"
CharacterPane.Position = UDim2.new(1, -220, 0, 32)
CharacterPane.Size = UDim2.new(0, 220, 1, -40)
CharacterPane.BackgroundTransparency = 1
CharacterPane.Visible = true
CharacterPane.Parent = Wardrobe
--CharacterPane Children
local FaceFrame = makeCharFrame("FacesFrame", CharacterPane)
game:GetService("ContentProvider"):Preload "http://www.roblox.com/asset/?id=75460621"
makeZone(
"FaceZone",
"http://www.roblox.com/asset/?id=75460621",
UDim2.new(0, 157, 0, 137),
UDim2.new(0.5, -78, 0.5, -68),
FaceFrame
)
makeStyledButton("Face", UDim2.new(0, 64, 0, 64), UDim2.new(0.5, -32, 0.5, -135), FaceFrame)
local HeadFrame = makeCharFrame("HeadsFrame", CharacterPane)
makeZone(
"FaceZone",
"http://www.roblox.com/asset/?id=75460621",
UDim2.new(0, 157, 0, 137),
UDim2.new(0.5, -78, 0.5, -68),
HeadFrame
)
makeStyledButton("Head", UDim2.new(0, 64, 0, 64), UDim2.new(0.5, -32, 0.5, -135), HeadFrame)
local HatsFrame = makeCharFrame("HatsFrame", CharacterPane)
game:GetService("ContentProvider"):Preload "http://www.roblox.com/asset/?id=75457888"
local HatsZone = makeZone(
"HatsZone",
"http://www.roblox.com/asset/?id=75457888",
UDim2.new(0, 186, 0, 184),
UDim2.new(0.5, -93, 0.5, -100),
HatsFrame
)
makeStyledButton(
"Hat1Button",
UDim2.new(0, 64, 0, 64),
UDim2.new(0, -1, 0, -1),
HatsZone,
Enum.ButtonStyle.RobloxButton
)
makeStyledButton(
"Hat2Button",
UDim2.new(0, 64, 0, 64),
UDim2.new(0, 63, 0, -1),
HatsZone,
Enum.ButtonStyle.RobloxButton
)
makeStyledButton(
"Hat3Button",
UDim2.new(0, 64, 0, 64),
UDim2.new(0, 127, 0, -1),
HatsZone,
Enum.ButtonStyle.RobloxButton
)
local PantsFrame = makeCharFrame("PantsFrame", CharacterPane)
game:GetService("ContentProvider"):Preload "http://www.roblox.com/asset/?id=75457920"
makeZone(
"PantsZone",
"http://www.roblox.com/asset/?id=75457920",
UDim2.new(0, 121, 0, 99),
UDim2.new(0.5, -60, 0.5, -100),
PantsFrame
)
local pantFrame = Instance.new "Frame"
pantFrame.RobloxLocked = true
pantFrame.Size = UDim2.new(0, 25, 0, 56)
pantFrame.Position = UDim2.new(0.5, -26, 0.5, 0)
pantFrame.BackgroundColor3 = Color3.new(0, 0, 0)
pantFrame.BorderColor3 = Color3.new(1, 1, 1)
pantFrame.Name = "PantFrame"
pantFrame.Parent = PantsFrame
local otherPantFrame = pantFrame:clone()
otherPantFrame.Position = UDim2.new(0.5, 3, 0.5, 0)
otherPantFrame.RobloxLocked = true
otherPantFrame.Parent = PantsFrame
local CurrentPants = Instance.new "ImageButton"
CurrentPants.RobloxLocked = true
CurrentPants.BackgroundTransparency = 1
CurrentPants.ZIndex = 2
CurrentPants.Name = "CurrentPants"
CurrentPants.Position = UDim2.new(0.5, -31, 0.5, -4)
CurrentPants.Size = UDim2.new(0, 54, 0, 59)
CurrentPants.Parent = PantsFrame
local MeshFrame = makeCharFrame("PackagesFrame", CharacterPane)
local torsoButton = makeStyledButton(
"TorsoMeshButton",
UDim2.new(0, 64, 0, 64),
UDim2.new(0.5, -32, 0.5, -110),
MeshFrame,
Enum.ButtonStyle.RobloxButton
)
makeTextLabel("TorsoLabel", "Torso", UDim2.new(0.5, -16, 0, -25), torsoButton)
local leftLegButton = makeStyledButton(
"LeftLegMeshButton",
UDim2.new(0, 64, 0, 64),
UDim2.new(0.5, 0, 0.5, -25),
MeshFrame,
Enum.ButtonStyle.RobloxButton
)
makeTextLabel("LeftLegLabel", "Left Leg", UDim2.new(0.5, -16, 0, -25), leftLegButton)
local rightLegButton = makeStyledButton(
"RightLegMeshButton",
UDim2.new(0, 64, 0, 64),
UDim2.new(0.5, -64, 0.5, -25),
MeshFrame,
Enum.ButtonStyle.RobloxButton
)
makeTextLabel("RightLegLabel", "Right Leg", UDim2.new(0.5, -16, 0, -25), rightLegButton)
local rightArmButton = makeStyledButton(
"RightArmMeshButton",
UDim2.new(0, 64, 0, 64),
UDim2.new(0.5, -96, 0.5, -110),
MeshFrame,
Enum.ButtonStyle.RobloxButton
)
makeTextLabel("RightArmLabel", "Right Arm", UDim2.new(0.5, -16, 0, -25), rightArmButton)
local leftArmButton = makeStyledButton(
"LeftArmMeshButton",
UDim2.new(0, 64, 0, 64),
UDim2.new(0.5, 32, 0.5, -110),
MeshFrame,
Enum.ButtonStyle.RobloxButton
)
makeTextLabel("LeftArmLabel", "Left Arm", UDim2.new(0.5, -16, 0, -25), leftArmButton)
local TShirtFrame = makeCharFrame("T-ShirtsFrame", CharacterPane)
game:GetService("ContentProvider"):Preload "http://www.roblox.com/asset/?id=75460642"
makeZone(
"TShirtZone",
"http://www.roblox.com/asset/?id=75460642",
UDim2.new(0, 121, 0, 154),
UDim2.new(0.5, -60, 0.5, -100),
TShirtFrame
)
makeStyledButton("TShirtButton", UDim2.new(0, 64, 0, 64), UDim2.new(0.5, -32, 0.5, -64), TShirtFrame)
local ShirtFrame = makeCharFrame("ShirtsFrame", CharacterPane)
makeZone(
"ShirtZone",
"http://www.roblox.com/asset/?id=75460642",
UDim2.new(0, 121, 0, 154),
UDim2.new(0.5, -60, 0.5, -100),
ShirtFrame
)
makeStyledButton("ShirtButton", UDim2.new(0, 64, 0, 64), UDim2.new(0.5, -32, 0.5, -64), ShirtFrame)
local ColorFrame = makeCharFrame("ColorFrame", CharacterPane)
game:GetService("ContentProvider"):Preload "http://www.roblox.com/asset/?id=76049888"
local ColorZone = makeZone(
"ColorZone",
"http://www.roblox.com/asset/?id=76049888",
UDim2.new(0, 120, 0, 150),
UDim2.new(0.5, -60, 0.5, -100),
ColorFrame
)
makeStyledButton("Head", UDim2.new(0.26, 0, 0.19, 0), UDim2.new(0.37, 0, 0.02, 0), ColorZone).AutoButtonColor = false
makeStyledButton("LeftArm", UDim2.new(0.19, 0, 0.36, 0), UDim2.new(0.78, 0, 0.26, 0), ColorZone).AutoButtonColor = false
makeStyledButton("RightArm", UDim2.new(0.19, 0, 0.36, 0), UDim2.new(0.025, 0, 0.26, 0), ColorZone).AutoButtonColor =
false
makeStyledButton("Torso", UDim2.new(0.43, 0, 0.36, 0), UDim2.new(0.28, 0, 0.26, 0), ColorZone).AutoButtonColor = false
makeStyledButton("RightLeg", UDim2.new(0.19, 0, 0.31, 0), UDim2.new(0.275, 0, 0.67, 0), ColorZone).AutoButtonColor =
false
makeStyledButton("LeftLeg", UDim2.new(0.19, 0, 0.31, 0), UDim2.new(0.525, 0, 0.67, 0), ColorZone).AutoButtonColor =
false
-- Character Panel label (shows what category we are currently browsing)
local CategoryLabel = Instance.new "TextLabel"
CategoryLabel.RobloxLocked = true
CategoryLabel.Name = "CategoryLabel"
CategoryLabel.BackgroundTransparency = 1
CategoryLabel.Font = Enum.Font.ArialBold
CategoryLabel.FontSize = Enum.FontSize.Size18
CategoryLabel.Position = UDim2.new(0, 0, 0, -7)
CategoryLabel.Size = UDim2.new(1, 0, 0, 20)
CategoryLabel.TextXAlignment = Enum.TextXAlignment.Center
CategoryLabel.Text = "All"
CategoryLabel.TextColor3 = Color3.new(1, 1, 1)
CategoryLabel.Parent = CharacterPane
--Save Button
local SaveButton = Instance.new "TextButton"
SaveButton.RobloxLocked = true
SaveButton.Name = "SaveButton"
SaveButton.Size = UDim2.new(0.6, 0, 0, 50)
SaveButton.Position = UDim2.new(0.2, 0, 1, -50)
SaveButton.Style = Enum.ButtonStyle.RobloxButton
SaveButton.Selected = false
SaveButton.Font = Enum.Font.ArialBold
SaveButton.FontSize = Enum.FontSize.Size18
SaveButton.Text = "Save"
SaveButton.TextColor3 = Color3.new(1, 1, 1)
SaveButton.Parent = CharacterPane
-- no need for this to stick around
script:Destroy()

File diff suppressed because it is too large Load Diff

View File

File diff suppressed because it is too large Load Diff

View File

@ -1,26 +0,0 @@
-- Library Registration Script
-- This script is used to register RbxLua libraries on game servers, so game scripts have
-- access to all of the libraries (otherwise only local scripts do)
local deepakTestingPlace = 3569749
local sc = game:GetService "ScriptContext"
local tries = 0
while not sc and tries < 3 do
tries = tries + 1
sc = game:GetService "ScriptContext"
wait(0.2)
end
if sc then
sc:RegisterLibrary("Libraries/RbxGui", "45284430")
sc:RegisterLibrary("Libraries/RbxGear", "45374389")
if game.PlaceId == deepakTestingPlace then
sc:RegisterLibrary("Libraries/RbxStatus", "52177566")
end
sc:RegisterLibrary("Libraries/RbxUtility", "60595411")
sc:RegisterLibrary("Libraries/RbxStamper", "73157242")
sc:LibraryRegistrationComplete()
else
print "failed to find script context, libraries did not load"
end

File diff suppressed because it is too large Load Diff

View File

@ -1,952 +0,0 @@
-- A couple of necessary functions
local function waitForChild(instance, name)
assert(instance)
assert(name)
while not instance:FindFirstChild(name) do
print("Waiting for ...", instance, name)
instance.ChildAdded:wait()
end
return instance:FindFirstChild(name)
end
local function waitForProperty(instance, property)
assert(instance)
assert(property)
while not instance[property] do
instance.Changed:wait()
end
end
local function IsTouchDevice()
local touchEnabled = false
pcall(function()
touchEnabled = Game:GetService("UserInputService").TouchEnabled
end)
return touchEnabled
end
waitForChild(game, "Players")
waitForProperty(game.Players, "LocalPlayer")
local player = game.Players.LocalPlayer
local RbxGui, _ = LoadLibrary "RbxGui"
if not RbxGui then
print "could not find RbxGui!"
return
end
--- Begin Locals
local StaticTabName = "gear"
local backpack = script.Parent
local backpackItems = {}
local buttons = {}
local debounce = false
local browsingMenu = false
local mouseEnterCons = {}
local mouseClickCons = {}
local characterChildAddedCon = nil
local characterChildRemovedCon = nil
local backpackAddCon = nil
local playerBackpack = waitForChild(player, "Backpack")
waitForChild(backpack, "Tabs")
waitForChild(backpack, "Gear")
local gearPreview = waitForChild(backpack.Gear, "GearPreview")
local scroller = waitForChild(backpack.Gear, "GearGridScrollingArea")
local currentLoadout = waitForChild(backpack.Parent, "CurrentLoadout")
local grid = waitForChild(backpack.Gear, "GearGrid")
local gearButton = waitForChild(grid, "GearButton")
local swapSlot = waitForChild(script.Parent, "SwapSlot")
local backpackManager = waitForChild(script.Parent, "CoreScripts/BackpackScripts/BackpackManager")
local backpackOpenEvent = waitForChild(backpackManager, "BackpackOpenEvent")
local backpackCloseEvent = waitForChild(backpackManager, "BackpackCloseEvent")
local tabClickedEvent = waitForChild(backpackManager, "TabClickedEvent")
local resizeEvent = waitForChild(backpackManager, "ResizeEvent")
local searchRequestedEvent = waitForChild(backpackManager, "SearchRequestedEvent")
local tellBackpackReadyFunc = waitForChild(backpackManager, "BackpackReady")
-- creating scroll bar early as to make sure items get placed correctly
local scrollFrame, scrollUp, scrollDown, recalculateScroll = RbxGui.CreateScrollingFrame(nil, "grid", Vector2.new(6, 6))
scrollFrame.Position = UDim2.new(0, 0, 0, 30)
scrollFrame.Size = UDim2.new(1, 0, 1, -30)
scrollFrame.Parent = backpack.Gear.GearGrid
local scrollBar = Instance.new "Frame"
scrollBar.Name = "ScrollBar"
scrollBar.BackgroundTransparency = 0.9
scrollBar.BackgroundColor3 = Color3.new(1, 1, 1)
scrollBar.BorderSizePixel = 0
scrollBar.Size = UDim2.new(0, 17, 1, -36)
scrollBar.Position = UDim2.new(0, 0, 0, 18)
scrollBar.Parent = scroller
scrollDown.Position = UDim2.new(0, 0, 1, -17)
scrollUp.Parent = scroller
scrollDown.Parent = scroller
local scrollFrameLoadout, scrollUpLoadout, scrollDownLoadout, recalculateScrollLoadout = RbxGui.CreateScrollingFrame()
scrollFrameLoadout.Position = UDim2.new(0, 0, 0, 0)
scrollFrameLoadout.Size = UDim2.new(1, 0, 1, 0)
scrollFrameLoadout.Parent = backpack.Gear.GearLoadouts.LoadoutsList
local LoadoutButton = Instance.new "TextButton"
LoadoutButton.RobloxLocked = true
LoadoutButton.Name = "LoadoutButton"
LoadoutButton.Font = Enum.Font.ArialBold
LoadoutButton.FontSize = Enum.FontSize.Size14
LoadoutButton.Position = UDim2.new(0, 0, 0, 0)
LoadoutButton.Size = UDim2.new(1, 0, 0, 32)
LoadoutButton.Style = Enum.ButtonStyle.RobloxButton
LoadoutButton.Text = "Loadout #1"
LoadoutButton.TextColor3 = Color3.new(1, 1, 1)
LoadoutButton.Parent = scrollFrameLoadout
local LoadoutButtonTwo = LoadoutButton:clone()
LoadoutButtonTwo.Text = "Loadout #2"
LoadoutButtonTwo.Parent = scrollFrameLoadout
local LoadoutButtonThree = LoadoutButton:clone()
LoadoutButtonThree.Text = "Loadout #3"
LoadoutButtonThree.Parent = scrollFrameLoadout
local LoadoutButtonFour = LoadoutButton:clone()
LoadoutButtonFour.Text = "Loadout #4"
LoadoutButtonFour.Parent = scrollFrameLoadout
local scrollBarLoadout = Instance.new "Frame"
scrollBarLoadout.Name = "ScrollBarLoadout"
scrollBarLoadout.BackgroundTransparency = 0.9
scrollBarLoadout.BackgroundColor3 = Color3.new(1, 1, 1)
scrollBarLoadout.BorderSizePixel = 0
scrollBarLoadout.Size = UDim2.new(0, 17, 1, -36)
scrollBarLoadout.Position = UDim2.new(0, 0, 0, 18)
scrollBarLoadout.Parent = backpack.Gear.GearLoadouts.GearLoadoutsScrollingArea
scrollDownLoadout.Position = UDim2.new(0, 0, 1, -17)
scrollUpLoadout.Parent = backpack.Gear.GearLoadouts.GearLoadoutsScrollingArea
scrollDownLoadout.Parent = backpack.Gear.GearLoadouts.GearLoadoutsScrollingArea
-- Begin Functions
function removeFromMap(map, object)
for i = 1, #map do
if map[i] == object then
table.remove(map, i)
break
end
end
end
function robloxLock(instance)
instance.RobloxLocked = true
children = instance:GetChildren()
if children then
for _, child in ipairs(children) do
robloxLock(child)
end
end
end
function resize()
local size = 0
if gearPreview.AbsoluteSize.Y > gearPreview.AbsoluteSize.X then
size = gearPreview.AbsoluteSize.X * 0.75
else
size = gearPreview.AbsoluteSize.Y * 0.75
end
waitForChild(gearPreview, "GearImage")
gearPreview.GearImage.Size = UDim2.new(0, size, 0, size)
gearPreview.GearImage.Position = UDim2.new(0, gearPreview.AbsoluteSize.X / 2 - size / 2, 0.75, -size)
resizeGrid()
end
function addToGrid(child)
if not child:IsA "Tool" then
if not child:IsA "HopperBin" then
return
end
end
if child:FindFirstChild "RobloxBuildTool" then
return
end
for _, v in pairs(backpackItems) do -- check to see if we already have this gear registered
if v == child then
return
end
end
table.insert(backpackItems, child)
local changeCon = child.Changed:connect(function(prop)
if prop == "Name" then
if buttons[child] then
if buttons[child].Image == "" then
buttons[child].GearText.Text = child.Name
end
end
end
end)
local ancestryCon = nil
ancestryCon = child.AncestryChanged:connect(function(_, _)
local thisObject = nil
for _, v in pairs(backpackItems) do
if v == child then
thisObject = v
break
end
end
waitForProperty(player, "Character")
waitForChild(player, "Backpack")
if child.Parent ~= player.Backpack and child.Parent ~= player.Character then
if ancestryCon then
ancestryCon:disconnect()
end
if changeCon then
changeCon:disconnect()
end
for _, v in pairs(backpackItems) do
if v == thisObject then
if mouseEnterCons[buttons[v]] then
mouseEnterCons[buttons[v]]:disconnect()
end
if mouseClickCons[buttons[v]] then
mouseClickCons[buttons[v]]:disconnect()
end
buttons[v].Parent = nil
buttons[v] = nil
break
end
end
removeFromMap(backpackItems, thisObject)
resizeGrid()
else
resizeGrid()
end
updateGridActive()
end)
resizeGrid()
end
function buttonClick(button)
if button:FindFirstChild "UnequipContextMenu" and not button.Active then
button.UnequipContextMenu.Visible = true
browsingMenu = true
end
end
function previewGear(button)
if not browsingMenu then
gearPreview.Visible = false
gearPreview.GearImage.Image = button.Image
gearPreview.GearStats.GearName.Text = button.GearReference.Value.Name
end
end
function findEmptySlot()
local smallestNum = nil
local loadout = currentLoadout:GetChildren()
for i = 1, #loadout do
if loadout[i]:IsA "Frame" and #loadout[i]:GetChildren() <= 0 then
local frameNum = tonumber(string.sub(loadout[i].Name, 5))
if frameNum == 0 then
frameNum = 10
end
if not smallestNum or (smallestNum > frameNum) then
smallestNum = frameNum
end
end
end
if smallestNum == 10 then
smallestNum = 0
end
return smallestNum
end
function checkForSwap(button, x, y)
local loadoutChildren = currentLoadout:GetChildren()
for i = 1, #loadoutChildren do
if loadoutChildren[i]:IsA "Frame" and string.find(loadoutChildren[i].Name, "Slot") then
if
x >= loadoutChildren[i].AbsolutePosition.x
and x <= (loadoutChildren[i].AbsolutePosition.x + loadoutChildren[i].AbsoluteSize.x)
then
if
y >= loadoutChildren[i].AbsolutePosition.y
and y <= (loadoutChildren[i].AbsolutePosition.y + loadoutChildren[i].AbsoluteSize.y)
then
local slot = tonumber(string.sub(loadoutChildren[i].Name, 5))
swapGearSlot(slot, button)
return true
end
end
end
end
return false
end
function resizeGrid()
for _, v in pairs(backpackItems) do
if not v:FindFirstChild "RobloxBuildTool" then
if not buttons[v] then
local buttonClone = gearButton:clone()
buttonClone.Parent = grid.ScrollingFrame
buttonClone.Visible = true
buttonClone.Image = v.TextureId
if buttonClone.Image == "" then
buttonClone.GearText.Text = v.Name
end
buttonClone.GearReference.Value = v
buttonClone.Draggable = true
buttons[v] = buttonClone
if not IsTouchDevice() then
local unequipMenu = getGearContextMenu()
unequipMenu.Visible = false
unequipMenu.Parent = buttonClone
end
local beginPos = nil
buttonClone.DragBegin:connect(function(value)
waitForChild(buttonClone, "Background")
buttonClone["Background"].ZIndex = 10
buttonClone.ZIndex = 10
beginPos = value
end)
buttonClone.DragStopped:connect(function(x, y)
waitForChild(buttonClone, "Background")
buttonClone["Background"].ZIndex = 1
buttonClone.ZIndex = 2
if beginPos ~= buttonClone.Position then
if not checkForSwap(buttonClone, x, y) then
buttonClone:TweenPosition(
beginPos,
Enum.EasingDirection.Out,
Enum.EasingStyle.Quad,
0.5,
true
)
buttonClone.Draggable = false
delay(0.5, function()
buttonClone.Draggable = true
end)
else
buttonClone.Position = beginPos
end
end
end)
local clickTime = tick()
mouseEnterCons[buttonClone] = buttonClone.MouseEnter:connect(function()
previewGear(buttonClone)
end)
mouseClickCons[buttonClone] = buttonClone.MouseButton1Click:connect(function()
local newClickTime = tick()
if buttonClone.Active and (newClickTime - clickTime) < 0.5 then
local slot = findEmptySlot()
if slot then
buttonClone.ZIndex = 1
swapGearSlot(slot, buttonClone)
end
else
buttonClick(buttonClone)
end
clickTime = newClickTime
end)
end
end
end
recalculateScroll()
end
function showPartialGrid(subset)
for _, v in pairs(buttons) do
v.Parent = nil
end
if subset then
for _, v in pairs(subset) do
v.Parent = grid.ScrollingFrame
end
end
recalculateScroll()
end
function showEntireGrid()
for _, v in pairs(buttons) do
v.Parent = grid.ScrollingFrame
end
recalculateScroll()
end
function inLoadout(gear)
local children = currentLoadout:GetChildren()
for i = 1, #children do
if children[i]:IsA "Frame" then
local button = children[i]:GetChildren()
if #button > 0 then
if button[1].GearReference.Value and button[1].GearReference.Value == gear then
return true
end
end
end
end
return false
end
function updateGridActive()
for _, v in pairs(backpackItems) do
if buttons[v] then
local gear = nil
local gearRef = buttons[v]:FindFirstChild "GearReference"
if gearRef then
gear = gearRef.Value
end
if (not gear) or inLoadout(gear) then
buttons[v].Active = false
else
buttons[v].Active = true
end
end
end
end
function centerGear(loadoutChildren)
local gearButtons = {}
local lastSlotAdd = nil
for i = 1, #loadoutChildren do
if loadoutChildren[i]:IsA "Frame" and #loadoutChildren[i]:GetChildren() > 0 then
if loadoutChildren[i].Name == "Slot0" then
lastSlotAdd = loadoutChildren[i]
else
table.insert(gearButtons, loadoutChildren[i])
end
end
end
if lastSlotAdd then
table.insert(gearButtons, lastSlotAdd)
end
local startPos = (1 - (#gearButtons * 0.1)) / 2
for i = 1, #gearButtons do
gearButtons[i]:TweenPosition(
UDim2.new(startPos + ((i - 1) * 0.1), 0, 0, 0),
Enum.EasingDirection.Out,
Enum.EasingStyle.Quad,
0.25,
true
)
end
end
function tabClickHandler(tabName)
if tabName == StaticTabName then
backpackOpenHandler(tabName)
else
backpackCloseHandler(tabName)
end
end
function backpackOpenHandler(currentTab)
if currentTab and currentTab ~= StaticTabName then
backpack.Gear.Visible = false
return
end
backpack.Gear.Visible = true
updateGridActive()
resizeGrid()
resize()
tellBackpackReadyFunc:Invoke()
end
function backpackCloseHandler(currentTab)
if currentTab and currentTab ~= StaticTabName then
backpack.Gear.Visible = false
return
end
backpack.Gear.Visible = false
resizeGrid()
resize()
tellBackpackReadyFunc:Invoke()
end
function loadoutCheck(child, selectState)
if not child:IsA "ImageButton" then
return
end
for _, v in pairs(backpackItems) do
if buttons[v] then
if child:FindFirstChild "GearReference" and buttons[v]:FindFirstChild "GearReference" then
if buttons[v].GearReference.Value == child.GearReference.Value then
buttons[v].Active = selectState
break
end
end
end
end
end
function clearPreview()
gearPreview.GearImage.Image = ""
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 equipGear(physGear)
-- removeAllEquippedGear(physGear)
-- physGear.Parent = player.Character
-- updateGridActive()
-- end
function unequipGear(physGear)
physGear.Parent = playerBackpack
updateGridActive()
end
function highlight(button)
button.TextColor3 = Color3.new(0, 0, 0)
button.BackgroundColor3 = Color3.new(0.8, 0.8, 0.8)
end
function clearHighlight(button)
button.TextColor3 = Color3.new(1, 1, 1)
button.BackgroundColor3 = Color3.new(0, 0, 0)
end
function swapGearSlot(slot, gearButton)
if not swapSlot.Value then -- signal loadout to swap a gear out
swapSlot.Slot.Value = slot
swapSlot.GearButton.Value = gearButton
swapSlot.Value = true
updateGridActive()
end
end
local UnequipGearMenuClick = function(element, menu)
if type(element.Action) ~= "number" then
return
end
local num = element.Action
if num == 1 then -- remove from loadout
unequipGear(menu.Parent.GearReference.Value)
local inventoryButton = menu.Parent
local gearToUnequip = inventoryButton.GearReference.Value
local loadoutChildren = currentLoadout:GetChildren()
local slot = -1
for i = 1, #loadoutChildren do
if loadoutChildren[i]:IsA "Frame" then
local button = loadoutChildren[i]:GetChildren()
if button[1] and button[1].GearReference.Value == gearToUnequip then
slot = button[1].SlotNumber.Text
break
end
end
end
swapGearSlot(slot, nil)
end
end
function setupCharacterConnections()
if backpackAddCon then
backpackAddCon:disconnect()
end
backpackAddCon = game.Players.LocalPlayer.Backpack.ChildAdded:connect(function(child)
addToGrid(child)
end)
-- make sure we get all the children
local backpackChildren = game.Players.LocalPlayer.Backpack:GetChildren()
for i = 1, #backpackChildren do
addToGrid(backpackChildren[i])
end
if characterChildAddedCon then
characterChildAddedCon:disconnect()
end
characterChildAddedCon = game.Players.LocalPlayer.Character.ChildAdded:connect(function(child)
addToGrid(child)
updateGridActive()
end)
if characterChildRemovedCon then
characterChildRemovedCon:disconnect()
end
characterChildRemovedCon = game.Players.LocalPlayer.Character.ChildRemoved:connect(function(_)
updateGridActive()
end)
wait()
centerGear(currentLoadout:GetChildren())
end
function removeCharacterConnections()
if characterChildAddedCon then
characterChildAddedCon:disconnect()
end
if characterChildRemovedCon then
characterChildRemovedCon:disconnect()
end
if backpackAddCon then
backpackAddCon:disconnect()
end
end
function trim(s)
return (s:gsub("^%s*(.-)%s*$", "%1"))
end
function filterGear(terms)
local filteredGear = {}
for _, v in pairs(backpackItems) do
if buttons[v] then
local gearString = string.lower(buttons[v].GearReference.Value.Name)
gearString = trim(gearString)
for i = 1, #terms do
if string.match(gearString, terms[i]) then
table.insert(filteredGear, buttons[v])
break
end
end
end
end
return filteredGear
end
function splitByWhitespace(text)
if type(text) ~= "string" then
return nil
end
local terms = {}
for token in string.gmatch(text, "[^%s]+") do
if string.len(token) > 0 then
table.insert(terms, token)
end
end
return terms
end
function showSearchGear(searchTerms)
if not backpack.Gear.Visible then
return
end -- currently not active tab
local searchTermTable = splitByWhitespace(searchTerms)
local currSearchTerms
if searchTermTable and (#searchTermTable > 0) then
currSearchTerms = searchTermTable
else
currSearchTerms = nil
end
if searchTermTable == nil then
showEntireGrid()
return
end
local filteredButtons = filterGear(currSearchTerms)
showPartialGrid(filteredButtons)
end
function nukeBackpack()
while #buttons > 0 do
table.remove(buttons)
end
buttons = {}
while #backpackItems > 0 do
table.remove(backpackItems)
end
backpackItems = {}
local scrollingFrameChildren = grid.ScrollingFrame:GetChildren()
for i = 1, #scrollingFrameChildren do
scrollingFrameChildren[i]:remove()
end
end
function getGearContextMenu()
local gearContextMenu = Instance.new "Frame"
gearContextMenu.Active = true
gearContextMenu.Name = "UnequipContextMenu"
gearContextMenu.Size = UDim2.new(0, 115, 0, 70)
gearContextMenu.Position = UDim2.new(0, -16, 0, -16)
gearContextMenu.BackgroundTransparency = 1
gearContextMenu.Visible = false
local gearContextMenuButton = Instance.new "TextButton"
gearContextMenuButton.Name = "UnequipContextMenuButton"
gearContextMenuButton.Text = ""
gearContextMenuButton.Style = Enum.ButtonStyle.RobloxButtonDefault
gearContextMenuButton.ZIndex = 8
gearContextMenuButton.Size = UDim2.new(1, 0, 1, -20)
gearContextMenuButton.Visible = true
gearContextMenuButton.Parent = gearContextMenu
local elementHeight = 12
local contextMenuElements = {}
local contextMenuElementsName = { "Remove Hotkey" }
for i = 1, #contextMenuElementsName do
local element = {}
element.Type = "Button"
element.Text = contextMenuElementsName[i]
element.Action = i
element.DoIt = UnequipGearMenuClick
table.insert(contextMenuElements, element)
end
for i, contextElement in ipairs(contextMenuElements) do
local element = contextElement
if element.Type == "Button" then
local button = Instance.new "TextButton"
button.Name = "UnequipContextButton" .. i
button.BackgroundColor3 = Color3.new(0, 0, 0)
button.BorderSizePixel = 0
button.TextXAlignment = Enum.TextXAlignment.Left
button.Text = " " .. contextElement.Text
button.Font = Enum.Font.Arial
button.FontSize = Enum.FontSize.Size14
button.Size = UDim2.new(1, 8, 0, elementHeight)
button.Position = UDim2.new(0, 0, 0, elementHeight * i)
button.TextColor3 = Color3.new(1, 1, 1)
button.ZIndex = 9
button.Parent = gearContextMenuButton
if not IsTouchDevice() then
button.MouseButton1Click:connect(function()
if button.Active and not gearContextMenu.Parent.Active then
pcall(function()
element.DoIt(element, gearContextMenu)
end)
browsingMenu = false
gearContextMenu.Visible = false
clearHighlight(button)
clearPreview()
end
end)
button.MouseEnter:connect(function()
if button.Active and gearContextMenu.Parent.Active then
highlight(button)
end
end)
button.MouseLeave:connect(function()
if button.Active and gearContextMenu.Parent.Active then
clearHighlight(button)
end
end)
end
contextElement.Button = button
contextElement.Element = button
elseif element.Type == "Label" then
local frame = Instance.new "Frame"
frame.Name = "ContextLabel" .. i
frame.BackgroundTransparency = 1
frame.Size = UDim2.new(1, 8, 0, elementHeight)
local label = Instance.new "TextLabel"
label.Name = "Text1"
label.BackgroundTransparency = 1
label.BackgroundColor3 = Color3.new(1, 1, 1)
label.BorderSizePixel = 0
label.TextXAlignment = Enum.TextXAlignment.Left
label.Font = Enum.Font.ArialBold
label.FontSize = Enum.FontSize.Size14
label.Position = UDim2.new(0, 0, 0, 0)
label.Size = UDim2.new(0.5, 0, 1, 0)
label.TextColor3 = Color3.new(1, 1, 1)
label.ZIndex = 9
label.Parent = frame
element.Label1 = label
if element.GetText2 then
label = Instance.new "TextLabel"
label.Name = "Text2"
label.BackgroundTransparency = 1
label.BackgroundColor3 = Color3.new(1, 1, 1)
label.BorderSizePixel = 0
label.TextXAlignment = Enum.TextXAlignment.Right
label.Font = Enum.Font.Arial
label.FontSize = Enum.FontSize.Size14
label.Position = UDim2.new(0.5, 0, 0, 0)
label.Size = UDim2.new(0.5, 0, 1, 0)
label.TextColor3 = Color3.new(1, 1, 1)
label.ZIndex = 9
label.Parent = frame
element.Label2 = label
end
frame.Parent = gearContextMenuButton
element.Label = frame
element.Element = frame
end
end
gearContextMenu.ZIndex = 4
gearContextMenu.MouseLeave:connect(function()
browsingMenu = false
gearContextMenu.Visible = false
clearPreview()
end)
robloxLock(gearContextMenu)
return gearContextMenu
end
function coreGuiChanged(coreGuiType, enabled)
if coreGuiType == Enum.CoreGuiType.Backpack or coreGuiType == Enum.CoreGuiType.All then
if not enabled then
backpack.Gear.Visible = false
end
end
end
local backpackChildren = player.Backpack:GetChildren()
for i = 1, #backpackChildren do
addToGrid(backpackChildren[i])
end
------------------------- Start Lifelong Connections -----------------------
resizeEvent.Event:connect(function(_)
if debounce then
return
end
debounce = true
wait()
resize()
resizeGrid()
debounce = false
end)
currentLoadout.ChildAdded:connect(function(child)
loadoutCheck(child, false)
end)
currentLoadout.ChildRemoved:connect(function(child)
loadoutCheck(child, true)
end)
currentLoadout.DescendantAdded:connect(function(descendant)
if not backpack.Visible and (descendant:IsA "ImageButton" or descendant:IsA "TextButton") then
centerGear(currentLoadout:GetChildren())
end
end)
currentLoadout.DescendantRemoving:connect(function(descendant)
if not backpack.Visible and (descendant:IsA "ImageButton" or descendant:IsA "TextButton") then
wait()
centerGear(currentLoadout:GetChildren())
end
end)
grid.MouseEnter:connect(function()
clearPreview()
end)
grid.MouseLeave:connect(function()
clearPreview()
end)
player.CharacterRemoving:connect(function()
removeCharacterConnections()
nukeBackpack()
end)
player.CharacterAdded:connect(function()
setupCharacterConnections()
end)
player.ChildAdded:connect(function(child)
if child:IsA "Backpack" then
playerBackpack = child
if backpackAddCon then
backpackAddCon:disconnect()
end
backpackAddCon = game.Players.LocalPlayer.Backpack.ChildAdded:connect(function(child)
addToGrid(child)
end)
end
end)
swapSlot.Changed:connect(function()
if not swapSlot.Value then
updateGridActive()
end
end)
local loadoutChildren = currentLoadout:GetChildren()
for i = 1, #loadoutChildren do
if loadoutChildren[i]:IsA "Frame" and string.find(loadoutChildren[i].Name, "Slot") then
loadoutChildren[i].ChildRemoved:connect(function()
updateGridActive()
end)
loadoutChildren[i].ChildAdded:connect(function()
updateGridActive()
end)
end
end
------------------------- End Lifelong Connections -----------------------
pcall(function()
coreGuiChanged(Enum.CoreGuiType.Backpack, Game.StarterGui:GetCoreGuiEnabled(Enum.CoreGuiType.Backpack))
Game.StarterGui.CoreGuiChangedSignal:connect(coreGuiChanged)
end)
resize()
resizeGrid()
-- make sure any items in the loadout are accounted for in inventory
local loadoutChildren = currentLoadout:GetChildren()
for i = 1, #loadoutChildren do
loadoutCheck(loadoutChildren[i], false)
end
if not backpack.Visible then
centerGear(currentLoadout:GetChildren())
end
-- make sure that inventory is listening to gear reparenting
if characterChildAddedCon == nil and game.Players.LocalPlayer["Character"] then
setupCharacterConnections()
end
if not backpackAddCon then
backpackAddCon = game.Players.LocalPlayer.Backpack.ChildAdded:connect(function(child)
addToGrid(child)
end)
end
backpackOpenEvent.Event:connect(backpackOpenHandler)
backpackCloseEvent.Event:connect(backpackCloseHandler)
tabClickedEvent.Event:connect(tabClickHandler)
searchRequestedEvent.Event:connect(showSearchGear)
recalculateScrollLoadout()

View File

@ -1,476 +0,0 @@
-- This script manages context switches in the backpack (Gear to Wardrobe, etc.) and player state changes. Also manages global functions across different tabs (currently only search)
if game.CoreGui.Version < 7 then
return
end -- peace out if we aren't using the right client
-- basic functions
local function waitForChild(instance, name)
while not instance:FindFirstChild(name) do
instance.ChildAdded:wait()
end
return instance:FindFirstChild(name)
end
local function waitForProperty(instance, property)
while not instance[property] do
instance.Changed:wait()
end
end
-- don't do anything if we are in an empty game
waitForChild(game, "Players")
if #game.Players:GetChildren() < 1 then
game.Players.ChildAdded:wait()
end
-- make sure everything is loaded in before we do anything
-- get our local player
waitForProperty(game.Players, "LocalPlayer")
------------------------ Locals ------------------------------
local backpack = script.Parent
waitForChild(backpack, "Gear")
local screen = script.Parent.Parent
assert(screen:IsA "ScreenGui")
waitForChild(backpack, "Tabs")
waitForChild(backpack.Tabs, "CloseButton")
local closeButton = backpack.Tabs.CloseButton
waitForChild(backpack.Tabs, "InventoryButton")
local inventoryButton = backpack.Tabs.InventoryButton
local wardrobeButton
if game.CoreGui.Version >= 8 then
waitForChild(backpack.Tabs, "WardrobeButton")
wardrobeButton = backpack.Tabs.WardrobeButton
end
waitForChild(backpack.Parent, "ControlFrame")
local backpackButton = waitForChild(backpack.Parent.ControlFrame, "BackpackButton")
local currentTab = "gear"
local searchFrame = waitForChild(backpack, "SearchFrame")
waitForChild(backpack.SearchFrame, "SearchBoxFrame")
local searchBox = waitForChild(backpack.SearchFrame.SearchBoxFrame, "SearchBox")
local searchButton = waitForChild(backpack.SearchFrame, "SearchButton")
local resetButton = waitForChild(backpack.SearchFrame, "ResetButton")
local robloxGui = waitForChild(Game.CoreGui, "RobloxGui")
local currentLoadout = waitForChild(robloxGui, "CurrentLoadout")
local loadoutBackground = waitForChild(currentLoadout, "Background")
local canToggle = true
local readyForNextEvent = true
local backpackIsOpen = false
local active = true
local disabledByDeveloper = false
local humanoidDiedCon = nil
local guiTweenSpeed = 0.25 -- how quickly we open/close the backpack
local searchDefaultText = "Search..."
local tilde = "~"
local backquote = "`"
local backpackSize = UDim2.new(0, 600, 0, 400)
if robloxGui.AbsoluteSize.Y <= 320 then
backpackSize = UDim2.new(0, 200, 0, 140)
end
------------------------ End Locals ---------------------------
---------------------------------------- Public Event Setup ----------------------------------------
function createPublicEvent(eventName)
assert(eventName, "eventName is nil")
assert(tostring(eventName), "eventName is not a string")
local newEvent = Instance.new "BindableEvent"
newEvent.Name = tostring(eventName)
newEvent.Parent = script
return newEvent
end
function createPublicFunction(funcName, invokeFunc)
assert(funcName, "funcName is nil")
assert(tostring(funcName), "funcName is not a string")
assert(invokeFunc, "invokeFunc is nil")
assert(type(invokeFunc) == "function", "invokeFunc should be of type 'function'")
local newFunction = Instance.new "BindableFunction"
newFunction.Name = tostring(funcName)
newFunction.OnInvoke = invokeFunc
newFunction.Parent = script
return newFunction
end
-- Events
local resizeEvent = createPublicEvent "ResizeEvent"
local backpackOpenEvent = createPublicEvent "BackpackOpenEvent"
local backpackCloseEvent = createPublicEvent "BackpackCloseEvent"
local tabClickedEvent = createPublicEvent "TabClickedEvent"
local searchRequestedEvent = createPublicEvent "SearchRequestedEvent"
---------------------------------------- End Public Event Setup ----------------------------------------
--------------------------- Internal Functions ----------------------------------------
function deactivateBackpack()
backpack.Visible = false
active = false
end
function initHumanoidDiedConnections()
if humanoidDiedCon then
humanoidDiedCon:disconnect()
end
waitForProperty(game.Players.LocalPlayer, "Character")
waitForChild(game.Players.LocalPlayer.Character, "Humanoid")
humanoidDiedCon = game.Players.LocalPlayer.Character.Humanoid.Died:connect(deactivateBackpack)
end
function activateBackpack()
initHumanoidDiedConnections()
active = true
backpack.Visible = backpackIsOpen
if backpackIsOpen then
toggleBackpack()
end
end
local hideBackpack = function()
backpackIsOpen = false
readyForNextEvent = false
backpackButton.Selected = false
resetSearch()
backpackCloseEvent:Fire(currentTab)
backpack.Tabs.Visible = false
searchFrame.Visible = false
backpack:TweenSizeAndPosition(
UDim2.new(0, backpackSize.X.Offset, 0, 0),
UDim2.new(0.5, -backpackSize.X.Offset / 2, 1, -85),
Enum.EasingDirection.Out,
Enum.EasingStyle.Quad,
guiTweenSpeed,
true,
function()
game.GuiService:RemoveCenterDialog(backpack)
backpack.Visible = false
backpackButton.Selected = false
end
)
delay(guiTweenSpeed, function()
game.GuiService:RemoveCenterDialog(backpack)
backpack.Visible = false
backpackButton.Selected = false
readyForNextEvent = true
canToggle = true
end)
end
function showBackpack()
game.GuiService:AddCenterDialog(backpack, Enum.CenterDialogType.PlayerInitiatedDialog, function()
backpack.Visible = true
backpackButton.Selected = true
end, function()
backpack.Visible = false
backpackButton.Selected = false
end)
backpack.Visible = true
backpackButton.Selected = true
backpack:TweenSizeAndPosition(
backpackSize,
UDim2.new(0.5, -backpackSize.X.Offset / 2, 1, -backpackSize.Y.Offset - 88),
Enum.EasingDirection.Out,
Enum.EasingStyle.Quad,
guiTweenSpeed,
true
)
delay(guiTweenSpeed, function()
backpack.Tabs.Visible = false
searchFrame.Visible = true
backpackOpenEvent:Fire(currentTab)
canToggle = true
readyForNextEvent = true
backpackButton.Image = "http://www.roblox.com/asset/?id=97644093"
backpackButton.Position = UDim2.new(0.5, -60, 1, -backpackSize.Y.Offset - 103)
end)
end
function toggleBackpack()
if not game.Players.LocalPlayer then
return
end
if not game.Players.LocalPlayer["Character"] then
return
end
if not canToggle then
return
end
if not readyForNextEvent then
return
end
readyForNextEvent = false
canToggle = false
backpackIsOpen = not backpackIsOpen
if backpackIsOpen then
loadoutBackground.Image = "http://www.roblox.com/asset/?id=97623721"
loadoutBackground.Position = UDim2.new(-0.03, 0, -0.17, 0)
loadoutBackground.Size = UDim2.new(1.05, 0, 1.25, 0)
loadoutBackground.ZIndex = 2.0
loadoutBackground.Visible = true
showBackpack()
else
backpackButton.Position = UDim2.new(0.5, -60, 1, -44)
loadoutBackground.Visible = false
backpackButton.Selected = false
backpackButton.Image = "http://www.roblox.com/asset/?id=97617958"
loadoutBackground.Image = "http://www.roblox.com/asset/?id=96536002"
loadoutBackground.Position = UDim2.new(-0.1, 0, -0.1, 0)
loadoutBackground.Size = UDim2.new(1.2, 0, 1.2, 0)
hideBackpack()
local clChildren = currentLoadout:GetChildren()
for i = 1, #clChildren do
if clChildren[i] and clChildren[i]:IsA "Frame" then
local frame = clChildren[i]
if #frame:GetChildren() > 0 then
backpackButton.Position = UDim2.new(0.5, -60, 1, -108)
backpackButton.Visible = true
loadoutBackground.Visible = true
if frame:GetChildren()[1]:IsA "ImageButton" then
local imgButton = frame:GetChildren()[1]
imgButton.Active = true
imgButton.Draggable = false
end
end
end
end
end
end
function closeBackpack()
if backpackIsOpen then
toggleBackpack()
end
end
function setSelected(tab)
assert(tab)
assert(tab:IsA "TextButton")
tab.BackgroundColor3 = Color3.new(1, 1, 1)
tab.TextColor3 = Color3.new(0, 0, 0)
tab.Selected = true
tab.ZIndex = 3
end
function setUnselected(tab)
assert(tab)
assert(tab:IsA "TextButton")
tab.BackgroundColor3 = Color3.new(0, 0, 0)
tab.TextColor3 = Color3.new(1, 1, 1)
tab.Selected = false
tab.ZIndex = 1
end
function updateTabGui(selectedTab)
assert(selectedTab)
if selectedTab == "gear" then
setSelected(inventoryButton)
setUnselected(wardrobeButton)
elseif selectedTab == "wardrobe" then
setSelected(wardrobeButton)
setUnselected(inventoryButton)
end
end
function mouseLeaveTab(button)
assert(button)
assert(button:IsA "TextButton")
if button.Selected then
return
end
button.BackgroundColor3 = Color3.new(0, 0, 0)
end
function mouseOverTab(button)
assert(button)
assert(button:IsA "TextButton")
if button.Selected then
return
end
button.BackgroundColor3 = Color3.new(39 / 255, 39 / 255, 39 / 255)
end
function newTabClicked(tabName)
assert(tabName)
tabName = string.lower(tabName)
currentTab = tabName
updateTabGui(tabName)
tabClickedEvent:Fire(tabName)
resetSearch()
end
function trim(s)
return (s:gsub("^%s*(.-)%s*$", "%1"))
end
-- function splitByWhitespace(text)
-- if type(text) ~= "string" then
-- return nil
-- end
-- local terms = {}
-- for token in string.gmatch(text, "[^%s]+") do
-- if string.len(token) > 0 then
-- table.insert(terms, token)
-- end
-- end
-- return terms
-- end
function resetSearchBoxGui()
resetButton.Visible = false
searchBox.Text = searchDefaultText
end
function doSearch()
local searchText = searchBox.Text
if searchText == "" then
resetSearch()
return
end
searchText = trim(searchText)
resetButton.Visible = true
-- termTable = splitByWhitespace(searchText)
searchRequestedEvent:Fire(searchText) -- todo: replace this with termtable when table passing is possible
end
function resetSearch()
resetSearchBoxGui()
searchRequestedEvent:Fire()
end
local backpackReady = function()
readyForNextEvent = true
end
function coreGuiChanged(coreGuiType, enabled)
if coreGuiType == Enum.CoreGuiType.Backpack or coreGuiType == Enum.CoreGuiType.All then
active = enabled
disabledByDeveloper = not enabled
if disabledByDeveloper then
pcall(function()
game:GetService("GuiService"):RemoveKey(tilde)
game:GetService("GuiService"):RemoveKey(backquote)
end)
else
game:GetService("GuiService"):AddKey(tilde)
game:GetService("GuiService"):AddKey(backquote)
end
resetSearch()
searchFrame.Visible = enabled and backpackIsOpen
currentLoadout.Visible = enabled
backpack.Visible = enabled
backpackButton.Visible = enabled
end
end
--------------------------- End Internal Functions -------------------------------------
------------------------------ Public Functions Setup -------------------------------------
createPublicFunction("CloseBackpack", hideBackpack)
createPublicFunction("BackpackReady", backpackReady)
------------------------------ End Public Functions Setup ---------------------------------
------------------------ Connections/Script Main -------------------------------------------
pcall(function()
coreGuiChanged(Enum.CoreGuiType.Backpack, Game.StarterGui:GetCoreGuiEnabled(Enum.CoreGuiType.Backpack))
Game.StarterGui.CoreGuiChangedSignal:connect(coreGuiChanged)
end)
inventoryButton.MouseButton1Click:connect(function()
newTabClicked "gear"
end)
inventoryButton.MouseEnter:connect(function()
mouseOverTab(inventoryButton)
end)
inventoryButton.MouseLeave:connect(function()
mouseLeaveTab(inventoryButton)
end)
if game.CoreGui.Version >= 8 then
wardrobeButton.MouseButton1Click:connect(function()
newTabClicked "wardrobe"
end)
wardrobeButton.MouseEnter:connect(function()
mouseOverTab(wardrobeButton)
end)
wardrobeButton.MouseLeave:connect(function()
mouseLeaveTab(wardrobeButton)
end)
end
closeButton.MouseButton1Click:connect(closeBackpack)
screen.Changed:connect(function(prop)
if prop == "AbsoluteSize" then
resizeEvent:Fire(screen.AbsoluteSize)
end
end)
-- GuiService key setup
game:GetService("GuiService"):AddKey(tilde)
game:GetService("GuiService"):AddKey(backquote)
game:GetService("GuiService").KeyPressed:connect(function(key)
if not active or disabledByDeveloper then
return
end
if key == tilde or key == backquote then
toggleBackpack()
end
end)
backpackButton.MouseButton1Click:connect(function()
if not active or disabledByDeveloper then
return
end
toggleBackpack()
end)
if game.Players.LocalPlayer["Character"] then
activateBackpack()
end
game.Players.LocalPlayer.CharacterAdded:connect(activateBackpack)
-- search functions
searchBox.FocusLost:connect(function(enterPressed)
if enterPressed or searchBox.Text ~= "" then
doSearch()
elseif searchBox.Text == "" then
resetSearch()
end
end)
searchButton.MouseButton1Click:connect(doSearch)
resetButton.MouseButton1Click:connect(resetSearch)
if searchFrame and robloxGui.AbsoluteSize.Y <= 320 then
searchFrame.RobloxLocked = false
searchFrame:Destroy()
end

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,246 +1,52 @@
print("[Mercury]: Loaded corescript 152908679")
local New
New = function(className, name, props)
if not (props ~= nil) then
props = name
name = nil
end
local obj = Instance.new(className)
if name then
obj.Name = name
end
local parent
for k, v in pairs(props) do
if type(k) == "string" then
if k == "Parent" then
parent = v
else
obj[k] = v
end
elseif type(k) == "number" and type(v) == "userdata" then
v.Parent = obj
end
end
obj.Parent = parent
return obj
end
local contextActionService = Game:GetService("ContextActionService")
local isTouchDevice = Game:GetService("UserInputService").TouchEnabled
local functionTable = { }
local buttonVector = { }
local buttonScreenGui
local buttonFrame
local ContextDownImage = "http://www.banland.xyz/asset/?id=97166756"
local ContextUpImage = "http://www.banland.xyz/asset/?id=97166444"
local oldTouches = { }
local buttonPositionTable = {
UDim2.new(0, 123, 0, 70),
UDim2.new(0, 30, 0, 60),
UDim2.new(0, 180, 0, 160),
UDim2.new(0, 85, 0, -25),
UDim2.new(0, 185, 0, -25),
UDim2.new(0, 185, 0, 260),
UDim2.new(0, 216, 0, 65)
}
local maxButtons = #buttonPositionTable
do
local _with_0 = Game:GetService("ContentProvider")
_with_0:Preload(ContextDownImage)
_with_0:Preload(ContextUpImage)
end
while not Game.Players do
wait()
end
while not Game.Players.LocalPlayer do
wait()
end
local createContextActionGui
createContextActionGui = function()
if not buttonScreenGui and isTouchDevice then
buttonScreenGui = New("ScreenGui", "ContextActionGui", {
New("Frame", "ContextButtonFrame", {
BackgroundTransparency = 1,
Size = UDim2.new(0.3, 0, 0.5, 0),
Position = UDim2.new(0.7, 0, 0.5, 0)
})
})
end
end
local contextButtonDown
contextButtonDown = function(button, inputObject, actionName)
if inputObject.UserInputType == Enum.UserInputType.Touch then
button.Image = ContextDownImage
return contextActionService:CallFunction(actionName, Enum.UserInputState.Begin)
end
end
local contextButtonMoved
contextButtonMoved = function(button, inputObject, actionName)
if inputObject.UserInputType == Enum.UserInputType.Touch then
button.Image = ContextDownImage
return contextActionService:CallFunction(actionName, Enum.UserInputState.Change)
end
end
local contextButtonUp
contextButtonUp = function(button, inputObject, actionName)
button.Image = ContextUpImage
if inputObject.UserInputType == Enum.UserInputType.Touch and inputObject.UserInputState == Enum.UserInputState.End then
return contextActionService:CallFunction(actionName, Enum.UserInputState.End, inputObject)
end
end
local isSmallScreenDevice
isSmallScreenDevice = function()
return Game:GetService("GuiService"):GetScreenResolution().y <= 320
end
local createNewButton
createNewButton = function(actionName, functionInfoTable)
local contextButton = New("ImageButton", "ContextActionButton", {
BackgroundTransparency = 1,
Size = UDim2.new((function()
if isSmallScreenDevice() then
return 0, 90, 0, 90
else
return 0, 70, 0, 70
end
end)()),
Active = true,
Image = ContextUpImage,
Parent = buttonFrame
})
local currentButtonTouch
Game:GetService("UserInputService").InputEnded:connect(function(inputObject)
oldTouches[inputObject] = nil
end)
contextButton.InputBegan:connect(function(inputObject)
if oldTouches[inputObject] then
return
end
if inputObject.UserInputState == Enum.UserInputState.Begin and not (currentButtonTouch ~= nil) then
currentButtonTouch = inputObject
return contextButtonDown(contextButton, inputObject, actionName)
end
end)
contextButton.InputChanged:connect(function(inputObject)
if oldTouches[inputObject] or currentButtonTouch ~= inputObject then
return
end
return contextButtonMoved(contextButton, inputObject, actionName)
end)
contextButton.InputEnded:connect(function(inputObject)
if oldTouches[inputObject] or currentButtonTouch ~= inputObject then
return
end
currentButtonTouch = nil
oldTouches[inputObject] = true
return contextButtonUp(contextButton, inputObject, actionName)
end)
local actionIcon = New("ImageLabel", "ActionIcon", {
Position = UDim2.new(0.175, 0, 0.175, 0),
Size = UDim2.new(0.65, 0, 0.65, 0),
BackgroundTransparency = 1
})
if functionInfoTable["image"] and type(functionInfoTable["image"]) == "string" then
actionIcon.Image = functionInfoTable["image"]
end
actionIcon.Parent = contextButton
local actionTitle = New("TextLabel", "ActionTitle", {
Size = UDim2.new(1, 0, 1, 0),
BackgroundTransparency = 1,
Font = Enum.Font.SourceSansBold,
TextColor3 = Color3.new(1, 1, 1),
TextStrokeTransparency = 0,
FontSize = Enum.FontSize.Size18,
TextWrapped = true,
Text = ""
})
if functionInfoTable["title"] and type(functionInfoTable["title"]) == "string" then
actionTitle.Text = functionInfoTable["title"]
end
actionTitle.Parent = contextButton
return contextButton
end
local createButton
createButton = function(actionName, functionInfoTable)
local button = createNewButton(actionName, functionInfoTable)
local position
for i = 1, #buttonVector do
if buttonVector[i] == "empty" then
position = i
break
end
end
if not position then
position = #buttonVector + 1
end
if position > maxButtons then
return
end
buttonVector[position] = button
functionTable[actionName]["button"] = button
button.Position = buttonPositionTable[position]
button.Parent = buttonFrame
if buttonScreenGui and not (buttonScreenGui.Parent ~= nil) then
buttonScreenGui.Parent = Game.Players.LocalPlayer.PlayerGui
end
end
local removeAction
removeAction = function(actionName)
if not functionTable[actionName] then
return
end
local actionButton = functionTable[actionName]["button"]
if actionButton then
actionButton.Parent = nil
for i = 1, #buttonVector do
if buttonVector[i] == actionButton then
buttonVector[i] = "empty"
break
end
end
actionButton:Destroy()
end
functionTable[actionName] = nil
end
local addAction
addAction = function(actionName, createTouchButton, functionInfoTable)
if functionTable[actionName] then
removeAction(actionName)
end
functionTable[actionName] = {
functionInfoTable
}
if createTouchButton and isTouchDevice then
createContextActionGui()
return createButton(actionName, functionInfoTable)
end
end
contextActionService.BoundActionChanged:connect(function(actionName, changeName, changeTable)
if functionTable[actionName] and changeTable then
do
local button = functionTable[actionName]["button"]
if button then
if changeName == "image" then
button.ActionIcon.Image = changeTable[changeName]
elseif changeName == "title" then
button.ActionTitle.Text = changeTable[changeName]
elseif changeName == "position" then
button.Position = changeTable[changeName]
end
end
end
end
end)
contextActionService.BoundActionAdded:connect(function(actionName, createTouchButton, functionInfoTable)
return addAction(actionName, createTouchButton, functionInfoTable)
end)
contextActionService.BoundActionRemoved:connect(function(actionName, _)
return removeAction(actionName)
end)
contextActionService.GetActionButtonEvent:connect(function(actionName)
if functionTable[actionName] then
return contextActionService:FireActionButtonFoundSignal(actionName, functionTable[actionName]["button"])
end
end)
local boundActions = contextActionService:GetAllBoundActionInfo()
for actionName, actionData in pairs(boundActions) do
addAction(actionName, actionData["createTouchButton"], actionData)
end
print'[Mercury]: Loaded corescript 152908679'local a a=function(b,c,d)if not(d~=
nil)then d=c c=nil end local e=Instance.new(b)if c then e.Name=c end local f for
g,h in pairs(d)do if type(g)=='string'then if g=='Parent'then f=h else e[g]=h
end elseif type(g)=='number'and type(h)=='userdata'then h.Parent=e end end e.
Parent=f return e end local b,c,d,e,f,g,h,i,j,k=Game:GetService
'ContextActionService',Game:GetService'UserInputService'.TouchEnabled,{},{},nil,
nil,'http://www.banland.xyz/asset/?id=97166756',
'http://www.banland.xyz/asset/?id=97166444',{},{UDim2.new(0,123,0,70),UDim2.new(
0,30,0,60),UDim2.new(0,180,0,160),UDim2.new(0,85,0,-25),UDim2.new(0,185,0,-25),
UDim2.new(0,185,0,260),UDim2.new(0,216,0,65)}local l=#k do local m=Game:
GetService'ContentProvider'm:Preload(h)m:Preload(i)end while not Game.Players do
wait()end while not Game.Players.LocalPlayer do wait()end local m m=function()if
not f and c then f=a('ScreenGui','ContextActionGui',{a('Frame',
'ContextButtonFrame',{BackgroundTransparency=1,Size=UDim2.new(0.3,0,0.5,0),
Position=UDim2.new(0.7,0,0.5,0)})})end end local n n=function(o,p,q)if p.
UserInputType==Enum.UserInputType.Touch then o.Image=h return b:CallFunction(q,
Enum.UserInputState.Begin)end end local o o=function(p,q,r)if q.UserInputType==
Enum.UserInputType.Touch then p.Image=h return b:CallFunction(r,Enum.
UserInputState.Change)end end local p p=function(q,r,s)q.Image=i if r.
UserInputType==Enum.UserInputType.Touch and r.UserInputState==Enum.
UserInputState.End then return b:CallFunction(s,Enum.UserInputState.End,r)end
end local q q=function()return Game:GetService'GuiService':GetScreenResolution()
.y<=320 end local r r=function(s,t)local u,v=a('ImageButton',
'ContextActionButton',{BackgroundTransparency=1,Size=UDim2.new((function()if q()
then return 0,90,0,90 else return 0,70,0,70 end end)()),Active=true,Image=i,
Parent=g}),nil Game:GetService'UserInputService'.InputEnded:connect(function(w)j
[w]=nil end)u.InputBegan:connect(function(w)if j[w]then return end if w.
UserInputState==Enum.UserInputState.Begin and not(v~=nil)then v=w return n(u,w,s
)end end)u.InputChanged:connect(function(w)if j[w]or v~=w then return end return
o(u,w,s)end)u.InputEnded:connect(function(w)if j[w]or v~=w then return end v=nil
j[w]=true return p(u,w,s)end)local w=a('ImageLabel','ActionIcon',{Position=UDim2
.new(0.175,0,0.175,0),Size=UDim2.new(0.65,0,0.65,0),BackgroundTransparency=1})if
t['image']and type(t['image'])=='string'then w.Image=t['image']end w.Parent=u
local x=a('TextLabel','ActionTitle',{Size=UDim2.new(1,0,1,0),
BackgroundTransparency=1,Font=Enum.Font.SourceSansBold,TextColor3=Color3.new(1,1
,1),TextStrokeTransparency=0,FontSize=Enum.FontSize.Size18,TextWrapped=true,Text
=''})if t['title']and type(t['title'])=='string'then x.Text=t['title']end x.
Parent=u return u end local s s=function(t,u)local v,w=r(t,u),nil for x=1,#e do
if e[x]=='empty'then w=x break end end if not w then w=#e+1 end if w>l then
return end e[w]=v d[t]['button']=v v.Position=k[w]v.Parent=g if f and not(f.
Parent~=nil)then f.Parent=Game.Players.LocalPlayer.PlayerGui end end local t t=
function(u)if not d[u]then return end local v=d[u]['button']if v then v.Parent=
nil for w=1,#e do if e[w]==v then e[w]='empty'break end end v:Destroy()end d[u]=
nil end local u u=function(v,w,x)if d[v]then t(v)end d[v]={x}if w and c then m()
return s(v,x)end end b.BoundActionChanged:connect(function(v,w,x)if d[v]and x
then do local y=d[v]['button']if y then if w=='image'then y.ActionIcon.Image=x[w
]elseif w=='title'then y.ActionTitle.Text=x[w]elseif w=='position'then y.
Position=x[w]end end end end end)b.BoundActionAdded:connect(function(v,w,x)
return u(v,w,x)end)b.BoundActionRemoved:connect(function(v,w)return t(v)end)b.
GetActionButtonEvent:connect(function(v)if d[v]then return b:
FireActionButtonFoundSignal(v,d[v]['button'])end end)local v=b:
GetAllBoundActionInfo()for w,x in pairs(v)do u(w,x['createTouchButton'],x)end

View File

@ -1,527 +1,104 @@
print("[Mercury]: Loaded corescript 153556783")
local New
New = function(className, name, props)
if not (props ~= nil) then
props = name
name = nil
end
local obj = Instance.new(className)
if name then
obj.Name = name
end
local parent
for k, v in pairs(props) do
if type(k) == "string" then
if k == "Parent" then
parent = v
else
obj[k] = v
end
elseif type(k) == "number" and type(v) == "userdata" then
v.Parent = obj
end
end
obj.Parent = parent
return obj
end
while not Game do
wait()
end
while not Game:FindFirstChild("Players") do
wait()
end
while not Game.Players.LocalPlayer do
wait()
end
while not Game:FindFirstChild("CoreGui") do
wait()
end
while not Game.CoreGui:FindFirstChild("RobloxGui") do
wait()
end
local userInputService = Game:GetService("UserInputService")
local success = pcall(function()
return userInputService:IsLuaTouchControls()
end)
if not success then
script:Destroy()
end
local screenResolution = Game:GetService("GuiService"):GetScreenResolution()
local isSmallScreenDevice
isSmallScreenDevice = function()
return screenResolution.y <= 320
end
local localPlayer = Game.Players.LocalPlayer
local thumbstickSize = 120
if isSmallScreenDevice() then
thumbstickSize = 70
end
local touchControlsSheet = "rbxasset://textures/ui/TouchControlsSheet.png"
local ThumbstickDeadZone = 5
local ThumbstickMaxPercentGive = 0.92
local thumbstickTouches = { }
local jumpButtonSize = 90
if isSmallScreenDevice() then
jumpButtonSize = 70
end
local oldJumpTouches = { }
local currentJumpTouch
local CameraRotateSensitivity = 0.007
local CameraRotateDeadZone = CameraRotateSensitivity * 16
local CameraZoomSensitivity = 0.03
local PinchZoomDelay = 0.2
local cameraTouch
Game:GetService("ContentProvider"):Preload(touchControlsSheet)
local DistanceBetweenTwoPoints
DistanceBetweenTwoPoints = function(point1, point2)
local dx = point2.x - point1.x
local dy = point2.y - point1.y
return math.sqrt(dx * dx + dy * dy)
end
local transformFromCenterToTopLeft
transformFromCenterToTopLeft = function(pointToTranslate, guiObject)
return UDim2.new(0, pointToTranslate.x - guiObject.AbsoluteSize.x / 2, 0, pointToTranslate.y - guiObject.AbsoluteSize.y / 2)
end
local rotatePointAboutLocation
rotatePointAboutLocation = function(pointToRotate, pointToRotateAbout, radians)
local sinAnglePercent = math.sin(radians)
local cosAnglePercent = math.cos(radians)
local transformedPoint = pointToRotate
transformedPoint = Vector2.new(transformedPoint.x - pointToRotateAbout.x, transformedPoint.y - pointToRotateAbout.y)
local xNew = transformedPoint.x * cosAnglePercent - transformedPoint.y * sinAnglePercent
local yNew = transformedPoint.x * sinAnglePercent + transformedPoint.y * cosAnglePercent
transformedPoint = Vector2.new(xNew + pointToRotateAbout.x, yNew + pointToRotateAbout.y)
return transformedPoint
end
local dotProduct
dotProduct = function(v1, v2)
return v1.x * v2.x + v1.y * v2.y
end
local stationaryThumbstickTouchMove
stationaryThumbstickTouchMove = function(thumbstickFrame, thumbstickOuter, touchLocation)
local thumbstickOuterCenterPosition = Vector2.new(thumbstickOuter.Position.X.Offset + thumbstickOuter.AbsoluteSize.x / 2, thumbstickOuter.Position.Y.Offset + thumbstickOuter.AbsoluteSize.y / 2)
local centerDiff = DistanceBetweenTwoPoints(touchLocation, thumbstickOuterCenterPosition)
if centerDiff > (thumbstickSize / 2) then
local thumbVector = Vector2.new(touchLocation.x - thumbstickOuterCenterPosition.x, touchLocation.y - thumbstickOuterCenterPosition.y)
local normal = thumbVector.unit
if normal.x == math.nan or normal.x == math.inf then
normal = Vector2.new(0, normal.y)
end
if normal.y == math.nan or normal.y == math.inf then
normal = Vector2.new(normal.x, 0)
end
local newThumbstickInnerPosition = thumbstickOuterCenterPosition + (normal * (thumbstickSize / 2))
thumbstickFrame.Position = transformFromCenterToTopLeft(newThumbstickInnerPosition, thumbstickFrame)
else
thumbstickFrame.Position = transformFromCenterToTopLeft(touchLocation, thumbstickFrame)
end
return Vector2.new(thumbstickFrame.Position.X.Offset - thumbstickOuter.Position.X.Offset, thumbstickFrame.Position.Y.Offset - thumbstickOuter.Position.Y.Offset)
end
local followThumbstickTouchMove
followThumbstickTouchMove = function(thumbstickFrame, thumbstickOuter, touchLocation)
local thumbstickOuterCenter = Vector2.new(thumbstickOuter.Position.X.Offset + thumbstickOuter.AbsoluteSize.x / 2, thumbstickOuter.Position.Y.Offset + thumbstickOuter.AbsoluteSize.y / 2)
if DistanceBetweenTwoPoints(touchLocation, thumbstickOuterCenter) > thumbstickSize / 2 then
local thumbstickInnerCenter = Vector2.new(thumbstickFrame.Position.X.Offset + thumbstickFrame.AbsoluteSize.x / 2, thumbstickFrame.Position.Y.Offset + thumbstickFrame.AbsoluteSize.y / 2)
local movementVectorUnit = Vector2.new(touchLocation.x - thumbstickInnerCenter.x, touchLocation.y - thumbstickInnerCenter.y).unit
local outerToInnerVectorCurrent = Vector2.new(thumbstickInnerCenter.x - thumbstickOuterCenter.x, thumbstickInnerCenter.y - thumbstickOuterCenter.y)
local outerToInnerVectorCurrentUnit = outerToInnerVectorCurrent.unit
local movementVector = Vector2.new(touchLocation.x - thumbstickInnerCenter.x, touchLocation.y - thumbstickInnerCenter.y)
local crossOuterToInnerWithMovement = (outerToInnerVectorCurrentUnit.x * movementVectorUnit.y) - (outerToInnerVectorCurrentUnit.y * movementVectorUnit.x)
local angle = math.atan2(crossOuterToInnerWithMovement, dotProduct(outerToInnerVectorCurrentUnit, movementVectorUnit))
local anglePercent = angle * math.min(movementVector.magnitude / outerToInnerVectorCurrent.magnitude, 1.0)
if math.abs(anglePercent) > 0.00001 then
local outerThumbCenter = rotatePointAboutLocation(thumbstickOuterCenter, thumbstickInnerCenter, anglePercent)
thumbstickOuter.Position = transformFromCenterToTopLeft(Vector2.new(outerThumbCenter.x, outerThumbCenter.y), thumbstickOuter)
end
thumbstickOuter.Position = UDim2.new(0, thumbstickOuter.Position.X.Offset + movementVector.x, 0, thumbstickOuter.Position.Y.Offset + movementVector.y)
end
thumbstickFrame.Position = transformFromCenterToTopLeft(touchLocation, thumbstickFrame)
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(0, thumbstickFramePosition.x + vectorWithLength.x, 0, thumbstickFramePosition.y + vectorWithLength.y)
end
return Vector2.new(thumbstickFrame.Position.X.Offset - thumbstickOuter.Position.X.Offset, thumbstickFrame.Position.Y.Offset - thumbstickOuter.Position.Y.Offset)
end
local movementOutsideDeadZone
movementOutsideDeadZone = function(movementVector)
return (math.abs(movementVector.x) > ThumbstickDeadZone) or (math.abs(movementVector.y) > ThumbstickDeadZone)
end
local constructThumbstick
constructThumbstick = function(defaultThumbstickPos, updateFunction, stationaryThumbstick)
local thumbstickFrame = New("Frame", "ThumbstickFrame", {
Active = true,
Size = UDim2.new(0, thumbstickSize, 0, thumbstickSize),
Position = defaultThumbstickPos,
BackgroundTransparency = 1
})
New("ImageLabel", "InnerThumbstick", {
Image = touchControlsSheet,
ImageRectOffset = Vector2.new(220, 0),
ImageRectSize = Vector2.new(111, 111),
BackgroundTransparency = 1,
Size = UDim2.new(0, thumbstickSize / 2, 0, thumbstickSize / 2),
Position = UDim2.new(0, thumbstickFrame.Size.X.Offset / 2 - thumbstickSize / 4, 0, thumbstickFrame.Size.Y.Offset / 2 - thumbstickSize / 4),
ZIndex = 2,
Parent = thumbstickFrame
})
local outerThumbstick = New("ImageLabel", "OuterThumbstick", {
Image = touchControlsSheet,
ImageRectOffset = Vector2.new(0, 0),
ImageRectSize = Vector2.new(220, 220),
BackgroundTransparency = 1,
Size = UDim2.new(0, thumbstickSize, 0, thumbstickSize),
Position = defaultThumbstickPos,
Parent = Game.CoreGui.RobloxGui
})
local thumbstickTouch
local userInputServiceTouchMovedCon
local userInputSeviceTouchEndedCon
local startInputTracking
startInputTracking = function(inputObject)
if thumbstickTouch then
return
end
if inputObject == cameraTouch then
return
end
if inputObject == currentJumpTouch then
return
end
if inputObject.UserInputType ~= Enum.UserInputType.Touch then
return
end
thumbstickTouch = inputObject
table.insert(thumbstickTouches, thumbstickTouch)
thumbstickFrame.Position = transformFromCenterToTopLeft(thumbstickTouch.Position, thumbstickFrame)
outerThumbstick.Position = thumbstickFrame.Position
userInputServiceTouchMovedCon = userInputService.TouchMoved:connect(function(movedInput)
if movedInput == thumbstickTouch then
local movementVector
if stationaryThumbstick then
movementVector = stationaryThumbstickTouchMove(thumbstickFrame, outerThumbstick, Vector2.new(movedInput.Position.x, movedInput.Position.y))
else
movementVector = followThumbstickTouchMove(thumbstickFrame, outerThumbstick, Vector2.new(movedInput.Position.x, movedInput.Position.y))
end
if updateFunction then
return updateFunction(movementVector, outerThumbstick.Size.X.Offset / 2)
end
end
end)
userInputSeviceTouchEndedCon = userInputService.TouchEnded:connect(function(endedInput)
if endedInput == thumbstickTouch then
if updateFunction then
updateFunction(Vector2.new(0, 0), 1)
end
userInputSeviceTouchEndedCon:disconnect()
userInputServiceTouchMovedCon:disconnect()
thumbstickFrame.Position = defaultThumbstickPos
outerThumbstick.Position = defaultThumbstickPos
for i, object in pairs(thumbstickTouches) do
if object == thumbstickTouch then
table.remove(thumbstickTouches, i)
break
end
end
thumbstickTouch = nil
end
end)
end
userInputService.Changed:connect(function(prop)
if prop == "ModalEnabled" then
do
local _tmp_0 = not userInputService.ModalEnabled
thumbstickFrame.Visible = _tmp_0
outerThumbstick.Visible = _tmp_0
end
end
end)
thumbstickFrame.InputBegan:connect(startInputTracking)
return thumbstickFrame
end
local setupCharacterMovement
setupCharacterMovement = function(parentFrame)
local lastMovementVector, lastMaxMovement
local moveCharacterFunc = localPlayer.MoveCharacter
local moveCharacterFunction
moveCharacterFunction = function(movementVector, maxMovement)
if localPlayer then
if movementOutsideDeadZone(movementVector) then
lastMovementVector = movementVector
lastMaxMovement = maxMovement
if movementVector.magnitude / maxMovement > ThumbstickMaxPercentGive then
maxMovement = movementVector.magnitude - 1
end
return moveCharacterFunc(localPlayer, movementVector, maxMovement)
else
lastMovementVector = Vector2.new(0, 0)
lastMaxMovement = 1
return moveCharacterFunc(localPlayer, lastMovementVector, lastMaxMovement)
end
end
end
local thumbstickPos = UDim2.new(0, thumbstickSize / 2, 1, -thumbstickSize * 1.75)
if isSmallScreenDevice() then
thumbstickPos = UDim2.new(0, (thumbstickSize / 2) - 10, 1, -thumbstickSize - 20)
end
local characterThumbstick = constructThumbstick(thumbstickPos, moveCharacterFunction, false)
characterThumbstick.Name = "CharacterThumbstick"
characterThumbstick.Parent = parentFrame
local refreshCharacterMovement
refreshCharacterMovement = function()
if localPlayer and moveCharacterFunc and lastMovementVector and lastMaxMovement then
return moveCharacterFunc(localPlayer, lastMovementVector, lastMaxMovement)
end
end
return refreshCharacterMovement
end
local setupJumpButton
setupJumpButton = function(parentFrame)
local jumpButton = New("ImageButton", "JumpButton", {
BackgroundTransparency = 1,
Image = touchControlsSheet,
ImageRectOffset = Vector2.new(176, 222),
ImageRectSize = Vector2.new(174, 174),
Size = UDim2.new(0, jumpButtonSize, 0, jumpButtonSize),
Position = UDim2.new(1, (function()
if isSmallScreenDevice() then
return -(jumpButtonSize * 2.25), 1, -jumpButtonSize - 20
else
return -(jumpButtonSize * 2.75), 1, -jumpButtonSize - 120
end
end)())
})
local playerJumpFunc = localPlayer.JumpCharacter
local doJumpLoop
doJumpLoop = function()
while currentJumpTouch do
if localPlayer then
playerJumpFunc(localPlayer)
end
wait(1 / 60)
end
end
jumpButton.InputBegan:connect(function(inputObject)
if inputObject.UserInputType ~= Enum.UserInputType.Touch then
return
end
if currentJumpTouch then
return
end
if inputObject == cameraTouch then
return
end
for _, touch in pairs(oldJumpTouches) do
if touch == inputObject then
return
end
end
currentJumpTouch = inputObject
jumpButton.ImageRectOffset = Vector2.new(0, 222)
jumpButton.ImageRectSize = Vector2.new(174, 174)
return doJumpLoop()
end)
jumpButton.InputEnded:connect(function(inputObject)
if inputObject.UserInputType ~= Enum.UserInputType.Touch then
return
end
jumpButton.ImageRectOffset = Vector2.new(176, 222)
jumpButton.ImageRectSize = Vector2.new(174, 174)
if inputObject == currentJumpTouch then
table.insert(oldJumpTouches, currentJumpTouch)
currentJumpTouch = nil
end
end)
userInputService.InputEnded:connect(function(globalInputObject)
for i, touch in pairs(oldJumpTouches) do
if touch == globalInputObject then
table.remove(oldJumpTouches, i)
break
end
end
end)
userInputService.Changed:connect(function(prop)
if prop == "ModalEnabled" then
jumpButton.Visible = not userInputService.ModalEnabled
end
end)
jumpButton.Parent = parentFrame
end
local isTouchUsedByJumpButton
isTouchUsedByJumpButton = function(touch)
if touch == currentJumpTouch then
return true
end
for _, touchToCompare in pairs(oldJumpTouches) do
if touch == touchToCompare then
return true
end
end
return false
end
local isTouchUsedByThumbstick
isTouchUsedByThumbstick = function(touch)
for _, touchToCompare in pairs(thumbstickTouches) do
if touch == touchToCompare then
return true
end
end
return false
end
local setupCameraControl
setupCameraControl = function(parentFrame, refreshCharacterMoveFunc)
local lastPos
local hasRotatedCamera = false
local rotateCameraFunc = userInputService.RotateCamera
local pinchTime = -1
local shouldPinch = false
local lastPinchScale
local zoomCameraFunc = userInputService.ZoomCamera
local pinchTouches = { }
local pinchFrame
local resetCameraRotateState
resetCameraRotateState = function()
cameraTouch = nil
hasRotatedCamera = false
lastPos = nil
end
local resetPinchState
resetPinchState = function()
pinchTouches = { }
lastPinchScale = nil
shouldPinch = false
pinchFrame:Destroy()
pinchFrame = nil
end
local startPinch
startPinch = function(firstTouch, secondTouch)
if pinchFrame ~= nil then
pinchFrame:Destroy()
end
pinchFrame = New("Frame", {
Name = "PinchFrame",
BackgroundTransparency = 1,
Size = UDim2.new(1, 0, 1, 0),
Parent = parentFrame
})
pinchFrame.InputChanged:connect(function(inputObject)
if not shouldPinch then
resetPinchState()
return
end
resetCameraRotateState()
if not (lastPinchScale ~= nil) then
if inputObject == firstTouch then
lastPinchScale = (inputObject.Position - secondTouch.Position).magnitude
firstTouch = inputObject
elseif inputObject == secondTouch then
lastPinchScale = (inputObject.Position - firstTouch.Position).magnitude
secondTouch = inputObject
end
else
local newPinchDistance = 0
if inputObject == firstTouch then
newPinchDistance = (inputObject.Position - secondTouch.Position).magnitude
firstTouch = inputObject
elseif inputObject == secondTouch then
newPinchDistance = (inputObject.Position - firstTouch.Position).magnitude
secondTouch = inputObject
end
if newPinchDistance ~= 0 then
local pinchDiff = newPinchDistance - lastPinchScale
if pinchDiff ~= 0 then
zoomCameraFunc(userInputService, (pinchDiff * CameraZoomSensitivity))
end
lastPinchScale = newPinchDistance
end
end
end)
return pinchFrame.InputEnded:connect(function(inputObject)
if inputObject == firstTouch or inputObject == secondTouch then
return resetPinchState()
end
end)
end
local pinchGestureReceivedTouch
pinchGestureReceivedTouch = function(inputObject)
if #pinchTouches < 1 then
table.insert(pinchTouches, inputObject)
pinchTime = tick()
shouldPinch = false
elseif #pinchTouches == 1 then
shouldPinch = ((tick() - pinchTime) <= PinchZoomDelay)
if shouldPinch then
table.insert(pinchTouches, inputObject)
return startPinch(pinchTouches[1], pinchTouches[2])
else
pinchTouches = { }
end
end
end
parentFrame.InputBegan:connect(function(inputObject)
if inputObject.UserInputType ~= Enum.UserInputType.Touch then
return
end
if isTouchUsedByJumpButton(inputObject) then
return
end
local usedByThumbstick = isTouchUsedByThumbstick(inputObject)
if not usedByThumbstick then
pinchGestureReceivedTouch(inputObject)
end
if not (cameraTouch ~= nil) and not usedByThumbstick then
cameraTouch = inputObject
lastPos = Vector2.new(cameraTouch.Position.x, cameraTouch.Position.y)
end
end)
userInputService.InputChanged:connect(function(inputObject)
if inputObject.UserInputType ~= Enum.UserInputType.Touch then
return
end
if cameraTouch ~= inputObject then
return
end
local newPos = Vector2.new(cameraTouch.Position.x, cameraTouch.Position.y)
local touchDiff = (lastPos - newPos) * CameraRotateSensitivity
if not hasRotatedCamera and (touchDiff.magnitude > CameraRotateDeadZone) then
hasRotatedCamera = true
lastPos = newPos
end
if hasRotatedCamera and (lastPos ~= newPos) then
rotateCameraFunc(userInputService, touchDiff)
refreshCharacterMoveFunc()
lastPos = newPos
end
end)
return userInputService.InputEnded:connect(function(inputObject)
if cameraTouch == inputObject or not (cameraTouch ~= nil) then
resetCameraRotateState()
end
for i, touch in pairs(pinchTouches) do
if touch == inputObject then
table.remove(pinchTouches, i)
end
end
end)
end
local setupTouchControls
setupTouchControls = function()
local touchControlFrame = New("Frame", "TouchControlFrame", {
Size = UDim2.new(1, 0, 1, 0),
BackgroundTransparency = 1,
Parent = Game.CoreGui.RobloxGui
})
local refreshCharacterMoveFunc = setupCharacterMovement(touchControlFrame)
setupJumpButton(touchControlFrame)
setupCameraControl(touchControlFrame, refreshCharacterMoveFunc)
return userInputService.ProcessedEvent:connect(function(inputObject, processed)
if not processed then
return
end
if inputObject == cameraTouch and inputObject.UserInputState == Enum.UserInputState.Begin then
cameraTouch = nil
end
end)
end
return setupTouchControls()
print'[Mercury]: Loaded corescript 153556783'local a a=function(b,c,d)if not(d~=
nil)then d=c c=nil end local e=Instance.new(b)if c then e.Name=c end local f for
g,h in pairs(d)do if type(g)=='string'then if g=='Parent'then f=h else e[g]=h
end elseif type(g)=='number'and type(h)=='userdata'then h.Parent=e end end e.
Parent=f return e end while not Game do wait()end while not Game:FindFirstChild
'Players'do wait()end while not Game.Players.LocalPlayer do wait()end while not
Game:FindFirstChild'CoreGui'do wait()end while not Game.CoreGui:FindFirstChild
'RobloxGui'do wait()end local b=Game:GetService'UserInputService'local c=pcall(
function()return b:IsLuaTouchControls()end)if not c then script:Destroy()end
local d,e=Game:GetService'GuiService':GetScreenResolution(),nil e=function()
return d.y<=320 end local f,g=Game.Players.LocalPlayer,120 if e()then g=70 end
local h,i,j,k,l='rbxasset://textures/ui/TouchControlsSheet.png',5,0.92,{},90 if
e()then l=70 end local m,n,o={},nil,0.007 local p,q,r,s=o*16,0.03,0.2,nil Game:
GetService'ContentProvider':Preload(h)local t t=function(u,v)local w,x=v.x-u.x,v
.y-u.y return math.sqrt(w*w+x*x)end local u u=function(v,w)return UDim2.new(0,v.
x-w.AbsoluteSize.x/2,0,v.y-w.AbsoluteSize.y/2)end local v v=function(w,x,y)local
z,A,B=math.sin(y),math.cos(y),w B=Vector2.new(B.x-x.x,B.y-x.y)local C,D=B.x*A-B.
y*z,B.x*z+B.y*A B=Vector2.new(C+x.x,D+x.y)return B end local w w=function(x,y)
return x.x*y.x+x.y*y.y end local x x=function(y,z,A)local B=Vector2.new(z.
Position.X.Offset+z.AbsoluteSize.x/2,z.Position.Y.Offset+z.AbsoluteSize.y/2)
local C=t(A,B)if C>(g/2)then local D=Vector2.new(A.x-B.x,A.y-B.y)local E=D.unit
if E.x==math.nan or E.x==math.inf then E=Vector2.new(0,E.y)end if E.y==math.nan
or E.y==math.inf then E=Vector2.new(E.x,0)end local F=B+(E*(g/2))y.Position=u(F,
y)else y.Position=u(A,y)end return Vector2.new(y.Position.X.Offset-z.Position.X.
Offset,y.Position.Y.Offset-z.Position.Y.Offset)end local y y=function(z,A,B)
local C=Vector2.new(A.Position.X.Offset+A.AbsoluteSize.x/2,A.Position.Y.Offset+A
.AbsoluteSize.y/2)if t(B,C)>g/2 then local D=Vector2.new(z.Position.X.Offset+z.
AbsoluteSize.x/2,z.Position.Y.Offset+z.AbsoluteSize.y/2)local E,F=Vector2.new(B.
x-D.x,B.y-D.y).unit,Vector2.new(D.x-C.x,D.y-C.y)local G,H=F.unit,Vector2.new(B.x
-D.x,B.y-D.y)local I=(G.x*E.y)-(G.y*E.x)local J=math.atan2(I,w(G,E))local K=J*
math.min(H.magnitude/F.magnitude,1)if math.abs(K)>0.00001 then local L=v(C,D,K)A
.Position=u(Vector2.new(L.x,L.y),A)end A.Position=UDim2.new(0,A.Position.X.
Offset+H.x,0,A.Position.Y.Offset+H.y)end z.Position=u(B,z)local D,E=Vector2.new(
z.Position.X.Offset,z.Position.Y.Offset),Vector2.new(A.Position.X.Offset,A.
Position.Y.Offset)if t(D,E)>g/2 then local F=(E-D).unit*g/2 A.Position=UDim2.
new(0,D.x+F.x,0,D.y+F.y)end return Vector2.new(z.Position.X.Offset-A.Position.X.
Offset,z.Position.Y.Offset-A.Position.Y.Offset)end local z z=function(A)return(
math.abs(A.x)>i)or(math.abs(A.y)>i)end local A A=function(B,C,D)local E=a(
'Frame','ThumbstickFrame',{Active=true,Size=UDim2.new(0,g,0,g),Position=B,
BackgroundTransparency=1})a('ImageLabel','InnerThumbstick',{Image=h,
ImageRectOffset=Vector2.new(220,0),ImageRectSize=Vector2.new(111,111),
BackgroundTransparency=1,Size=UDim2.new(0,g/2,0,g/2),Position=UDim2.new(0,E.Size
.X.Offset/2-g/4,0,E.Size.Y.Offset/2-g/4),ZIndex=2,Parent=E})local F,G,H,I,J=a(
'ImageLabel','OuterThumbstick',{Image=h,ImageRectOffset=Vector2.new(0,0),
ImageRectSize=Vector2.new(220,220),BackgroundTransparency=1,Size=UDim2.new(0,g,0
,g),Position=B,Parent=Game.CoreGui.RobloxGui}),nil,nil,nil,nil J=function(K)if G
then return end if K==s then return end if K==n then return end if K.
UserInputType~=Enum.UserInputType.Touch then return end G=K table.insert(k,G)E.
Position=u(G.Position,E)F.Position=E.Position H=b.TouchMoved:connect(function(L)
if L==G then local M if D then M=x(E,F,Vector2.new(L.Position.x,L.Position.y))
else M=y(E,F,Vector2.new(L.Position.x,L.Position.y))end if C then return C(M,F.
Size.X.Offset/2)end end end)I=b.TouchEnded:connect(function(L)if L==G then if C
then C(Vector2.new(0,0),1)end I:disconnect()H:disconnect()E.Position=B F.
Position=B for M,N in pairs(k)do if N==G then table.remove(k,M)break end end G=
nil end end)end b.Changed:connect(function(K)if K=='ModalEnabled'then do local L
=not b.ModalEnabled E.Visible=L F.Visible=L end end end)E.InputBegan:connect(J)
return E end local B B=function(C)local D,E,F,G=nil,nil,f.MoveCharacter,nil G=
function(H,I)if f then if z(H)then D=H E=I if H.magnitude/I>j then I=H.magnitude
-1 end return F(f,H,I)else D=Vector2.new(0,0)E=1 return F(f,D,E)end end end
local H=UDim2.new(0,g/2,1,-g*1.75)if e()then H=UDim2.new(0,(g/2)-10,1,-g-20)end
local I=A(H,G,false)I.Name='CharacterThumbstick'I.Parent=C local J J=function()
if f and F and D and E then return F(f,D,E)end end return J end local C C=
function(D)local E,F,G=a('ImageButton','JumpButton',{BackgroundTransparency=1,
Image=h,ImageRectOffset=Vector2.new(176,222),ImageRectSize=Vector2.new(174,174),
Size=UDim2.new(0,l,0,l),Position=UDim2.new(1,(function()if e()then return-(l*
2.25),1,-l-20 else return-(l*2.75),1,-l-120 end end)())}),f.JumpCharacter,nil G=
function()while n do if f then F(f)end wait(1.6666666666666665E-2)end end E.
InputBegan:connect(function(H)if H.UserInputType~=Enum.UserInputType.Touch then
return end if n then return end if H==s then return end for I,J in pairs(m)do if
J==H then return end end n=H E.ImageRectOffset=Vector2.new(0,222)E.ImageRectSize
=Vector2.new(174,174)return G()end)E.InputEnded:connect(function(H)if H.
UserInputType~=Enum.UserInputType.Touch then return end E.ImageRectOffset=
Vector2.new(176,222)E.ImageRectSize=Vector2.new(174,174)if H==n then table.
insert(m,n)n=nil end end)b.InputEnded:connect(function(H)for I,J in pairs(m)do
if J==H then table.remove(m,I)break end end end)b.Changed:connect(function(H)if
H=='ModalEnabled'then E.Visible=not b.ModalEnabled end end)E.Parent=D end local
D D=function(E)if E==n then return true end for F,G in pairs(m)do if E==G then
return true end end return false end local E E=function(F)for G,H in pairs(k)do
if F==H then return true end end return false end local F F=function(G,H)local I
,J,K,L,M,N,O,P,Q,R=nil,false,b.RotateCamera,-1,false,nil,b.ZoomCamera,{},nil,nil
R=function()s=nil J=false I=nil end local S S=function()P={}N=nil M=false Q:
Destroy()Q=nil end local T T=function(U,V)if Q~=nil then Q:Destroy()end Q=a(
'Frame',{Name='PinchFrame',BackgroundTransparency=1,Size=UDim2.new(1,0,1,0),
Parent=G})Q.InputChanged:connect(function(W)if not M then S()return end R()if
not(N~=nil)then if W==U then N=(W.Position-V.Position).magnitude U=W elseif W==V
then N=(W.Position-U.Position).magnitude V=W end else local X=0 if W==U then X=(
W.Position-V.Position).magnitude U=W elseif W==V then X=(W.Position-U.Position).
magnitude V=W end if X~=0 then local Y=X-N if Y~=0 then O(b,(Y*q))end N=X end
end end)return Q.InputEnded:connect(function(W)if W==U or W==V then return S()
end end)end local U U=function(V)if#P<1 then table.insert(P,V)L=tick()M=false
elseif#P==1 then M=((tick()-L)<=r)if M then table.insert(P,V)return T(P[1],P[2])
else P={}end end end G.InputBegan:connect(function(V)if V.UserInputType~=Enum.
UserInputType.Touch then return end if D(V)then return end local W=E(V)if not W
then U(V)end if not(s~=nil)and not W then s=V I=Vector2.new(s.Position.x,s.
Position.y)end end)b.InputChanged:connect(function(V)if V.UserInputType~=Enum.
UserInputType.Touch then return end if s~=V then return end local W=Vector2.new(
s.Position.x,s.Position.y)local X=(I-W)*o if not J and(X.magnitude>p)then J=true
I=W end if J and(I~=W)then K(b,X)H()I=W end end)return b.InputEnded:connect(
function(V)if s==V or not(s~=nil)then R()end for W,X in pairs(P)do if X==V then
table.remove(P,W)end end end)end local G G=function()local H=a('Frame',
'TouchControlFrame',{Size=UDim2.new(1,0,1,0),BackgroundTransparency=1,Parent=
Game.CoreGui.RobloxGui})local I=B(H)C(H)F(H,I)return b.ProcessedEvent:connect(
function(J,K)if not K then return end if J==s and J.UserInputState==Enum.
UserInputState.Begin then s=nil end end)end return G()

File diff suppressed because it is too large Load Diff

View File

@ -1,127 +1,28 @@
print("[Mercury]: Loaded corescript 36868950")
local controlFrame = script.Parent:FindFirstChild("ControlFrame")
if not controlFrame then
return
end
local New
New = function(className, name, props)
if not (props ~= nil) then
props = name
name = nil
end
local obj = Instance.new(className)
if name then
obj.Name = name
end
local parent
for k, v in pairs(props) do
if type(k) == "string" then
if k == "Parent" then
parent = v
else
obj[k] = v
end
elseif type(k) == "number" and type(v) == "userdata" then
v.Parent = obj
end
end
obj.Parent = parent
return obj
end
local bottomLeftControl = controlFrame:FindFirstChild("BottomLeftControl")
local bottomRightControl = controlFrame:FindFirstChild("BottomRightControl")
local frameTip = New("TextLabel", "ToolTip", {
Text = "",
Font = Enum.Font.ArialBold,
FontSize = Enum.FontSize.Size12,
TextColor3 = Color3.new(1, 1, 1),
BorderSizePixel = 0,
ZIndex = 10,
Size = UDim2.new(2, 0, 1, 0),
Position = UDim2.new(1, 0, 0, 0),
BackgroundColor3 = Color3.new(0, 0, 0),
BackgroundTransparency = 1,
TextTransparency = 1,
TextWrap = true,
New("BoolValue", "inside", {
Value = false
})
})
local setUpListeners
setUpListeners = function(frameToListen)
local fadeSpeed = 0.1
frameToListen.Parent.MouseEnter:connect(function()
if frameToListen:FindFirstChild("inside") then
frameToListen.inside.Value = true
wait(1.2)
if frameToListen.inside.Value then
while frameToListen.inside.Value and frameToListen.BackgroundTransparency > 0 do
frameToListen.BackgroundTransparency = frameToListen.BackgroundTransparency - fadeSpeed
frameToListen.TextTransparency = frameToListen.TextTransparency - fadeSpeed
wait()
end
end
end
end)
local killTip
killTip = function(killFrame)
killFrame.inside.Value = false
killFrame.BackgroundTransparency = 1
killFrame.TextTransparency = 1
end
frameToListen.Parent.MouseLeave:connect(function()
return killTip(frameToListen)
end)
return frameToListen.Parent.MouseButton1Click:connect(function()
return killTip(frameToListen)
end)
end
local createSettingsButtonTip
createSettingsButtonTip = function(parent)
if not (parent ~= nil) then
parent = bottomLeftControl:FindFirstChild("SettingsButton")
end
local toolTip = frameTip:clone()
toolTip.RobloxLocked = true
toolTip.Text = "Settings/Leave Game"
toolTip.Position = UDim2.new(0, 0, 0, -18)
toolTip.Size = UDim2.new(0, 120, 0, 20)
toolTip.Parent = parent
setUpListeners(toolTip)
return toolTip
end
wait(5)
local bottomLeftChildren = bottomLeftControl:GetChildren()
for i = 1, #bottomLeftChildren do
if bottomLeftChildren[i].Name == "Exit" then
do
local exitTip = frameTip:clone()
exitTip.RobloxLocked = true
exitTip.Text = "Leave Place"
exitTip.Position = UDim2.new(0, 0, -1, 0)
exitTip.Size = UDim2.new(1, 0, 1, 0)
exitTip.Parent = bottomLeftChildren[i]
setUpListeners(exitTip)
end
elseif bottomLeftChildren[i].Name == "SettingsButton" then
createSettingsButtonTip(bottomLeftChildren[i])
end
end
local bottomRightChildren = bottomRightControl:GetChildren()
for i = 1, #bottomRightChildren do
if (bottomRightChildren[i].Name:find("Camera") ~= nil) then
do
local cameraTip = frameTip:clone()
cameraTip.RobloxLocked = true
cameraTip.Text = "Camera View"
if bottomRightChildren[i].Name:find("Zoom") then
cameraTip.Position = UDim2.new(-1, 0, -1.5)
else
cameraTip.Position = UDim2.new(0, 0, -1.5, 0)
end
cameraTip.Size = UDim2.new(2, 0, 1.25, 0)
cameraTip.Parent = bottomRightChildren[i]
setUpListeners(cameraTip)
end
end
end
print'[Mercury]: Loaded corescript 36868950'local a=script.Parent:FindFirstChild
'ControlFrame'if not a then return end local b b=function(c,d,e)if not(e~=nil)
then e=d d=nil end local f=Instance.new(c)if d then f.Name=d end local g for h,i
in pairs(e)do if type(h)=='string'then if h=='Parent'then g=i else f[h]=i end
elseif type(h)=='number'and type(i)=='userdata'then i.Parent=f end end f.Parent=
g return f end local c,d,e,f=a:FindFirstChild'BottomLeftControl',a:
FindFirstChild'BottomRightControl',b('TextLabel','ToolTip',{Text='',Font=Enum.
Font.ArialBold,FontSize=Enum.FontSize.Size12,TextColor3=Color3.new(1,1,1),
BorderSizePixel=0,ZIndex=10,Size=UDim2.new(2,0,1,0),Position=UDim2.new(1,0,0,0),
BackgroundColor3=Color3.new(0,0,0),BackgroundTransparency=1,TextTransparency=1,
TextWrap=true,b('BoolValue','inside',{Value=false})}),nil f=function(g)local h=
0.1 g.Parent.MouseEnter:connect(function()if g:FindFirstChild'inside'then g.
inside.Value=true wait(1.2)if g.inside.Value then while g.inside.Value and g.
BackgroundTransparency>0 do g.BackgroundTransparency=g.BackgroundTransparency-h
g.TextTransparency=g.TextTransparency-h wait()end end end end)local i i=function
(j)j.inside.Value=false j.BackgroundTransparency=1 j.TextTransparency=1 end g.
Parent.MouseLeave:connect(function()return i(g)end)return g.Parent.
MouseButton1Click:connect(function()return i(g)end)end local g g=function(h)if
not(h~=nil)then h=c:FindFirstChild'SettingsButton'end local i=e:clone()i.
RobloxLocked=true i.Text='Settings/Leave Game'i.Position=UDim2.new(0,0,0,-18)i.
Size=UDim2.new(0,120,0,20)i.Parent=h f(i)return i end wait(5)local h=c:
GetChildren()for i=1,#h do if h[i].Name=='Exit'then do local j=e:clone()j.
RobloxLocked=true j.Text='Leave Place'j.Position=UDim2.new(0,0,-1,0)j.Size=UDim2
.new(1,0,1,0)j.Parent=h[i]f(j)end elseif h[i].Name=='SettingsButton'then g(h[i])
end end local i=d:GetChildren()for j=1,#i do if(i[j].Name:find'Camera'~=nil)then
do local k=e:clone()k.RobloxLocked=true k.Text='Camera View'if i[j].Name:find
'Zoom'then k.Position=UDim2.new(-1,0,-1.5)else k.Position=UDim2.new(0,0,-1.5,0)
end k.Size=UDim2.new(2,0,1.25,0)k.Parent=i[j]f(k)end end end

View File

@ -1,69 +1,34 @@
print("[Mercury]: Loaded corescript 37801172")
local scriptContext = game:GetService("ScriptContext")
local touchEnabled = false
pcall(function()
touchEnabled = game:GetService("UserInputService").TouchEnabled
end)
scriptContext:AddCoreScript(60595695, scriptContext, "/Libraries/LibraryRegistration/LibraryRegistration")
local waitForChild
waitForChild = function(instance, name)
while not instance:FindFirstChild(name) do
instance.ChildAdded:wait()
end
end
scriptContext = game:GetService("ScriptContext")
scriptContext:AddCoreScript(59002209, scriptContext, "CoreScripts/Sections")
waitForChild(game:GetService("CoreGui"), "RobloxGui")
local screenGui = game:GetService("CoreGui"):FindFirstChild("RobloxGui")
if not touchEnabled then
scriptContext:AddCoreScript(36868950, screenGui, "CoreScripts/ToolTip")
scriptContext:AddCoreScript(46295863, screenGui, "CoreScripts/Settings")
else
scriptContext:AddCoreScript(153556783, screenGui, "CoreScripts/TouchControls")
end
scriptContext:AddCoreScript(39250920, screenGui, "CoreScripts/MainBotChatScript")
scriptContext:AddCoreScript(48488451, screenGui, "CoreScripts/PopupScript")
scriptContext:AddCoreScript(48488398, screenGui, "CoreScripts/NotificationScript")
scriptContext:AddCoreScript(97188756, screenGui, "CoreScripts/ChatScript")
scriptContext:AddCoreScript(107893730, screenGui, "CoreScripts/PurchasePromptScript")
if not touchEnabled or screenGui.AbsoluteSize.Y > 600 then
scriptContext:AddCoreScript(48488235, screenGui, "CoreScripts/PlayerListScript")
else
delay(5, function()
if screenGui.AbsoluteSize.Y >= 600 then
return scriptContext:AddCoreScript(48488235, screenGui, "CoreScripts/PlayerListScript")
end
end)
end
if game.CoreGui.Version >= 3 and game.PlaceId ~= 130815926 then
scriptContext:AddCoreScript(53878047, screenGui, "CoreScripts/BackpackScripts/BackpackBuilder")
waitForChild(screenGui, "CurrentLoadout")
waitForChild(screenGui, "Backpack")
local Backpack = screenGui.Backpack
if game.CoreGui.Version >= 7 then
scriptContext:AddCoreScript(89449093, Backpack, "CoreScripts/BackpackScripts/BackpackManager")
end
scriptContext:AddCoreScript(89449008, Backpack, "CoreScripts/BackpackScripts/BackpackGear")
scriptContext:AddCoreScript(53878057, screenGui.CurrentLoadout, "CoreScripts/BackpackScripts/LoadoutScript")
if game.CoreGui.Version >= 8 then
scriptContext:AddCoreScript(-1, Backpack, "CoreScripts/BackpackScripts/BackpackWardrobe")
end
end
local IsPersonalServer = not not game.Workspace:FindFirstChild("PSVariable")
if IsPersonalServer then
scriptContext:AddCoreScript(64164692, game.Players.LocalPlayer, "BuildToolManager")
end
game.Workspace.ChildAdded:connect(function(nchild)
if nchild.Name == "PSVariable" and nchild:IsA("BoolValue") then
IsPersonalServer = true
return scriptContext:AddCoreScript(64164692, game.Players.LocalPlayer, "BuildToolManager")
end
end)
if touchEnabled then
scriptContext:AddCoreScript(152908679, screenGui, "CoreScripts/ContextActionTouch")
waitForChild(screenGui, "ControlFrame")
waitForChild(screenGui.ControlFrame, "BottomLeftControl")
screenGui.ControlFrame.BottomLeftControl.Visible = false
waitForChild(screenGui.ControlFrame, "TopLeftControl")
screenGui.ControlFrame.TopLeftControl.Visible = false
end
print'[Mercury]: Loaded corescript 37801172'local a,b=game:GetService
'ScriptContext',false pcall(function()b=game:GetService'UserInputService'.
TouchEnabled end)a:AddCoreScript(60595695,a,
'/Libraries/LibraryRegistration/LibraryRegistration')local c c=function(d,e)
while not d:FindFirstChild(e)do d.ChildAdded:wait()end end a=game:GetService
'ScriptContext'a:AddCoreScript(59002209,a,'CoreScripts/Sections')c(game:
GetService'CoreGui','RobloxGui')local d=game:GetService'CoreGui':FindFirstChild
'RobloxGui'if not b then a:AddCoreScript(36868950,d,'CoreScripts/ToolTip')a:
AddCoreScript(46295863,d,'CoreScripts/Settings')else a:AddCoreScript(153556783,d
,'CoreScripts/TouchControls')end a:AddCoreScript(39250920,d,
'CoreScripts/MainBotChatScript')a:AddCoreScript(48488451,d,
'CoreScripts/PopupScript')a:AddCoreScript(48488398,d,
'CoreScripts/NotificationScript')a:AddCoreScript(97188756,d,
'CoreScripts/ChatScript')a:AddCoreScript(107893730,d,
'CoreScripts/PurchasePromptScript')if not b or d.AbsoluteSize.Y>600 then a:
AddCoreScript(48488235,d,'CoreScripts/PlayerListScript')else delay(5,function()
if d.AbsoluteSize.Y>=600 then return a:AddCoreScript(48488235,d,
'CoreScripts/PlayerListScript')end end)end if game.CoreGui.Version>=3 and game.
PlaceId~=130815926 then a:AddCoreScript(53878047,d,
'CoreScripts/BackpackScripts/BackpackBuilder')c(d,'CurrentLoadout')c(d,
'Backpack')local e=d.Backpack if game.CoreGui.Version>=7 then a:AddCoreScript(
89449093,e,'CoreScripts/BackpackScripts/BackpackManager')end a:AddCoreScript(
89449008,e,'CoreScripts/BackpackScripts/BackpackGear')a:AddCoreScript(53878057,d
.CurrentLoadout,'CoreScripts/BackpackScripts/LoadoutScript')if game.CoreGui.
Version>=8 then a:AddCoreScript(-1,e,
'CoreScripts/BackpackScripts/BackpackWardrobe')end end local e=not not game.
Workspace:FindFirstChild'PSVariable'if e then a:AddCoreScript(64164692,game.
Players.LocalPlayer,'BuildToolManager')end game.Workspace.ChildAdded:connect(
function(f)if f.Name=='PSVariable'and f:IsA'BoolValue'then e=true return a:
AddCoreScript(64164692,game.Players.LocalPlayer,'BuildToolManager')end end)if b
then a:AddCoreScript(152908679,d,'CoreScripts/ContextActionTouch')c(d,
'ControlFrame')c(d.ControlFrame,'BottomLeftControl')d.ControlFrame.
BottomLeftControl.Visible=false c(d.ControlFrame,'TopLeftControl')d.ControlFrame
.TopLeftControl.Visible=false end

View File

@ -1,231 +1,50 @@
print("[Mercury]: Loaded corescript 38037565")
local New
New = function(className, name, props)
if not (props ~= nil) then
props = name
name = nil
end
local obj = Instance.new(className)
if name then
obj.Name = name
end
local parent
for k, v in pairs(props) do
if type(k) == "string" then
if k == "Parent" then
parent = v
else
obj[k] = v
end
elseif type(k) == "number" and type(v) == "userdata" then
v.Parent = obj
end
end
obj.Parent = parent
return obj
end
local damageGuiWidth = 5.0
local damageGuiHeight = 5.0
local waitForChild
waitForChild = function(parent, childName)
local child = parent:findFirstChild(childName)
if child then
return child
end
while true do
child = parent.ChildAdded:wait()
if child.Name == childName then
return child
end
end
end
local Figure = script.Parent
local Humanoid = waitForChild(Figure, "Humanoid")
local Torso = waitForChild(Figure, "Torso")
local config = Figure:FindFirstChild("PlayerStats")
local inCharTag = Instance.new("BoolValue")
inCharTag.Name = "InCharTag"
local hider = Instance.new("BoolValue")
hider.Name = "RobloxBuildTool"
if not (config ~= nil) then
config = New("Configuration", "PlayerStats", {
Parent = Figure
})
end
local myHealth = config:FindFirstChild("MaxHealth")
if not (myHealth ~= nil) then
myHealth = New("NumberValue", "MaxHealth", {
Value = 100,
Parent = config
})
end
Humanoid.MaxHealth = myHealth.Value
Humanoid.Health = myHealth.Value
local onMaxHealthChange
onMaxHealthChange = function()
Humanoid.MaxHealth = myHealth.Value
Humanoid.Health = myHealth.Value
end
myHealth.Changed:connect(onMaxHealthChange)
local vPlayer = game.Players:GetPlayerFromCharacter(script.Parent)
local dotGui = vPlayer.PlayerGui:FindFirstChild("DamageOverTimeGui")
if not (dotGui ~= nil) then
dotGui = New("BillboardGui", "DamageOverTimeGui", {
Parent = vPlayer.PlayerGui,
Adornee = script.Parent:FindFirstChild("Head"),
Active = true,
size = UDim2.new(damageGuiWidth, 0, damageGuiHeight, 0.0),
StudsOffset = Vector3.new(0, 2.0, 0.0)
})
end
print("newHealth declarations finished")
local billboardHealthChange
billboardHealthChange = function(dmg)
local textLabel = New("TextLabel", {
Text = tostring(dmg),
TextColor3 = (function()
if dmg > 0 then
return Color3.new(0, 1, 0)
else
return Color3.new(1, 0, 1)
end
end)(),
size = UDim2.new(1, 0, 1, 0.0),
Active = true,
FontSize = 6,
BackgroundTransparency = 1,
Parent = dotGui
})
for t = 1, 10 do
wait(0.1)
textLabel.TextTransparency = t / 10
textLabel.Position = UDim2.new(0, 0, 0, -t * 5)
textLabel.FontSize = 6 - t * 0.6
end
return textLabel:remove()
end
local setMaxHealth
setMaxHealth = function()
if myHealth.Value >= 0 then
Humanoid.MaxHealth = myHealth.Value
print(Humanoid.MaxHealth)
if Humanoid.Health > Humanoid.MaxHealth then
Humanoid.Health = Humanoid.MaxHealth
end
end
end
myHealth.Changed:connect(setMaxHealth)
local fireEffect = New("Fire", "FireEffect", {
Heat = 0.1,
Size = 3.0,
Enabled = false
})
while true do
local s = wait(1)
local health = Humanoid.Health
if health > 0 then
local delta = 0
if config then
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
regen.Value = Vector3.new(regen.Value.X + regen.Value.Z, regen.Value.Y - s, 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
delta = delta - poison.Value.X
if poison.Value.Y >= 0 then
poison.Value = Vector3.new(poison.Value.X + poison.Value.Z, poison.Value.Y - s, 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
delta = delta - ice.Value.X
if ice.Value.Y >= 0 then
ice.Value = Vector3.new(ice.Value.X, ice.Value.Y - s, ice.Value.Z)
else
ice:remove()
end
end
if fire then
fireEffect.Enabled = true
fireEffect.Parent = Figure.Torso
delta = delta - fire.Value.X
if fire.Value.Y >= 0 then
fire.Value = Vector3.new(fire.Value.X, fire.Value.Y - s, fire.Value.Z)
else
fire:remove()
fireEffect.Enabled = false
fireEffect.Parent = nil
end
end
if stun then
local backpackTools
if stun.Value > 0 then
Torso.Anchored = true
local currentChildren = script.Parent:GetChildren()
backpackTools = game.Players:GetPlayerFromCharacter(script.Parent).Backpack:GetChildren()
for i = 1, #currentChildren do
if currentChildren[i].className == "Tool" then
inCharTag:Clone().Parent = currentChildren[i]
print(backpackTools)
table.insert(backpackTools, currentChildren[i])
end
end
for i = 1, #backpackTools do
if not (backpackTools[i]:FindFirstChild("RobloxBuildTool") ~= nil) then
hider:Clone().Parent = backpackTools[i]
backpackTools[i].Parent = game.Lighting
end
end
wait(0.2)
for i = 1, #backpackTools do
backpackTools[i].Parent = game.Players:GetPlayerFromCharacter(script.Parent).Backpack
end
stun.Value = stun.Value - s
else
Torso.Anchored = false
for i = 1, #backpackTools do
local rbTool = backpackTools[i]:FindFirstChild("RobloxBuildTool")
if rbTool then
rbTool:Remove()
end
backpackTools[i].Parent = game.Lighting
end
wait(0.2)
for i = 1, #backpackTools do
local wasInChar = backpackTools[i]:FindFirstChild("InCharTag")
if wasInChar then
wasInChar:Remove()
backpackTools[i].Parent = script.Parent
else
backpackTools[i].Parent = game.Players:GetPlayerFromCharacter(script.Parent).Backpack
end
end
stun:Remove()
end
end
if delta ~= 0 then
coroutine.resume(coroutine.create(billboardHealthChange), delta)
end
end
health = Humanoid.Health + delta * s
if health * 1.01 < Humanoid.MaxHealth then
Humanoid.Health = health
elseif delta > 0 then
Humanoid.Health = Humanoid.MaxHealth
end
end
end
print'[Mercury]: Loaded corescript 38037565'local a a=function(b,c,d)if not(d~=
nil)then d=c c=nil end local e=Instance.new(b)if c then e.Name=c end local f for
g,h in pairs(d)do if type(g)=='string'then if g=='Parent'then f=h else e[g]=h
end elseif type(g)=='number'and type(h)=='userdata'then h.Parent=e end end e.
Parent=f return e end local b,c,d=5,5,nil d=function(e,f)local g=e:
findFirstChild(f)if g then return g end while true do g=e.ChildAdded:wait()if g.
Name==f then return g end end end local e=script.Parent local f,g,h,i=d(e,
'Humanoid'),d(e,'Torso'),e:FindFirstChild'PlayerStats',Instance.new'BoolValue'i.
Name='InCharTag'local j=Instance.new'BoolValue'j.Name='RobloxBuildTool'if not(h
~=nil)then h=a('Configuration','PlayerStats',{Parent=e})end local k=h:
FindFirstChild'MaxHealth'if not(k~=nil)then k=a('NumberValue','MaxHealth',{Value
=100,Parent=h})end f.MaxHealth=k.Value f.Health=k.Value local l l=function()f.
MaxHealth=k.Value f.Health=k.Value end k.Changed:connect(l)local m=game.Players:
GetPlayerFromCharacter(script.Parent)local n=m.PlayerGui:FindFirstChild
'DamageOverTimeGui'if not(n~=nil)then n=a('BillboardGui','DamageOverTimeGui',{
Parent=m.PlayerGui,Adornee=script.Parent:FindFirstChild'Head',Active=true,size=
UDim2.new(b,0,c,0),StudsOffset=Vector3.new(0,2,0)})end print
'newHealth declarations finished'local o o=function(p)local q=a('TextLabel',{
Text=tostring(p),TextColor3=(function()if p>0 then return Color3.new(0,1,0)else
return Color3.new(1,0,1)end end)(),size=UDim2.new(1,0,1,0),Active=true,FontSize=
6,BackgroundTransparency=1,Parent=n})for r=1,10 do wait(0.1)q.TextTransparency=r
/10 q.Position=UDim2.new(0,0,0,-r*5)q.FontSize=6-r*0.6 end return q:remove()end
local p p=function()if k.Value>=0 then f.MaxHealth=k.Value print(f.MaxHealth)if
f.Health>f.MaxHealth then f.Health=f.MaxHealth end end end k.Changed:connect(p)
local q=a('Fire','FireEffect',{Heat=0.1,Size=3,Enabled=false})while true do
local r,s=wait(1),f.Health if s>0 then local t=0 if h then local u,v,w,x,y=h:
FindFirstChild'Regen',h:FindFirstChild'Poison',h:FindFirstChild'Ice',h:
FindFirstChild'Fire',h:FindFirstChild'Stun'if u then t=t+u.Value.X if u.Value.Y
>=0 then u.Value=Vector3.new(u.Value.X+u.Value.Z,u.Value.Y-r,u.Value.Z)elseif u.
Value.Y==-1 then u.Value=Vector3.new(u.Value.X+u.Value.Z,-1,u.Value.Z)else u:
remove()end end if v then t=t-v.Value.X if v.Value.Y>=0 then v.Value=Vector3.
new(v.Value.X+v.Value.Z,v.Value.Y-r,v.Value.Z)elseif v.Value.Y==-1 then v.Value=
Vector3.new(v.Value.X+v.Value.Z,-1,v.Value.Z)else v:remove()end end if w then t=
t-w.Value.X if w.Value.Y>=0 then w.Value=Vector3.new(w.Value.X,w.Value.Y-r,w.
Value.Z)else w:remove()end end if x then q.Enabled=true q.Parent=e.Torso t=t-x.
Value.X if x.Value.Y>=0 then x.Value=Vector3.new(x.Value.X,x.Value.Y-r,x.Value.Z
)else x:remove()q.Enabled=false q.Parent=nil end end if y then local z if y.
Value>0 then g.Anchored=true local A=script.Parent:GetChildren()z=game.Players:
GetPlayerFromCharacter(script.Parent).Backpack:GetChildren()for B=1,#A do if A[B
].className=='Tool'then i:Clone().Parent=A[B]print(z)table.insert(z,A[B])end end
for B=1,#z do if not(z[B]:FindFirstChild'RobloxBuildTool'~=nil)then j:Clone().
Parent=z[B]z[B].Parent=game.Lighting end end wait(0.2)for B=1,#z do z[B].Parent=
game.Players:GetPlayerFromCharacter(script.Parent).Backpack end y.Value=y.Value-
r else g.Anchored=false for A=1,#z do local B=z[A]:FindFirstChild
'RobloxBuildTool'if B then B:Remove()end z[A].Parent=game.Lighting end wait(0.2)
for A=1,#z do local B=z[A]:FindFirstChild'InCharTag'if B then B:Remove()z[A].
Parent=script.Parent else z[A].Parent=game.Players:GetPlayerFromCharacter(script
.Parent).Backpack end end y:Remove()end end if t~=0 then coroutine.resume(
coroutine.create(o),t)end end s=f.Health+t*r if s*1.01<f.MaxHealth then f.Health
=s elseif t>0 then f.Health=f.MaxHealth end end end

View File

@ -1,542 +1,132 @@
print("[Mercury]: Loaded corescript 39250920")
local New
New = function(className, name, props)
if not (props ~= nil) then
props = name
name = nil
end
local obj = Instance.new(className)
if name then
obj.Name = name
end
local parent
for k, v in pairs(props) do
if type(k) == "string" then
if k == "Parent" then
parent = v
else
obj[k] = v
end
elseif type(k) == "number" and type(v) == "userdata" then
v.Parent = obj
end
end
obj.Parent = parent
return obj
end
local waitForProperty
waitForProperty = function(instance, name)
while not instance[name] do
instance.Changed:wait()
end
end
local waitForChild
waitForChild = function(instance, name)
while not instance:FindFirstChild(name) do
instance.ChildAdded:wait()
end
end
local mainFrame
local choices = { }
local lastChoice
local choiceMap = { }
local currentConversationDialog
local currentConversationPartner
local currentAbortDialogScript
local tooFarAwayMessage = "You are too far away to chat!"
local tooFarAwaySize = 300
local characterWanderedOffMessage = "Chat ended because you walked away"
local characterWanderedOffSize = 350
local conversationTimedOut = "Chat ended because you didn't reply"
local conversationTimedOutSize = 350
local player
local chatNotificationGui
local messageDialog
local timeoutScript
local reenableDialogScript
local dialogMap = { }
local dialogConnections = { }
local gui
waitForChild(game, "CoreGui")
waitForChild(game.CoreGui, "RobloxGui")
if game.CoreGui.RobloxGui:FindFirstChild("ControlFrame") then
gui = game.CoreGui.RobloxGui.ControlFrame
else
gui = game.CoreGui.RobloxGui
end
local currentTone
currentTone = function()
if currentConversationDialog then
return currentConversationDialog.Tone
else
return Enum.DialogTone.Neutral
end
end
local createChatNotificationGui
createChatNotificationGui = function()
chatNotificationGui = New("BillboardGui", "ChatNotificationGui", {
ExtentsOffset = Vector3.new(0, 1, 0),
Size = UDim2.new(4, 0, 5.42857122, 0),
SizeOffset = Vector2.new(0, 0),
StudsOffset = Vector3.new(0.4, 4.3, 0),
Enabled = true,
RobloxLocked = true,
Active = true,
New("ImageLabel", "Image", {
Active = false,
BackgroundTransparency = 1,
Position = UDim2.new(0, 0, 0, 0),
Size = UDim2.new(1, 0, 1, 0),
Image = "",
RobloxLocked = true,
New("ImageButton", "Button", {
AutoButtonColor = false,
Position = UDim2.new(0.088, 0, 0.053, 0),
Size = UDim2.new(0.83, 0, 0.46, 0),
Image = "",
BackgroundTransparency = 1,
RobloxLocked = true
})
})
})
end
local getChatColor
getChatColor = function(tone)
if tone == Enum.DialogTone.Neutral then
return Enum.ChatColor.Blue
elseif tone == Enum.DialogTone.Friendly then
return Enum.ChatColor.Green
elseif tone == Enum.DialogTone.Enemy then
return Enum.ChatColor.Red
end
end
local resetColor
resetColor = function(frame, tone)
if tone == Enum.DialogTone.Neutral then
frame.BackgroundColor3 = Color3.new(0, 0, 179 / 255)
frame.Number.TextColor3 = Color3.new(45 / 255, 142 / 255, 245 / 255)
elseif tone == Enum.DialogTone.Friendly then
frame.BackgroundColor3 = Color3.new(0, 77 / 255, 0)
frame.Number.TextColor3 = Color3.new(0, 190 / 255, 0)
elseif tone == Enum.DialogTone.Enemy then
frame.BackgroundColor3 = Color3.new(140 / 255, 0, 0)
frame.Number.TextColor3 = Color3.new(255 / 255, 88 / 255, 79 / 255)
end
end
local styleChoices
styleChoices = function(tone)
for _, obj in pairs(choices) do
resetColor(obj, tone)
end
return resetColor(lastChoice, tone)
end
local styleMainFrame
styleMainFrame = function(tone)
if tone == Enum.DialogTone.Neutral then
mainFrame.Style = Enum.FrameStyle.ChatBlue
mainFrame.Tail.Image = "rbxasset://textures/chatBubble_botBlue_tailRight.png"
elseif tone == Enum.DialogTone.Friendly then
mainFrame.Style = Enum.FrameStyle.ChatGreen
mainFrame.Tail.Image = "rbxasset://textures/chatBubble_botGreen_tailRight.png"
elseif tone == Enum.DialogTone.Enemy then
mainFrame.Style = Enum.FrameStyle.ChatRed
mainFrame.Tail.Image = "rbxasset://textures/chatBubble_botRed_tailRight.png"
end
return styleChoices(tone)
end
local setChatNotificationTone
setChatNotificationTone = function(gui, purpose, tone)
if tone == Enum.DialogTone.Neutral then
gui.Image.Image = "rbxasset://textures/chatBubble_botBlue_notify_bkg.png"
elseif tone == Enum.DialogTone.Friendly then
gui.Image.Image = "rbxasset://textures/chatBubble_botGreen_notify_bkg.png"
elseif tone == Enum.DialogTone.Enemy then
gui.Image.Image = "rbxasset://textures/chatBubble_botRed_notify_bkg.png"
end
if purpose == Enum.DialogPurpose.Quest then
gui.Image.Button.Image = "rbxasset://textures/chatBubble_bot_notify_bang.png"
elseif purpose == Enum.DialogPurpose.Help then
gui.Image.Button.Image = "rbxasset://textures/chatBubble_bot_notify_question.png"
elseif purpose == Enum.DialogPurpose.Shop then
gui.Image.Button.Image = "rbxasset://textures/chatBubble_bot_notify_money.png"
end
end
local createMessageDialog
createMessageDialog = function()
messageDialog = New("Frame", "DialogScriptMessage", {
Style = Enum.FrameStyle.RobloxRound,
Visible = false,
New("TextLabel", "Text", {
Position = UDim2.new(0, 0, 0, -1),
Size = UDim2.new(1, 0, 1, 0),
FontSize = Enum.FontSize.Size14,
BackgroundTransparency = 1,
TextColor3 = Color3.new(1, 1, 1),
RobloxLocked = true
})
})
end
local showMessage
showMessage = function(msg, size)
messageDialog.Text.Text = msg
messageDialog.Size = UDim2.new(0, size, 0, 40)
messageDialog.Position = UDim2.new(0.5, -size / 2, 0.5, -40)
messageDialog.Visible = true
wait(2)
messageDialog.Visible = false
return messageDialog
end
local variableDelay
variableDelay = function(str)
local length = math.min(string.len(str), 100)
return wait(0.75 + (length / 75) * 1.5)
end
local highlightColor
highlightColor = function(frame, tone)
if tone == Enum.DialogTone.Neutral then
frame.BackgroundColor3 = Color3.new(2 / 255, 108 / 255, 255 / 255)
frame.Number.TextColor3 = Color3.new(1, 1, 1)
elseif tone == Enum.DialogTone.Friendly then
frame.BackgroundColor3 = Color3.new(0, 128 / 255, 0)
frame.Number.TextColor3 = Color3.new(1, 1, 1)
elseif tone == Enum.DialogTone.Enemy then
frame.BackgroundColor3 = Color3.new(204 / 255, 0, 0)
frame.Number.TextColor3 = Color3.new(1, 1, 1)
end
end
local endDialog
endDialog = function()
if currentAbortDialogScript then
currentAbortDialogScript:Remove()
currentAbortDialogScript = nil
end
local dialog = currentConversationDialog
currentConversationDialog = nil
if dialog and dialog.InUse then
local reenableScript = reenableDialogScript:Clone()
reenableScript.archivable = false
reenableScript.Disabled = false
reenableScript.Parent = dialog
end
for dialog, gui in pairs(dialogMap) do
if dialog and gui then
gui.Enabled = not dialog.InUse
end
end
currentConversationPartner = nil
end
local wanderDialog
wanderDialog = function()
print("Wander")
mainFrame.Visible = false
endDialog()
return showMessage(characterWanderedOffMessage, characterWanderedOffSize)
end
local timeoutDialog
timeoutDialog = function()
print("Timeout")
mainFrame.Visible = false
endDialog()
return showMessage(conversationTimedOut, conversationTimedOutSize)
end
local normalEndDialog
normalEndDialog = function()
print("Done")
return endDialog()
end
local sanitizeMessage
sanitizeMessage = function(msg)
if string.len(msg) == 0 then
return "..."
else
return msg
end
end
local renewKillswitch
renewKillswitch = function(dialog)
if currentAbortDialogScript then
currentAbortDialogScript:Remove()
currentAbortDialogScript = nil
end
currentAbortDialogScript = timeoutScript:Clone()
currentAbortDialogScript.archivable = false
currentAbortDialogScript.Disabled = false
currentAbortDialogScript.Parent = dialog
return currentAbortDialogScript
end
local presentDialogChoices
presentDialogChoices = function(talkingPart, dialogChoices)
if not currentConversationDialog then
return
end
currentConversationPartner = talkingPart
local sortedDialogChoices = { }
for _, obj in pairs(dialogChoices) do
if obj:IsA("DialogChoice") then
table.insert(sortedDialogChoices, obj)
end
end
table.sort(sortedDialogChoices, function(a, b)
return a.Name < b.Name
end)
if #sortedDialogChoices == 0 then
normalEndDialog()
return
end
local pos = 1
local yPosition = 0
choiceMap = { }
for _, obj in pairs(choices) do
obj.Visible = false
end
for _, obj in pairs(sortedDialogChoices) do
if pos <= #choices then
choices[pos].Size = UDim2.new(1, 0, 0, 24 * 3)
choices[pos].UserPrompt.Text = obj.UserDialog
local height = math.ceil(choices[pos].UserPrompt.TextBounds.Y / 24) * 24
choices[pos].Position = UDim2.new(0, 0, 0, yPosition)
choices[pos].Size = UDim2.new(1, 0, 0, height)
choices[pos].Visible = true
choiceMap[choices[pos]] = obj
yPosition = yPosition + height
pos = pos + 1
end
end
lastChoice.Position = UDim2.new(0, 0, 0, yPosition)
lastChoice.Number.Text = pos .. ")"
mainFrame.Size = UDim2.new(0, 350, 0, yPosition + 24 + 32)
mainFrame.Position = UDim2.new(0, 20, 0, -mainFrame.Size.Y.Offset - 20)
styleMainFrame(currentTone())
mainFrame.Visible = true
end
local selectChoice
selectChoice = function(choice)
renewKillswitch(currentConversationDialog)
mainFrame.Visible = false
if choice == lastChoice then
game.Chat:Chat(game.Players.LocalPlayer.Character, "Goodbye!", getChatColor(currentTone()))
return normalEndDialog()
else
local dialogChoice = choiceMap[choice]
game.Chat:Chat(game.Players.LocalPlayer.Character, sanitizeMessage(dialogChoice.UserDialog), getChatColor(currentTone()))
wait(1)
currentConversationDialog:SignalDialogChoiceSelected(player, dialogChoice)
game.Chat:Chat(currentConversationPartner, sanitizeMessage(dialogChoice.ResponseDialog), getChatColor(currentTone()))
variableDelay(dialogChoice.ResponseDialog)
return presentDialogChoices(currentConversationPartner, dialogChoice:GetChildren())
end
end
local newChoice
newChoice = function(numberText)
local frame = New("TextButton", {
BackgroundColor3 = Color3.new(0, 0, 179 / 255),
AutoButtonColor = false,
BorderSizePixel = 0,
Text = "",
RobloxLocked = true,
New("TextLabel", "Number", {
TextColor3 = Color3.new(127 / 255, 212 / 255, 255 / 255),
Text = numberText,
FontSize = Enum.FontSize.Size14,
BackgroundTransparency = 1,
Position = UDim2.new(0, 4, 0, 2),
Size = UDim2.new(0, 20, 0, 24),
TextXAlignment = Enum.TextXAlignment.Left,
TextYAlignment = Enum.TextYAlignment.Top,
RobloxLocked = true
}),
New("TextLabel", "UserPrompt", {
BackgroundTransparency = 1,
TextColor3 = Color3.new(1, 1, 1),
FontSize = Enum.FontSize.Size14,
Position = UDim2.new(0, 28, 0, 2),
Size = UDim2.new(1, -32, 1, -4),
TextXAlignment = Enum.TextXAlignment.Left,
TextYAlignment = Enum.TextYAlignment.Top,
TextWrap = true,
RobloxLocked = true
})
})
frame.MouseEnter:connect(function()
return highlightColor(frame, currentTone())
end)
frame.MouseLeave:connect(function()
return resetColor(frame, currentTone())
end)
frame.MouseButton1Click:connect(function()
return selectChoice(frame)
end)
return frame
end
local initialize
initialize = function(parent)
choices[1] = newChoice("1)")
choices[2] = newChoice("2)")
choices[3] = newChoice("3)")
choices[4] = newChoice("4)")
lastChoice = newChoice("5)")
lastChoice.UserPrompt.Text = "Goodbye!"
lastChoice.Size = UDim2.new(1, 0, 0, 28)
mainFrame = New("Frame", "UserDialogArea", {
Size = UDim2.new(0, 350, 0, 200),
Style = Enum.FrameStyle.ChatBlue,
Visible = false,
New("ImageLabel", "Tail", {
Size = UDim2.new(0, 62, 0, 53),
Position = UDim2.new(1, 8, 0.25),
Image = "rbxasset://textures/chatBubble_botBlue_tailRight.png",
BackgroundTransparency = 1,
RobloxLocked = true
})
})
for _, obj in pairs(choices) do
obj.RobloxLocked = true
obj.Parent = mainFrame
lastChoice.RobloxLocked = true
end
lastChoice.Parent = mainFrame
mainFrame.RobloxLocked = true
mainFrame.Parent = parent
end
local doDialog
doDialog = function(dialog)
while not Instance.Lock(dialog, player) do
wait()
end
if dialog.InUse then
Instance.Unlock(dialog)
return
else
dialog.InUse = true
Instance.Unlock(dialog)
end
currentConversationDialog = dialog
game.Chat:Chat(dialog.Parent, dialog.InitialPrompt, getChatColor(dialog.Tone))
variableDelay(dialog.InitialPrompt)
return presentDialogChoices(dialog.Parent, dialog:GetChildren())
end
local checkForLeaveArea
checkForLeaveArea = function()
while currentConversationDialog do
if currentConversationDialog.Parent and (player:DistanceFromCharacter(currentConversationDialog.Parent.Position >= currentConversationDialog.ConversationDistance)) then
wanderDialog()
end
wait(1)
end
end
local startDialog
startDialog = function(dialog)
if dialog.Parent and dialog.Parent:IsA("BasePart") then
if player:DistanceFromCharacter(dialog.Parent.Position) >= dialog.ConversationDistance then
showMessage(tooFarAwayMessage, tooFarAwaySize)
return
end
for dialog, gui in pairs(dialogMap) do
if dialog and gui then
gui.Enabled = false
end
end
renewKillswitch(dialog)
delay(1, checkForLeaveArea)
return doDialog(dialog)
end
end
local removeDialog
removeDialog = function(dialog)
if dialogMap[dialog] then
dialogMap[dialog]:Remove()
dialogMap[dialog] = nil
end
if dialogConnections[dialog] then
dialogConnections[dialog]:disconnect()
dialogConnections[dialog] = nil
end
end
local addDialog
addDialog = function(dialog)
if dialog.Parent then
if dialog.Parent:IsA("BasePart") then
local chatGui = chatNotificationGui:clone()
chatGui.Enabled = not dialog.InUse
chatGui.Adornee = dialog.Parent
chatGui.RobloxLocked = true
chatGui.Parent = game.CoreGui
chatGui.Image.Button.MouseButton1Click:connect(function()
return startDialog(dialog)
end)
setChatNotificationTone(chatGui, dialog.Purpose, dialog.Tone)
dialogMap[dialog] = chatGui
dialogConnections[dialog] = dialog.Changed:connect(function(prop)
if prop == "Parent" and dialog.Parent then
removeDialog(dialog)
return addDialog(dialog)
elseif prop == "InUse" then
chatGui.Enabled = not currentConversationDialog and not dialog.InUse
if dialog == currentConversationDialog then
return timeoutDialog()
end
elseif prop == "Tone" or prop == "Purpose" then
return setChatNotificationTone(chatGui, dialog.Purpose, dialog.Tone)
end
end)
else
dialogConnections[dialog] = dialog.Changed:connect(function(prop)
if prop == "Parent" and dialog.Parent then
removeDialog(dialog)
return addDialog(dialog)
end
end)
end
end
end
local fetchScripts
fetchScripts = function()
local model = game:GetService("InsertService"):LoadAsset(39226062)
if type(model) == "string" then
wait(0.1)
model = game:GetService("InsertService"):LoadAsset(39226062)
end
if type(model) == "string" then
return
end
waitForChild(model, "TimeoutScript")
timeoutScript = model.TimeoutScript
waitForChild(model, "ReenableDialogScript")
reenableDialogScript = model.ReenableDialogScript
end
local onLoad
onLoad = function()
waitForProperty(game.Players, "LocalPlayer")
player = game.Players.LocalPlayer
waitForProperty(player, "Character")
fetchScripts()
createChatNotificationGui()
createMessageDialog()
messageDialog.RobloxLocked = true
messageDialog.Parent = gui
waitForChild(gui, "BottomLeftControl")
local frame = New("Frame", "DialogFrame", {
Position = UDim2.new(0, 0, 0, 0),
Size = UDim2.new(0, 0, 0, 0),
BackgroundTransparency = 1,
RobloxLocked = true,
Parent = gui.BottomLeftControl
})
initialize(frame)
game.CollectionService.ItemAdded:connect(function(obj)
if obj:IsA("Dialog") then
return addDialog(obj)
end
end)
game.CollectionService.ItemRemoved:connect(function(obj)
if obj:IsA("Dialog") then
return removeDialog(obj)
end
end)
for _, obj in pairs(game.CollectionService:GetCollection("Dialog")) do
if obj:IsA("Dialog") then
addDialog(obj)
end
end
end
return onLoad()
print'[Mercury]: Loaded corescript 39250920'local a a=function(b,c,d)if not(d~=
nil)then d=c c=nil end local e=Instance.new(b)if c then e.Name=c end local f for
g,h in pairs(d)do if type(g)=='string'then if g=='Parent'then f=h else e[g]=h
end elseif type(g)=='number'and type(h)=='userdata'then h.Parent=e end end e.
Parent=f return e end local b b=function(c,d)while not c[d]do c.Changed:wait()
end end local c c=function(d,e)while not d:FindFirstChild(e)do d.ChildAdded:
wait()end end local d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x=nil,{},nil,{},nil,
nil,nil,'You are too far away to chat!',300,'Chat ended because you walked away'
,350,"Chat ended because you didn't reply",350,nil,nil,nil,nil,nil,{},{},nil c(
game,'CoreGui')c(game.CoreGui,'RobloxGui')if game.CoreGui.RobloxGui:
FindFirstChild'ControlFrame'then x=game.CoreGui.RobloxGui.ControlFrame else x=
game.CoreGui.RobloxGui end local y y=function()if h then return h.Tone else
return Enum.DialogTone.Neutral end end local z z=function()r=a('BillboardGui',
'ChatNotificationGui',{ExtentsOffset=Vector3.new(0,1,0),Size=UDim2.new(4,0,
5.42857122,0),SizeOffset=Vector2.new(0,0),StudsOffset=Vector3.new(0.4,4.3,0),
Enabled=true,RobloxLocked=true,Active=true,a('ImageLabel','Image',{Active=false,
BackgroundTransparency=1,Position=UDim2.new(0,0,0,0),Size=UDim2.new(1,0,1,0),
Image='',RobloxLocked=true,a('ImageButton','Button',{AutoButtonColor=false,
Position=UDim2.new(0.088,0,0.053,0),Size=UDim2.new(0.83,0,0.46,0),Image='',
BackgroundTransparency=1,RobloxLocked=true})})})end local A A=function(B)if B==
Enum.DialogTone.Neutral then return Enum.ChatColor.Blue elseif B==Enum.
DialogTone.Friendly then return Enum.ChatColor.Green elseif B==Enum.DialogTone.
Enemy then return Enum.ChatColor.Red end end local B B=function(C,D)if D==Enum.
DialogTone.Neutral then C.BackgroundColor3=Color3.new(0,0,0.7019607843137254)C.
Number.TextColor3=Color3.new(0.17647058823529413,0.5568627450980392,
0.9607843137254902)elseif D==Enum.DialogTone.Friendly then C.BackgroundColor3=
Color3.new(0,0.30196078431372547,0)C.Number.TextColor3=Color3.new(0,
0.7450980392156863,0)elseif D==Enum.DialogTone.Enemy then C.BackgroundColor3=
Color3.new(0.5490196078431373,0,0)C.Number.TextColor3=Color3.new(1,
0.34509803921568627,0.30980392156862746)end end local C C=function(D)for E,F in
pairs(e)do B(F,D)end return B(f,D)end local D D=function(E)if E==Enum.DialogTone
.Neutral then d.Style=Enum.FrameStyle.ChatBlue d.Tail.Image=
'rbxasset://textures/chatBubble_botBlue_tailRight.png'elseif E==Enum.DialogTone.
Friendly then d.Style=Enum.FrameStyle.ChatGreen d.Tail.Image=
'rbxasset://textures/chatBubble_botGreen_tailRight.png'elseif E==Enum.DialogTone
.Enemy then d.Style=Enum.FrameStyle.ChatRed d.Tail.Image=
'rbxasset://textures/chatBubble_botRed_tailRight.png'end return C(E)end local E
E=function(F,G,H)if H==Enum.DialogTone.Neutral then F.Image.Image=
'rbxasset://textures/chatBubble_botBlue_notify_bkg.png'elseif H==Enum.DialogTone
.Friendly then F.Image.Image=
'rbxasset://textures/chatBubble_botGreen_notify_bkg.png'elseif H==Enum.
DialogTone.Enemy then F.Image.Image=
'rbxasset://textures/chatBubble_botRed_notify_bkg.png'end if G==Enum.
DialogPurpose.Quest then F.Image.Button.Image=
'rbxasset://textures/chatBubble_bot_notify_bang.png'elseif G==Enum.DialogPurpose
.Help then F.Image.Button.Image=
'rbxasset://textures/chatBubble_bot_notify_question.png'elseif G==Enum.
DialogPurpose.Shop then F.Image.Button.Image=
'rbxasset://textures/chatBubble_bot_notify_money.png'end end local F F=function(
)s=a('Frame','DialogScriptMessage',{Style=Enum.FrameStyle.RobloxRound,Visible=
false,a('TextLabel','Text',{Position=UDim2.new(0,0,0,-1),Size=UDim2.new(1,0,1,0)
,FontSize=Enum.FontSize.Size14,BackgroundTransparency=1,TextColor3=Color3.new(1,
1,1),RobloxLocked=true})})end local G G=function(H,I)s.Text.Text=H s.Size=UDim2.
new(0,I,0,40)s.Position=UDim2.new(0.5,-I/2,0.5,-40)s.Visible=true wait(2)s.
Visible=false return s end local H H=function(I)local J=math.min(string.len(I),
100)return wait(0.75+(J/75)*1.5)end local I I=function(J,K)if K==Enum.DialogTone
.Neutral then J.BackgroundColor3=Color3.new(7.8431372549019605E-3,
0.4235294117647059,1)J.Number.TextColor3=Color3.new(1,1,1)elseif K==Enum.
DialogTone.Friendly then J.BackgroundColor3=Color3.new(0,0.5019607843137255,0)J.
Number.TextColor3=Color3.new(1,1,1)elseif K==Enum.DialogTone.Enemy then J.
BackgroundColor3=Color3.new(0.8,0,0)J.Number.TextColor3=Color3.new(1,1,1)end end
local J J=function()if j then j:Remove()j=nil end local K=h h=nil if K and K.
InUse then local L=u:Clone()L.archivable=false L.Disabled=false L.Parent=K end
for L,M in pairs(v)do if L and M then M.Enabled=not L.InUse end end i=nil end
local L L=function()print'Wander'd.Visible=false J()return G(m,n)end local M M=
function()print'Timeout'd.Visible=false J()return G(o,p)end local N N=function()
print'Done'return J()end local O O=function(P)if string.len(P)==0 then return
'...'else return P end end local P P=function(Q)if j then j:Remove()j=nil end j=
t:Clone()j.archivable=false j.Disabled=false j.Parent=Q return j end local Q Q=
function(R,S)if not h then return end i=R local T={}for U,V in pairs(S)do if V:
IsA'DialogChoice'then table.insert(T,V)end end table.sort(T,function(W,X)return
W.Name<X.Name end)if#T==0 then N()return end local W,X=1,0 g={}for Y,Z in pairs(
e)do Z.Visible=false end for _,aa in pairs(T)do if W<=#e then e[W].Size=UDim2.
new(1,0,0,72)e[W].UserPrompt.Text=aa.UserDialog local ab=math.ceil(e[W].
UserPrompt.TextBounds.Y/24)*24 e[W].Position=UDim2.new(0,0,0,X)e[W].Size=UDim2.
new(1,0,0,ab)e[W].Visible=true g[e[W]]=aa X=X+ab W=W+1 end end f.Position=UDim2.
new(0,0,0,X)f.Number.Text=W..')'d.Size=UDim2.new(0,350,0,X+24+32)d.Position=
UDim2.new(0,20,0,-d.Size.Y.Offset-20)D(y())d.Visible=true end local aa aa=
function(ab)P(h)d.Visible=false if ab==f then game.Chat:Chat(game.Players.
LocalPlayer.Character,'Goodbye!',A(y()))return N()else local R=g[ab]game.Chat:
Chat(game.Players.LocalPlayer.Character,O(R.UserDialog),A(y()))wait(1)h:
SignalDialogChoiceSelected(q,R)game.Chat:Chat(i,O(R.ResponseDialog),A(y()))H(R.
ResponseDialog)return Q(i,R:GetChildren())end end local ab ab=function(R)local S
=a('TextButton',{BackgroundColor3=Color3.new(0,0,0.7019607843137254),
AutoButtonColor=false,BorderSizePixel=0,Text='',RobloxLocked=true,a('TextLabel',
'Number',{TextColor3=Color3.new(0.4980392156862745,0.8313725490196079,1),Text=R,
FontSize=Enum.FontSize.Size14,BackgroundTransparency=1,Position=UDim2.new(0,4,0,
2),Size=UDim2.new(0,20,0,24),TextXAlignment=Enum.TextXAlignment.Left,
TextYAlignment=Enum.TextYAlignment.Top,RobloxLocked=true}),a('TextLabel',
'UserPrompt',{BackgroundTransparency=1,TextColor3=Color3.new(1,1,1),FontSize=
Enum.FontSize.Size14,Position=UDim2.new(0,28,0,2),Size=UDim2.new(1,-32,1,-4),
TextXAlignment=Enum.TextXAlignment.Left,TextYAlignment=Enum.TextYAlignment.Top,
TextWrap=true,RobloxLocked=true})})S.MouseEnter:connect(function()return I(S,y()
)end)S.MouseLeave:connect(function()return B(S,y())end)S.MouseButton1Click:
connect(function()return aa(S)end)return S end local R R=function(S)e[1]=ab'1)'e
[2]=ab'2)'e[3]=ab'3)'e[4]=ab'4)'f=ab'5)'f.UserPrompt.Text='Goodbye!'f.Size=UDim2
.new(1,0,0,28)d=a('Frame','UserDialogArea',{Size=UDim2.new(0,350,0,200),Style=
Enum.FrameStyle.ChatBlue,Visible=false,a('ImageLabel','Tail',{Size=UDim2.new(0,
62,0,53),Position=UDim2.new(1,8,0.25),Image=
'rbxasset://textures/chatBubble_botBlue_tailRight.png',BackgroundTransparency=1,
RobloxLocked=true})})for T,W in pairs(e)do W.RobloxLocked=true W.Parent=d f.
RobloxLocked=true end f.Parent=d d.RobloxLocked=true d.Parent=S end local S S=
function(T)while not Instance.Lock(T,q)do wait()end if T.InUse then Instance.
Unlock(T)return else T.InUse=true Instance.Unlock(T)end h=T game.Chat:Chat(T.
Parent,T.InitialPrompt,A(T.Tone))H(T.InitialPrompt)return Q(T.Parent,T:
GetChildren())end local T T=function()while h do if h.Parent and(q:
DistanceFromCharacter(h.Parent.Position>=h.ConversationDistance))then L()end
wait(1)end end local W W=function(X)if X.Parent and X.Parent:IsA'BasePart'then
if q:DistanceFromCharacter(X.Parent.Position)>=X.ConversationDistance then G(k,l
)return end for _,ac in pairs(v)do if _ and ac then ac.Enabled=false end end P(_
)delay(1,T)return S(_)end end local ac ac=function(X)if v[X]then v[X]:Remove()v[
X]=nil end if w[X]then w[X]:disconnect()w[X]=nil end end local X X=function(_)if
_.Parent then if _.Parent:IsA'BasePart'then local ad=r:clone()ad.Enabled=not _.
InUse ad.Adornee=_.Parent ad.RobloxLocked=true ad.Parent=game.CoreGui ad.Image.
Button.MouseButton1Click:connect(function()return W(_)end)E(ad,_.Purpose,_.Tone)
v[_]=ad w[_]=_.Changed:connect(function(ae)if ae=='Parent'and _.Parent then ac(_
)return X(_)elseif ae=='InUse'then ad.Enabled=not h and not _.InUse if _==h then
return M()end elseif ae=='Tone'or ae=='Purpose'then return E(ad,_.Purpose,_.Tone
)end end)else w[_]=_.Changed:connect(function(ad)if ad=='Parent'and _.Parent
then ac(_)return X(_)end end)end end end local ad ad=function()local ae=game:
GetService'InsertService':LoadAsset(39226062)if type(ae)=='string'then wait(0.1)
ae=game:GetService'InsertService':LoadAsset(39226062)end if type(ae)=='string'
then return end c(ae,'TimeoutScript')t=ae.TimeoutScript c(ae,
'ReenableDialogScript')u=ae.ReenableDialogScript end local ae ae=function()b(
game.Players,'LocalPlayer')q=game.Players.LocalPlayer b(q,'Character')ad()z()F()
s.RobloxLocked=true s.Parent=x c(x,'BottomLeftControl')local _=a('Frame',
'DialogFrame',{Position=UDim2.new(0,0,0,0),Size=UDim2.new(0,0,0,0),
BackgroundTransparency=1,RobloxLocked=true,Parent=x.BottomLeftControl})R(_)game.
CollectionService.ItemAdded:connect(function(af)if af:IsA'Dialog'then return X(
af)end end)game.CollectionService.ItemRemoved:connect(function(af)if af:IsA
'Dialog'then return ac(af)end end)for af,ag in pairs(game.CollectionService:
GetCollection'Dialog')do if ag:IsA'Dialog'then X(ag)end end end return ae()

File diff suppressed because it is too large Load Diff

View File

@ -1,16 +1,6 @@
print("[Mercury]: Loaded corescript 45374389")
local t = { }
t.Foo = function()
return print("foo")
end
t.Bar = function()
return print("bar")
end
t.Help = function(funcNameOrFunc)
if "Foo" == funcNameOrFunc or t.Foo == funcNameOrFunc then
return "Function Foo. Arguments: None. Side effect: prints foo"
elseif "Bar" == funcNameOrFunc or t.Bar == funcNameOrFunc then
return "Function Bar. Arguments: None. Side effect: prints bar"
end
end
return t
print'[Mercury]: Loaded corescript 45374389'local a={}a.Foo=function()return
print'foo'end a.Bar=function()return print'bar'end a.Help=function(b)if'Foo'==b
or a.Foo==b then return
'Function Foo. Arguments: None. Side effect: prints foo'elseif'Bar'==b or a.
Bar==b then return'Function Bar. Arguments: None. Side effect: prints bar'end
end return a

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,235 +1,85 @@
print("[Mercury]: Loaded corescript 48488398")
local waitForProperty
waitForProperty = function(instance, property)
while not instance[property] do
instance.Changed:wait()
end
end
local waitForChild
waitForChild = function(instance, name)
while not instance:FindFirstChild(name) do
instance.ChildAdded:wait()
end
end
waitForProperty(game.Players, "LocalPlayer")
waitForChild(script.Parent, "Popup")
waitForChild(script.Parent.Popup, "AcceptButton")
script.Parent.Popup.AcceptButton.Modal = true
local localPlayer = game.Players.LocalPlayer
local teleportUI
local friendRequestBlacklist = { }
local teleportEnabled = true
local showOneButton
showOneButton = function()
local popup = script.Parent:FindFirstChild("Popup")
if popup then
popup.OKButton.Visible = true
popup.DeclineButton.Visible = false
popup.AcceptButton.Visible = false
end
return popup
end
local showTwoButtons
showTwoButtons = function()
local popup = script.Parent:FindFirstChild("Popup")
if popup then
popup.OKButton.Visible = false
popup.DeclineButton.Visible = true
popup.AcceptButton.Visible = true
end
return popup
end
local makePopupInvisible
makePopupInvisible = function()
if script.Parent.Popup then
script.Parent.Popup.Visible = false
end
end
local makeFriend
makeFriend = function(fromPlayer, toPlayer)
local popup = script.Parent:FindFirstChild("Popup")
if not (popup ~= nil) then
return
end
if popup.Visible then
return
end
if friendRequestBlacklist[fromPlayer] then
return
end
popup.PopupText.Text = "Accept Friend Request from " .. tostring(fromPlayer.Name) .. "?"
popup.PopupImage.Image = "http://www.roblox.com/thumbs/avatar.ashx?userId=" .. tostring(fromPlayer.userId) .. "&x=352&y=352"
showTwoButtons()
popup.Visible = true
popup.AcceptButton.Text = "Accept"
popup.DeclineButton.Text = "Decline"
popup:TweenSize(UDim2.new(0, 330, 0, 350), Enum.EasingDirection.Out, Enum.EasingStyle.Quart, 1, true)
local yesCon, noCon
yesCon = popup.AcceptButton.MouseButton1Click:connect(function()
popup.Visible = false
toPlayer:RequestFriendship(fromPlayer)
if yesCon ~= nil then
yesCon:disconnect()
end
if noCon ~= nil then
noCon:disconnect()
end
return popup:TweenSize(UDim2.new(0, 0, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quart, 1, true, makePopupInvisible())
end)
noCon = popup.DeclineButton.MouseButton1Click:connect(function()
popup.Visible = false
toPlayer:RevokeFriendship(fromPlayer)
friendRequestBlacklist[fromPlayer] = true
print("pop up blacklist")
if yesCon ~= nil then
yesCon:disconnect()
end
if noCon ~= nil then
noCon:disconnect()
end
return popup:TweenSize(UDim2.new(0, 0, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quart, 1, true, makePopupInvisible())
end)
end
game.Players.FriendRequestEvent:connect(function(fromPlayer, toPlayer, event)
if fromPlayer ~= localPlayer and toPlayer ~= localPlayer then
return
end
if fromPlayer == localPlayer then
if event == Enum.FriendRequestEvent.Accept then
return game:GetService("GuiService"):SendNotification("You are Friends", "With " .. tostring(toPlayer.Name) .. "!", "http://www.roblox.com/thumbs/avatar.ashx?userId=" .. tostring(toPlayer.userId) .. "&x=48&y=48", 5, function() end)
end
elseif toPlayer == localPlayer then
if event == Enum.FriendRequestEvent.Issue then
if friendRequestBlacklist[fromPlayer] then
return
end
return game:GetService("GuiService"):SendNotification("Friend Request", "From " .. tostring(fromPlayer.Name), "http://www.roblox.com/thumbs/avatar.ashx?userId=" .. tostring(fromPlayer.userId) .. "&x=48&y=48", 8, function()
return makeFriend(fromPlayer, toPlayer)
end)
elseif event == Enum.FriendRequestEvent.Accept then
return game:GetService("GuiService"):SendNotification("You are Friends", "With " .. tostring(fromPlayer.Name) .. "!", "http://www.roblox.com/thumbs/avatar.ashx?userId=" .. tostring(fromPlayer.userId) .. "&x=48&y=48", 5, function() end)
end
end
end)
local showTeleportUI
showTeleportUI = function(message, timer)
if teleportUI ~= nil then
teleportUI:Remove()
end
waitForChild(localPlayer, "PlayerGui")
local _with_0 = Instance.new("Message")
_with_0.Text = message
_with_0.Parent = localPlayer.PlayerGui
if timer > 0 then
wait(timer)
_with_0:Remove()
end
return _with_0
end
local onTeleport
onTeleport = function(teleportState, _, _)
if game:GetService("TeleportService").CustomizedTeleportUI == false then
return showTeleportUI((function()
if Enum.TeleportState.Started == teleportState then
return "Teleport started...", 0
elseif Enum.TeleportState.WaitingForServer == teleportState then
return "Requesting server...", 0
elseif Enum.TeleportState.InProgress == teleportState then
return "Teleporting...", 0
elseif Enum.TeleportState.Failed == teleportState then
return "Teleport failed. Insufficient privileges or target place does not exist.", 3
end
end)())
end
end
if teleportEnabled then
localPlayer.OnTeleport:connect(onTeleport)
game:GetService("TeleportService").ErrorCallback = function(message)
local popup = script.Parent:FindFirstChild("Popup")
showOneButton()
popup.PopupText.Text = message
local clickCon
clickCon = popup.OKButton.MouseButton1Click:connect(function()
game:GetService("TeleportService"):TeleportCancel()
if clickCon then
clickCon:disconnect()
end
game.GuiService:RemoveCenterDialog(script.Parent:FindFirstChild("Popup"))
return popup:TweenSize(UDim2.new(0, 0, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quart, 1, true, makePopupInvisible())
end)
return game.GuiService:AddCenterDialog(script.Parent:FindFirstChild("Popup", Enum.CenterDialogType.QuitDialog), function()
showOneButton()
script.Parent:FindFirstChild("Popup").Visible = true
return popup:TweenSize(UDim2.new(0, 330, 0, 350), Enum.EasingDirection.Out, Enum.EasingStyle.Quart, 1, true)
end, function()
return popup:TweenSize(UDim2.new(0, 0, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quart, 1, true, makePopupInvisible())
end)
end
game:GetService("TeleportService").ConfirmationCallback = function(message, placeId, spawnName)
local popup = script.Parent:FindFirstChild("Popup")
popup.PopupText.Text = message
popup.PopupImage.Image = ""
local yesCon, noCon
local killCons
killCons = function()
if yesCon ~= nil then
yesCon:disconnect()
end
if noCon ~= nil then
noCon:disconnect()
end
game.GuiService:RemoveCenterDialog(script.Parent:FindFirstChild("Popup"))
return popup:TweenSize(UDim2.new(0, 0, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quart, 1, true, makePopupInvisible())
end
yesCon = popup.AcceptButton.MouseButton1Click:connect(function()
killCons()
local success, err
success, err = pcall(function()
return game:GetService("TeleportService"):TeleportImpl(placeId, spawnName)
end)
if not success then
showOneButton()
popup.PopupText.Text = err
local clickCon
clickCon = popup.OKButton.MouseButton1Click:connect(function()
if clickCon ~= nil then
clickCon:disconnect()
end
game.GuiService:RemoveCenterDialog(script.Parent:FindFirstChild("Popup"))
return popup:TweenSize(UDim2.new(0, 0, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quart, 1, true, makePopupInvisible())
end)
return game.GuiService:AddCenterDialog(script.Parent:FindFirstChild("Popup", Enum.CenterDialogType.QuitDialog), function()
showOneButton()
script.Parent:FindFirstChild("Popup").Visible = true
return popup:TweenSize(UDim2.new(0, 330, 0, 350), Enum.EasingDirection.Out, Enum.EasingStyle.Quart, 1, true)
end, function()
return popup:TweenSize(UDim2.new(0, 0, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quart, 1, true, makePopupInvisible())
end)
end
end)
noCon = popup.DeclineButton.MouseButton1Click:connect(function()
killCons()
return pcall(function()
return game:GetService("TeleportService"):TeleportCancel()
end)
end)
local centerDialogSuccess = pcall(function()
return game.GuiService:AddCenterDialog(script.Parent:FindFirstChild("Popup", Enum.CenterDialogType.QuitDialog), function()
showTwoButtons()
popup.AcceptButton.Text = "Leave"
popup.DeclineButton.Text = "Stay"
script.Parent:FindFirstChild("Popup").Visible = true
return popup:TweenSize(UDim2.new(0, 330, 0, 350), Enum.EasingDirection.Out, Enum.EasingStyle.Quart, 1, true)
end, function()
return popup:TweenSize(UDim2.new(0, 0, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quart, 1, true, makePopupInvisible())
end)
end)
if centerDialogSuccess == false then
script.Parent:FindFirstChild("Popup").Visible = true
popup.AcceptButton.Text = "Leave"
popup.DeclineButton.Text = "Stay"
popup:TweenSize(UDim2.new(0, 330, 0, 350), Enum.EasingDirection.Out, Enum.EasingStyle.Quart, 1, true)
end
return true
end
end
print'[Mercury]: Loaded corescript 48488398'local a a=function(b,c)while not b[c
]do b.Changed:wait()end end local b b=function(c,d)while not c:FindFirstChild(d)
do c.ChildAdded:wait()end end a(game.Players,'LocalPlayer')b(script.Parent,
'Popup')b(script.Parent.Popup,'AcceptButton')script.Parent.Popup.AcceptButton.
Modal=true local c,d,e,f,g=game.Players.LocalPlayer,nil,{},true,nil g=function()
local h=script.Parent:FindFirstChild'Popup'if h then h.OKButton.Visible=true h.
DeclineButton.Visible=false h.AcceptButton.Visible=false end return h end local
h h=function()local i=script.Parent:FindFirstChild'Popup'if i then i.OKButton.
Visible=false i.DeclineButton.Visible=true i.AcceptButton.Visible=true end
return i end local i i=function()if script.Parent.Popup then script.Parent.Popup
.Visible=false end end local j j=function(k,l)local m=script.Parent:
FindFirstChild'Popup'if not(m~=nil)then return end if m.Visible then return end
if e[k]then return end m.PopupText.Text='Accept Friend Request from '..tostring(
k.Name)..'?'m.PopupImage.Image=
'http://www.roblox.com/thumbs/avatar.ashx?userId='..tostring(k.userId)..
'&x=352&y=352'h()m.Visible=true m.AcceptButton.Text='Accept'm.DeclineButton.Text
='Decline'm:TweenSize(UDim2.new(0,330,0,350),Enum.EasingDirection.Out,Enum.
EasingStyle.Quart,1,true)local n,o n=m.AcceptButton.MouseButton1Click:connect(
function()m.Visible=false l:RequestFriendship(k)if n~=nil then n:disconnect()end
if o~=nil then o:disconnect()end return m:TweenSize(UDim2.new(0,0,0,0),Enum.
EasingDirection.Out,Enum.EasingStyle.Quart,1,true,i())end)o=m.DeclineButton.
MouseButton1Click:connect(function()m.Visible=false l:RevokeFriendship(k)e[k]=
true print'pop up blacklist'if n~=nil then n:disconnect()end if o~=nil then o:
disconnect()end return m:TweenSize(UDim2.new(0,0,0,0),Enum.EasingDirection.Out,
Enum.EasingStyle.Quart,1,true,i())end)end game.Players.FriendRequestEvent:
connect(function(k,l,m)if k~=c and l~=c then return end if k==c then if m==Enum.
FriendRequestEvent.Accept then return game:GetService'GuiService':
SendNotification('You are Friends','With '..tostring(l.Name)..'!',
'http://www.roblox.com/thumbs/avatar.ashx?userId='..tostring(l.userId)..
'&x=48&y=48',5,function()end)end elseif l==c then if m==Enum.FriendRequestEvent.
Issue then if e[k]then return end return game:GetService'GuiService':
SendNotification('Friend Request','From '..tostring(k.Name),
'http://www.roblox.com/thumbs/avatar.ashx?userId='..tostring(k.userId)..
'&x=48&y=48',8,function()return j(k,l)end)elseif m==Enum.FriendRequestEvent.
Accept then return game:GetService'GuiService':SendNotification(
'You are Friends','With '..tostring(k.Name)..'!',
'http://www.roblox.com/thumbs/avatar.ashx?userId='..tostring(k.userId)..
'&x=48&y=48',5,function()end)end end end)local k k=function(l,m)if d~=nil then d
:Remove()end b(c,'PlayerGui')local n=Instance.new'Message'n.Text=l n.Parent=c.
PlayerGui if m>0 then wait(m)n:Remove()end return n end local l l=function(m,n,o
)if game:GetService'TeleportService'.CustomizedTeleportUI==false then return k((
function()if Enum.TeleportState.Started==m then return'Teleport started...',0
elseif Enum.TeleportState.WaitingForServer==m then return'Requesting server...',
0 elseif Enum.TeleportState.InProgress==m then return'Teleporting...',0 elseif
Enum.TeleportState.Failed==m then return
[[Teleport failed. Insufficient privileges or target place does not exist.]],3
end end)())end end if f then c.OnTeleport:connect(l)game:GetService
'TeleportService'.ErrorCallback=function(m)local o=script.Parent:FindFirstChild
'Popup'g()o.PopupText.Text=m local p p=o.OKButton.MouseButton1Click:connect(
function()game:GetService'TeleportService':TeleportCancel()if p then p:
disconnect()end game.GuiService:RemoveCenterDialog(script.Parent:FindFirstChild
'Popup')return o:TweenSize(UDim2.new(0,0,0,0),Enum.EasingDirection.Out,Enum.
EasingStyle.Quart,1,true,i())end)return game.GuiService:AddCenterDialog(script.
Parent:FindFirstChild('Popup',Enum.CenterDialogType.QuitDialog),function()g()
script.Parent:FindFirstChild'Popup'.Visible=true return o:TweenSize(UDim2.new(0,
330,0,350),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,1,true)end,function()
return o:TweenSize(UDim2.new(0,0,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.
Quart,1,true,i())end)end game:GetService'TeleportService'.ConfirmationCallback=
function(m,o,p)local q=script.Parent:FindFirstChild'Popup'q.PopupText.Text=m q.
PopupImage.Image=''local r,s,t t=function()if r~=nil then r:disconnect()end if s
~=nil then s:disconnect()end game.GuiService:RemoveCenterDialog(script.Parent:
FindFirstChild'Popup')return q:TweenSize(UDim2.new(0,0,0,0),Enum.EasingDirection
.Out,Enum.EasingStyle.Quart,1,true,i())end r=q.AcceptButton.MouseButton1Click:
connect(function()t()local u,v u,v=pcall(function()return game:GetService
'TeleportService':TeleportImpl(o,p)end)if not u then g()q.PopupText.Text=v local
w w=q.OKButton.MouseButton1Click:connect(function()if w~=nil then w:disconnect()
end game.GuiService:RemoveCenterDialog(script.Parent:FindFirstChild'Popup')
return q:TweenSize(UDim2.new(0,0,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.
Quart,1,true,i())end)return game.GuiService:AddCenterDialog(script.Parent:
FindFirstChild('Popup',Enum.CenterDialogType.QuitDialog),function()g()script.
Parent:FindFirstChild'Popup'.Visible=true return q:TweenSize(UDim2.new(0,330,0,
350),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,1,true)end,function()return
q:TweenSize(UDim2.new(0,0,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,1
,true,i())end)end end)s=q.DeclineButton.MouseButton1Click:connect(function()t()
return pcall(function()return game:GetService'TeleportService':TeleportCancel()
end)end)local u=pcall(function()return game.GuiService:AddCenterDialog(script.
Parent:FindFirstChild('Popup',Enum.CenterDialogType.QuitDialog),function()h()q.
AcceptButton.Text='Leave'q.DeclineButton.Text='Stay'script.Parent:FindFirstChild
'Popup'.Visible=true return q:TweenSize(UDim2.new(0,330,0,350),Enum.
EasingDirection.Out,Enum.EasingStyle.Quart,1,true)end,function()return q:
TweenSize(UDim2.new(0,0,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,1,
true,i())end)end)if u==false then script.Parent:FindFirstChild'Popup'.Visible=
true q.AcceptButton.Text='Leave'q.DeclineButton.Text='Stay'q:TweenSize(UDim2.
new(0,330,0,350),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,1,true)end
return true end end

View File

@ -1,91 +1,22 @@
print("[Mercury]: Loaded corescript 48488451")
local New
New = function(className, name, props)
if not (props ~= nil) then
props = name
name = nil
end
local obj = Instance.new(className)
if name then
obj.Name = name
end
local parent
for k, v in pairs(props) do
if type(k) == "string" then
if k == "Parent" then
parent = v
else
obj[k] = v
end
elseif type(k) == "number" and type(v) == "userdata" then
v.Parent = obj
end
end
obj.Parent = parent
return obj
end
local popupFrame = New("Frame", "Popup", {
Position = UDim2.new(0.5, -165, 0.5, -175),
Size = UDim2.new(0, 330, 0, 350),
Style = Enum.FrameStyle.RobloxRound,
ZIndex = 4,
Visible = false,
Parent = script.Parent,
New("TextLabel", "PopupText", {
Size = UDim2.new(1, 0, 0.8, 0),
Font = Enum.Font.ArialBold,
FontSize = Enum.FontSize.Size36,
BackgroundTransparency = 1,
Text = "Hello I'm a popup",
TextColor3 = Color3.new(248 / 255, 248 / 255, 248 / 255),
TextWrap = true,
ZIndex = 5
}),
New("TextButton", "AcceptButton", {
Position = UDim2.new(0, 20, 0, 270),
Size = UDim2.new(0, 100, 0, 50),
Font = Enum.Font.ArialBold,
FontSize = Enum.FontSize.Size24,
Style = Enum.ButtonStyle.RobloxButton,
TextColor3 = Color3.new(248 / 255, 248 / 255, 248 / 255),
Text = "Yes",
ZIndex = 5
}),
New("ImageLabel", "PopupImage", {
BackgroundTransparency = 1,
Position = UDim2.new(0.5, -140, 0, 0),
Size = UDim2.new(0, 280, 0, 280),
ZIndex = 3,
New("ImageLabel", "Backing", {
BackgroundTransparency = 1,
Size = UDim2.new(1, 0, 1, 0),
Image = "http://www.roblox.com/asset/?id=47574181",
ZIndex = 2
})
})
})
local AcceptButton = popupFrame.AcceptButton
do
local _with_0 = popupFrame:clone()
_with_0.Name = "Darken"
_with_0.Size = UDim2.new(1, 16, 1, 16)
_with_0.Position = UDim2.new(0, -8, 0, -8)
_with_0.ZIndex = 1
_with_0.Parent = popupFrame
end
do
local _with_0 = AcceptButton:clone()
_with_0.Name = "DeclineButton"
_with_0.Position = UDim2.new(1, -120, 0, 270)
_with_0.Text = "No"
_with_0.Parent = popupFrame
end
do
local _with_0 = AcceptButton:clone()
_with_0.Name = "OKButton"
_with_0.Text = "OK"
_with_0.Position = UDim2.new(0.5, -50, 0, 270)
_with_0.Visible = false
_with_0.Parent = popupFrame
end
return script:remove()
print'[Mercury]: Loaded corescript 48488451'local a a=function(b,c,d)if not(d~=
nil)then d=c c=nil end local e=Instance.new(b)if c then e.Name=c end local f for
g,h in pairs(d)do if type(g)=='string'then if g=='Parent'then f=h else e[g]=h
end elseif type(g)=='number'and type(h)=='userdata'then h.Parent=e end end e.
Parent=f return e end local b=a('Frame','Popup',{Position=UDim2.new(0.5,-165,0.5
,-175),Size=UDim2.new(0,330,0,350),Style=Enum.FrameStyle.RobloxRound,ZIndex=4,
Visible=false,Parent=script.Parent,a('TextLabel','PopupText',{Size=UDim2.new(1,0
,0.8,0),Font=Enum.Font.ArialBold,FontSize=Enum.FontSize.Size36,
BackgroundTransparency=1,Text="Hello I'm a popup",TextColor3=Color3.new(
0.9725490196078431,0.9725490196078431,0.9725490196078431),TextWrap=true,ZIndex=5
}),a('TextButton','AcceptButton',{Position=UDim2.new(0,20,0,270),Size=UDim2.new(
0,100,0,50),Font=Enum.Font.ArialBold,FontSize=Enum.FontSize.Size24,Style=Enum.
ButtonStyle.RobloxButton,TextColor3=Color3.new(0.9725490196078431,
0.9725490196078431,0.9725490196078431),Text='Yes',ZIndex=5}),a('ImageLabel',
'PopupImage',{BackgroundTransparency=1,Position=UDim2.new(0.5,-140,0,0),Size=
UDim2.new(0,280,0,280),ZIndex=3,a('ImageLabel','Backing',{BackgroundTransparency
=1,Size=UDim2.new(1,0,1,0),Image='http://www.roblox.com/asset/?id=47574181',
ZIndex=2})})})local c=b.AcceptButton do local d=b:clone()d.Name='Darken'd.Size=
UDim2.new(1,16,1,16)d.Position=UDim2.new(0,-8,0,-8)d.ZIndex=1 d.Parent=b end do
local d=c:clone()d.Name='DeclineButton'd.Position=UDim2.new(1,-120,0,270)d.Text=
'No'd.Parent=b end do local d=c:clone()d.Name='OKButton'd.Text='OK'd.Position=
UDim2.new(0.5,-50,0,270)d.Visible=false d.Parent=b end return script:remove()

View File

@ -1,758 +1,230 @@
print("[Mercury]: Loaded corescript 53878047")
if game.CoreGui.Version < 3 then
return
end
local New
New = function(className, name, props)
if not (props ~= nil) then
props = name
name = nil
end
local obj = Instance.new(className)
if name then
obj.Name = name
end
local parent
for k, v in pairs(props) do
if type(k) == "string" then
if k == "Parent" then
parent = v
else
obj[k] = v
end
elseif type(k) == "number" and type(v) == "userdata" then
v.Parent = obj
end
end
obj.Parent = parent
return obj
end
local gui = script.Parent
local waitForChild
waitForChild = function(instance, name)
while not instance:FindFirstChild(name) do
instance.ChildAdded:wait()
end
end
local waitForProperty
waitForProperty = function(instance, property)
while not instance[property] do
instance.Changed:wait()
end
end
local IsTouchDevice
IsTouchDevice = function()
local touchEnabled = false
pcall(function()
touchEnabled = Game:GetService("UserInputService").TouchEnabled
end)
return touchEnabled
end
local IsPhone
IsPhone = function()
if gui.AbsoluteSize.Y <= 320 then
return true
else
return false
end
end
waitForChild(game, "Players")
waitForProperty(game.Players, "LocalPlayer")
local CurrentLoadout = New("Frame", "CurrentLoadout", {
Position = UDim2.new(0.5, -300, 1, -85),
Size = UDim2.new(0, 600, 0, 54),
BackgroundTransparency = 1,
RobloxLocked = true,
Parent = gui,
New("BoolValue", "Debounce", {
RobloxLocked = true
}),
New("ImageLabel", "Background", {
Size = UDim2.new(1.2, 0, 1.2, 0),
Image = "http://www.roblox.com/asset/?id=96536002",
BackgroundTransparency = 1,
Position = UDim2.new(-0.1, 0, -0.1, 0),
ZIndex = 0.0,
Visible = false,
New("ImageLabel", {
Size = UDim2.new(1, 0, 0.025, 1),
Position = UDim2.new(0, 0, 0, 0),
Image = "http://www.roblox.com/asset/?id=97662207",
BackgroundTransparency = 1
})
})
})
waitForChild(gui, "ControlFrame")
New("ImageButton", "BackpackButton", {
RobloxLocked = true,
Visible = false,
BackgroundTransparency = 1,
Image = "http://www.roblox.com/asset/?id=97617958",
Position = UDim2.new(0.5, -60, 1, -108),
Size = UDim2.new(0, 120, 0, 18),
Parent = gui.ControlFrame
})
local NumSlots = 9
if IsPhone() then
NumSlots = 3
CurrentLoadout.Size = UDim2.new(0, 180, 0, 54)
CurrentLoadout.Position = UDim2.new(0.5, -90, 1, -85)
end
for i = 0, NumSlots do
local slotFrame = New("Frame", {
Name = "Slot" .. tostring(i),
RobloxLocked = true,
BackgroundColor3 = Color3.new(0, 0, 0),
BackgroundTransparency = 1,
BorderColor3 = Color3.new(1, 1, 1),
ZIndex = 4.0,
Position = UDim2.new((function()
if i == 0 then
return 0.9, 0, 0, 0
else
return (i - 1) * 0.1, (i - 1) * 6, 0, 0
end
end)()),
Size = UDim2.new(0, 54, 1, 0),
Parent = CurrentLoadout
})
if gui.AbsoluteSize.Y <= 320 then
slotFrame.Position = UDim2.new(0, (i - 1) * 60, 0, -50)
print("Well got here", slotFrame, slotFrame.Position.X.Scale, slotFrame.Position.X.Offset)
if i == 0 then
slotFrame:Destroy()
end
end
end
local TempSlot = New("ImageButton", "TempSlot", {
Active = true,
Size = UDim2.new(1, 0, 1, 0),
BackgroundTransparency = 1,
Style = "Custom",
Visible = false,
RobloxLocked = true,
ZIndex = 3.0,
Parent = CurrentLoadout,
New("ImageLabel", "Background", {
BackgroundTransparency = 1,
Image = "http://www.roblox.com/asset/?id=97613075",
Size = UDim2.new(1, 0, 1, 0)
}),
New("ObjectValue", "GearReference", {
RobloxLocked = true
}),
New("TextLabel", "ToolTipLabel", {
RobloxLocked = true,
Text = "",
BackgroundTransparency = 0.5,
BorderSizePixel = 0,
Visible = false,
TextColor3 = Color3.new(1, 1, 1),
BackgroundColor3 = Color3.new(0, 0, 0),
TextStrokeTransparency = 0,
Font = Enum.Font.ArialBold,
FontSize = Enum.FontSize.Size14,
Size = UDim2.new(1, 60, 0, 20),
Position = UDim2.new(0, -30, 0, -30)
}),
New("BoolValue", "Kill", {
RobloxLocked = true
}),
New("TextLabel", "GearText", {
RobloxLocked = true,
BackgroundTransparency = 1,
Font = Enum.Font.Arial,
FontSize = Enum.FontSize.Size14,
Position = UDim2.new(0, -8, 0, -8),
Size = UDim2.new(1, 16, 1, 16),
Text = "",
TextColor3 = Color3.new(1, 1, 1),
TextWrap = true,
ZIndex = 5.0
}),
New("ImageLabel", "GearImage", {
BackgroundTransparency = 1,
Position = UDim2.new(0, 0, 0, 0),
Size = UDim2.new(1, 0, 1, 0),
ZIndex = 5.0,
RobloxLocked = true
})
})
local SlotNumber = New("TextLabel", "SlotNumber", {
BackgroundTransparency = 1,
BorderSizePixel = 0,
Font = Enum.Font.ArialBold,
FontSize = Enum.FontSize.Size18,
Position = UDim2.new(0, 0, 0, 0),
Size = UDim2.new(0, 10, 0, 15),
TextColor3 = Color3.new(1, 1, 1),
TextTransparency = 0,
TextXAlignment = Enum.TextXAlignment.Left,
TextYAlignment = Enum.TextYAlignment.Bottom,
RobloxLocked = true,
Parent = TempSlot,
ZIndex = 5
})
if IsTouchDevice() then
SlotNumber.Visible = false
end
local SlotNumberDownShadow
do
local _with_0 = SlotNumber:Clone()
_with_0.Name = "SlotNumberDownShadow"
_with_0.TextColor3 = Color3.new(0, 0, 0)
_with_0.Position = UDim2.new(0, 1, 0, -1)
_with_0.Parent = TempSlot
_with_0.ZIndex = 2
SlotNumberDownShadow = _with_0
end
do
local _with_0 = SlotNumberDownShadow:Clone()
_with_0.Name = "SlotNumberUpShadow"
_with_0.Position = UDim2.new(0, -1, 0, -1)
_with_0.Parent = TempSlot
end
local Backpack = New("Frame", "Backpack", {
RobloxLocked = true,
Visible = false,
Position = UDim2.new(0.5, 0, 0.5, 0),
BackgroundColor3 = Color3.new(32 / 255, 32 / 255, 32 / 255),
BackgroundTransparency = 0.0,
BorderSizePixel = 0,
Parent = gui,
Active = true,
New("BoolValue", "SwapSlot", {
RobloxLocked = true,
New("IntValue", "Slot", {
RobloxLocked = true
}),
New("ObjectValue", "GearButton", {
RobloxLocked = true
})
}),
New("Frame", "SearchFrame", {
RobloxLocked = true,
BackgroundTransparency = 1,
Position = UDim2.new(1, -220, 0, 2),
Size = UDim2.new(0, 220, 0, 24),
New("ImageButton", "SearchButton", {
RobloxLocked = true,
Size = UDim2.new(0, 25, 0, 25),
BackgroundTransparency = 1,
Image = "rbxasset://textures/ui/SearchIcon.png"
}),
New("TextButton", "ResetButton", {
RobloxLocked = true,
Visible = false,
Position = UDim2.new(1, -26, 0, 3),
Size = UDim2.new(0, 20, 0, 20),
Style = Enum.ButtonStyle.RobloxButtonDefault,
Text = "X",
TextColor3 = Color3.new(1, 1, 1),
Font = Enum.Font.ArialBold,
FontSize = Enum.FontSize.Size18,
ZIndex = 3
}),
New("TextButton", "SearchBoxFrame", {
RobloxLocked = true,
Position = UDim2.new(0, 25, 0, 0),
Size = UDim2.new(1, -28, 0, 26),
Text = "",
Style = Enum.ButtonStyle.RobloxButton,
New("TextBox", "SearchBox", {
RobloxLocked = true,
BackgroundTransparency = 1,
Font = Enum.Font.ArialBold,
FontSize = Enum.FontSize.Size12,
Position = UDim2.new(0, -5, 0, -5),
Size = UDim2.new(1, 10, 1, 10),
TextColor3 = Color3.new(1, 1, 1),
TextXAlignment = Enum.TextXAlignment.Left,
ZIndex = 2,
TextWrap = true,
Text = "Search..."
})
})
})
})
local Tabs = New("Frame", "Tabs", {
Visible = false,
Active = false,
RobloxLocked = true,
BackgroundColor3 = Color3.new(0, 0, 0),
BackgroundTransparency = 0.08,
BorderSizePixel = 0,
Position = UDim2.new(0, 0, -0.1, -4),
Size = UDim2.new(1, 0, 0.1, 4),
Parent = Backpack,
New("Frame", "TabLine", {
RobloxLocked = true,
BackgroundColor3 = Color3.new(53 / 255, 53 / 255, 53 / 255),
BorderSizePixel = 0,
Position = UDim2.new(0, 5, 1, -4),
Size = UDim2.new(1, -10, 0, 4),
ZIndex = 2
}),
New("TextButton", "InventoryButton", {
RobloxLocked = true,
Size = UDim2.new(0, 60, 0, 30),
Position = UDim2.new(0, 7, 1, -31),
BackgroundColor3 = Color3.new(1, 1, 1),
BorderColor3 = Color3.new(1, 1, 1),
Font = Enum.Font.ArialBold,
FontSize = Enum.FontSize.Size18,
Text = "Gear",
AutoButtonColor = false,
TextColor3 = Color3.new(0, 0, 0),
Selected = true,
Active = true,
ZIndex = 3
}),
New("TextButton", "CloseButton", {
RobloxLocked = true,
Font = Enum.Font.ArialBold,
FontSize = Enum.FontSize.Size24,
Position = UDim2.new(1, -33, 0, 4),
Size = UDim2.new(0, 30, 0, 30),
Style = Enum.ButtonStyle.RobloxButton,
Text = "",
TextColor3 = Color3.new(1, 1, 1),
Modal = true,
New("ImageLabel", "XImage", {
RobloxLocked = true,
Image = (function()
game:GetService("ContentProvider"):Preload("http://www.roblox.com/asset/?id=75547445")
return "http://www.roblox.com/asset/?id=75547445"
end)(),
BackgroundTransparency = 1,
Position = UDim2.new(-0.25, -1, -0.25, -1),
Size = UDim2.new(1.5, 2, 1.5, 2),
ZIndex = 2
})
})
})
if game.CoreGui.Version >= 8 then
New("TextButton", "WardrobeButton", {
RobloxLocked = true,
Size = UDim2.new(0, 90, 0, 30),
Position = UDim2.new(0, 77, 1, -31),
BackgroundColor3 = Color3.new(0, 0, 0),
BorderColor3 = Color3.new(1, 1, 1),
Font = Enum.Font.ArialBold,
FontSize = Enum.FontSize.Size18,
Text = "Wardrobe",
AutoButtonColor = false,
TextColor3 = Color3.new(1, 1, 1),
Selected = false,
Active = true,
Parent = Tabs
})
end
local Gear = New("Frame", "Gear", {
RobloxLocked = true,
BackgroundTransparency = 1,
Size = UDim2.new(1, 0, 1, 0),
ClipsDescendants = true,
Parent = Backpack,
New("Frame", "AssetsList", {
RobloxLocked = true,
BackgroundTransparency = 1,
Size = UDim2.new(0.2, 0, 1, 0),
Style = Enum.FrameStyle.RobloxSquare,
Visible = false
}),
New("Frame", "GearGrid", {
RobloxLocked = true,
Size = UDim2.new(0.95, 0, 1, 0),
BackgroundTransparency = 1,
New("ImageButton", "GearButton", {
RobloxLocked = true,
Visible = false,
Size = UDim2.new(0, 54, 0, 54),
Style = "Custom",
BackgroundTransparency = 1,
New("ImageLabel", "Background", {
BackgroundTransparency = 1,
Image = "http://www.roblox.com/asset/?id=97613075",
Size = UDim2.new(1, 0, 1, 0)
}),
New("ObjectValue", "GearReference", {
RobloxLocked = true
}),
New("Frame", "GreyOutButton", {
RobloxLocked = true,
BackgroundTransparency = 0.5,
Size = UDim2.new(1, 0, 1, 0),
Active = true,
Visible = false,
ZIndex = 3
}),
New("TextLabel", "GearText", {
RobloxLocked = true,
BackgroundTransparency = 1,
Font = Enum.Font.Arial,
FontSize = Enum.FontSize.Size14,
Position = UDim2.new(0, -8, 0, -8),
Size = UDim2.new(1, 16, 1, 16),
Text = "",
ZIndex = 2,
TextColor3 = Color3.new(1, 1, 1),
TextWrap = true
})
})
})
})
local GearGridScrollingArea = New("Frame", "GearGridScrollingArea", {
RobloxLocked = true,
Position = UDim2.new(1, -19, 0, 35),
Size = UDim2.new(0, 17, 1, -45),
BackgroundTransparency = 1,
Parent = Gear
})
local GearLoadouts = New("Frame", "GearLoadouts", {
RobloxLocked = true,
BackgroundTransparency = 1,
Position = UDim2.new(0.7, 23, 0.5, 1),
Size = UDim2.new(0.3, -23, 0.5, -1),
Parent = Gear,
Visible = false,
New("Frame", "LoadoutsList", {
RobloxLocked = true,
Position = UDim2.new(0, 0, 0.15, 2),
Size = UDim2.new(1, -17, 0.85, -2),
Style = Enum.FrameStyle.RobloxSquare
}),
New("Frame", "GearLoadoutsHeader", {
RobloxLocked = true,
BackgroundColor3 = Color3.new(0, 0, 0),
BackgroundTransparency = 0.2,
BorderColor3 = Color3.new(1, 0, 0),
Size = UDim2.new(1, 2, 0.15, -1),
New("TextLabel", "LoadoutsHeaderText", {
RobloxLocked = true,
BackgroundTransparency = 1,
Font = Enum.Font.ArialBold,
FontSize = Enum.FontSize.Size18,
Size = UDim2.new(1, 0, 1, 0),
Text = "Loadouts",
TextColor3 = Color3.new(1, 1, 1)
})
})
})
do
local _with_0 = GearGridScrollingArea:Clone()
_with_0.Name = "GearLoadoutsScrollingArea"
_with_0.RobloxLocked = true
_with_0.Position = UDim2.new(1, -15, 0.15, 2)
_with_0.Size = UDim2.new(0, 17, 0.85, -2)
_with_0.Parent = GearLoadouts
end
local GearPreview = New("Frame", "GearPreview", {
RobloxLocked = true,
Position = UDim2.new(0.7, 23, 0, 0),
Size = UDim2.new(0.3, -28, 0.5, -1),
BackgroundTransparency = 1,
ZIndex = 7,
Parent = Gear,
New("Frame", "GearStats", {
RobloxLocked = true,
BackgroundTransparency = 1,
Position = UDim2.new(0, 0, 0.75, 0),
Size = UDim2.new(1, 0, 0.25, 0),
ZIndex = 8,
New("TextLabel", "GearName", {
RobloxLocked = true,
BackgroundTransparency = 1,
Font = Enum.Font.ArialBold,
FontSize = Enum.FontSize.Size18,
Position = UDim2.new(0, -3, 0, 0),
Size = UDim2.new(1, 6, 1, 5),
Text = "",
TextColor3 = Color3.new(1, 1, 1),
TextWrap = true,
ZIndex = 9
})
}),
New("ImageLabel", "GearImage", {
RobloxLocked = true,
Image = "",
BackgroundTransparency = 1,
Position = UDim2.new(0.125, 0, 0, 0),
Size = UDim2.new(0.75, 0, 0.75, 0),
ZIndex = 8,
New("Frame", "GearIcons", {
BackgroundColor3 = Color3.new(0, 0, 0),
BackgroundTransparency = 0.5,
BorderSizePixel = 0,
RobloxLocked = true,
Position = UDim2.new(0.4, 2, 0.85, -2),
Size = UDim2.new(0.6, 0, 0.15, 0),
Visible = false,
ZIndex = 9,
New("ImageLabel", "GenreImage", {
RobloxLocked = true,
BackgroundColor3 = Color3.new(102 / 255, 153 / 255, 1),
BackgroundTransparency = 0.5,
BorderSizePixel = 0,
Size = UDim2.new(0.25, 0, 1, 0)
})
})
})
})
local GearIcons, GenreImage
do
local _obj_0 = GearPreview.GearImage
GearIcons, GenreImage = _obj_0.GearIcons, _obj_0.GearIcons.GenreImage
end
do
local _with_0 = GenreImage:Clone()
_with_0.Name = "AttributeOneImage"
_with_0.RobloxLocked = true
_with_0.BackgroundColor3 = Color3.new(1, 51 / 255, 0)
_with_0.Position = UDim2.new(0.25, 0, 0, 0)
_with_0.Parent = GearIcons
end
do
local _with_0 = GenreImage:Clone()
_with_0.Name = "AttributeTwoImage"
_with_0.RobloxLocked = true
_with_0.BackgroundColor3 = Color3.new(153 / 255, 1, 153 / 255)
_with_0.Position = UDim2.new(0.5, 0, 0, 0)
_with_0.Parent = GearIcons
end
do
local _with_0 = GenreImage:Clone()
_with_0.Name = "AttributeThreeImage"
_with_0.RobloxLocked = true
_with_0.BackgroundColor3 = Color3.new(0, 0.5, 0.5)
_with_0.Position = UDim2.new(0.75, 0, 0, 0)
_with_0.Parent = GearIcons
end
if game.CoreGui.Version < 8 then
script:remove()
return
end
local makeCharFrame
makeCharFrame = function(frameName, parent)
return New("Frame", tostring(frameName), {
RobloxLocked = true,
Size = UDim2.new(1, 0, 1, -70),
Position = UDim2.new(0, 0, 0, 20),
BackgroundTransparency = 1,
Parent = parent,
Visible = false
})
end
local makeZone
makeZone = function(zoneName, image, size, position, parent)
return New("ImageLabel", tostring(zoneName), {
RobloxLocked = true,
Image = image,
Size = size,
BackgroundTransparency = 1,
Position = position,
Parent = parent
})
end
local makeStyledButton
makeStyledButton = function(buttonName, size, position, parent, buttonStyle)
local button = New("ImageButton", tostring(buttonName), {
RobloxLocked = true,
Size = size,
Position = position
})
if buttonStyle then
button.Style = buttonStyle
else
button.BackgroundColor3 = Color3.new(0, 0, 0)
button.BorderColor3 = Color3.new(1, 1, 1)
end
button.Parent = parent
return button
end
local makeTextLabel
makeTextLabel = function(TextLabelName, text, position, parent)
return New("TextLabel", {
Name = TextLabelName,
RobloxLocked = true,
BackgroundTransparency = 1,
Size = UDim2.new(0, 32, 0, 14),
Font = Enum.Font.Arial,
TextColor3 = Color3.new(1, 1, 1),
FontSize = Enum.FontSize.Size14,
Text = text,
Position = position,
Parent = parent
})
end
local Wardrobe = New("Frame", "Wardrobe", {
RobloxLocked = true,
BackgroundTransparency = 1,
Visible = false,
Size = UDim2.new(1, 0, 1, 0),
Parent = Backpack,
New("Frame", "AssetList", {
RobloxLocked = true,
Position = UDim2.new(0, 4, 0, 5),
Size = UDim2.new(0, 85, 1, -5),
BackgroundTransparency = 1,
Visible = true
}),
New("TextButton", "PreviewButton", {
RobloxLocked = true,
Text = "Rotate",
BackgroundColor3 = Color3.new(0, 0, 0),
BackgroundTransparency = 0.5,
BorderColor3 = Color3.new(1, 1, 1),
Position = UDim2.new(1.2, -62, 1, -50),
Size = UDim2.new(0, 125, 0, 50),
Font = Enum.Font.ArialBold,
FontSize = Enum.FontSize.Size24,
TextColor3 = Color3.new(1, 1, 1),
TextWrapped = true,
TextStrokeTransparency = 0
})
})
local PreviewAssetFrame = New("Frame", "PreviewAssetFrame", {
RobloxLocked = true,
BackgroundTransparency = 1,
Position = UDim2.new(1, -240, 0, 30),
Size = UDim2.new(0, 250, 0, 250),
Parent = Wardrobe
})
local PreviewAssetBacking = New("TextButton", "PreviewAssetBacking", {
RobloxLocked = true,
Active = false,
Text = "",
AutoButtonColor = false,
Size = UDim2.new(1, 0, 1, 0),
Style = Enum.ButtonStyle.RobloxButton,
Visible = false,
ZIndex = 9,
Parent = PreviewAssetFrame,
New("ImageLabel", "PreviewAssetImage", {
RobloxLocked = true,
BackgroundTransparency = 0.8,
Position = UDim2.new(0.5, -100, 0, 0),
Size = UDim2.new(0, 200, 0, 200),
BorderSizePixel = 0,
ZIndex = 10
})
})
local AssetNameLabel = New("TextLabel", "AssetNameLabel", {
RobloxLocked = true,
BackgroundTransparency = 1,
Position = UDim2.new(0, 0, 1, -20),
Size = UDim2.new(0.5, 0, 0, 24),
ZIndex = 10,
Font = Enum.Font.Arial,
Text = "",
TextColor3 = Color3.new(1, 1, 1),
TextScaled = true,
Parent = PreviewAssetBacking
})
do
local _with_0 = AssetNameLabel:Clone()
_with_0.Name = "AssetTypeLabel"
_with_0.RobloxLocked = true
_with_0.TextScaled = false
_with_0.FontSize = Enum.FontSize.Size18
_with_0.Position = UDim2.new(0.5, 3, 1, -20)
_with_0.Parent = PreviewAssetBacking
end
local CharacterPane = New("Frame", "CharacterPane", {
RobloxLocked = true,
Position = UDim2.new(1, -220, 0, 32),
Size = UDim2.new(0, 220, 1, -40),
BackgroundTransparency = 1,
Visible = true,
Parent = Wardrobe,
New("TextLabel", "CategoryLabel", {
RobloxLocked = true,
BackgroundTransparency = 1,
Font = Enum.Font.ArialBold,
FontSize = Enum.FontSize.Size18,
Position = UDim2.new(0, 0, 0, -7),
Size = UDim2.new(1, 0, 0, 20),
TextXAlignment = Enum.TextXAlignment.Center,
Text = "All",
TextColor3 = Color3.new(1, 1, 1)
}),
New("TextButton", "SaveButton", {
RobloxLocked = true,
Size = UDim2.new(0.6, 0, 0, 50),
Position = UDim2.new(0.2, 0, 1, -50),
Style = Enum.ButtonStyle.RobloxButton,
Selected = false,
Font = Enum.Font.ArialBold,
FontSize = Enum.FontSize.Size18,
Text = "Save",
TextColor3 = Color3.new(1, 1, 1)
})
})
local FaceFrame = makeCharFrame("FacesFrame", CharacterPane)
game:GetService("ContentProvider"):Preload("http://www.roblox.com/asset/?id=75460621")
makeZone("FaceZone", "http://www.roblox.com/asset/?id=75460621", UDim2.new(0, 157, 0, 137), UDim2.new(0.5, -78, 0.5, -68), FaceFrame)
makeStyledButton("Face", UDim2.new(0, 64, 0, 64), UDim2.new(0.5, -32, 0.5, -135), FaceFrame)
local HeadFrame = makeCharFrame("HeadsFrame", CharacterPane)
makeZone("FaceZone", "http://www.roblox.com/asset/?id=75460621", UDim2.new(0, 157, 0, 137), UDim2.new(0.5, -78, 0.5, -68), HeadFrame)
makeStyledButton("Head", UDim2.new(0, 64, 0, 64), UDim2.new(0.5, -32, 0.5, -135), HeadFrame)
local HatsFrame = makeCharFrame("HatsFrame", CharacterPane)
game:GetService("ContentProvider"):Preload("http://www.roblox.com/asset/?id=75457888")
local HatsZone = makeZone("HatsZone", "http://www.roblox.com/asset/?id=75457888", UDim2.new(0, 186, 0, 184), UDim2.new(0.5, -93, 0.5, -100), HatsFrame)
makeStyledButton("Hat1Button", UDim2.new(0, 64, 0, 64), UDim2.new(0, -1, 0, -1), HatsZone, Enum.ButtonStyle.RobloxButton)
makeStyledButton("Hat2Button", UDim2.new(0, 64, 0, 64), UDim2.new(0, 63, 0, -1), HatsZone, Enum.ButtonStyle.RobloxButton)
makeStyledButton("Hat3Button", UDim2.new(0, 64, 0, 64), UDim2.new(0, 127, 0, -1), HatsZone, Enum.ButtonStyle.RobloxButton)
local PantsFrame = makeCharFrame("PantsFrame", CharacterPane)
game:GetService("ContentProvider"):Preload("http://www.roblox.com/asset/?id=75457920")
makeZone("PantsZone", "http://www.roblox.com/asset/?id=75457920", UDim2.new(0, 121, 0, 99), UDim2.new(0.5, -60, 0.5, -100), PantsFrame)
local pantFrame = New("Frame", "PantFrame", {
RobloxLocked = true,
Size = UDim2.new(0, 25, 0, 56),
Position = UDim2.new(0.5, -26, 0.5, 0),
BackgroundColor3 = Color3.new(0, 0, 0),
BorderColor3 = Color3.new(1, 1, 1),
Parent = PantsFrame
})
do
local _with_0 = pantFrame:Clone()
_with_0.Position = UDim2.new(0.5, 3, 0.5, 0)
_with_0.RobloxLocked = true
_with_0.Parent = PantsFrame
end
New("ImageButton", "CurrentPants", {
RobloxLocked = true,
BackgroundTransparency = 1,
ZIndex = 2,
Position = UDim2.new(0.5, -31, 0.5, -4),
Size = UDim2.new(0, 54, 0, 59),
Parent = PantsFrame
})
local MeshFrame = makeCharFrame("PackagesFrame", CharacterPane)
local torsoButton = makeStyledButton("TorsoMeshButton", UDim2.new(0, 64, 0, 64), UDim2.new(0.5, -32, 0.5, -110), MeshFrame, Enum.ButtonStyle.RobloxButton)
makeTextLabel("TorsoLabel", "Torso", UDim2.new(0.5, -16, 0, -25), torsoButton)
local leftLegButton = makeStyledButton("LeftLegMeshButton", UDim2.new(0, 64, 0, 64), UDim2.new(0.5, 0, 0.5, -25), MeshFrame, Enum.ButtonStyle.RobloxButton)
makeTextLabel("LeftLegLabel", "Left Leg", UDim2.new(0.5, -16, 0, -25), leftLegButton)
local rightLegButton = makeStyledButton("RightLegMeshButton", UDim2.new(0, 64, 0, 64), UDim2.new(0.5, -64, 0.5, -25), MeshFrame, Enum.ButtonStyle.RobloxButton)
makeTextLabel("RightLegLabel", "Right Leg", UDim2.new(0.5, -16, 0, -25), rightLegButton)
local rightArmButton = makeStyledButton("RightArmMeshButton", UDim2.new(0, 64, 0, 64), UDim2.new(0.5, -96, 0.5, -110), MeshFrame, Enum.ButtonStyle.RobloxButton)
makeTextLabel("RightArmLabel", "Right Arm", UDim2.new(0.5, -16, 0, -25), rightArmButton)
local leftArmButton = makeStyledButton("LeftArmMeshButton", UDim2.new(0, 64, 0, 64), UDim2.new(0.5, 32, 0.5, -110), MeshFrame, Enum.ButtonStyle.RobloxButton)
makeTextLabel("LeftArmLabel", "Left Arm", UDim2.new(0.5, -16, 0, -25), leftArmButton)
local TShirtFrame = makeCharFrame("T-ShirtsFrame", CharacterPane)
game:GetService("ContentProvider"):Preload("http://www.roblox.com/asset/?id=75460642")
makeZone("TShirtZone", "http://www.roblox.com/asset/?id=75460642", UDim2.new(0, 121, 0, 154), UDim2.new(0.5, -60, 0.5, -100), TShirtFrame)
makeStyledButton("TShirtButton", UDim2.new(0, 64, 0, 64), UDim2.new(0.5, -32, 0.5, -64), TShirtFrame)
local ShirtFrame = makeCharFrame("ShirtsFrame", CharacterPane)
makeZone("ShirtZone", "http://www.roblox.com/asset/?id=75460642", UDim2.new(0, 121, 0, 154), UDim2.new(0.5, -60, 0.5, -100), ShirtFrame)
makeStyledButton("ShirtButton", UDim2.new(0, 64, 0, 64), UDim2.new(0.5, -32, 0.5, -64), ShirtFrame)
local ColorFrame = makeCharFrame("ColorFrame", CharacterPane)
game:GetService("ContentProvider"):Preload("http://www.roblox.com/asset/?id=76049888")
local ColorZone = makeZone("ColorZone", "http://www.roblox.com/asset/?id=76049888", UDim2.new(0, 120, 0, 150), UDim2.new(0.5, -60, 0.5, -100), ColorFrame)
makeStyledButton("Head", UDim2.new(0.26, 0, 0.19, 0), UDim2.new(0.37, 0, 0.02, 0), ColorZone).AutoButtonColor = false
makeStyledButton("LeftArm", UDim2.new(0.19, 0, 0.36, 0), UDim2.new(0.78, 0, 0.26, 0), ColorZone).AutoButtonColor = false
makeStyledButton("RightArm", UDim2.new(0.19, 0, 0.36, 0), UDim2.new(0.025, 0, 0.26, 0), ColorZone).AutoButtonColor = false
makeStyledButton("Torso", UDim2.new(0.43, 0, 0.36, 0), UDim2.new(0.28, 0, 0.26, 0), ColorZone).AutoButtonColor = false
makeStyledButton("RightLeg", UDim2.new(0.19, 0, 0.31, 0), UDim2.new(0.275, 0, 0.67, 0), ColorZone).AutoButtonColor = false
makeStyledButton("LeftLeg", UDim2.new(0.19, 0, 0.31, 0), UDim2.new(0.525, 0, 0.67, 0), ColorZone).AutoButtonColor = false
return script:Destroy()
print'[Mercury]: Loaded corescript 53878047'if game.CoreGui.Version<3 then
return end local a a=function(b,c,d)if not(d~=nil)then d=c c=nil end local e=
Instance.new(b)if c then e.Name=c end local f for g,h in pairs(d)do if type(g)==
'string'then if g=='Parent'then f=h else e[g]=h end elseif type(g)=='number'and
type(h)=='userdata'then h.Parent=e end end e.Parent=f return e end local b,c=
script.Parent,nil c=function(d,e)while not d:FindFirstChild(e)do d.ChildAdded:
wait()end end local d d=function(e,f)while not e[f]do e.Changed:wait()end end
local e e=function()local f=false pcall(function()f=Game:GetService
'UserInputService'.TouchEnabled end)return f end local f f=function()if b.
AbsoluteSize.Y<=320 then return true else return false end end c(game,'Players')
d(game.Players,'LocalPlayer')local g=a('Frame','CurrentLoadout',{Position=UDim2.
new(0.5,-300,1,-85),Size=UDim2.new(0,600,0,54),BackgroundTransparency=1,
RobloxLocked=true,Parent=b,a('BoolValue','Debounce',{RobloxLocked=true}),a(
'ImageLabel','Background',{Size=UDim2.new(1.2,0,1.2,0),Image=
'http://www.roblox.com/asset/?id=96536002',BackgroundTransparency=1,Position=
UDim2.new(-0.1,0,-0.1,0),ZIndex=0,Visible=false,a('ImageLabel',{Size=UDim2.new(1
,0,0.025,1),Position=UDim2.new(0,0,0,0),Image=
'http://www.roblox.com/asset/?id=97662207',BackgroundTransparency=1})})})c(b,
'ControlFrame')a('ImageButton','BackpackButton',{RobloxLocked=true,Visible=false
,BackgroundTransparency=1,Image='http://www.roblox.com/asset/?id=97617958',
Position=UDim2.new(0.5,-60,1,-108),Size=UDim2.new(0,120,0,18),Parent=b.
ControlFrame})local h=9 if f()then h=3 g.Size=UDim2.new(0,180,0,54)g.Position=
UDim2.new(0.5,-90,1,-85)end for i=0,h do local j=a('Frame',{Name='Slot'..
tostring(i),RobloxLocked=true,BackgroundColor3=Color3.new(0,0,0),
BackgroundTransparency=1,BorderColor3=Color3.new(1,1,1),ZIndex=4,Position=UDim2.
new((function()if i==0 then return 0.9,0,0,0 else return(i-1)*0.1,(i-1)*6,0,0
end end)()),Size=UDim2.new(0,54,1,0),Parent=g})if b.AbsoluteSize.Y<=320 then j.
Position=UDim2.new(0,(i-1)*60,0,-50)print('Well got here',j,j.Position.X.Scale,j
.Position.X.Offset)if i==0 then j:Destroy()end end end local i=a('ImageButton',
'TempSlot',{Active=true,Size=UDim2.new(1,0,1,0),BackgroundTransparency=1,Style=
'Custom',Visible=false,RobloxLocked=true,ZIndex=3,Parent=g,a('ImageLabel',
'Background',{BackgroundTransparency=1,Image=
'http://www.roblox.com/asset/?id=97613075',Size=UDim2.new(1,0,1,0)}),a(
'ObjectValue','GearReference',{RobloxLocked=true}),a('TextLabel','ToolTipLabel',
{RobloxLocked=true,Text='',BackgroundTransparency=0.5,BorderSizePixel=0,Visible=
false,TextColor3=Color3.new(1,1,1),BackgroundColor3=Color3.new(0,0,0),
TextStrokeTransparency=0,Font=Enum.Font.ArialBold,FontSize=Enum.FontSize.Size14,
Size=UDim2.new(1,60,0,20),Position=UDim2.new(0,-30,0,-30)}),a('BoolValue','Kill'
,{RobloxLocked=true}),a('TextLabel','GearText',{RobloxLocked=true,
BackgroundTransparency=1,Font=Enum.Font.Arial,FontSize=Enum.FontSize.Size14,
Position=UDim2.new(0,-8,0,-8),Size=UDim2.new(1,16,1,16),Text='',TextColor3=
Color3.new(1,1,1),TextWrap=true,ZIndex=5}),a('ImageLabel','GearImage',{
BackgroundTransparency=1,Position=UDim2.new(0,0,0,0),Size=UDim2.new(1,0,1,0),
ZIndex=5,RobloxLocked=true})})local j=a('TextLabel','SlotNumber',{
BackgroundTransparency=1,BorderSizePixel=0,Font=Enum.Font.ArialBold,FontSize=
Enum.FontSize.Size18,Position=UDim2.new(0,0,0,0),Size=UDim2.new(0,10,0,15),
TextColor3=Color3.new(1,1,1),TextTransparency=0,TextXAlignment=Enum.
TextXAlignment.Left,TextYAlignment=Enum.TextYAlignment.Bottom,RobloxLocked=true,
Parent=i,ZIndex=5})if e()then j.Visible=false end local k do local l=j:Clone()l.
Name='SlotNumberDownShadow'l.TextColor3=Color3.new(0,0,0)l.Position=UDim2.new(0,
1,0,-1)l.Parent=i l.ZIndex=2 k=l end do local l=k:Clone()l.Name=
'SlotNumberUpShadow'l.Position=UDim2.new(0,-1,0,-1)l.Parent=i end local l=a(
'Frame','Backpack',{RobloxLocked=true,Visible=false,Position=UDim2.new(0.5,0,0.5
,0),BackgroundColor3=Color3.new(0.12549019607843137,0.12549019607843137,
0.12549019607843137),BackgroundTransparency=0,BorderSizePixel=0,Parent=b,Active=
true,a('BoolValue','SwapSlot',{RobloxLocked=true,a('IntValue','Slot',{
RobloxLocked=true}),a('ObjectValue','GearButton',{RobloxLocked=true})}),a(
'Frame','SearchFrame',{RobloxLocked=true,BackgroundTransparency=1,Position=UDim2
.new(1,-220,0,2),Size=UDim2.new(0,220,0,24),a('ImageButton','SearchButton',{
RobloxLocked=true,Size=UDim2.new(0,25,0,25),BackgroundTransparency=1,Image=
'rbxasset://textures/ui/SearchIcon.png'}),a('TextButton','ResetButton',{
RobloxLocked=true,Visible=false,Position=UDim2.new(1,-26,0,3),Size=UDim2.new(0,
20,0,20),Style=Enum.ButtonStyle.RobloxButtonDefault,Text='X',TextColor3=Color3.
new(1,1,1),Font=Enum.Font.ArialBold,FontSize=Enum.FontSize.Size18,ZIndex=3}),a(
'TextButton','SearchBoxFrame',{RobloxLocked=true,Position=UDim2.new(0,25,0,0),
Size=UDim2.new(1,-28,0,26),Text='',Style=Enum.ButtonStyle.RobloxButton,a(
'TextBox','SearchBox',{RobloxLocked=true,BackgroundTransparency=1,Font=Enum.Font
.ArialBold,FontSize=Enum.FontSize.Size12,Position=UDim2.new(0,-5,0,-5),Size=
UDim2.new(1,10,1,10),TextColor3=Color3.new(1,1,1),TextXAlignment=Enum.
TextXAlignment.Left,ZIndex=2,TextWrap=true,Text='Search...'})})})})local m=a(
'Frame','Tabs',{Visible=false,Active=false,RobloxLocked=true,BackgroundColor3=
Color3.new(0,0,0),BackgroundTransparency=0.08,BorderSizePixel=0,Position=UDim2.
new(0,0,-0.1,-4),Size=UDim2.new(1,0,0.1,4),Parent=l,a('Frame','TabLine',{
RobloxLocked=true,BackgroundColor3=Color3.new(0.20784313725490197,
0.20784313725490197,0.20784313725490197),BorderSizePixel=0,Position=UDim2.new(0,
5,1,-4),Size=UDim2.new(1,-10,0,4),ZIndex=2}),a('TextButton','InventoryButton',{
RobloxLocked=true,Size=UDim2.new(0,60,0,30),Position=UDim2.new(0,7,1,-31),
BackgroundColor3=Color3.new(1,1,1),BorderColor3=Color3.new(1,1,1),Font=Enum.Font
.ArialBold,FontSize=Enum.FontSize.Size18,Text='Gear',AutoButtonColor=false,
TextColor3=Color3.new(0,0,0),Selected=true,Active=true,ZIndex=3}),a('TextButton'
,'CloseButton',{RobloxLocked=true,Font=Enum.Font.ArialBold,FontSize=Enum.
FontSize.Size24,Position=UDim2.new(1,-33,0,4),Size=UDim2.new(0,30,0,30),Style=
Enum.ButtonStyle.RobloxButton,Text='',TextColor3=Color3.new(1,1,1),Modal=true,a(
'ImageLabel','XImage',{RobloxLocked=true,Image=(function()game:GetService
'ContentProvider':Preload'http://www.roblox.com/asset/?id=75547445'return
'http://www.roblox.com/asset/?id=75547445'end)(),BackgroundTransparency=1,
Position=UDim2.new(-0.25,-1,-0.25,-1),Size=UDim2.new(1.5,2,1.5,2),ZIndex=2})})})
if game.CoreGui.Version>=8 then a('TextButton','WardrobeButton',{RobloxLocked=
true,Size=UDim2.new(0,90,0,30),Position=UDim2.new(0,77,1,-31),BackgroundColor3=
Color3.new(0,0,0),BorderColor3=Color3.new(1,1,1),Font=Enum.Font.ArialBold,
FontSize=Enum.FontSize.Size18,Text='Wardrobe',AutoButtonColor=false,TextColor3=
Color3.new(1,1,1),Selected=false,Active=true,Parent=m})end local n=a('Frame',
'Gear',{RobloxLocked=true,BackgroundTransparency=1,Size=UDim2.new(1,0,1,0),
ClipsDescendants=true,Parent=l,a('Frame','AssetsList',{RobloxLocked=true,
BackgroundTransparency=1,Size=UDim2.new(0.2,0,1,0),Style=Enum.FrameStyle.
RobloxSquare,Visible=false}),a('Frame','GearGrid',{RobloxLocked=true,Size=UDim2.
new(0.95,0,1,0),BackgroundTransparency=1,a('ImageButton','GearButton',{
RobloxLocked=true,Visible=false,Size=UDim2.new(0,54,0,54),Style='Custom',
BackgroundTransparency=1,a('ImageLabel','Background',{BackgroundTransparency=1,
Image='http://www.roblox.com/asset/?id=97613075',Size=UDim2.new(1,0,1,0)}),a(
'ObjectValue','GearReference',{RobloxLocked=true}),a('Frame','GreyOutButton',{
RobloxLocked=true,BackgroundTransparency=0.5,Size=UDim2.new(1,0,1,0),Active=true
,Visible=false,ZIndex=3}),a('TextLabel','GearText',{RobloxLocked=true,
BackgroundTransparency=1,Font=Enum.Font.Arial,FontSize=Enum.FontSize.Size14,
Position=UDim2.new(0,-8,0,-8),Size=UDim2.new(1,16,1,16),Text='',ZIndex=2,
TextColor3=Color3.new(1,1,1),TextWrap=true})})})})local o,p=a('Frame',
'GearGridScrollingArea',{RobloxLocked=true,Position=UDim2.new(1,-19,0,35),Size=
UDim2.new(0,17,1,-45),BackgroundTransparency=1,Parent=n}),a('Frame',
'GearLoadouts',{RobloxLocked=true,BackgroundTransparency=1,Position=UDim2.new(
0.7,23,0.5,1),Size=UDim2.new(0.3,-23,0.5,-1),Parent=n,Visible=false,a('Frame',
'LoadoutsList',{RobloxLocked=true,Position=UDim2.new(0,0,0.15,2),Size=UDim2.new(
1,-17,0.85,-2),Style=Enum.FrameStyle.RobloxSquare}),a('Frame',
'GearLoadoutsHeader',{RobloxLocked=true,BackgroundColor3=Color3.new(0,0,0),
BackgroundTransparency=0.2,BorderColor3=Color3.new(1,0,0),Size=UDim2.new(1,2,
0.15,-1),a('TextLabel','LoadoutsHeaderText',{RobloxLocked=true,
BackgroundTransparency=1,Font=Enum.Font.ArialBold,FontSize=Enum.FontSize.Size18,
Size=UDim2.new(1,0,1,0),Text='Loadouts',TextColor3=Color3.new(1,1,1)})})})do
local q=o:Clone()q.Name='GearLoadoutsScrollingArea'q.RobloxLocked=true q.
Position=UDim2.new(1,-15,0.15,2)q.Size=UDim2.new(0,17,0.85,-2)q.Parent=p end
local q,r,s=a('Frame','GearPreview',{RobloxLocked=true,Position=UDim2.new(0.7,23
,0,0),Size=UDim2.new(0.3,-28,0.5,-1),BackgroundTransparency=1,ZIndex=7,Parent=n,
a('Frame','GearStats',{RobloxLocked=true,BackgroundTransparency=1,Position=UDim2
.new(0,0,0.75,0),Size=UDim2.new(1,0,0.25,0),ZIndex=8,a('TextLabel','GearName',{
RobloxLocked=true,BackgroundTransparency=1,Font=Enum.Font.ArialBold,FontSize=
Enum.FontSize.Size18,Position=UDim2.new(0,-3,0,0),Size=UDim2.new(1,6,1,5),Text=
'',TextColor3=Color3.new(1,1,1),TextWrap=true,ZIndex=9})}),a('ImageLabel',
'GearImage',{RobloxLocked=true,Image='',BackgroundTransparency=1,Position=UDim2.
new(0.125,0,0,0),Size=UDim2.new(0.75,0,0.75,0),ZIndex=8,a('Frame','GearIcons',{
BackgroundColor3=Color3.new(0,0,0),BackgroundTransparency=0.5,BorderSizePixel=0,
RobloxLocked=true,Position=UDim2.new(0.4,2,0.85,-2),Size=UDim2.new(0.6,0,0.15,0)
,Visible=false,ZIndex=9,a('ImageLabel','GenreImage',{RobloxLocked=true,
BackgroundColor3=Color3.new(0.4,0.6,1),BackgroundTransparency=0.5,
BorderSizePixel=0,Size=UDim2.new(0.25,0,1,0)})})})}),nil,nil do local t=q.
GearImage r,s=t.GearIcons,t.GearIcons.GenreImage end do local t=s:Clone()t.Name=
'AttributeOneImage't.RobloxLocked=true t.BackgroundColor3=Color3.new(1,0.2,0)t.
Position=UDim2.new(0.25,0,0,0)t.Parent=r end do local t=s:Clone()t.Name=
'AttributeTwoImage't.RobloxLocked=true t.BackgroundColor3=Color3.new(0.6,1,0.6)t
.Position=UDim2.new(0.5,0,0,0)t.Parent=r end do local t=s:Clone()t.Name=
'AttributeThreeImage't.RobloxLocked=true t.BackgroundColor3=Color3.new(0,0.5,0.5
)t.Position=UDim2.new(0.75,0,0,0)t.Parent=r end if game.CoreGui.Version<8 then
script:remove()return end local t t=function(u,v)return a('Frame',tostring(u),{
RobloxLocked=true,Size=UDim2.new(1,0,1,-70),Position=UDim2.new(0,0,0,20),
BackgroundTransparency=1,Parent=v,Visible=false})end local u u=function(v,w,x,y,
z)return a('ImageLabel',tostring(v),{RobloxLocked=true,Image=w,Size=x,
BackgroundTransparency=1,Position=y,Parent=z})end local v v=function(w,x,y,z,A)
local B=a('ImageButton',tostring(w),{RobloxLocked=true,Size=x,Position=y})if A
then B.Style=A else B.BackgroundColor3=Color3.new(0,0,0)B.BorderColor3=Color3.
new(1,1,1)end B.Parent=z return B end local w w=function(x,y,z,A)return a(
'TextLabel',{Name=x,RobloxLocked=true,BackgroundTransparency=1,Size=UDim2.new(0,
32,0,14),Font=Enum.Font.Arial,TextColor3=Color3.new(1,1,1),FontSize=Enum.
FontSize.Size14,Text=y,Position=z,Parent=A})end local x=a('Frame','Wardrobe',{
RobloxLocked=true,BackgroundTransparency=1,Visible=false,Size=UDim2.new(1,0,1,0)
,Parent=l,a('Frame','AssetList',{RobloxLocked=true,Position=UDim2.new(0,4,0,5),
Size=UDim2.new(0,85,1,-5),BackgroundTransparency=1,Visible=true}),a('TextButton'
,'PreviewButton',{RobloxLocked=true,Text='Rotate',BackgroundColor3=Color3.new(0,
0,0),BackgroundTransparency=0.5,BorderColor3=Color3.new(1,1,1),Position=UDim2.
new(1.2,-62,1,-50),Size=UDim2.new(0,125,0,50),Font=Enum.Font.ArialBold,FontSize=
Enum.FontSize.Size24,TextColor3=Color3.new(1,1,1),TextWrapped=true,
TextStrokeTransparency=0})})local y=a('Frame','PreviewAssetFrame',{RobloxLocked=
true,BackgroundTransparency=1,Position=UDim2.new(1,-240,0,30),Size=UDim2.new(0,
250,0,250),Parent=x})local z=a('TextButton','PreviewAssetBacking',{RobloxLocked=
true,Active=false,Text='',AutoButtonColor=false,Size=UDim2.new(1,0,1,0),Style=
Enum.ButtonStyle.RobloxButton,Visible=false,ZIndex=9,Parent=y,a('ImageLabel',
'PreviewAssetImage',{RobloxLocked=true,BackgroundTransparency=0.8,Position=UDim2
.new(0.5,-100,0,0),Size=UDim2.new(0,200,0,200),BorderSizePixel=0,ZIndex=10})})
local A=a('TextLabel','AssetNameLabel',{RobloxLocked=true,BackgroundTransparency
=1,Position=UDim2.new(0,0,1,-20),Size=UDim2.new(0.5,0,0,24),ZIndex=10,Font=Enum.
Font.Arial,Text='',TextColor3=Color3.new(1,1,1),TextScaled=true,Parent=z})do
local B=A:Clone()B.Name='AssetTypeLabel'B.RobloxLocked=true B.TextScaled=false B
.FontSize=Enum.FontSize.Size18 B.Position=UDim2.new(0.5,3,1,-20)B.Parent=z end
local B=a('Frame','CharacterPane',{RobloxLocked=true,Position=UDim2.new(1,-220,0
,32),Size=UDim2.new(0,220,1,-40),BackgroundTransparency=1,Visible=true,Parent=x,
a('TextLabel','CategoryLabel',{RobloxLocked=true,BackgroundTransparency=1,Font=
Enum.Font.ArialBold,FontSize=Enum.FontSize.Size18,Position=UDim2.new(0,0,0,-7),
Size=UDim2.new(1,0,0,20),TextXAlignment=Enum.TextXAlignment.Center,Text='All',
TextColor3=Color3.new(1,1,1)}),a('TextButton','SaveButton',{RobloxLocked=true,
Size=UDim2.new(0.6,0,0,50),Position=UDim2.new(0.2,0,1,-50),Style=Enum.
ButtonStyle.RobloxButton,Selected=false,Font=Enum.Font.ArialBold,FontSize=Enum.
FontSize.Size18,Text='Save',TextColor3=Color3.new(1,1,1)})})local C=t(
'FacesFrame',B)game:GetService'ContentProvider':Preload
'http://www.roblox.com/asset/?id=75460621'u('FaceZone',
'http://www.roblox.com/asset/?id=75460621',UDim2.new(0,157,0,137),UDim2.new(0.5,
-78,0.5,-68),C)v('Face',UDim2.new(0,64,0,64),UDim2.new(0.5,-32,0.5,-135),C)local
D=t('HeadsFrame',B)u('FaceZone','http://www.roblox.com/asset/?id=75460621',UDim2
.new(0,157,0,137),UDim2.new(0.5,-78,0.5,-68),D)v('Head',UDim2.new(0,64,0,64),
UDim2.new(0.5,-32,0.5,-135),D)local E=t('HatsFrame',B)game:GetService
'ContentProvider':Preload'http://www.roblox.com/asset/?id=75457888'local F=u(
'HatsZone','http://www.roblox.com/asset/?id=75457888',UDim2.new(0,186,0,184),
UDim2.new(0.5,-93,0.5,-100),E)v('Hat1Button',UDim2.new(0,64,0,64),UDim2.new(0,-1
,0,-1),F,Enum.ButtonStyle.RobloxButton)v('Hat2Button',UDim2.new(0,64,0,64),UDim2
.new(0,63,0,-1),F,Enum.ButtonStyle.RobloxButton)v('Hat3Button',UDim2.new(0,64,0,
64),UDim2.new(0,127,0,-1),F,Enum.ButtonStyle.RobloxButton)local G=t('PantsFrame'
,B)game:GetService'ContentProvider':Preload
'http://www.roblox.com/asset/?id=75457920'u('PantsZone',
'http://www.roblox.com/asset/?id=75457920',UDim2.new(0,121,0,99),UDim2.new(0.5,-
60,0.5,-100),G)local H=a('Frame','PantFrame',{RobloxLocked=true,Size=UDim2.new(0
,25,0,56),Position=UDim2.new(0.5,-26,0.5,0),BackgroundColor3=Color3.new(0,0,0),
BorderColor3=Color3.new(1,1,1),Parent=G})do local I=H:Clone()I.Position=UDim2.
new(0.5,3,0.5,0)I.RobloxLocked=true I.Parent=G end a('ImageButton',
'CurrentPants',{RobloxLocked=true,BackgroundTransparency=1,ZIndex=2,Position=
UDim2.new(0.5,-31,0.5,-4),Size=UDim2.new(0,54,0,59),Parent=G})local I=t(
'PackagesFrame',B)local J=v('TorsoMeshButton',UDim2.new(0,64,0,64),UDim2.new(0.5
,-32,0.5,-110),I,Enum.ButtonStyle.RobloxButton)w('TorsoLabel','Torso',UDim2.new(
0.5,-16,0,-25),J)local K=v('LeftLegMeshButton',UDim2.new(0,64,0,64),UDim2.new(
0.5,0,0.5,-25),I,Enum.ButtonStyle.RobloxButton)w('LeftLegLabel','Left Leg',UDim2
.new(0.5,-16,0,-25),K)local L=v('RightLegMeshButton',UDim2.new(0,64,0,64),UDim2.
new(0.5,-64,0.5,-25),I,Enum.ButtonStyle.RobloxButton)w('RightLegLabel',
'Right Leg',UDim2.new(0.5,-16,0,-25),L)local M=v('RightArmMeshButton',UDim2.new(
0,64,0,64),UDim2.new(0.5,-96,0.5,-110),I,Enum.ButtonStyle.RobloxButton)w(
'RightArmLabel','Right Arm',UDim2.new(0.5,-16,0,-25),M)local N=v(
'LeftArmMeshButton',UDim2.new(0,64,0,64),UDim2.new(0.5,32,0.5,-110),I,Enum.
ButtonStyle.RobloxButton)w('LeftArmLabel','Left Arm',UDim2.new(0.5,-16,0,-25),N)
local O=t('T-ShirtsFrame',B)game:GetService'ContentProvider':Preload
'http://www.roblox.com/asset/?id=75460642'u('TShirtZone',
'http://www.roblox.com/asset/?id=75460642',UDim2.new(0,121,0,154),UDim2.new(0.5,
-60,0.5,-100),O)v('TShirtButton',UDim2.new(0,64,0,64),UDim2.new(0.5,-32,0.5,-64)
,O)local P=t('ShirtsFrame',B)u('ShirtZone',
'http://www.roblox.com/asset/?id=75460642',UDim2.new(0,121,0,154),UDim2.new(0.5,
-60,0.5,-100),P)v('ShirtButton',UDim2.new(0,64,0,64),UDim2.new(0.5,-32,0.5,-64),
P)local Q=t('ColorFrame',B)game:GetService'ContentProvider':Preload
'http://www.roblox.com/asset/?id=76049888'local R=u('ColorZone',
'http://www.roblox.com/asset/?id=76049888',UDim2.new(0,120,0,150),UDim2.new(0.5,
-60,0.5,-100),Q)v('Head',UDim2.new(0.26,0,0.19,0),UDim2.new(0.37,0,0.02,0),R).
AutoButtonColor=false v('LeftArm',UDim2.new(0.19,0,0.36,0),UDim2.new(0.78,0,0.26
,0),R).AutoButtonColor=false v('RightArm',UDim2.new(0.19,0,0.36,0),UDim2.new(
0.025,0,0.26,0),R).AutoButtonColor=false v('Torso',UDim2.new(0.43,0,0.36,0),
UDim2.new(0.28,0,0.26,0),R).AutoButtonColor=false v('RightLeg',UDim2.new(0.19,0,
0.31,0),UDim2.new(0.275,0,0.67,0),R).AutoButtonColor=false v('LeftLeg',UDim2.
new(0.19,0,0.31,0),UDim2.new(0.525,0,0.67,0),R).AutoButtonColor=false return
script:Destroy()

File diff suppressed because it is too large Load Diff

View File

@ -1 +1 @@
return print("[Mercury]: Loaded corescript 59002209")
return print'[Mercury]: Loaded corescript 59002209'

View File

@ -1,731 +1,165 @@
print("[Mercury]: Loaded corescript 60595411")
local t = { }
local New
New = function(className, name, props)
if not (props ~= nil) then
props = name
name = nil
end
local obj = Instance.new(className)
if name then
obj.Name = name
end
local parent
for k, v in pairs(props) do
if type(k) == "string" then
if k == "Parent" then
parent = v
else
obj[k] = v
end
elseif type(k) == "number" and type(v) == "userdata" then
v.Parent = obj
end
end
obj.Parent = parent
return obj
end
local assert = assert
local Null
Null = function()
return Null
end
local StringBuilder = {
buffer = { }
}
StringBuilder.New = function(self)
local o = setmetatable({ }, self)
self.__index = self
o.buffer = { }
return o
end
StringBuilder.Append = function(self, s)
do
local _obj_0 = self.buffer
_obj_0[#_obj_0 + 1] = s
end
end
StringBuilder.ToString = function(self)
return table.concat(self.buffer)
end
local JsonWriter = {
backslashes = {
["\b"] = "\\b",
["\t"] = "\\t",
["\n"] = "\\n",
["\f"] = "\\f",
["\r"] = "\\r",
['"'] = '\\"',
["\\"] = "\\\\",
["/"] = "\\/"
}
}
JsonWriter.New = function(self)
local o = setmetatable({ }, self)
o.writer = StringBuilder:New()
self.__index = self
return o
end
JsonWriter.Append = function(self, s)
return self.writer:Append(s)
end
JsonWriter.ToString = function(self)
return self.writer:ToString()
end
JsonWriter.Write = function(self, o)
local _exp_0 = type(o)
if "nil" == _exp_0 then
return self:WriteNil()
elseif "boolean" == _exp_0 or "number" == _exp_0 then
return self:WriteString(o)
elseif "string" == _exp_0 then
return self:ParseString(o)
elseif "table" == _exp_0 then
return self:WriteTable(o)
elseif "function" == _exp_0 then
return self:WriteFunction(o)
elseif "thread" == _exp_0 or "userdata" == _exp_0 then
return self:WriteError(o)
end
end
JsonWriter.WriteNil = function(self)
return self:Append("null")
end
JsonWriter.WriteString = function(self, o)
return self:Append(tostring(o))
end
JsonWriter.ParseString = function(self, s)
self:Append('"')
self:Append(string.gsub(s, '[%z%c\\"/]', function(n)
local c = self.backslashes[n]
if c then
return c
end
return string.format("\\u%.4X", string.byte(n))
end))
return self:Append('"')
end
JsonWriter.IsArray = function(self, t)
local count = 0
local isindex
isindex = function(k)
if type(k) == "number" and k > 0 and math.floor(k) == k then
return true
end
return false
end
for k, _ in pairs(t) do
if not isindex(k) then
return false, "{", "}"
else
count = math.max(count, k)
end
end
return true, "[", "]", count
end
JsonWriter.WriteTable = function(self, t)
local ba, st, et, n = self:IsArray(t)
self:Append(st)
if ba then
for i = 1, n do
self:Write(t[i])
if i < n then
self:Append(",")
end
end
else
local first = true
for k, v in pairs(t) do
if not first then
self:Append(",")
end
first = false
self:ParseString(k)
self:Append(":")
self:Write(v)
end
end
return self:Append(et)
end
JsonWriter.WriteError = function(self, o)
return error(string.format("Encoding of %s unsupported", tostring(o)))
end
JsonWriter.WriteFunction = function(self, o)
if o == Null then
return self:WriteNil()
else
return self:WriteError(o)
end
end
local StringReader = {
s = "",
i = 0
}
StringReader.New = function(self, s)
local o = setmetatable({ }, self)
self.__index = self
o.s = s or o.s
return o
end
StringReader.Peek = function(self)
local i = self.i + 1
if i <= #self.s then
return string.sub(self.s, i, i)
end
return nil
end
StringReader.Next = function(self)
self.i = self.i + 1
if self.i <= #self.s then
return string.sub(self.s, self.i, self.i)
end
return nil
end
StringReader.All = function(self)
return self.s
end
local JsonReader = {
escapes = {
["t"] = "\t",
["n"] = "\n",
["f"] = "\f",
["r"] = "\r",
["b"] = "\b"
}
}
JsonReader.New = function(self, s)
local o = setmetatable({ }, self)
o.reader = StringReader:New(s)
self.__index = self
return o
end
JsonReader.Read = function(self)
self:SkipWhiteSpace()
local peek = self:Peek()
if not (peek ~= nil) then
return error(string.format("Nil string: '%s'", self:All()))
elseif peek == "{" then
return self:ReadObject()
elseif peek == "[" then
return self:ReadArray()
elseif peek == '"' then
return self:ReadString()
elseif string.find(peek, "[%+%-%d]") then
return self:ReadNumber()
elseif peek == "t" then
return self:ReadTrue()
elseif peek == "f" then
return self:ReadFalse()
elseif peek == "n" then
return self:ReadNull()
elseif peek == "/" then
self:ReadComment()
return self:Read()
else
return nil
end
end
JsonReader.ReadTrue = function(self)
self:TestReservedWord({
't',
'r',
'u',
'e'
})
return true
end
JsonReader.ReadFalse = function(self)
self:TestReservedWord({
'f',
'a',
'l',
's',
'e'
})
return false
end
JsonReader.ReadNull = function(self)
self:TestReservedWord({
'n',
'u',
'l',
'l'
})
return nil
end
JsonReader.TestReservedWord = function(self, t)
for _, v in ipairs(t) do
if self:Next() ~= v then
error(string.format("Error reading '%s': %s", table.concat(t), self:All()))
end
end
end
JsonReader.ReadNumber = function(self)
local result = self:Next()
local peek = self:Peek()
while (peek ~= nil) and string.find(peek, "[%+%-%d%.eE]") do
result = result .. self:Next()
peek = self:Peek()
end
result = tonumber(result)
if not (result ~= nil) then
return error(string.format("Invalid number: '%s'", result))
else
return result
end
end
JsonReader.ReadString = function(self)
local result = ""
assert(self:Next() == '"')
while self:Peek() ~= '"' do
local ch = self:Next()
if ch == "\\" then
ch = self:Next()
if self.escapes[ch] then
ch = self.escapes[ch]
end
end
result = result .. ch
end
assert(self:Next() == '"')
local fromunicode
fromunicode = function(m)
return string.char(tonumber(m, 16))
end
return string.gsub(result, "u%x%x(%x%x)", fromunicode)
end
JsonReader.ReadComment = function(self)
assert(self:Next() == "/")
local second = self:Next()
if second == "/" then
return self:ReadSingleLineComment()
elseif second == "*" then
return self:ReadBlockComment()
else
return error(string.format("Invalid comment: %s", self:All()))
end
end
JsonReader.ReadBlockComment = function(self)
local done = false
while not done do
local ch = self:Next()
if ch == "*" and self:Peek() == "/" then
done = true
end
if not done and ch == "/" and self:Peek() == "*" then
error(string.format("Invalid comment: %s, '/*' illegal.", self:All()))
end
end
return self:Next()
end
JsonReader.ReadSingleLineComment = function(self)
local ch = self:Next()
while ch ~= "\r" and ch ~= "\n" do
ch = self:Next()
end
end
JsonReader.ReadArray = function(self)
local result = { }
assert(self:Next() == "[")
local done = false
if self:Peek() == "]" then
done = true
end
while not done do
local item = self:Read()
result[#result + 1] = item
self:SkipWhiteSpace()
if self:Peek() == "]" then
done = true
end
if not done then
local ch = self:Next()
if ch ~= "," then
error(string.format("Invalid array: '%s' due to: '%s'", self:All(), ch))
end
end
end
assert("]" == self:Next())
return result
end
JsonReader.ReadObject = function(self)
local result = { }
assert(self:Next() == "{")
local done = false
if self:Peek() == "}" then
done = true
end
while not done do
local key = self:Read()
if type(key) ~= "string" then
error(string.format("Invalid non-string object key: %s", key))
end
self:SkipWhiteSpace()
local ch = self:Next()
if ch ~= ":" then
error(string.format("Invalid object: '%s' due to: '%s'", self:All(), ch))
end
self:SkipWhiteSpace()
local val = self:Read()
result[key] = val
self:SkipWhiteSpace()
if self:Peek() == "}" then
done = true
end
if not done then
ch = self:Next()
if ch ~= "," then
error(string.format("Invalid array: '%s' near: '%s'", self:All(), ch))
end
end
end
assert(self:Next() == "}")
return result
end
JsonReader.SkipWhiteSpace = function(self)
local p = self:Peek()
while (p ~= nil) and string.find(p, "[%s/]") do
if p == "/" then
self:ReadComment()
else
self:Next()
end
p = self:Peek()
end
end
JsonReader.Peek = function(self)
return self.reader:Peek()
end
JsonReader.Next = function(self)
return self.reader:Next()
end
JsonReader.All = function(self)
return self.reader:All()
end
local Encode
Encode = function(o)
local _with_0 = JsonWriter:New()
_with_0:Write(o)
_with_0:ToString()
return _with_0
end
local Decode
Decode = function(s)
local _with_0 = JsonReader:New(s)
_with_0:Read()
return _with_0
end
t.DecodeJSON = function(jsonString)
pcall(function()
return warn('RbxUtility.DecodeJSON is deprecated, please use Game:GetService("HttpService"):JSONDecode() instead.')
end)
if type(jsonString) == "string" then
return Decode(jsonString)
end
print("RbxUtil.DecodeJSON expects string argument!")
return nil
end
t.EncodeJSON = function(jsonTable)
pcall(function()
return warn('RbxUtility.EncodeJSON is deprecated, please use Game:GetService("HttpService"):JSONEncode() instead.')
end)
return Encode(jsonTable)
end
t.MakeWedge = function(x, y, z, _)
return game:GetService("Terrain"):AutoWedgeCell(x, y, z)
end
t.SelectTerrainRegion = function(regionToSelect, color, selectEmptyCells, selectionParent)
local terrain = game.Workspace:FindFirstChild("Terrain")
if not terrain then
return
end
assert(regionToSelect)
assert(color)
if not type(regionToSelect) == "Region3" then
error("regionToSelect (first arg), should be of type Region3, but is type", type(regionToSelect))
end
if not type(color) == "BrickColor" then
error("color (second arg), should be of type BrickColor, but is type", type(color))
end
local GetCell = terrain.GetCell
local WorldToCellPreferSolid = terrain.WorldToCellPreferSolid
local CellCenterToWorld = terrain.CellCenterToWorld
local emptyMaterial = Enum.CellMaterial.Empty
local selectionContainer = New("Model", "SelectionContainer", {
Archivable = false,
Parent = (function()
if selectionParent then
return selectionParent
else
return game.Workspace
end
end)()
})
local updateSelection
local currentKeepAliveTag
local aliveCounter = 0
local lastRegion
local adornments = { }
local reusableAdorns = { }
local selectionPart = New("Part", "SelectionPart", {
Transparency = 1,
Anchored = true,
Locked = true,
CanCollide = false,
Size = Vector3.new(4.2, 4.2, 4.2)
})
local selectionBox = Instance.new("SelectionBox")
local createAdornment
createAdornment = function(theColor)
local selectionPartClone
local selectionBoxClone
if #reusableAdorns > 0 then
selectionPartClone = reusableAdorns[1]["part"]
selectionBoxClone = reusableAdorns[1]["box"]
table.remove(reusableAdorns, 1)
selectionBoxClone.Visible = true
else
selectionPartClone = selectionPart:Clone()
selectionPartClone.Archivable = false
selectionBoxClone = selectionBox:Clone()
selectionBoxClone.Archivable = false
selectionBoxClone.Adornee = selectionPartClone
selectionBoxClone.Parent = selectionContainer
selectionBoxClone.Adornee = selectionPartClone
selectionBoxClone.Parent = selectionContainer
end
if theColor then
selectionBoxClone.Color = theColor
end
return selectionPartClone, selectionBoxClone
end
local cleanUpAdornments
cleanUpAdornments = function()
for cellPos, adornTable in pairs(adornments) do
if adornTable.KeepAlive ~= currentKeepAliveTag then
adornTable.SelectionBox.Visible = false
table.insert(reusableAdorns, {
part = adornTable.SelectionPart,
box = adornTable.SelectionBox
})
adornments[cellPos] = nil
end
end
end
local incrementAliveCounter
incrementAliveCounter = function()
aliveCounter = aliveCounter + 1
if aliveCounter > 1000000 then
aliveCounter = 0
end
return aliveCounter
end
local adornFullCellsInRegion
adornFullCellsInRegion = function(region, color)
local regionBegin = region.CFrame.p - region.Size / 2 + Vector3.new(2, 2, 2)
local regionEnd = region.CFrame.p + region.Size / 2 - Vector3.new(2, 2, 2)
local cellPosBegin = WorldToCellPreferSolid(terrain, regionBegin)
local cellPosEnd = WorldToCellPreferSolid(terrain, regionEnd)
currentKeepAliveTag = incrementAliveCounter()
for y = cellPosBegin.y, cellPosEnd.y do
for z = cellPosBegin.z, cellPosEnd.z do
for x = cellPosBegin.x, cellPosEnd.x do
local cellMaterial = GetCell(terrain, x, y, z)
if cellMaterial ~= emptyMaterial then
local cframePos = CellCenterToWorld(terrain, x, y, z)
local cellPos = Vector3int16.new(x, y, z)
local updated = false
for cellPosAdorn, adornTable in pairs(adornments) do
if cellPosAdorn == cellPos then
adornTable.KeepAlive = currentKeepAliveTag
if color then
adornTable.SelectionBox.Color = color
end
updated = true
break
end
end
if not updated then
local selectionPart, selectionBox
selectionPart, selectionBox = createAdornment(color)
selectionPart.Size = Vector3.new(4, 4, 4)
selectionPart.CFrame = CFrame.new(cframePos)
local adornTable = {
SelectionPart = selectionPart,
SelectionBox = selectionBox,
KeepAlive = currentKeepAliveTag
}
adornments[cellPos] = adornTable
end
end
end
end
end
return cleanUpAdornments()
end
lastRegion = regionToSelect
if selectEmptyCells then
local selectionPart, selectionBox
selectionPart, selectionBox = createAdornment(color)
selectionPart.Size = regionToSelect.Size
selectionPart.CFrame = regionToSelect.CFrame
adornments.SelectionPart = selectionPart
adornments.SelectionBox = selectionBox
updateSelection = function(newRegion, color)
if newRegion and newRegion ~= lastRegion then
lastRegion = newRegion
selectionPart.Size = newRegion.Size
selectionPart.CFrame = newRegion.CFrame
end
if color then
selectionBox.Color = color
end
end
else
adornFullCellsInRegion(regionToSelect, color)
updateSelection = function(newRegion, color)
if newRegion and newRegion ~= lastRegion then
lastRegion = newRegion
return adornFullCellsInRegion(newRegion, color)
end
end
end
local destroyFunc
destroyFunc = function()
updateSelection = nil
if selectionContainer ~= nil then
selectionContainer:Destroy()
end
adornments = nil
end
return updateSelection, destroyFunc
end
t.CreateSignal = function()
local this = { }
local mBindableEvent = Instance.new("BindableEvent")
local mAllCns = { }
this.connect = function(self, func)
if self ~= this then
error("connect must be called with `:`, not `.`", 2)
end
if type(func) ~= "function" then
error("Argument #1 of connect must be a function, got a " .. tostring(type(func)), 2)
end
local cn = mBindableEvent.Event:connect(func)
mAllCns[cn] = true
local pubCn = { }
pubCn.disconnect = function(self)
cn:disconnect()
mAllCns[cn] = nil
end
pubCn.Disconnect = pubCn.disconnect
return pubCn
end
this.disconnect = function(self)
if self ~= this then
error("disconnect must be called with `:`, not `.`", 2)
end
for cn, _ in pairs(mAllCns) do
cn:disconnect()
mAllCns[cn] = nil
end
end
this.wait = function(self)
if self ~= this then
error("wait must be called with `:`, not `.`", 2)
end
return mBindableEvent.Event:wait()
end
this.fire = function(self, ...)
if self ~= this then
error("fire must be called with `:`, not `.`", 2)
end
return mBindableEvent:Fire(...)
end
this.Connect = this.connect
this.Disconnect = this.disconnect
this.Wait = this.wait
this.Fire = this.fire
return this
end
local Create_PrivImpl
Create_PrivImpl = function(objectType)
if type(objectType) ~= "string" then
error("Argument of Create must be a string", 2)
end
return function(dat)
dat = dat or { }
local obj = Instance.new(objectType)
local parent
local ctor
for k, v in pairs(dat) do
if type(k) == "string" then
if k == "Parent" then
parent = v
else
obj[k] = v
end
elseif type(k) == "number" then
if type(v) ~= "userdata" then
error("Bad entry in Create body: Numeric keys must be paired with children, got a: " .. tostring(type(v)), 2)
end
v.Parent = obj
elseif type(k) == "table" and k.__eventname then
if type(v) ~= "function" then
error("Bad entry in Create body: Key `[Create.E'" .. tostring(k.__eventname) .. "']` must have a function value, got: " .. tostring(v), 2)
end
obj[k.__eventname]:connect(v)
elseif k == t.Create then
if type(v) ~= "function" then
error("Bad entry in Create body: Key `[Create]` should be paired with a constructor function, got: " .. tostring(v), 2)
elseif ctor then
error("Bad entry in Create body: Only one constructor function is allowed", 2)
end
ctor = v
else
error("Bad entry (" .. tostring(k) .. " => " .. tostring(v) .. ") in Create body", 2)
end
end
if ctor ~= nil then
ctor(obj)
end
if parent then
obj.Parent = parent
end
return obj
end
end
t.Create = setmetatable({ }, {
["__call"] = function(_, ...)
return Create_PrivImpl(...)
end
})
t.Create.E = function(eventName)
return {
__eventname = eventName
}
end
t.Help = function(funcNameOrFunc)
if "DecodeJSON" == funcNameOrFunc or t.DecodeJSON == funcNameOrFunc then
return "Function DecodeJSON. " .. "Arguments: (string). " .. "Side effect: returns a table with all parsed JSON values"
elseif "EncodeJSON" == funcNameOrFunc or t.EncodeJSON == funcNameOrFunc then
return "Function EncodeJSON. " .. "Arguments: (table). " .. "Side effect: returns a string composed of argument table in JSON data format"
elseif "MakeWedge" == funcNameOrFunc or t.MakeWedge == funcNameOrFunc 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 "
elseif "SelectTerrainRegion" == funcNameOrFunc or t.SelectTerrainRegion == funcNameOrFunc 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"
elseif "CreateSignal" == funcNameOrFunc or t.CreateSignal == funcNameOrFunc 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 in" .. "Lua 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')."
elseif "Signal:connect" == funcNameOrFunc 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|."
elseif "Signal:wait" == funcNameOrFunc 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."
elseif "Signal:fire" == funcNameOrFunc 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."
elseif "Signal:disconnect" == funcNameOrFunc 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."
elseif "Create" == funcNameOrFunc 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 t
print'[Mercury]: Loaded corescript 60595411'local a,b={},nil b=function(c,d,e)if
not(e~=nil)then e=d d=nil end local f=Instance.new(c)if d then f.Name=d end
local g for h,i in pairs(e)do if type(h)=='string'then if h=='Parent'then g=i
else f[h]=i end elseif type(h)=='number'and type(i)=='userdata'then i.Parent=f
end end f.Parent=g return f end local c,d=assert,nil d=function()return d end
local e={buffer={}}e.New=function(f)local g=setmetatable({},f)f.__index=f g.
buffer={}return g end e.Append=function(f,g)do local h=f.buffer h[#h+1]=g end
end e.ToString=function(f)return table.concat(f.buffer)end local f={backslashes=
{['\b']='\\b',['\t']='\\t',['\n']='\\n',['\f']='\\f',['\r']='\\r',['"']='\\"',[
'\\']='\\\\',['/']='\\/'}}f.New=function(g)local h=setmetatable({},g)h.writer=e:
New()g.__index=g return h end f.Append=function(g,h)return g.writer:Append(h)end
f.ToString=function(g)return g.writer:ToString()end f.Write=function(g,h)local i
=type(h)if'nil'==i then return g:WriteNil()elseif'boolean'==i or'number'==i then
return g:WriteString(h)elseif'string'==i then return g:ParseString(h)elseif
'table'==i then return g:WriteTable(h)elseif'function'==i then return g:
WriteFunction(h)elseif'thread'==i or'userdata'==i then return g:WriteError(h)end
end f.WriteNil=function(g)return g:Append'null'end f.WriteString=function(g,h)
return g:Append(tostring(h))end f.ParseString=function(g,h)g:Append'"'g:Append(
string.gsub(h,'[%z%c\\"/]',function(i)local j=g.backslashes[i]if j then return j
end return string.format('\\u%.4X',string.byte(i))end))return g:Append'"'end f.
IsArray=function(g,h)local i,j=0,nil j=function(k)if type(k)=='number'and k>0
and math.floor(k)==k then return true end return false end for k,l in pairs(h)do
if not j(k)then return false,'{','}'else i=math.max(i,k)end end return true,'[',
']',i end f.WriteTable=function(g,h)local i,j,k,l=g:IsArray(h)g:Append(j)if i
then for m=1,l do g:Write(h[m])if m<l then g:Append','end end else local m=true
for n,o in pairs(h)do if not m then g:Append','end m=false g:ParseString(n)g:
Append':'g:Write(o)end end return g:Append(k)end f.WriteError=function(g,h)
return error(string.format('Encoding of %s unsupported',tostring(h)))end f.
WriteFunction=function(g,h)if h==d then return g:WriteNil()else return g:
WriteError(h)end end local g={s='',i=0}g.New=function(h,i)local j=setmetatable({
},h)h.__index=h j.s=i or j.s return j end g.Peek=function(h)local i=h.i+1 if i<=
#h.s then return string.sub(h.s,i,i)end return nil end g.Next=function(h)h.i=h.i
+1 if h.i<=#h.s then return string.sub(h.s,h.i,h.i)end return nil end g.All=
function(h)return h.s end local h={escapes={['t']='\t',['n']='\n',['f']='\f',[
'r']='\r',['b']='\b'}}h.New=function(i,j)local k=setmetatable({},i)k.reader=g:
New(j)i.__index=i return k end h.Read=function(i)i:SkipWhiteSpace()local j=i:
Peek()if not(j~=nil)then return error(string.format("Nil string: '%s'",i:All()))
elseif j=='{'then return i:ReadObject()elseif j=='['then return i:ReadArray()
elseif j=='"'then return i:ReadString()elseif string.find(j,'[%+%-%d]')then
return i:ReadNumber()elseif j=='t'then return i:ReadTrue()elseif j=='f'then
return i:ReadFalse()elseif j=='n'then return i:ReadNull()elseif j=='/'then i:
ReadComment()return i:Read()else return nil end end h.ReadTrue=function(i)i:
TestReservedWord{'t','r','u','e'}return true end h.ReadFalse=function(i)i:
TestReservedWord{'f','a','l','s','e'}return false end h.ReadNull=function(i)i:
TestReservedWord{'n','u','l','l'}return nil end h.TestReservedWord=function(i,j)
for k,l in ipairs(j)do if i:Next()~=l then error(string.format(
"Error reading '%s': %s",table.concat(j),i:All()))end end end h.ReadNumber=
function(i)local j,k=i:Next(),i:Peek()while(k~=nil)and string.find(k,
'[%+%-%d%.eE]')do j=j..i:Next()k=i:Peek()end j=tonumber(j)if not(j~=nil)then
return error(string.format("Invalid number: '%s'",j))else return j end end h.
ReadString=function(i)local j=''c(i:Next()=='"')while i:Peek()~='"'do local k=i:
Next()if k=='\\'then k=i:Next()if i.escapes[k]then k=i.escapes[k]end end j=j..k
end c(i:Next()=='"')local k k=function(l)return string.char(tonumber(l,16))end
return string.gsub(j,'u%x%x(%x%x)',k)end h.ReadComment=function(i)c(i:Next()==
'/')local j=i:Next()if j=='/'then return i:ReadSingleLineComment()elseif j=='*'
then return i:ReadBlockComment()else return error(string.format(
'Invalid comment: %s',i:All()))end end h.ReadBlockComment=function(i)local j=
false while not j do local k=i:Next()if k=='*'and i:Peek()=='/'then j=true end
if not j and k=='/'and i:Peek()=='*'then error(string.format(
"Invalid comment: %s, '/*' illegal.",i:All()))end end return i:Next()end h.
ReadSingleLineComment=function(i)local j=i:Next()while j~='\r'and j~='\n'do j=i:
Next()end end h.ReadArray=function(i)local j={}c(i:Next()=='[')local k=false if
i:Peek()==']'then k=true end while not k do local l=i:Read()j[#j+1]=l i:
SkipWhiteSpace()if i:Peek()==']'then k=true end if not k then local m=i:Next()if
m~=','then error(string.format("Invalid array: '%s' due to: '%s'",i:All(),m))end
end end c(']'==i:Next())return j end h.ReadObject=function(i)local j={}c(i:Next(
)=='{')local k=false if i:Peek()=='}'then k=true end while not k do local l=i:
Read()if type(l)~='string'then error(string.format(
'Invalid non-string object key: %s',l))end i:SkipWhiteSpace()local m=i:Next()if
m~=':'then error(string.format("Invalid object: '%s' due to: '%s'",i:All(),m))
end i:SkipWhiteSpace()local n=i:Read()j[l]=n i:SkipWhiteSpace()if i:Peek()=='}'
then k=true end if not k then m=i:Next()if m~=','then error(string.format(
"Invalid array: '%s' near: '%s'",i:All(),m))end end end c(i:Next()=='}')return j
end h.SkipWhiteSpace=function(i)local j=i:Peek()while(j~=nil)and string.find(j,
'[%s/]')do if j=='/'then i:ReadComment()else i:Next()end j=i:Peek()end end h.
Peek=function(i)return i.reader:Peek()end h.Next=function(i)return i.reader:
Next()end h.All=function(i)return i.reader:All()end local i i=function(j)local k
=f:New()k:Write(j)k:ToString()return k end local j j=function(k)local l=h:New(k)
l:Read()return l end a.DecodeJSON=function(k)pcall(function()return warn
[[RbxUtility.DecodeJSON is deprecated, please use Game:GetService("HttpService"):JSONDecode() instead.]]
end)if type(k)=='string'then return j(k)end print
'RbxUtil.DecodeJSON expects string argument!'return nil end a.EncodeJSON=
function(k)pcall(function()return warn
[[RbxUtility.EncodeJSON is deprecated, please use Game:GetService("HttpService"):JSONEncode() instead.]]
end)return i(k)end a.MakeWedge=function(k,l,m,n)return game:GetService'Terrain':
AutoWedgeCell(k,l,m)end a.SelectTerrainRegion=function(k,l,m,n)local o=game.
Workspace:FindFirstChild'Terrain'if not o then return end c(k)c(l)if not type(k)
=='Region3'then error(
[[regionToSelect (first arg), should be of type Region3, but is type]],type(k))
end if not type(l)=='BrickColor'then error(
[[color (second arg), should be of type BrickColor, but is type]],type(l))end
local p,q,r,s,t,u,v,w,x,y,z,A,B,C=o.GetCell,o.WorldToCellPreferSolid,o.
CellCenterToWorld,Enum.CellMaterial.Empty,b('Model','SelectionContainer',{
Archivable=false,Parent=(function()if n then return n else return game.Workspace
end end)()}),nil,nil,0,nil,{},{},b('Part','SelectionPart',{Transparency=1,
Anchored=true,Locked=true,CanCollide=false,Size=Vector3.new(4.2,4.2,4.2)}),
Instance.new'SelectionBox',nil C=function(D)local E,F if#z>0 then E=z[1]['part']
F=z[1]['box']table.remove(z,1)F.Visible=true else E=A:Clone()E.Archivable=false
F=B:Clone()F.Archivable=false F.Adornee=E F.Parent=t F.Adornee=E F.Parent=t end
if D then F.Color=D end return E,F end local D D=function()for E,F in pairs(y)do
if F.KeepAlive~=v then F.SelectionBox.Visible=false table.insert(z,{part=F.
SelectionPart,box=F.SelectionBox})y[E]=nil end end end local E E=function()w=w+1
if w>1000000 then w=0 end return w end local F F=function(G,H)local I,J=G.CFrame
.p-G.Size/2+Vector3.new(2,2,2),G.CFrame.p+G.Size/2-Vector3.new(2,2,2)local K,L=
q(o,I),q(o,J)v=E()for M=K.y,L.y do for N=K.z,L.z do for O=K.x,L.x do local P=p(o
,O,M,N)if P~=s then local Q,R,S=r(o,O,M,N),Vector3int16.new(O,M,N),false for T,U
in pairs(y)do if T==R then U.KeepAlive=v if H then U.SelectionBox.Color=H end S=
true break end end if not S then local V,W V,W=C(H)V.Size=Vector3.new(4,4,4)V.
CFrame=CFrame.new(Q)local X={SelectionPart=V,SelectionBox=W,KeepAlive=v}y[R]=X
end end end end end return D()end x=k if m then local G,H G,H=C(l)G.Size=k.Size
G.CFrame=k.CFrame y.SelectionPart=G y.SelectionBox=H u=function(I,J)if I and I~=
x then x=I G.Size=I.Size G.CFrame=I.CFrame end if J then H.Color=J end end else
F(k,l)u=function(G,H)if G and G~=x then x=G return F(G,H)end end end local G G=
function()u=nil if t~=nil then t:Destroy()end y=nil end return u,G end a.
CreateSignal=function()local k,l,m={},Instance.new'BindableEvent',{}k.connect=
function(n,o)if n~=k then error('connect must be called with `:`, not `.`',2)end
if type(o)~='function'then error(
'Argument #1 of connect must be a function, got a '..tostring(type(o)),2)end
local p=l.Event:connect(o)m[p]=true local q={}q.disconnect=function(r)p:
disconnect()m[p]=nil end q.Disconnect=q.disconnect return q end k.disconnect=
function(n)if n~=k then error('disconnect must be called with `:`, not `.`',2)
end for o,p in pairs(m)do o:disconnect()m[o]=nil end end k.wait=function(n)if n
~=k then error('wait must be called with `:`, not `.`',2)end return l.Event:
wait()end k.fire=function(n,...)if n~=k then error(
'fire must be called with `:`, not `.`',2)end return l:Fire(...)end k.Connect=k.
connect k.Disconnect=k.disconnect k.Wait=k.wait k.Fire=k.fire return k end local
k k=function(l)if type(l)~='string'then error(
'Argument of Create must be a string',2)end return function(m)m=m or{}local n,o,
p=Instance.new(l),nil,nil for q,r in pairs(m)do if type(q)=='string'then if q==
'Parent'then o=r else n[q]=r end elseif type(q)=='number'then if type(r)~=
'userdata'then error(
[[Bad entry in Create body: Numeric keys must be paired with children, got a: ]]
..tostring(type(r)),2)end r.Parent=n elseif type(q)=='table'and q.__eventname
then if type(r)~='function'then error(
"Bad entry in Create body: Key `[Create.E'"..tostring(q.__eventname)..
"']` must have a function value, got: "..tostring(r),2)end n[q.__eventname]:
connect(r)elseif q==a.Create then if type(r)~='function'then error(
[[Bad entry in Create body: Key `[Create]` should be paired with a constructor function, got: ]]
..tostring(r),2)elseif p then error(
[[Bad entry in Create body: Only one constructor function is allowed]],2)end p=r
else error('Bad entry ('..tostring(q)..' => '..tostring(r)..') in Create body',2
)end end if p~=nil then p(n)end if o then n.Parent=o end return n end end a.
Create=setmetatable({},{['__call']=function(l,...)return k(...)end})a.Create.E=
function(l)return{__eventname=l}end a.Help=function(l)if'DecodeJSON'==l or a.
DecodeJSON==l then return
[[Function DecodeJSON. Arguments: (string). Side effect: returns a table with all parsed JSON values]]
elseif'EncodeJSON'==l or a.EncodeJSON==l then return
[[Function EncodeJSON. Arguments: (table). Side effect: returns a string composed of argument table in JSON data format]]
elseif'MakeWedge'==l or a.MakeWedge==l 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 ]]
elseif'SelectTerrainRegion'==l or a.SelectTerrainRegion==l 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]]
elseif'CreateSignal'==l or a.CreateSignal==l 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').]]
elseif'Signal:connect'==l 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|.]]
elseif'Signal:wait'==l 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.]]
elseif'Signal:fire'==l 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.]]
elseif'Signal:disconnect'==l 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.]]
elseif'Create'==l 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

@ -1,22 +1,8 @@
print("[Mercury]: Loaded corescript 60595695")
local deepakTestingPlace = 3569749
local sc = game:GetService("ScriptContext")
local tries = 0
while not (sc or tries > 2) do
tries = tries + 1
sc = game:GetService("ScriptContext")
wait(0.2)
end
if sc then
sc:RegisterLibrary("Libraries/RbxGui", "45284430")
sc:RegisterLibrary("Libraries/RbxGear", "45374389")
if game.PlaceId == deepakTestingPlace then
sc:RegisterLibrary("Libraries/RbxStatus", "52177566")
end
sc:RegisterLibrary("Libraries/RbxUtility", "60595411")
sc:RegisterLibrary("Libraries/RbxStamper", "73157242")
sc:LibraryRegistrationComplete()
else
print("failed to find script context, libraries did not load")
end
return sc
print'[Mercury]: Loaded corescript 60595695'local a,b,c=3569749,game:GetService
'ScriptContext',0 while not(b or c>2)do c=c+1 b=game:GetService'ScriptContext'
wait(0.2)end if b then b:RegisterLibrary('Libraries/RbxGui','45284430')b:
RegisterLibrary('Libraries/RbxGear','45374389')if game.PlaceId==a then b:
RegisterLibrary('Libraries/RbxStatus','52177566')end b:RegisterLibrary(
'Libraries/RbxUtility','60595411')b:RegisterLibrary('Libraries/RbxStamper',
'73157242')b:LibraryRegistrationComplete()else print
'failed to find script context, libraries did not load'end return b

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,390 +1,87 @@
print("[Mercury]: Loaded corescript 89449093")
if game.CoreGui.Version < 7 then
return
end
local waitForChild
waitForChild = function(instance, name)
while not instance:FindFirstChild(name) do
instance.ChildAdded:wait()
end
return instance:FindFirstChild(name)
end
local waitForProperty
waitForProperty = function(instance, property)
while not instance[property] do
instance.Changed:wait()
end
end
waitForChild(game, "Players")
if #game.Players:GetChildren() < 1 then
game.Players.ChildAdded:wait()
end
waitForProperty(game.Players, "LocalPlayer")
local backpack = script.Parent
waitForChild(backpack, "Gear")
local screen = script.Parent.Parent
assert(screen:IsA("ScreenGui"))
waitForChild(backpack, "Tabs")
waitForChild(backpack.Tabs, "CloseButton")
local closeButton = backpack.Tabs.CloseButton
waitForChild(backpack.Tabs, "InventoryButton")
local inventoryButton = backpack.Tabs.InventoryButton
local wardrobeButton
if game.CoreGui.Version >= 8 then
waitForChild(backpack.Tabs, "WardrobeButton")
wardrobeButton = backpack.Tabs.WardrobeButton
end
waitForChild(backpack.Parent, "ControlFrame")
local backpackButton = waitForChild(backpack.Parent.ControlFrame, "BackpackButton")
local currentTab = "gear"
local searchFrame = waitForChild(backpack, "SearchFrame")
waitForChild(backpack.SearchFrame, "SearchBoxFrame")
local searchBox = waitForChild(backpack.SearchFrame.SearchBoxFrame, "SearchBox")
local searchButton = waitForChild(backpack.SearchFrame, "SearchButton")
local resetButton = waitForChild(backpack.SearchFrame, "ResetButton")
local robloxGui = waitForChild(Game.CoreGui, "RobloxGui")
local currentLoadout = waitForChild(robloxGui, "CurrentLoadout")
local loadoutBackground = waitForChild(currentLoadout, "Background")
local canToggle = true
local readyForNextEvent = true
local backpackIsOpen = false
local active = true
local disabledByDeveloper = false
local humanoidDiedCon
local guiTweenSpeed = 0.25
local searchDefaultText = "Search..."
local tilde = "~"
local backquote = "`"
local backpackSize = UDim2.new(0, 600, 0, 400)
if robloxGui.AbsoluteSize.Y <= 320 then
backpackSize = UDim2.new(0, 200, 0, 140)
end
local createPublicEvent
createPublicEvent = function(eventName)
assert(eventName, "eventName is nil")
assert(tostring(eventName), "eventName is not a string")
local _with_0 = Instance.new("BindableEvent")
_with_0.Name = tostring(eventName)
_with_0.Parent = script
return _with_0
end
local createPublicFunction
createPublicFunction = function(funcName, invokeFunc)
assert(funcName, "funcName is nil")
assert(tostring(funcName), "funcName is not a string")
assert(invokeFunc, "invokeFunc is nil")
assert(type(invokeFunc) == "function", "invokeFunc should be of type 'function'")
local _with_0 = Instance.new("BindableFunction")
_with_0.Name = tostring(funcName)
_with_0.OnInvoke = invokeFunc
_with_0.Parent = script
return _with_0
end
local resizeEvent = createPublicEvent("ResizeEvent")
local backpackOpenEvent = createPublicEvent("BackpackOpenEvent")
local backpackCloseEvent = createPublicEvent("BackpackCloseEvent")
local tabClickedEvent = createPublicEvent("TabClickedEvent")
local searchRequestedEvent = createPublicEvent("SearchRequestedEvent")
local resetSearchBoxGui
resetSearchBoxGui = function()
resetButton.Visible = false
searchBox.Text = searchDefaultText
end
local resetSearch
resetSearch = function()
resetSearchBoxGui()
return searchRequestedEvent:Fire()
end
local deactivateBackpack
deactivateBackpack = function()
backpack.Visible = false
active = false
end
local initHumanoidDiedConnections
initHumanoidDiedConnections = function()
if humanoidDiedCon then
humanoidDiedCon:disconnect()
end
waitForProperty(game.Players.LocalPlayer, "Character")
waitForChild(game.Players.LocalPlayer.Character, "Humanoid")
humanoidDiedCon = game.Players.LocalPlayer.Character.Humanoid.Died:connect(deactivateBackpack)
end
local hideBackpack
hideBackpack = function()
backpackIsOpen = false
readyForNextEvent = false
backpackButton.Selected = false
resetSearch()
backpackCloseEvent:Fire(currentTab)
backpack.Tabs.Visible = false
searchFrame.Visible = false
backpack:TweenSizeAndPosition(UDim2.new(0, backpackSize.X.Offset, 0, 0), UDim2.new(0.5, -backpackSize.X.Offset / 2, 1, -85), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, guiTweenSpeed, true, function()
game.GuiService:RemoveCenterDialog(backpack)
backpack.Visible = false
backpackButton.Selected = false
end)
return delay(guiTweenSpeed, function()
game.GuiService:RemoveCenterDialog(backpack)
backpack.Visible = false
backpackButton.Selected = false
readyForNextEvent = true
canToggle = true
end)
end
local showBackpack
showBackpack = function()
game.GuiService:AddCenterDialog(backpack, Enum.CenterDialogType.PlayerInitiatedDialog, function()
backpack.Visible = true
backpackButton.Selected = true
end, function()
backpack.Visible = false
backpackButton.Selected = false
end)
backpack.Visible = true
backpackButton.Selected = true
backpack:TweenSizeAndPosition(backpackSize, UDim2.new(0.5, -backpackSize.X.Offset / 2, 1, -backpackSize.Y.Offset - 88), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, guiTweenSpeed, true)
return delay(guiTweenSpeed, function()
backpack.Tabs.Visible = false
searchFrame.Visible = true
backpackOpenEvent:Fire(currentTab)
canToggle = true
readyForNextEvent = true
backpackButton.Image = "http://www.roblox.com/asset/?id=97644093"
backpackButton.Position = UDim2.new(0.5, -60, 1, -backpackSize.Y.Offset - 103)
end)
end
local toggleBackpack
toggleBackpack = function()
if not game.Players.LocalPlayer then
return
end
if not game.Players.LocalPlayer["Character"] then
return
end
if not canToggle then
return
end
if not readyForNextEvent then
return
end
readyForNextEvent = false
canToggle = false
backpackIsOpen = not backpackIsOpen
if backpackIsOpen then
loadoutBackground.Image = "http://www.roblox.com/asset/?id=97623721"
loadoutBackground.Position = UDim2.new(-0.03, 0, -0.17, 0)
loadoutBackground.Size = UDim2.new(1.05, 0, 1.25, 0)
loadoutBackground.ZIndex = 2.0
loadoutBackground.Visible = true
return showBackpack()
else
backpackButton.Position = UDim2.new(0.5, -60, 1, -44)
loadoutBackground.Visible = false
backpackButton.Selected = false
backpackButton.Image = "http://www.roblox.com/asset/?id=97617958"
loadoutBackground.Image = "http://www.roblox.com/asset/?id=96536002"
loadoutBackground.Position = UDim2.new(-0.1, 0, -0.1, 0)
loadoutBackground.Size = UDim2.new(1.2, 0, 1.2, 0)
hideBackpack()
local clChildren = currentLoadout:GetChildren()
for i = 1, #clChildren do
if clChildren[i] and clChildren[i]:IsA("Frame") then
local frame = clChildren[i]
if #frame:GetChildren() > 0 then
backpackButton.Position = UDim2.new(0.5, -60, 1, -108)
backpackButton.Visible = true
loadoutBackground.Visible = true
if frame:GetChildren()[1]:IsA("ImageButton") then
local imgButton = frame:GetChildren()[1]
imgButton.Active = true
imgButton.Draggable = false
end
end
end
end
end
end
local activateBackpack
activateBackpack = function()
initHumanoidDiedConnections()
active = true
backpack.Visible = backpackIsOpen
if backpackIsOpen then
return toggleBackpack()
end
end
local closeBackpack
closeBackpack = function()
if backpackIsOpen then
return toggleBackpack()
end
end
local setSelected
setSelected = function(tab)
assert(tab)
assert(tab:IsA("TextButton"))
tab.BackgroundColor3 = Color3.new(1, 1, 1)
tab.TextColor3 = Color3.new(0, 0, 0)
tab.Selected = true
tab.ZIndex = 3
return tab
end
local setUnselected
setUnselected = function(tab)
assert(tab)
assert(tab:IsA("TextButton"))
tab.BackgroundColor3 = Color3.new(0, 0, 0)
tab.TextColor3 = Color3.new(1, 1, 1)
tab.Selected = false
tab.ZIndex = 1
return tab
end
local updateTabGui
updateTabGui = function(selectedTab)
assert(selectedTab)
if selectedTab == "gear" then
setSelected(inventoryButton)
return setUnselected(wardrobeButton)
elseif selectedTab == "wardrobe" then
setSelected(wardrobeButton)
return setUnselected(inventoryButton)
end
end
local mouseLeaveTab
mouseLeaveTab = function(button)
assert(button)
assert(button:IsA("TextButton"))
if button.Selected then
return
end
button.BackgroundColor3 = Color3.new(0, 0, 0)
end
local mouseOverTab
mouseOverTab = function(button)
assert(button)
assert(button:IsA("TextButton"))
if button.Selected then
return
end
button.BackgroundColor3 = Color3.new(39 / 255, 39 / 255, 39 / 255)
end
local newTabClicked
newTabClicked = function(tabName)
assert(tabName)
tabName = string.lower(tabName)
currentTab = tabName
updateTabGui(tabName)
tabClickedEvent:Fire(tabName)
return resetSearch()
end
local trim
trim = function(s)
return s:gsub("^%s*(.-)%s*$", "%1")
end
local doSearch
doSearch = function()
local searchText = searchBox.Text
if searchText == "" then
resetSearch()
return
end
searchText = trim(searchText)
resetButton.Visible = true
return searchRequestedEvent:Fire(searchText)
end
local backpackReady
backpackReady = function()
readyForNextEvent = true
end
local coreGuiChanged
coreGuiChanged = function(coreGuiType, enabled)
if coreGuiType == Enum.CoreGuiType.Backpack or coreGuiType == Enum.CoreGuiType.All then
active = enabled
disabledByDeveloper = not enabled
do
local _with_0 = game:GetService("GuiService")
if disabledByDeveloper then
pcall(function()
_with_0:RemoveKey(tilde)
return _with_0:RemoveKey(backquote)
end)
else
_with_0:AddKey(tilde)
_with_0:AddKey(backquote)
end
end
resetSearch()
searchFrame.Visible = enabled and backpackIsOpen
currentLoadout.Visible = enabled
backpack.Visible = enabled
backpackButton.Visible = enabled
end
end
createPublicFunction("CloseBackpack", hideBackpack)
createPublicFunction("BackpackReady", backpackReady)
pcall(function()
coreGuiChanged(Enum.CoreGuiType.Backpack, Game.StarterGui:GetCoreGuiEnabled(Enum.CoreGuiType.Backpack))
return Game.StarterGui.CoreGuiChangedSignal:connect(coreGuiChanged)
end)
inventoryButton.MouseButton1Click:connect(function()
return newTabClicked("gear")
end)
inventoryButton.MouseEnter:connect(function()
return mouseOverTab(inventoryButton)
end)
inventoryButton.MouseLeave:connect(function()
return mouseLeaveTab(inventoryButton)
end)
if game.CoreGui.Version >= 8 then
wardrobeButton.MouseButton1Click:connect(function()
return newTabClicked("wardrobe")
end)
wardrobeButton.MouseEnter:connect(function()
return mouseOverTab(wardrobeButton)
end)
wardrobeButton.MouseLeave:connect(function()
return mouseLeaveTab(wardrobeButton)
end)
end
closeButton.MouseButton1Click:connect(closeBackpack)
screen.Changed:connect(function(prop)
if prop == "AbsoluteSize" then
return resizeEvent:Fire(screen.AbsoluteSize)
end
end)
do
local _with_0 = game:GetService("GuiService")
_with_0:AddKey(tilde)
_with_0:AddKey(backquote)
_with_0.KeyPressed:connect(function(key)
if not active or disabledByDeveloper then
return
end
if key == tilde or key == backquote then
return toggleBackpack()
end
end)
end
backpackButton.MouseButton1Click:connect(function()
if not active or disabledByDeveloper then
return
end
return toggleBackpack()
end)
if game.Players.LocalPlayer["Character"] then
activateBackpack()
end
game.Players.LocalPlayer.CharacterAdded:connect(activateBackpack)
searchBox.FocusLost:connect(function(enterPressed)
if enterPressed or searchBox.Text ~= "" then
return doSearch()
elseif searchBox.Text == "" then
return resetSearch()
end
end)
searchButton.MouseButton1Click:connect(doSearch)
resetButton.MouseButton1Click:connect(resetSearch)
if searchFrame and robloxGui.AbsoluteSize.Y <= 320 then
searchFrame.RobloxLocked = false
return searchFrame:Destroy()
end
print'[Mercury]: Loaded corescript 89449093'if game.CoreGui.Version<7 then
return end local a a=function(b,c)while not b:FindFirstChild(c)do b.ChildAdded:
wait()end return b:FindFirstChild(c)end local b b=function(c,d)while not c[d]do
c.Changed:wait()end end a(game,'Players')if#game.Players:GetChildren()<1 then
game.Players.ChildAdded:wait()end b(game.Players,'LocalPlayer')local c=script.
Parent a(c,'Gear')local d=script.Parent.Parent assert(d:IsA'ScreenGui')a(c,
'Tabs')a(c.Tabs,'CloseButton')local e=c.Tabs.CloseButton a(c.Tabs,
'InventoryButton')local f,g=c.Tabs.InventoryButton,nil if game.CoreGui.Version>=
8 then a(c.Tabs,'WardrobeButton')g=c.Tabs.WardrobeButton end a(c.Parent,
'ControlFrame')local h,i,j=a(c.Parent.ControlFrame,'BackpackButton'),'gear',a(c,
'SearchFrame')a(c.SearchFrame,'SearchBoxFrame')local k,l,m,n=a(c.SearchFrame.
SearchBoxFrame,'SearchBox'),a(c.SearchFrame,'SearchButton'),a(c.SearchFrame,
'ResetButton'),a(Game.CoreGui,'RobloxGui')local o=a(n,'CurrentLoadout')local p,q
,r,s,t,u,v,w,x,y,z,A=a(o,'Background'),true,true,false,true,false,nil,0.25,
'Search...','~','`',UDim2.new(0,600,0,400)if n.AbsoluteSize.Y<=320 then A=UDim2.
new(0,200,0,140)end local B B=function(C)assert(C,'eventName is nil')assert(
tostring(C),'eventName is not a string')local D=Instance.new'BindableEvent'D.
Name=tostring(C)D.Parent=script return D end local C C=function(D,E)assert(D,
'funcName is nil')assert(tostring(D),'funcName is not a string')assert(E,
'invokeFunc is nil')assert(type(E)=='function',
"invokeFunc should be of type 'function'")local F=Instance.new'BindableFunction'
F.Name=tostring(D)F.OnInvoke=E F.Parent=script return F end local D,E,F,G,H,I=B
'ResizeEvent',B'BackpackOpenEvent',B'BackpackCloseEvent',B'TabClickedEvent',B
'SearchRequestedEvent',nil I=function()m.Visible=false k.Text=x end local J J=
function()I()return H:Fire()end local K K=function()c.Visible=false t=false end
local L L=function()if v then v:disconnect()end b(game.Players.LocalPlayer,
'Character')a(game.Players.LocalPlayer.Character,'Humanoid')v=game.Players.
LocalPlayer.Character.Humanoid.Died:connect(K)end local M M=function()s=false r=
false h.Selected=false J()F:Fire(i)c.Tabs.Visible=false j.Visible=false c:
TweenSizeAndPosition(UDim2.new(0,A.X.Offset,0,0),UDim2.new(0.5,-A.X.Offset/2,1,-
85),Enum.EasingDirection.Out,Enum.EasingStyle.Quad,w,true,function()game.
GuiService:RemoveCenterDialog(c)c.Visible=false h.Selected=false end)return
delay(w,function()game.GuiService:RemoveCenterDialog(c)c.Visible=false h.
Selected=false r=true q=true end)end local N N=function()game.GuiService:
AddCenterDialog(c,Enum.CenterDialogType.PlayerInitiatedDialog,function()c.
Visible=true h.Selected=true end,function()c.Visible=false h.Selected=false end)
c.Visible=true h.Selected=true c:TweenSizeAndPosition(A,UDim2.new(0.5,-A.X.
Offset/2,1,-A.Y.Offset-88),Enum.EasingDirection.Out,Enum.EasingStyle.Quad,w,true
)return delay(w,function()c.Tabs.Visible=false j.Visible=true E:Fire(i)q=true r=
true h.Image='http://www.roblox.com/asset/?id=97644093'h.Position=UDim2.new(0.5,
-60,1,-A.Y.Offset-103)end)end local O O=function()if not game.Players.
LocalPlayer then return end if not game.Players.LocalPlayer['Character']then
return end if not q then return end if not r then return end r=false q=false s=
not s if s then p.Image='http://www.roblox.com/asset/?id=97623721'p.Position=
UDim2.new(-3E-2,0,-0.17,0)p.Size=UDim2.new(1.05,0,1.25,0)p.ZIndex=2 p.Visible=
true return N()else h.Position=UDim2.new(0.5,-60,1,-44)p.Visible=false h.
Selected=false h.Image='http://www.roblox.com/asset/?id=97617958'p.Image=
'http://www.roblox.com/asset/?id=96536002'p.Position=UDim2.new(-0.1,0,-0.1,0)p.
Size=UDim2.new(1.2,0,1.2,0)M()local P=o:GetChildren()for Q=1,#P do if P[Q]and P[
Q]:IsA'Frame'then local R=P[Q]if#R:GetChildren()>0 then h.Position=UDim2.new(0.5
,-60,1,-108)h.Visible=true p.Visible=true if R:GetChildren()[1]:IsA'ImageButton'
then local S=R:GetChildren()[1]S.Active=true S.Draggable=false end end end end
end end local P P=function()L()t=true c.Visible=s if s then return O()end end
local Q Q=function()if s then return O()end end local R R=function(S)assert(S)
assert(S:IsA'TextButton')S.BackgroundColor3=Color3.new(1,1,1)S.TextColor3=Color3
.new(0,0,0)S.Selected=true S.ZIndex=3 return S end local S S=function(T)assert(T
)assert(T:IsA'TextButton')T.BackgroundColor3=Color3.new(0,0,0)T.TextColor3=
Color3.new(1,1,1)T.Selected=false T.ZIndex=1 return T end local T T=function(U)
assert(U)if U=='gear'then R(f)return S(g)elseif U=='wardrobe'then R(g)return S(f
)end end local U U=function(V)assert(V)assert(V:IsA'TextButton')if V.Selected
then return end V.BackgroundColor3=Color3.new(0,0,0)end local V V=function(W)
assert(W)assert(W:IsA'TextButton')if W.Selected then return end W.
BackgroundColor3=Color3.new(0.15294117647058825,0.15294117647058825,
0.15294117647058825)end local W W=function(X)assert(X)X=string.lower(X)i=X T(X)G
:Fire(X)return J()end local X X=function(Y)return Y:gsub('^%s*(.-)%s*$','%1')end
local Y Y=function()local Z=k.Text if Z==''then J()return end Z=X(Z)m.Visible=
true return H:Fire(Z)end local Z Z=function()r=true end local _ _=function(aa,ab
)if aa==Enum.CoreGuiType.Backpack or aa==Enum.CoreGuiType.All then t=ab u=not ab
do local ac=game:GetService'GuiService'if u then pcall(function()ac:RemoveKey(y)
return ac:RemoveKey(z)end)else ac:AddKey(y)ac:AddKey(z)end end J()j.Visible=ab
and s o.Visible=ab c.Visible=ab h.Visible=ab end end C('CloseBackpack',M)C(
'BackpackReady',Z)pcall(function()_(Enum.CoreGuiType.Backpack,Game.StarterGui:
GetCoreGuiEnabled(Enum.CoreGuiType.Backpack))return Game.StarterGui.
CoreGuiChangedSignal:connect(_)end)f.MouseButton1Click:connect(function()return
W'gear'end)f.MouseEnter:connect(function()return V(f)end)f.MouseLeave:connect(
function()return U(f)end)if game.CoreGui.Version>=8 then g.MouseButton1Click:
connect(function()return W'wardrobe'end)g.MouseEnter:connect(function()return V(
g)end)g.MouseLeave:connect(function()return U(g)end)end e.MouseButton1Click:
connect(Q)d.Changed:connect(function(aa)if aa=='AbsoluteSize'then return D:Fire(
d.AbsoluteSize)end end)do local aa=game:GetService'GuiService'aa:AddKey(y)aa:
AddKey(z)aa.KeyPressed:connect(function(ab)if not t or u then return end if ab==
y or ab==z then return O()end end)end h.MouseButton1Click:connect(function()if
not t or u then return end return O()end)if game.Players.LocalPlayer['Character'
]then P()end game.Players.LocalPlayer.CharacterAdded:connect(P)k.FocusLost:
connect(function(aa)if aa or k.Text~=''then return Y()elseif k.Text==''then
return J()end end)l.MouseButton1Click:connect(Y)m.MouseButton1Click:connect(J)if
j and n.AbsoluteSize.Y<=320 then j.RobloxLocked=false return j:Destroy()end

File diff suppressed because it is too large Load Diff