Corescript fixes and formatting improvements
This commit is contained in:
parent
da219017d7
commit
d396ddaaea
1112
luau/107893730.luau
1112
luau/107893730.luau
File diff suppressed because it is too large
Load Diff
|
|
@ -1,314 +0,0 @@
|
|||
-- CoreGui.RobloxGui.CoreScripts/ContextActionTouch
|
||||
-- Unused by Mercury
|
||||
print "[Mercury]: Loaded corescript 152908679"
|
||||
for _ = 1, 4 do
|
||||
pcall(function()
|
||||
warn "IF YOU SEE THIS MESSAGE, PLEASE REPORT IT TO THE MERCURY DEVELOPERS"
|
||||
end)
|
||||
print "IF YOU SEE THIS MESSAGE, PLEASE REPORT IT TO THE MERCURY DEVELOPERS"
|
||||
end
|
||||
|
||||
-- ContextActionTouch.lua
|
||||
-- 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, buttonFrame
|
||||
|
||||
local ContextDownImage = "http://banland.xyz/asset/?id=97166756"
|
||||
local ContextUpImage = "http://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
|
||||
|
||||
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
|
||||
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
|
||||
|
|
@ -1,773 +0,0 @@
|
|||
-- CoreGui.RobloxGui.CoreScripts/TouchControls
|
||||
-- Unused by Mercury
|
||||
print "[Mercury]: Loaded corescript 153556783"
|
||||
for _ = 1, 4 do
|
||||
pcall(function()
|
||||
warn "IF YOU SEE THIS MESSAGE, PLEASE REPORT IT TO THE MERCURY DEVELOPERS"
|
||||
end)
|
||||
print "IF YOU SEE THIS MESSAGE, PLEASE REPORT IT TO THE MERCURY DEVELOPERS"
|
||||
end
|
||||
|
||||
-- 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.
|
||||
|
||||
-- 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
|
||||
|
||||
local CameraRotateSensitivity = 0.007
|
||||
local CameraRotateDeadZone = CameraRotateSensitivity * 16
|
||||
local CameraZoomSensitivity = 0.03
|
||||
local PinchZoomDelay = 0.2
|
||||
local cameraTouch
|
||||
|
||||
-- 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
|
||||
local userInputServiceTouchMovedCon
|
||||
local userInputSeviceTouchEndedCon
|
||||
|
||||
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
|
||||
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
|
||||
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
|
||||
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 = 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
|
||||
|
|
@ -267,7 +267,7 @@ function initializeDeveloperConsole()
|
|||
Position = UDim2.new(0, 0, 0.5, -8),
|
||||
Rotation = 180,
|
||||
Size = UDim2.new(1, 0, 0, 16),
|
||||
Image = "http://banland.xyz/Asset?id=151205881",
|
||||
Image = "https://banland.xyz/Asset?id=151205881",
|
||||
}
|
||||
|
||||
local Dev_DownButton = Create "ImageButton" {
|
||||
|
|
@ -286,7 +286,7 @@ function initializeDeveloperConsole()
|
|||
Position = UDim2.new(0, 3, 0, 3),
|
||||
Size = UDim2.new(0, 14, 0, 14),
|
||||
Rotation = 180,
|
||||
Image = "http://banland.xyz/Asset?id=151205813",
|
||||
Image = "https://banland.xyz/Asset?id=151205813",
|
||||
}
|
||||
|
||||
local Dev_UpButton = Create "ImageButton" {
|
||||
|
|
@ -304,7 +304,7 @@ function initializeDeveloperConsole()
|
|||
BackgroundTransparency = 1,
|
||||
Position = UDim2.new(0, 3, 0, 3),
|
||||
Size = UDim2.new(0, 14, 0, 14),
|
||||
Image = "http://banland.xyz/Asset?id=151205813",
|
||||
Image = "https://banland.xyz/Asset?id=151205813",
|
||||
}
|
||||
|
||||
local Dev_TextBox = Create "Frame" {
|
||||
|
|
@ -341,7 +341,7 @@ function initializeDeveloperConsole()
|
|||
Position = UDim2.new(0, 0, 0, 0),
|
||||
Size = UDim2.new(1, 0, 1, 0),
|
||||
Rotation = 0,
|
||||
Image = "http://banland.xyz/Asset?id=152093917",
|
||||
Image = "https://banland.xyz/Asset?id=152093917",
|
||||
}
|
||||
|
||||
local Dev_ResizeButton = Create "ImageButton" {
|
||||
|
|
@ -360,7 +360,7 @@ function initializeDeveloperConsole()
|
|||
Position = UDim2.new(0, 6, 0, 6),
|
||||
Size = UDim2.new(0.8, 0, 0.8, 0),
|
||||
Rotation = 135,
|
||||
Image = "http://banland.xyz/Asset?id=151205813",
|
||||
Image = "https://banland.xyz/Asset?id=151205813",
|
||||
}
|
||||
|
||||
Create "TextButton" {
|
||||
|
|
@ -415,7 +415,7 @@ function initializeDeveloperConsole()
|
|||
BackgroundTransparency = 1,
|
||||
Position = UDim2.new(0, 3, 0, 3),
|
||||
Size = UDim2.new(0, 14, 0, 14),
|
||||
Image = "http://banland.xyz/Asset?id=151205852",
|
||||
Image = "https://banland.xyz/Asset?id=151205852",
|
||||
}
|
||||
|
||||
Create "TextButton" {
|
||||
|
|
@ -864,8 +864,6 @@ function initializeDeveloperConsole()
|
|||
return (num < 10 and "0" or "") .. num
|
||||
end
|
||||
|
||||
local str = "%s:%s:%s"
|
||||
|
||||
local function ConvertTimeStamp(timeStamp)
|
||||
local localTime = timeStamp - os.time() + math.floor(tick())
|
||||
local dayTime = localTime % 86400
|
||||
|
|
@ -881,7 +879,7 @@ function initializeDeveloperConsole()
|
|||
local m = numberWithZero(minute)
|
||||
local s = numberWithZero(dayTime)
|
||||
|
||||
return str:format(h, m, s)
|
||||
return `{h}{m}{s}`
|
||||
end
|
||||
|
||||
--Filter
|
||||
|
|
|
|||
|
|
@ -6,11 +6,6 @@ local scriptContext = game:GetService "ScriptContext"
|
|||
-- Creates all neccessary scripts for the gui on initial load, everything except build tools
|
||||
-- Please note that these are loaded in a specific order to diminish errors/perceived load time by user
|
||||
|
||||
local touchEnabled = false
|
||||
pcall(function()
|
||||
touchEnabled = game:GetService("UserInputService").TouchEnabled
|
||||
end)
|
||||
|
||||
-- library registration
|
||||
scriptContext:AddCoreScript(
|
||||
60595695,
|
||||
|
|
@ -23,30 +18,14 @@ local function waitForChild(instance, name)
|
|||
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
|
||||
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
|
||||
-- ToolTipper (creates tool tips for gui)
|
||||
scriptContext:AddCoreScript(36868950, screenGui, "CoreScripts/ToolTip")
|
||||
-- SettingsScript
|
||||
scriptContext:AddCoreScript(46295863, screenGui, "CoreScripts/Settings")
|
||||
|
||||
-- MainBotChatScript
|
||||
scriptContext:AddCoreScript(
|
||||
|
|
@ -72,7 +51,7 @@ scriptContext:AddCoreScript(
|
|||
"CoreScripts/PurchasePromptScript"
|
||||
)
|
||||
|
||||
if not touchEnabled or screenGui.AbsoluteSize.Y > 600 then
|
||||
if screenGui.AbsoluteSize.Y > 600 then
|
||||
-- New Player List
|
||||
scriptContext:AddCoreScript(
|
||||
48488235,
|
||||
|
|
@ -125,14 +104,6 @@ if game.CoreGui.Version >= 3 and game.PlaceId ~= 130815926 then --todo: remove p
|
|||
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"
|
||||
|
|
@ -151,19 +122,3 @@ game.Workspace.ChildAdded:connect(function(nchild)
|
|||
)
|
||||
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
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
-- RbxGui
|
||||
print "[Mercury]: Loaded corescript 45284430"
|
||||
|
||||
local t = {}
|
||||
local RbxGui = {}
|
||||
|
||||
local function ScopedConnect(
|
||||
parentInstance,
|
||||
|
|
@ -135,7 +135,7 @@ local function cancelSlide(areaSoak)
|
|||
end
|
||||
end
|
||||
|
||||
t.CreateStyledMessageDialog = function(title, message, style, buttons)
|
||||
RbxGui.CreateStyledMessageDialog = function(title, message, style, buttons)
|
||||
local frame = Instance.new "Frame"
|
||||
frame.Size = UDim2.new(0.5, 0, 0, 165)
|
||||
frame.Position = UDim2.new(0.25, 0, 0.5, -72.5)
|
||||
|
|
@ -149,15 +149,15 @@ t.CreateStyledMessageDialog = function(title, message, style, buttons)
|
|||
styleImage.Position = UDim2.new(0, 5, 0, 15)
|
||||
if style == "error" or style == "Error" then
|
||||
styleImage.Size = UDim2.new(0, 71, 0, 71)
|
||||
styleImage.Image = "http://banland.xyz/asset?id=42565285"
|
||||
styleImage.Image = "https://banland.xyz/asset?id=42565285"
|
||||
elseif style == "notify" or style == "Notify" then
|
||||
styleImage.Size = UDim2.new(0, 71, 0, 71)
|
||||
styleImage.Image = "http://banland.xyz/asset?id=42604978"
|
||||
styleImage.Image = "https://banland.xyz/asset?id=42604978"
|
||||
elseif style == "confirm" or style == "Confirm" then
|
||||
styleImage.Size = UDim2.new(0, 74, 0, 76)
|
||||
styleImage.Image = "http://banland.xyz/asset?id=42557901"
|
||||
styleImage.Image = "https://banland.xyz/asset?id=42557901"
|
||||
else
|
||||
return t.CreateMessageDialog(title, message, buttons)
|
||||
return RbxGui.CreateMessageDialog(title, message, buttons)
|
||||
end
|
||||
styleImage.Parent = frame
|
||||
|
||||
|
|
@ -195,7 +195,7 @@ t.CreateStyledMessageDialog = function(title, message, style, buttons)
|
|||
return frame
|
||||
end
|
||||
|
||||
t.CreateMessageDialog = function(title, message, buttons)
|
||||
RbxGui.CreateMessageDialog = function(title, message, buttons)
|
||||
local frame = Instance.new "Frame"
|
||||
frame.Size = UDim2.new(0.5, 0, 0.5, 0)
|
||||
frame.Position = UDim2.new(0.25, 0, 0.25, 0)
|
||||
|
|
@ -235,7 +235,8 @@ t.CreateMessageDialog = function(title, message, buttons)
|
|||
return frame
|
||||
end
|
||||
|
||||
t.CreateDropDownMenu = function(items, onSelect, forRoblox)
|
||||
local scrollMouseCount
|
||||
RbxGui.CreateDropDownMenu = function(items, onSelect, forRoblox)
|
||||
local width = UDim.new(0, 100)
|
||||
local height = UDim.new(0, 32)
|
||||
|
||||
|
|
@ -263,7 +264,7 @@ t.CreateDropDownMenu = function(items, onSelect, forRoblox)
|
|||
local dropDownIcon = Instance.new "ImageLabel"
|
||||
dropDownIcon.Name = "Icon"
|
||||
dropDownIcon.Active = false
|
||||
dropDownIcon.Image = "http://banland.xyz/asset/?id=45732894"
|
||||
dropDownIcon.Image = "https://banland.xyz/asset/?id=45732894"
|
||||
dropDownIcon.BackgroundTransparency = 1
|
||||
dropDownIcon.Size = UDim2.new(0, 11, 0, 6)
|
||||
dropDownIcon.Position = UDim2.new(1, -11, 0.5, -2)
|
||||
|
|
@ -325,7 +326,7 @@ t.CreateDropDownMenu = function(items, onSelect, forRoblox)
|
|||
|
||||
local scrollUpButton
|
||||
local scrollDownButton
|
||||
local scrollMouseCount = 0
|
||||
scrollMouseCount = 0
|
||||
|
||||
local setZIndex = function(baseZIndex)
|
||||
droppedDownMenu.ZIndex = baseZIndex + 1
|
||||
|
|
@ -580,7 +581,7 @@ t.CreateDropDownMenu = function(items, onSelect, forRoblox)
|
|||
return frame, updateSelection
|
||||
end
|
||||
|
||||
t.CreatePropertyDropDownMenu = function(instance, property, enum)
|
||||
RbxGui.CreatePropertyDropDownMenu = function(instance, property, enum)
|
||||
local items = enum:GetEnumItems()
|
||||
local names = {}
|
||||
local nameToItem = {}
|
||||
|
|
@ -591,7 +592,7 @@ t.CreatePropertyDropDownMenu = function(instance, property, enum)
|
|||
|
||||
local frame
|
||||
local updateSelection
|
||||
frame, updateSelection = t.CreateDropDownMenu(names, function(text)
|
||||
frame, updateSelection = RbxGui.CreateDropDownMenu(names, function(text)
|
||||
instance[property] = nameToItem[text]
|
||||
end)
|
||||
|
||||
|
|
@ -606,7 +607,7 @@ t.CreatePropertyDropDownMenu = function(instance, property, enum)
|
|||
return frame
|
||||
end
|
||||
|
||||
t.GetFontHeight = function(font, fontSize)
|
||||
RbxGui.GetFontHeight = function(font, fontSize)
|
||||
if font == nil or fontSize == nil then
|
||||
error "Font and FontSize must be non-nil"
|
||||
end
|
||||
|
|
@ -743,7 +744,7 @@ local function layoutGuiObjectsHelper(frame, guiObjects, settingsTable)
|
|||
end
|
||||
end
|
||||
|
||||
t.LayoutGuiObjects = function(frame, guiObjects, settingsTable)
|
||||
RbxGui.LayoutGuiObjects = function(frame, guiObjects, settingsTable)
|
||||
if not frame:IsA "GuiObject" then
|
||||
error "Frame must be a GuiObject"
|
||||
end
|
||||
|
|
@ -797,7 +798,7 @@ t.LayoutGuiObjects = function(frame, guiObjects, settingsTable)
|
|||
layoutGuiObjectsHelper(wrapperFrame, guiObjects, settingsTable)
|
||||
end
|
||||
|
||||
t.CreateSlider = function(steps, width, position)
|
||||
RbxGui.CreateSlider = function(steps, width, position)
|
||||
local sliderGui = Instance.new "Frame"
|
||||
sliderGui.Size = UDim2.new(1, 0, 1, 0)
|
||||
sliderGui.BackgroundTransparency = 1
|
||||
|
|
@ -910,7 +911,7 @@ t.CreateSlider = function(steps, width, position)
|
|||
return sliderGui, sliderPosition, sliderSteps
|
||||
end
|
||||
|
||||
t.CreateTrueScrollingFrame = function()
|
||||
RbxGui.CreateTrueScrollingFrame = function()
|
||||
local lowY
|
||||
local highY
|
||||
|
||||
|
|
@ -988,14 +989,14 @@ t.CreateTrueScrollingFrame = function()
|
|||
end
|
||||
scrollDownButton.MouseEnter:connect(function()
|
||||
scrollDownButton.BackgroundTransparency = 0.1
|
||||
local downChildren = scrollDownButton:GetChildren()
|
||||
downChildren = scrollDownButton:GetChildren()
|
||||
for i = 1, #downChildren do
|
||||
downChildren[i].BackgroundTransparency = 0.1
|
||||
end
|
||||
end)
|
||||
scrollDownButton.MouseLeave:connect(function()
|
||||
scrollDownButton.BackgroundTransparency = 0.5
|
||||
local downChildren = scrollDownButton:GetChildren()
|
||||
downChildren = scrollDownButton:GetChildren()
|
||||
for i = 1, #downChildren do
|
||||
downChildren[i].BackgroundTransparency = 0.5
|
||||
end
|
||||
|
|
@ -1308,11 +1309,12 @@ t.CreateTrueScrollingFrame = function()
|
|||
reentrancyGuardScrollDown = false
|
||||
end
|
||||
|
||||
local scrollStamp
|
||||
|
||||
local function scrollUp(mouseYPos)
|
||||
if scrollUpButton.Active then
|
||||
local scrollStamp = tick()
|
||||
scrollStamp = tick()
|
||||
local current = scrollStamp
|
||||
local upCon
|
||||
upCon = mouseDrag.MouseButton1Up:connect(function()
|
||||
scrollStamp = tick()
|
||||
mouseDrag.Parent = nil
|
||||
|
|
@ -1343,7 +1345,7 @@ t.CreateTrueScrollingFrame = function()
|
|||
|
||||
local function scrollDown(mouseYPos)
|
||||
if scrollDownButton.Active then
|
||||
local scrollStamp = tick()
|
||||
scrollStamp = tick()
|
||||
local current = scrollStamp
|
||||
local downCon
|
||||
downCon = mouseDrag.MouseButton1Up:connect(function()
|
||||
|
|
@ -1380,7 +1382,6 @@ t.CreateTrueScrollingFrame = function()
|
|||
|
||||
scrollbar.MouseButton1Down:connect(function(_, y)
|
||||
if scrollbar.Active then
|
||||
local scrollStamp = tick()
|
||||
local mouseOffset = y - scrollbar.AbsolutePosition.y
|
||||
if dragCon then
|
||||
dragCon:disconnect()
|
||||
|
|
@ -1391,30 +1392,28 @@ t.CreateTrueScrollingFrame = function()
|
|||
upCon = nil
|
||||
end
|
||||
local reentrancyGuardMouseScroll = false
|
||||
dragCon = mouseDrag.MouseMoved:connect(function(x, y)
|
||||
dragCon = mouseDrag.MouseMoved:connect(function(x2, y2)
|
||||
if reentrancyGuardMouseScroll then
|
||||
return
|
||||
end
|
||||
|
||||
reentrancyGuardMouseScroll = true
|
||||
if positionScrollBar(x, y, mouseOffset) then
|
||||
if positionScrollBar(x2, y2, mouseOffset) then
|
||||
recalculate()
|
||||
end
|
||||
reentrancyGuardMouseScroll = false
|
||||
end)
|
||||
upCon = mouseDrag.MouseButton1Up:connect(function()
|
||||
scrollStamp = tick()
|
||||
mouseDrag.Parent = nil
|
||||
dragCon:disconnect()
|
||||
dragCon = nil
|
||||
upCon:disconnect()
|
||||
drag = nil
|
||||
end)
|
||||
mouseDrag.Parent = getScreenGuiAncestor(scrollbar)
|
||||
end
|
||||
end)
|
||||
|
||||
local scrollMouseCount = 0
|
||||
scrollMouseCount = 0
|
||||
|
||||
scrollUpButton.MouseButton1Down:connect(function()
|
||||
scrollUp()
|
||||
|
|
@ -1507,7 +1506,7 @@ t.CreateTrueScrollingFrame = function()
|
|||
return scrollingFrame, controlFrame
|
||||
end
|
||||
|
||||
t.CreateScrollingFrame = function(orderList, scrollStyle)
|
||||
RbxGui.CreateScrollingFrame = function(orderList, scrollStyle)
|
||||
local frame = Instance.new "Frame"
|
||||
frame.Name = "ScrollingFrame"
|
||||
frame.BackgroundTransparency = 1
|
||||
|
|
@ -1534,7 +1533,7 @@ t.CreateScrollingFrame = function(orderList, scrollStyle)
|
|||
local scrollStamp = 0
|
||||
|
||||
local scrollDrag = Instance.new "ImageButton"
|
||||
scrollDrag.Image = "http://banland.xyz/asset/?id=61367186"
|
||||
scrollDrag.Image = "https://banland.xyz/asset/?id=61367186"
|
||||
scrollDrag.Size = UDim2.new(1, 0, 0, 16)
|
||||
scrollDrag.BackgroundTransparency = 1
|
||||
scrollDrag.Name = "ScrollDrag"
|
||||
|
|
@ -1676,7 +1675,8 @@ t.CreateScrollingFrame = function(orderList, scrollStyle)
|
|||
setRowSize = true
|
||||
local lastChildSize = 0
|
||||
|
||||
local xOffset, yOffset = 0
|
||||
local xOffset = 0
|
||||
local yOffset = 0
|
||||
if guiObjects[1] then
|
||||
yOffset = math.ceil(
|
||||
math.floor(
|
||||
|
|
@ -1924,7 +1924,7 @@ t.CreateScrollingFrame = function(orderList, scrollStyle)
|
|||
recalculate()
|
||||
end
|
||||
|
||||
local scrollUp = function(mouseYPos)
|
||||
local function scrollUp(mouseYPos)
|
||||
if scrollUpButton.Active then
|
||||
scrollStamp = tick()
|
||||
local current = scrollStamp
|
||||
|
|
@ -2001,17 +2001,17 @@ t.CreateScrollingFrame = function(orderList, scrollStyle)
|
|||
local mouseOffset = y - scrollDrag.AbsolutePosition.y
|
||||
local dragCon
|
||||
local upCon
|
||||
dragCon = mouseDrag.MouseMoved:connect(function(_, y)
|
||||
dragCon = mouseDrag.MouseMoved:connect(function(_, y2)
|
||||
local barAbsPos = scrollbar.AbsolutePosition.y
|
||||
local barAbsSize = scrollbar.AbsoluteSize.y
|
||||
|
||||
local dragAbsSize = scrollDrag.AbsoluteSize.y
|
||||
local barAbsOne = barAbsPos + barAbsSize - dragAbsSize
|
||||
y -= mouseOffset
|
||||
y = y < barAbsPos and barAbsPos
|
||||
or y > barAbsOne and barAbsOne
|
||||
or y
|
||||
y -= barAbsPos
|
||||
y2 -= mouseOffset
|
||||
y2 = y2 < barAbsPos and barAbsPos
|
||||
or y2 > barAbsOne and barAbsOne
|
||||
or y2
|
||||
y2 -= barAbsPos
|
||||
|
||||
local guiObjects = 0
|
||||
local children = frame:GetChildren()
|
||||
|
|
@ -2023,7 +2023,7 @@ t.CreateScrollingFrame = function(orderList, scrollStyle)
|
|||
end
|
||||
end
|
||||
|
||||
local doublePercent = y / (barAbsSize - dragAbsSize)
|
||||
local doublePercent = y2 / (barAbsSize - dragAbsSize)
|
||||
local rowDiff = rowSize
|
||||
local totalScrollCount = guiObjects - (howManyDisplayed - 1)
|
||||
local newScrollPosition = math.floor(
|
||||
|
|
@ -2046,13 +2046,12 @@ t.CreateScrollingFrame = function(orderList, scrollStyle)
|
|||
dragCon:disconnect()
|
||||
dragCon = nil
|
||||
upCon:disconnect()
|
||||
drag = nil
|
||||
end)
|
||||
mouseDrag.Parent = getScreenGuiAncestor(scrollbar)
|
||||
end
|
||||
end)
|
||||
|
||||
local scrollMouseCount = 0
|
||||
scrollMouseCount = 0
|
||||
|
||||
scrollUpButton.MouseButton1Down:connect(function()
|
||||
scrollUp()
|
||||
|
|
@ -2151,7 +2150,7 @@ local function getGuiOwner(instance)
|
|||
return nil
|
||||
end
|
||||
|
||||
t.AutoTruncateTextObject = function(textLabel)
|
||||
RbxGui.AutoTruncateTextObject = function(textLabel)
|
||||
local text = textLabel.Text
|
||||
|
||||
local fullLabel = textLabel:Clone()
|
||||
|
|
@ -2304,7 +2303,7 @@ local function TransitionTutorialPages(
|
|||
)
|
||||
end
|
||||
|
||||
t.CreateTutorial = function(name, tutorialKey, createButtons)
|
||||
RbxGui.CreateTutorial = function(name, tutorialKey, createButtons)
|
||||
local frame = Instance.new "Frame"
|
||||
frame.Name = "Tutorial-" .. name
|
||||
frame.BackgroundTransparency = 1
|
||||
|
|
@ -2545,7 +2544,7 @@ local function CreateBasicTutorialPage(
|
|||
return frame, innerFrame
|
||||
end
|
||||
|
||||
t.CreateTextTutorialPage = function(name, text, skipTutorialFunc)
|
||||
RbxGui.CreateTextTutorialPage = function(name, text, skipTutorialFunc)
|
||||
local frame
|
||||
local contentFrame
|
||||
|
||||
|
|
@ -2561,8 +2560,8 @@ t.CreateTextTutorialPage = function(name, text, skipTutorialFunc)
|
|||
textLabel.Size = UDim2.new(1, 0, 1, 0)
|
||||
|
||||
local function handleResize(minSize, maxSize)
|
||||
local size = binaryShrink(minSize, maxSize, function(size)
|
||||
frame.Size = UDim2.new(0, size, 0, size)
|
||||
local size = binaryShrink(minSize, maxSize, function(newSize)
|
||||
frame.Size = UDim2.new(0, newSize, 0, newSize)
|
||||
return textLabel.TextFits
|
||||
end)
|
||||
frame.Size = UDim2.new(0, size, 0, size)
|
||||
|
|
@ -2576,7 +2575,7 @@ t.CreateTextTutorialPage = function(name, text, skipTutorialFunc)
|
|||
return frame
|
||||
end
|
||||
|
||||
t.CreateImageTutorialPage = function(
|
||||
RbxGui.CreateImageTutorialPage = function(
|
||||
name,
|
||||
imageAsset,
|
||||
x,
|
||||
|
|
@ -2594,8 +2593,8 @@ t.CreateImageTutorialPage = function(
|
|||
imageLabel.Position = UDim2.new(0.5, -x / 2, 0.5, -y / 2)
|
||||
|
||||
local function handleResize(minSize, maxSize)
|
||||
local size = binaryShrink(minSize, maxSize, function(size)
|
||||
return size >= x and size >= y
|
||||
local size = binaryShrink(minSize, maxSize, function(newSize)
|
||||
return newSize >= x and newSize >= y
|
||||
end)
|
||||
if size >= x and size >= y then
|
||||
imageLabel.Size = UDim2.new(0, x, 0, y)
|
||||
|
|
@ -2627,7 +2626,7 @@ t.CreateImageTutorialPage = function(
|
|||
return frame
|
||||
end
|
||||
|
||||
t.AddTutorialPage = function(tutorial, tutorialPage)
|
||||
RbxGui.AddTutorialPage = function(tutorial, tutorialPage)
|
||||
local transitionFrame = tutorial.TransitionFrame
|
||||
local currentPageValue = tutorial.CurrentTutorialPage
|
||||
|
||||
|
|
@ -2682,7 +2681,7 @@ t.AddTutorialPage = function(tutorial, tutorialPage)
|
|||
end
|
||||
end
|
||||
|
||||
t.CreateSetPanel = function(
|
||||
RbxGui.CreateSetPanel = function(
|
||||
userIdsForSets,
|
||||
objectSelected,
|
||||
dialogClosed,
|
||||
|
|
@ -2813,7 +2812,7 @@ t.CreateSetPanel = function(
|
|||
waterForceDirLabel.Position = UDim2.new(0, 0, 0, 50)
|
||||
waterForceDirLabel.Parent = waterFrame
|
||||
|
||||
local waterTypeChangedEvent = Instance.new "BindableEvent"
|
||||
waterTypeChangedEvent = Instance.new "BindableEvent"
|
||||
waterTypeChangedEvent.Name = "WaterTypeChangedEvent"
|
||||
waterTypeChangedEvent.Parent = waterFrame
|
||||
|
||||
|
|
@ -2827,7 +2826,7 @@ t.CreateSetPanel = function(
|
|||
end
|
||||
|
||||
local waterForceDirectionDropDown, forceWaterDirectionSelection =
|
||||
t.CreateDropDownMenu(
|
||||
RbxGui.CreateDropDownMenu(
|
||||
waterForceDirections,
|
||||
waterForceDirectionSelectedFunc
|
||||
)
|
||||
|
|
@ -2837,7 +2836,7 @@ t.CreateSetPanel = function(
|
|||
waterForceDirectionDropDown.Parent = waterForceDirLabel
|
||||
|
||||
local waterForceDropDown, forceWaterForceSelection =
|
||||
t.CreateDropDownMenu(waterForces, waterForceSelectedFunc)
|
||||
RbxGui.CreateDropDownMenu(waterForces, waterForceSelectedFunc)
|
||||
forceWaterForceSelection "None"
|
||||
waterForceDropDown.Size = UDim2.new(1, 0, 0, 25)
|
||||
waterForceDropDown.Position = UDim2.new(0, 0, 1, 3)
|
||||
|
|
@ -2848,7 +2847,7 @@ t.CreateSetPanel = function(
|
|||
|
||||
-- Helper Function that contructs gui elements
|
||||
local function createSetGui()
|
||||
local setGui = Instance.new "ScreenGui"
|
||||
setGui = Instance.new "ScreenGui"
|
||||
setGui.Name = "SetGui"
|
||||
|
||||
local setPanel = Instance.new "Frame"
|
||||
|
|
@ -2929,7 +2928,7 @@ t.CreateSetPanel = function(
|
|||
line.ZIndex = 6
|
||||
line.Parent = sets
|
||||
|
||||
local setsLists, controlFrame = t.CreateTrueScrollingFrame()
|
||||
local setsLists, controlFrame = RbxGui.CreateTrueScrollingFrame()
|
||||
setsLists.Size = UDim2.new(1, -6, 0.94, 0)
|
||||
setsLists.Position = UDim2.new(0, 0, 0.06, 0)
|
||||
setsLists.BackgroundTransparency = 1
|
||||
|
|
@ -2965,7 +2964,7 @@ t.CreateSetPanel = function(
|
|||
local cancelImage = Instance.new "ImageLabel"
|
||||
cancelImage.Name = "CancelImage"
|
||||
cancelImage.BackgroundTransparency = 1
|
||||
cancelImage.Image = "http://banland.xyz/asset?id=54135717"
|
||||
cancelImage.Image = "https://banland.xyz/asset?id=54135717"
|
||||
cancelImage.Position = UDim2.new(0, -2, 0, -2)
|
||||
cancelImage.Size = UDim2.new(0, 16, 0, 16)
|
||||
cancelImage.ZIndex = 6
|
||||
|
|
@ -3201,7 +3200,7 @@ t.CreateSetPanel = function(
|
|||
local function createDropDownMenuButton(parent)
|
||||
local dropDownButton = Instance.new "ImageButton"
|
||||
dropDownButton.Name = "DropDownButton"
|
||||
dropDownButton.Image = "http://banland.xyz/asset/?id=67581509"
|
||||
dropDownButton.Image = "https://banland.xyz/asset/?id=67581509"
|
||||
dropDownButton.BackgroundTransparency = 1
|
||||
dropDownButton.Size = UDim2.new(0, 16, 0, 16)
|
||||
dropDownButton.Position = UDim2.new(1, -24, 0, 6)
|
||||
|
|
@ -3529,7 +3528,7 @@ t.CreateSetPanel = function(
|
|||
end
|
||||
)
|
||||
|
||||
local scrollFrame, controlFrame = t.CreateTrueScrollingFrame()
|
||||
local scrollFrame, controlFrame = RbxGui.CreateTrueScrollingFrame()
|
||||
scrollFrame.Size = UDim2.new(0.54, 0, 0.85, 0)
|
||||
scrollFrame.Position = UDim2.new(0.24, 0, 0.085, 0)
|
||||
scrollFrame.Name = "ItemsFrame"
|
||||
|
|
@ -3542,6 +3541,11 @@ t.CreateSetPanel = function(
|
|||
controlFrame.Parent = setGui.SetPanel
|
||||
controlFrame.Position = UDim2.new(0.76, 5, 0, 0)
|
||||
|
||||
local rows =
|
||||
math.floor(setGui.SetPanel.ItemsFrame.AbsoluteSize.Y / buttonHeight)
|
||||
local columns =
|
||||
math.floor(setGui.SetPanel.ItemsFrame.AbsoluteSize.X / buttonWidth)
|
||||
|
||||
local debounce = false
|
||||
controlFrame.ScrollBottom.Changed:connect(function(_)
|
||||
if controlFrame.ScrollBottom.Value == true then
|
||||
|
|
@ -3573,10 +3577,6 @@ t.CreateSetPanel = function(
|
|||
userCategoryButtons = processCategory(userData)
|
||||
end
|
||||
|
||||
rows = math.floor(setGui.SetPanel.ItemsFrame.AbsoluteSize.Y / buttonHeight)
|
||||
columns =
|
||||
math.floor(setGui.SetPanel.ItemsFrame.AbsoluteSize.X / buttonWidth)
|
||||
|
||||
populateSetsFrame()
|
||||
|
||||
--[[local insertPanelCloseCon = ]]
|
||||
|
|
@ -3611,7 +3611,7 @@ t.CreateSetPanel = function(
|
|||
waterTypeChangedEvent
|
||||
end
|
||||
|
||||
t.CreateTerrainMaterialSelector = function(size, position)
|
||||
RbxGui.CreateTerrainMaterialSelector = function(size, position)
|
||||
local terrainMaterialSelectionChanged = Instance.new "BindableEvent"
|
||||
terrainMaterialSelectionChanged.Name = "TerrainMaterialSelectionChanged"
|
||||
|
||||
|
|
@ -3619,11 +3619,7 @@ t.CreateTerrainMaterialSelector = function(size, position)
|
|||
|
||||
local frame = Instance.new "Frame"
|
||||
frame.Name = "TerrainMaterialSelector"
|
||||
if size then
|
||||
frame.Size = size
|
||||
else
|
||||
frame.Size = UDim2.new(0, 245, 0, 230)
|
||||
end
|
||||
frame.Size = size or UDim2.new(0, 245, 0, 230)
|
||||
if position then
|
||||
frame.Position = position
|
||||
end
|
||||
|
|
@ -3770,63 +3766,63 @@ t.CreateTerrainMaterialSelector = function(size, position)
|
|||
materialToImageMap[v] = {}
|
||||
if v == "Grass" then
|
||||
materialToImageMap[v].Regular =
|
||||
"http://banland.xyz/asset/?id=56563112"
|
||||
"https://banland.xyz/asset/?id=56563112"
|
||||
elseif v == "Sand" then
|
||||
materialToImageMap[v].Regular =
|
||||
"http://banland.xyz/asset/?id=62356652"
|
||||
"https://banland.xyz/asset/?id=62356652"
|
||||
elseif v == "Brick" then
|
||||
materialToImageMap[v].Regular =
|
||||
"http://banland.xyz/asset/?id=65961537"
|
||||
"https://banland.xyz/asset/?id=65961537"
|
||||
elseif v == "Granite" then
|
||||
materialToImageMap[v].Regular =
|
||||
"http://banland.xyz/asset/?id=67532153"
|
||||
"https://banland.xyz/asset/?id=67532153"
|
||||
elseif v == "Asphalt" then
|
||||
materialToImageMap[v].Regular =
|
||||
"http://banland.xyz/asset/?id=67532038"
|
||||
"https://banland.xyz/asset/?id=67532038"
|
||||
elseif v == "Iron" then
|
||||
materialToImageMap[v].Regular =
|
||||
"http://banland.xyz/asset/?id=67532093"
|
||||
"https://banland.xyz/asset/?id=67532093"
|
||||
elseif v == "Aluminum" then
|
||||
materialToImageMap[v].Regular =
|
||||
"http://banland.xyz/asset/?id=67531995"
|
||||
"https://banland.xyz/asset/?id=67531995"
|
||||
elseif v == "Gold" then
|
||||
materialToImageMap[v].Regular =
|
||||
"http://banland.xyz/asset/?id=67532118"
|
||||
"https://banland.xyz/asset/?id=67532118"
|
||||
elseif v == "Plastic (red)" then
|
||||
materialToImageMap[v].Regular =
|
||||
"http://banland.xyz/asset/?id=67531848"
|
||||
"https://banland.xyz/asset/?id=67531848"
|
||||
elseif v == "Plastic (blue)" then
|
||||
materialToImageMap[v].Regular =
|
||||
"http://banland.xyz/asset/?id=67531924"
|
||||
"https://banland.xyz/asset/?id=67531924"
|
||||
elseif v == "Plank" then
|
||||
materialToImageMap[v].Regular =
|
||||
"http://banland.xyz/asset/?id=67532015"
|
||||
"https://banland.xyz/asset/?id=67532015"
|
||||
elseif v == "Log" then
|
||||
materialToImageMap[v].Regular =
|
||||
"http://banland.xyz/asset/?id=67532051"
|
||||
"https://banland.xyz/asset/?id=67532051"
|
||||
elseif v == "Gravel" then
|
||||
materialToImageMap[v].Regular =
|
||||
"http://banland.xyz/asset/?id=67532206"
|
||||
"https://banland.xyz/asset/?id=67532206"
|
||||
elseif v == "Cinder Block" then
|
||||
materialToImageMap[v].Regular =
|
||||
"http://banland.xyz/asset/?id=67532103"
|
||||
"https://banland.xyz/asset/?id=67532103"
|
||||
elseif v == "Stone Wall" then
|
||||
materialToImageMap[v].Regular =
|
||||
"http://banland.xyz/asset/?id=67531804"
|
||||
"https://banland.xyz/asset/?id=67531804"
|
||||
elseif v == "Concrete" then
|
||||
materialToImageMap[v].Regular =
|
||||
"http://banland.xyz/asset/?id=67532059"
|
||||
"https://banland.xyz/asset/?id=67532059"
|
||||
elseif v == "Water" then
|
||||
materialToImageMap[v].Regular =
|
||||
"http://banland.xyz/asset/?id=81407474"
|
||||
"https://banland.xyz/asset/?id=81407474"
|
||||
else
|
||||
materialToImageMap[v].Regular =
|
||||
"http://banland.xyz/asset/?id=66887593" -- fill in the rest here!!
|
||||
"https://banland.xyz/asset/?id=66887593" -- fill in the rest here!!
|
||||
end
|
||||
end
|
||||
|
||||
local scrollFrame, scrollUp, scrollDown, recalculateScroll =
|
||||
t.CreateScrollingFrame(nil, "grid")
|
||||
RbxGui.CreateScrollingFrame(nil, "grid")
|
||||
scrollFrame.Size = UDim2.new(0.85, 0, 1, 0)
|
||||
scrollFrame.Position = UDim2.new(0, 0, 0, 0)
|
||||
scrollFrame.Parent = frame
|
||||
|
|
@ -3940,9 +3936,9 @@ t.CreateTerrainMaterialSelector = function(size, position)
|
|||
return frame, terrainMaterialSelectionChanged, forceTerrainMaterialSelection
|
||||
end
|
||||
|
||||
t.CreateLoadingFrame = function(name, size, position)
|
||||
RbxGui.CreateLoadingFrame = function(name, size, position)
|
||||
game:GetService("ContentProvider")
|
||||
:Preload "http://banland.xyz/asset/?id=35238053"
|
||||
:Preload "https://banland.xyz/asset/?id=35238053"
|
||||
|
||||
local loadingFrame = Instance.new "Frame"
|
||||
loadingFrame.Name = "LoadingFrame"
|
||||
|
|
@ -3969,7 +3965,7 @@ t.CreateLoadingFrame = function(name, size, position)
|
|||
|
||||
local loadingGreenBar = Instance.new "ImageLabel"
|
||||
loadingGreenBar.Name = "LoadingGreenBar"
|
||||
loadingGreenBar.Image = "http://banland.xyz/asset/?id=35238053"
|
||||
loadingGreenBar.Image = "https://banland.xyz/asset/?id=35238053"
|
||||
loadingGreenBar.Position = UDim2.new(0, 0, 0, 0)
|
||||
loadingGreenBar.Size = UDim2.new(0, 0, 1, 0)
|
||||
loadingGreenBar.Visible = false
|
||||
|
|
@ -4082,8 +4078,15 @@ t.CreateLoadingFrame = function(name, size, position)
|
|||
return loadingFrame, updateLoadingGuiPercent, cancelButtonClicked
|
||||
end
|
||||
|
||||
t.CreatePluginFrame = function(name, size, position, scrollable, parent)
|
||||
function createMenuButton(size, position, text, fontsize, name, parent)
|
||||
RbxGui.CreatePluginFrame = function(name, size, position, scrollable, parent)
|
||||
local function createMenuButton(
|
||||
size,
|
||||
position,
|
||||
text,
|
||||
fontsize,
|
||||
name,
|
||||
parent
|
||||
)
|
||||
local button = Instance.new "TextButton"
|
||||
button.AutoButtonColor = false
|
||||
button.Name = name
|
||||
|
|
@ -4298,7 +4301,7 @@ t.CreatePluginFrame = function(name, size, position, scrollable, parent)
|
|||
local frame, control, verticalDragger
|
||||
if scrollable then
|
||||
--frame for widgets
|
||||
frame, control = t.CreateTrueScrollingFrame()
|
||||
frame, control = RbxGui.CreateTrueScrollingFrame()
|
||||
frame.Size = UDim2.new(1, 0, 1, 0)
|
||||
frame.BackgroundColor3 = Color3.new(72 / 255, 72 / 255, 72 / 255)
|
||||
frame.BorderColor3 = Color3.new(0, 0, 0)
|
||||
|
|
@ -4450,11 +4453,11 @@ t.CreatePluginFrame = function(name, size, position, scrollable, parent)
|
|||
return dragBar, widgetContainer, helpFrame, closeEvent
|
||||
end
|
||||
|
||||
t.Help = function(funcNameOrFunc)
|
||||
RbxGui.Help = function(funcNameOrFunc)
|
||||
--input argument can be a string or a function. Should return a description (of arguments and expected side effects)
|
||||
if
|
||||
funcNameOrFunc == "CreatePropertyDropDownMenu"
|
||||
or funcNameOrFunc == t.CreatePropertyDropDownMenu
|
||||
or funcNameOrFunc == RbxGui.CreatePropertyDropDownMenu
|
||||
then
|
||||
return "Function CreatePropertyDropDownMenu. "
|
||||
.. "Arguments: (instance, propertyName, enumType). "
|
||||
|
|
@ -4462,7 +4465,7 @@ t.Help = function(funcNameOrFunc)
|
|||
end
|
||||
if
|
||||
funcNameOrFunc == "CreateDropDownMenu"
|
||||
or funcNameOrFunc == t.CreateDropDownMenu
|
||||
or funcNameOrFunc == RbxGui.CreateDropDownMenu
|
||||
then
|
||||
return "Function CreateDropDownMenu. "
|
||||
.. "Arguments: (items, onItemSelected). "
|
||||
|
|
@ -4470,7 +4473,7 @@ t.Help = function(funcNameOrFunc)
|
|||
end
|
||||
if
|
||||
funcNameOrFunc == "CreateMessageDialog"
|
||||
or funcNameOrFunc == t.CreateMessageDialog
|
||||
or funcNameOrFunc == RbxGui.CreateMessageDialog
|
||||
then
|
||||
return "Function CreateMessageDialog. "
|
||||
.. "Arguments: (title, message, buttons). "
|
||||
|
|
@ -4478,7 +4481,7 @@ t.Help = function(funcNameOrFunc)
|
|||
end
|
||||
if
|
||||
funcNameOrFunc == "CreateStyledMessageDialog"
|
||||
or funcNameOrFunc == t.CreateStyledMessageDialog
|
||||
or funcNameOrFunc == RbxGui.CreateStyledMessageDialog
|
||||
then
|
||||
return "Function CreateStyledMessageDialog. "
|
||||
.. "Arguments: (title, message, style, buttons). "
|
||||
|
|
@ -4486,7 +4489,7 @@ t.Help = function(funcNameOrFunc)
|
|||
end
|
||||
if
|
||||
funcNameOrFunc == "GetFontHeight"
|
||||
or funcNameOrFunc == t.GetFontHeight
|
||||
or funcNameOrFunc == RbxGui.GetFontHeight
|
||||
then
|
||||
return "Function GetFontHeight. "
|
||||
.. "Arguments: (font, fontSize). "
|
||||
|
|
@ -4494,7 +4497,7 @@ t.Help = function(funcNameOrFunc)
|
|||
end
|
||||
if
|
||||
funcNameOrFunc == "CreateScrollingFrame"
|
||||
or funcNameOrFunc == t.CreateScrollingFrame
|
||||
or funcNameOrFunc == RbxGui.CreateScrollingFrame
|
||||
then
|
||||
return "Function CreateScrollingFrame. "
|
||||
.. "Arguments: (orderList, style) "
|
||||
|
|
@ -4502,7 +4505,7 @@ t.Help = function(funcNameOrFunc)
|
|||
end
|
||||
if
|
||||
funcNameOrFunc == "CreateTrueScrollingFrame"
|
||||
or funcNameOrFunc == t.CreateTrueScrollingFrame
|
||||
or funcNameOrFunc == RbxGui.CreateTrueScrollingFrame
|
||||
then
|
||||
return "Function CreateTrueScrollingFrame. "
|
||||
.. "Arguments: (nil) "
|
||||
|
|
@ -4510,20 +4513,23 @@ t.Help = function(funcNameOrFunc)
|
|||
end
|
||||
if
|
||||
funcNameOrFunc == "AutoTruncateTextObject"
|
||||
or funcNameOrFunc == t.AutoTruncateTextObject
|
||||
or funcNameOrFunc == RbxGui.AutoTruncateTextObject
|
||||
then
|
||||
return "Function AutoTruncateTextObject. "
|
||||
.. "Arguments: (textLabel) "
|
||||
.. "Side effect: returns 2 objects, (textLabel, changeText). The 'textLabel' input is modified to automatically truncate text (with ellipsis), if it gets too small to fit. 'changeText' is a function that can be used to change the text, it takes 1 string as an argument"
|
||||
end
|
||||
if funcNameOrFunc == "CreateSlider" or funcNameOrFunc == t.CreateSlider then
|
||||
if
|
||||
funcNameOrFunc == "CreateSlider"
|
||||
or funcNameOrFunc == RbxGui.CreateSlider
|
||||
then
|
||||
return "Function CreateSlider. "
|
||||
.. "Arguments: (steps, width, position) "
|
||||
.. "Side effect: returns 2 objects, (sliderGui, sliderPosition). The 'steps' argument specifies how many different positions the slider can hold along the bar. 'width' specifies in pixels how wide the bar should be (modifiable afterwards if desired). 'position' argument should be a UDim2 for slider positioning. 'sliderPosition' is an IntValue whose current .Value specifies the specific step the slider is currently on."
|
||||
end
|
||||
if
|
||||
funcNameOrFunc == "CreateLoadingFrame"
|
||||
or funcNameOrFunc == t.CreateLoadingFrame
|
||||
or funcNameOrFunc == RbxGui.CreateLoadingFrame
|
||||
then
|
||||
return "Function CreateLoadingFrame. "
|
||||
.. "Arguments: (name, size, position) "
|
||||
|
|
@ -4531,7 +4537,7 @@ t.Help = function(funcNameOrFunc)
|
|||
end
|
||||
if
|
||||
funcNameOrFunc == "CreateTerrainMaterialSelector"
|
||||
or funcNameOrFunc == t.CreateTerrainMaterialSelector
|
||||
or funcNameOrFunc == RbxGui.CreateTerrainMaterialSelector
|
||||
then
|
||||
return "Function CreateTerrainMaterialSelector. "
|
||||
.. "Arguments: (size, position) "
|
||||
|
|
@ -4539,4 +4545,4 @@ t.Help = function(funcNameOrFunc)
|
|||
end
|
||||
end
|
||||
|
||||
return t
|
||||
return RbxGui
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ local RbxGui
|
|||
local helpButton, updateCameraDropDownSelection, updateVideoCaptureDropDownSelection
|
||||
local tweenTime = 0.2
|
||||
|
||||
local mouseLockLookScreenUrl = "http://banland.xyz/asset?id=54071825"
|
||||
local classicLookScreenUrl = "http://banland.xyz/Asset?id=45915798"
|
||||
local mouseLockLookScreenUrl = "https://banland.xyz/asset?id=54071825"
|
||||
local classicLookScreenUrl = "https://banland.xyz/Asset?id=45915798"
|
||||
|
||||
local hasGraphicsSlider = (game:GetService("CoreGui").Version >= 5)
|
||||
local GraphicsQualityLevels = 10 -- how many levels we allow on graphics slider
|
||||
|
|
@ -415,17 +415,17 @@ local function createHelpDialog(baseZIndex)
|
|||
buttons[2] = {}
|
||||
buttons[2].Text = "Move"
|
||||
buttons[2].Function = function()
|
||||
image.Image = "http://banland.xyz/Asset?id=45915811"
|
||||
image.Image = "https://banland.xyz/Asset?id=45915811"
|
||||
end
|
||||
buttons[3] = {}
|
||||
buttons[3].Text = "Gear"
|
||||
buttons[3].Function = function()
|
||||
image.Image = "http://banland.xyz/Asset?id=45917596"
|
||||
image.Image = "https://banland.xyz/Asset?id=45917596"
|
||||
end
|
||||
buttons[4] = {}
|
||||
buttons[4].Text = "Zoom"
|
||||
buttons[4].Function = function()
|
||||
image.Image = "http://banland.xyz/Asset?id=45915825"
|
||||
image.Image = "https://banland.xyz/Asset?id=45915825"
|
||||
end
|
||||
|
||||
CreateTextButtons(buttonRow, buttons, UDim.new(0, 0), UDim.new(1, 0))
|
||||
|
|
@ -2007,7 +2007,7 @@ local createSaveDialogs = function()
|
|||
-8
|
||||
)
|
||||
spinnerImage.BackgroundTransparency = 1
|
||||
spinnerImage.Image = "http://banland.xyz/Asset?id=45880710"
|
||||
spinnerImage.Image = "https://banland.xyz/Asset?id=45880710"
|
||||
spinnerImage.Parent = spinnerFrame
|
||||
|
||||
spinnerIcons[spinnerNum] = spinnerImage
|
||||
|
|
@ -2029,10 +2029,10 @@ local createSaveDialogs = function()
|
|||
while pos < 8 do
|
||||
if pos == spinPos or pos == ((spinPos + 1) % 8) then
|
||||
spinnerIcons[pos + 1].Image =
|
||||
"http://banland.xyz/Asset?id=45880668"
|
||||
"https://banland.xyz/Asset?id=45880668"
|
||||
else
|
||||
spinnerIcons[pos + 1].Image =
|
||||
"http://banland.xyz/Asset?id=45880710"
|
||||
"https://banland.xyz/Asset?id=45880710"
|
||||
end
|
||||
|
||||
pos += 1
|
||||
|
|
@ -2169,7 +2169,7 @@ local createReportAbuseDialog = function()
|
|||
frame.Active = true
|
||||
frame.Parent = shield
|
||||
|
||||
local settingsFrame = Instance.new "Frame"
|
||||
settingsFrame = Instance.new "Frame"
|
||||
settingsFrame.Name = "ReportAbuseStyle"
|
||||
settingsFrame.Size = UDim2.new(1, 0, 1, 0)
|
||||
settingsFrame.Style = Enum.FrameStyle.RobloxRound
|
||||
|
|
@ -2602,25 +2602,3 @@ if success and luaChat then
|
|||
end)
|
||||
end
|
||||
]]
|
||||
|
||||
--[[
|
||||
local BurningManPlaceID = 41324860
|
||||
-- TODO: remove click to walk completely if testing shows we don't need it
|
||||
-- Removes click to walk option from Burning Man
|
||||
delay(0, function()
|
||||
waitForChild(game, "NetworkClient")
|
||||
waitForChild(game, "Players")
|
||||
waitForProperty(game.Players, "LocalPlayer")
|
||||
waitForProperty(game.Players.LocalPlayer, "Character")
|
||||
waitForChild(game.Players.LocalPlayer.Character, "Humanoid")
|
||||
waitForProperty(game, "PlaceId")
|
||||
|
||||
if game.PlaceId == BurningManPlaceID then
|
||||
game.Players.LocalPlayer.Character.Humanoid:SetClickToWalkEnabled(false)
|
||||
game.Players.LocalPlayer.CharacterAdded:connect(function(character)
|
||||
waitForChild(character, "Humanoid")
|
||||
character.Humanoid:SetClickToWalkEnabled(false)
|
||||
end)
|
||||
end
|
||||
end)
|
||||
]]
|
||||
|
|
|
|||
3236
luau/48488235.luau
3236
luau/48488235.luau
File diff suppressed because it is too large
Load Diff
|
|
@ -46,7 +46,7 @@ function makeFriend(fromPlayer, toPlayer)
|
|||
|
||||
popup.PopupText.Text = `Accept Friend Request from {fromPlayer.Name}?`
|
||||
popup.PopupImage.Image =
|
||||
`http://banland.xyz/thumbs/avatar.ashx?userId={fromPlayer.userId}&x=352&y=352`
|
||||
`https://banland.xyz/thumbs/avatar.ashx?userId={fromPlayer.userId}&x=352&y=352`
|
||||
|
||||
showTwoButtons()
|
||||
popup.Visible = true
|
||||
|
|
@ -114,7 +114,7 @@ game.Players.FriendRequestEvent:connect(function(fromPlayer, toPlayer, event)
|
|||
game:GetService("GuiService"):SendNotification(
|
||||
"You are Friends",
|
||||
`With {toPlayer.Name}!`,
|
||||
`http://banland.xyz/thumbs/avatar.ashx?userId={toPlayer.userId}&x=48&y=48`,
|
||||
`https://banland.xyz/thumbs/avatar.ashx?userId={toPlayer.userId}&x=48&y=48`,
|
||||
5,
|
||||
function() end
|
||||
)
|
||||
|
|
@ -127,7 +127,7 @@ game.Players.FriendRequestEvent:connect(function(fromPlayer, toPlayer, event)
|
|||
game:GetService("GuiService"):SendNotification(
|
||||
"Friend Request",
|
||||
`From {fromPlayer.Name}`,
|
||||
`http://banland.xyz/thumbs/avatar.ashx?userId={fromPlayer.userId}&x=48&y=48`,
|
||||
`https://banland.xyz/thumbs/avatar.ashx?userId={fromPlayer.userId}&x=48&y=48`,
|
||||
8,
|
||||
function()
|
||||
makeFriend(fromPlayer, toPlayer)
|
||||
|
|
@ -137,7 +137,7 @@ game.Players.FriendRequestEvent:connect(function(fromPlayer, toPlayer, event)
|
|||
game:GetService("GuiService"):SendNotification(
|
||||
"You are Friends",
|
||||
`With {fromPlayer.Name}!`,
|
||||
`http://banland.xyz/thumbs/avatar.ashx?userId={fromPlayer.userId}&x=48&y=48`,
|
||||
`https://banland.xyz/thumbs/avatar.ashx?userId={fromPlayer.userId}&x=48&y=48`,
|
||||
5,
|
||||
function() end
|
||||
)
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ popupImage.Parent = popupFrame
|
|||
local backing = Instance.new "ImageLabel"
|
||||
backing.BackgroundTransparency = 1
|
||||
backing.Size = UDim2.new(1, 0, 1, 0)
|
||||
backing.Image = "http://banland.xyz/asset/?id=47574181"
|
||||
backing.Image = "https://banland.xyz/asset/?id=47574181"
|
||||
backing.Name = "Backing"
|
||||
backing.ZIndex = 2
|
||||
backing.Parent = popupImage
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ CurrentLoadout.Parent = gui
|
|||
local CLBackground = Instance.new "ImageLabel"
|
||||
CLBackground.Name = "Background"
|
||||
CLBackground.Size = UDim2.new(1.2, 0, 1.2, 0)
|
||||
CLBackground.Image = "http://banland.xyz/asset/?id=96536002"
|
||||
CLBackground.Image = "https://banland.xyz/asset/?id=96536002"
|
||||
CLBackground.BackgroundTransparency = 1
|
||||
CLBackground.Position = UDim2.new(-0.1, 0, -0.1, 0)
|
||||
CLBackground.ZIndex = 0.0
|
||||
|
|
@ -65,7 +65,7 @@ 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://banland.xyz/asset/?id=97662207"
|
||||
BackgroundUp.Image = "https://banland.xyz/asset/?id=97662207"
|
||||
BackgroundUp.BackgroundTransparency = 1
|
||||
BackgroundUp.Parent = CLBackground
|
||||
|
||||
|
|
@ -79,7 +79,7 @@ BackpackButton.RobloxLocked = true
|
|||
BackpackButton.Visible = false
|
||||
BackpackButton.Name = "BackpackButton"
|
||||
BackpackButton.BackgroundTransparency = 1
|
||||
BackpackButton.Image = "http://banland.xyz/asset/?id=97617958"
|
||||
BackpackButton.Image = "https://banland.xyz/asset/?id=97617958"
|
||||
BackpackButton.Position = UDim2.new(0.5, -60, 1, -108)
|
||||
BackpackButton.Size = UDim2.new(0, 120, 0, 18)
|
||||
waitForChild(gui, "ControlFrame")
|
||||
|
|
@ -138,14 +138,14 @@ TempSlot.ZIndex = 3.0
|
|||
local slotBackground = Instance.new "ImageLabel"
|
||||
slotBackground.Name = "Background"
|
||||
slotBackground.BackgroundTransparency = 1
|
||||
slotBackground.Image = "http://banland.xyz/asset/?id=97613075"
|
||||
slotBackground.Image = "https://banland.xyz/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://banland.xyz/asset/?id=97643886"
|
||||
HighLight.Image = "https://banland.xyz/asset/?id=97643886"
|
||||
HighLight.Size = UDim2.new(1, 0, 1, 0)
|
||||
--HighLight.Parent = TempSlot
|
||||
HighLight.Visible = false
|
||||
|
|
@ -339,8 +339,8 @@ closeButton.Modal = true
|
|||
local XImage = Instance.new "ImageLabel"
|
||||
XImage.RobloxLocked = true
|
||||
XImage.Name = "XImage"
|
||||
ContentProvider:Preload "http://banland.xyz/asset/?id=75547445"
|
||||
XImage.Image = "http://banland.xyz/asset/?id=75547445" --TODO: move to rbxasset
|
||||
ContentProvider:Preload "https://banland.xyz/asset/?id=75547445"
|
||||
XImage.Image = "https://banland.xyz/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)
|
||||
|
|
@ -430,7 +430,7 @@ GearGrid.Size = UDim2.new(0.95, 0, 1, 0)
|
|||
GearGrid.BackgroundTransparency = 1
|
||||
GearGrid.Parent = Gear
|
||||
|
||||
local GearButton = Instance.new "ImageButton"
|
||||
GearButton = Instance.new "ImageButton"
|
||||
GearButton.RobloxLocked = true
|
||||
GearButton.Visible = false
|
||||
GearButton.Name = "GearButton"
|
||||
|
|
@ -439,15 +439,15 @@ GearButton.Style = "Custom"
|
|||
GearButton.BackgroundTransparency = 1
|
||||
GearButton.Parent = GearGrid
|
||||
|
||||
local slotBackground = Instance.new "ImageLabel"
|
||||
slotBackground = Instance.new "ImageLabel"
|
||||
slotBackground.Name = "Background"
|
||||
slotBackground.BackgroundTransparency = 1
|
||||
slotBackground.Image = "http://banland.xyz/asset/?id=97613075"
|
||||
slotBackground.Image = "https://banland.xyz/asset/?id=97613075"
|
||||
slotBackground.Size = UDim2.new(1, 0, 1, 0)
|
||||
slotBackground.Parent = GearButton
|
||||
|
||||
-- GearButton Children
|
||||
local GearReference = Instance.new "ObjectValue"
|
||||
GearReference = Instance.new "ObjectValue"
|
||||
GearReference.RobloxLocked = true
|
||||
GearReference.Name = "GearReference"
|
||||
GearReference.Parent = GearButton
|
||||
|
|
@ -462,7 +462,7 @@ GreyOutButton.Visible = false
|
|||
GreyOutButton.ZIndex = 3
|
||||
GreyOutButton.Parent = GearButton
|
||||
|
||||
local GearText = Instance.new "TextLabel"
|
||||
GearText = Instance.new "TextLabel"
|
||||
GearText.RobloxLocked = true
|
||||
GearText.Name = "GearText"
|
||||
GearText.BackgroundTransparency = 1
|
||||
|
|
@ -564,7 +564,7 @@ GearName.TextWrap = true
|
|||
GearName.ZIndex = 9
|
||||
GearName.Parent = GearStats
|
||||
|
||||
local GearImage = Instance.new "ImageLabel"
|
||||
GearImage = Instance.new "ImageLabel"
|
||||
GearImage.RobloxLocked = true
|
||||
GearImage.Name = "GearImage"
|
||||
GearImage.Image = ""
|
||||
|
|
@ -771,10 +771,10 @@ CharacterPane.Parent = Wardrobe
|
|||
|
||||
--CharacterPane Children
|
||||
local FaceFrame = makeCharFrame("FacesFrame", CharacterPane)
|
||||
ContentProvider:Preload "http://banland.xyz/asset/?id=75460621"
|
||||
ContentProvider:Preload "https://banland.xyz/asset/?id=75460621"
|
||||
makeZone(
|
||||
"FaceZone",
|
||||
"http://banland.xyz/asset/?id=75460621",
|
||||
"https://banland.xyz/asset/?id=75460621",
|
||||
UDim2.new(0, 157, 0, 137),
|
||||
UDim2.new(0.5, -78, 0.5, -68),
|
||||
FaceFrame
|
||||
|
|
@ -789,7 +789,7 @@ makeStyledButton(
|
|||
local HeadFrame = makeCharFrame("HeadsFrame", CharacterPane)
|
||||
makeZone(
|
||||
"FaceZone",
|
||||
"http://banland.xyz/asset/?id=75460621",
|
||||
"https://banland.xyz/asset/?id=75460621",
|
||||
UDim2.new(0, 157, 0, 137),
|
||||
UDim2.new(0.5, -78, 0.5, -68),
|
||||
HeadFrame
|
||||
|
|
@ -802,10 +802,10 @@ makeStyledButton(
|
|||
)
|
||||
|
||||
local HatsFrame = makeCharFrame("HatsFrame", CharacterPane)
|
||||
ContentProvider:Preload "http://banland.xyz/asset/?id=75457888"
|
||||
ContentProvider:Preload "https://banland.xyz/asset/?id=75457888"
|
||||
local HatsZone = makeZone(
|
||||
"HatsZone",
|
||||
"http://banland.xyz/asset/?id=75457888",
|
||||
"https://banland.xyz/asset/?id=75457888",
|
||||
UDim2.new(0, 186, 0, 184),
|
||||
UDim2.new(0.5, -93, 0.5, -100),
|
||||
HatsFrame
|
||||
|
|
@ -833,10 +833,10 @@ makeStyledButton(
|
|||
)
|
||||
|
||||
local PantsFrame = makeCharFrame("PantsFrame", CharacterPane)
|
||||
ContentProvider:Preload "http://banland.xyz/asset/?id=75457920"
|
||||
ContentProvider:Preload "https://banland.xyz/asset/?id=75457920"
|
||||
makeZone(
|
||||
"PantsZone",
|
||||
"http://banland.xyz/asset/?id=75457920",
|
||||
"https://banland.xyz/asset/?id=75457920",
|
||||
UDim2.new(0, 121, 0, 99),
|
||||
UDim2.new(0.5, -60, 0.5, -100),
|
||||
PantsFrame
|
||||
|
|
@ -928,10 +928,10 @@ makeTextLabel(
|
|||
)
|
||||
|
||||
local TShirtFrame = makeCharFrame("T-ShirtsFrame", CharacterPane)
|
||||
ContentProvider:Preload "http://banland.xyz/asset/?id=75460642"
|
||||
ContentProvider:Preload "https://banland.xyz/asset/?id=75460642"
|
||||
makeZone(
|
||||
"TShirtZone",
|
||||
"http://banland.xyz/asset/?id=75460642",
|
||||
"https://banland.xyz/asset/?id=75460642",
|
||||
UDim2.new(0, 121, 0, 154),
|
||||
UDim2.new(0.5, -60, 0.5, -100),
|
||||
TShirtFrame
|
||||
|
|
@ -946,7 +946,7 @@ makeStyledButton(
|
|||
local ShirtFrame = makeCharFrame("ShirtsFrame", CharacterPane)
|
||||
makeZone(
|
||||
"ShirtZone",
|
||||
"http://banland.xyz/asset/?id=75460642",
|
||||
"https://banland.xyz/asset/?id=75460642",
|
||||
UDim2.new(0, 121, 0, 154),
|
||||
UDim2.new(0.5, -60, 0.5, -100),
|
||||
ShirtFrame
|
||||
|
|
@ -959,10 +959,10 @@ makeStyledButton(
|
|||
)
|
||||
|
||||
local ColorFrame = makeCharFrame("ColorFrame", CharacterPane)
|
||||
ContentProvider:Preload "http://banland.xyz/asset/?id=76049888"
|
||||
ContentProvider:Preload "https://banland.xyz/asset/?id=76049888"
|
||||
local ColorZone = makeZone(
|
||||
"ColorZone",
|
||||
"http://banland.xyz/asset/?id=76049888",
|
||||
"https://banland.xyz/asset/?id=76049888",
|
||||
UDim2.new(0, 120, 0, 150),
|
||||
UDim2.new(0.5, -60, 0.5, -100),
|
||||
ColorFrame
|
||||
|
|
|
|||
|
|
@ -116,6 +116,8 @@ for i = 1, maxNumLoadoutItems do
|
|||
end
|
||||
|
||||
local backpackWasOpened = false
|
||||
|
||||
local dragBeginPos
|
||||
--- End Locals
|
||||
|
||||
-- Begin Functions
|
||||
|
|
@ -135,13 +137,13 @@ local function kill(prop, con, gear)
|
|||
end
|
||||
end
|
||||
|
||||
function registerNumberKeys()
|
||||
local function registerNumberKeys()
|
||||
for i = 0, 9 do
|
||||
GuiService:AddKey(tostring(i))
|
||||
end
|
||||
end
|
||||
|
||||
function unregisterNumberKeys()
|
||||
local function unregisterNumberKeys()
|
||||
pcall(function()
|
||||
for i = 0, 9 do
|
||||
GuiService:RemoveKey(tostring(i))
|
||||
|
|
@ -149,7 +151,7 @@ function unregisterNumberKeys()
|
|||
end)
|
||||
end
|
||||
|
||||
function characterInWorkspace()
|
||||
local function characterInWorkspace()
|
||||
if game.Players.LocalPlayer then
|
||||
if game.Players.LocalPlayer.Character then
|
||||
if game.Players.LocalPlayer.Character ~= nil then
|
||||
|
|
@ -163,7 +165,7 @@ function characterInWorkspace()
|
|||
return false
|
||||
end
|
||||
|
||||
function removeGear(gear)
|
||||
local function removeGear(gear)
|
||||
local emptySlot
|
||||
for i = 1, #gearSlots do
|
||||
if gearSlots[i] == gear and gear.Parent ~= nil then
|
||||
|
|
@ -225,7 +227,7 @@ function removeGear(gear)
|
|||
end
|
||||
end
|
||||
|
||||
function insertGear(gear, addToSlot)
|
||||
local function insertGear(gear, addToSlot)
|
||||
local pos
|
||||
if not addToSlot then
|
||||
for i = 1, #gearSlots do
|
||||
|
|
@ -284,7 +286,7 @@ function insertGear(gear, addToSlot)
|
|||
end)
|
||||
end
|
||||
|
||||
function reorganizeLoadout(gear, inserting, _, addToSlot)
|
||||
local function reorganizeLoadout(gear, inserting, _, addToSlot)
|
||||
if inserting then -- add in gear
|
||||
insertGear(gear, addToSlot)
|
||||
else
|
||||
|
|
@ -295,7 +297,7 @@ function reorganizeLoadout(gear, inserting, _, addToSlot)
|
|||
end
|
||||
end
|
||||
|
||||
function checkToolAncestry(child, parent)
|
||||
local function checkToolAncestry(child, parent)
|
||||
if child:FindFirstChild "RobloxBuildTool" then
|
||||
return
|
||||
end -- don't show roblox build tools
|
||||
|
|
@ -325,7 +327,7 @@ function checkToolAncestry(child, parent)
|
|||
end
|
||||
end
|
||||
|
||||
function removeAllEquippedGear(physGear)
|
||||
local function removeAllEquippedGear(physGear)
|
||||
local stuff = player.Character:GetChildren()
|
||||
for i = 1, #stuff do
|
||||
if
|
||||
|
|
@ -342,159 +344,7 @@ function removeAllEquippedGear(physGear)
|
|||
end
|
||||
end
|
||||
|
||||
function hopperBinSwitcher(numKey, physGear)
|
||||
if not physGear then
|
||||
return
|
||||
end
|
||||
|
||||
physGear:ToggleSelect()
|
||||
|
||||
if gearSlots[numKey] == "empty" then
|
||||
return
|
||||
end
|
||||
|
||||
if not physGear.Active then
|
||||
gearSlots[numKey].Selected = false
|
||||
normalizeButton(gearSlots[numKey])
|
||||
else
|
||||
gearSlots[numKey].Selected = true
|
||||
enlargeButton(gearSlots[numKey])
|
||||
end
|
||||
end
|
||||
|
||||
function toolSwitcher(numKey)
|
||||
if not gearSlots[numKey] then
|
||||
return
|
||||
end
|
||||
local physGear = gearSlots[numKey].GearReference.Value
|
||||
if physGear == nil then
|
||||
return
|
||||
end
|
||||
|
||||
removeAllEquippedGear(physGear) -- we don't remove this gear, as then we get a double switcheroo
|
||||
|
||||
local key = numKey
|
||||
if numKey == 0 then
|
||||
key = 10
|
||||
end
|
||||
|
||||
for i = 1, #gearSlots do
|
||||
if gearSlots[i] and gearSlots[i] ~= "empty" and i ~= key then
|
||||
normalizeButton(gearSlots[i])
|
||||
gearSlots[i].Selected = false
|
||||
if
|
||||
gearSlots[i].GearReference
|
||||
and gearSlots[i].GearReference.Value
|
||||
and gearSlots[i].GearReference.Value:IsA "HopperBin"
|
||||
and gearSlots[i].GearReference.Value.Active
|
||||
then
|
||||
gearSlots[i].GearReference.Value:ToggleSelect()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if physGear:IsA "HopperBin" then
|
||||
hopperBinSwitcher(numKey, physGear)
|
||||
else
|
||||
if physGear.Parent == player.Character then
|
||||
physGear.Parent = player.Backpack
|
||||
|
||||
if gearSlots[numKey] ~= "empty" then
|
||||
gearSlots[numKey].Selected = false
|
||||
normalizeButton(gearSlots[numKey])
|
||||
end
|
||||
else
|
||||
--player.Character.Humanoid:EquipTool(physGear)
|
||||
|
||||
physGear.Parent = player.Character
|
||||
gearSlots[numKey].Selected = true
|
||||
|
||||
enlargeButton(gearSlots[numKey])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function activateGear(num)
|
||||
local numKey
|
||||
if num == "0" then
|
||||
numKey = 10 -- why do lua indexes have to start at 1? :(
|
||||
else
|
||||
numKey = tonumber(num)
|
||||
end
|
||||
|
||||
if numKey == nil then
|
||||
return
|
||||
end
|
||||
|
||||
if gearSlots[numKey] ~= "empty" then
|
||||
toolSwitcher(numKey)
|
||||
end
|
||||
end
|
||||
|
||||
enlargeButton = function(button)
|
||||
if button.Size.Y.Scale > 1 then
|
||||
return
|
||||
end
|
||||
if not button.Parent then
|
||||
return
|
||||
end
|
||||
if not button.Selected then
|
||||
return
|
||||
end
|
||||
|
||||
for i = 1, #gearSlots do
|
||||
if gearSlots[i] == "empty" then
|
||||
break
|
||||
end
|
||||
if gearSlots[i] ~= button then
|
||||
normalizeButton(gearSlots[i])
|
||||
end
|
||||
end
|
||||
|
||||
if not enlargeOverride then
|
||||
return
|
||||
end
|
||||
|
||||
if button:FindFirstChild "Highlight" then
|
||||
button.Highlight.Visible = true
|
||||
end
|
||||
|
||||
if button:IsA "ImageButton" or button:IsA "TextButton" then
|
||||
button.ZIndex = 5
|
||||
local centerizeX = -(
|
||||
buttonSizeEnlarge.X.Scale - button.Size.X.Scale
|
||||
) / 2
|
||||
local centerizeY = -(
|
||||
buttonSizeEnlarge.Y.Scale - button.Size.Y.Scale
|
||||
) / 2
|
||||
button:TweenSizeAndPosition(
|
||||
buttonSizeEnlarge,
|
||||
UDim2.new(
|
||||
button.Position.X.Scale + centerizeX,
|
||||
button.Position.X.Offset,
|
||||
button.Position.Y.Scale + centerizeY,
|
||||
button.Position.Y.Offset
|
||||
),
|
||||
Enum.EasingDirection.Out,
|
||||
Enum.EasingStyle.Quad,
|
||||
guiTweenSpeed / 5,
|
||||
enlargeOverride
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
normalizeAllButtons = function()
|
||||
for i = 1, #gearSlots do
|
||||
if gearSlots[i] == "empty" then
|
||||
break
|
||||
end
|
||||
if gearSlots[i] ~= button then
|
||||
normalizeButton(gearSlots[i], 0.1)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
normalizeButton = function(button, speed)
|
||||
local function normaliseButton(button, speed)
|
||||
if not button then
|
||||
return
|
||||
end
|
||||
|
|
@ -537,13 +387,154 @@ normalizeButton = function(button, speed)
|
|||
end
|
||||
end
|
||||
|
||||
local function enlargeButton(button)
|
||||
if button.Size.Y.Scale > 1 then
|
||||
return
|
||||
end
|
||||
if not button.Parent then
|
||||
return
|
||||
end
|
||||
if not button.Selected then
|
||||
return
|
||||
end
|
||||
|
||||
for i = 1, #gearSlots do
|
||||
if gearSlots[i] == "empty" then
|
||||
break
|
||||
end
|
||||
if gearSlots[i] ~= button then
|
||||
normaliseButton(gearSlots[i])
|
||||
end
|
||||
end
|
||||
|
||||
if not enlargeOverride then
|
||||
return
|
||||
end
|
||||
|
||||
if button:FindFirstChild "Highlight" then
|
||||
button.Highlight.Visible = true
|
||||
end
|
||||
|
||||
if button:IsA "ImageButton" or button:IsA "TextButton" then
|
||||
button.ZIndex = 5
|
||||
local centerizeX = -(
|
||||
buttonSizeEnlarge.X.Scale - button.Size.X.Scale
|
||||
) / 2
|
||||
local centerizeY = -(
|
||||
buttonSizeEnlarge.Y.Scale - button.Size.Y.Scale
|
||||
) / 2
|
||||
button:TweenSizeAndPosition(
|
||||
buttonSizeEnlarge,
|
||||
UDim2.new(
|
||||
button.Position.X.Scale + centerizeX,
|
||||
button.Position.X.Offset,
|
||||
button.Position.Y.Scale + centerizeY,
|
||||
button.Position.Y.Offset
|
||||
),
|
||||
Enum.EasingDirection.Out,
|
||||
Enum.EasingStyle.Quad,
|
||||
guiTweenSpeed / 5,
|
||||
enlargeOverride
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
local function hopperBinSwitcher(numKey, physGear)
|
||||
if not physGear then
|
||||
return
|
||||
end
|
||||
|
||||
physGear:ToggleSelect()
|
||||
|
||||
if gearSlots[numKey] == "empty" then
|
||||
return
|
||||
end
|
||||
|
||||
if not physGear.Active then
|
||||
gearSlots[numKey].Selected = false
|
||||
normaliseButton(gearSlots[numKey])
|
||||
else
|
||||
gearSlots[numKey].Selected = true
|
||||
enlargeButton(gearSlots[numKey])
|
||||
end
|
||||
end
|
||||
|
||||
local function toolSwitcher(numKey)
|
||||
if not gearSlots[numKey] then
|
||||
return
|
||||
end
|
||||
local physGear = gearSlots[numKey].GearReference.Value
|
||||
if physGear == nil then
|
||||
return
|
||||
end
|
||||
|
||||
removeAllEquippedGear(physGear) -- we don't remove this gear, as then we get a double switcheroo
|
||||
|
||||
local key = numKey
|
||||
if numKey == 0 then
|
||||
key = 10
|
||||
end
|
||||
|
||||
for i = 1, #gearSlots do
|
||||
if gearSlots[i] and gearSlots[i] ~= "empty" and i ~= key then
|
||||
normaliseButton(gearSlots[i])
|
||||
gearSlots[i].Selected = false
|
||||
if
|
||||
gearSlots[i].GearReference
|
||||
and gearSlots[i].GearReference.Value
|
||||
and gearSlots[i].GearReference.Value:IsA "HopperBin"
|
||||
and gearSlots[i].GearReference.Value.Active
|
||||
then
|
||||
gearSlots[i].GearReference.Value:ToggleSelect()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if physGear:IsA "HopperBin" then
|
||||
hopperBinSwitcher(numKey, physGear)
|
||||
else
|
||||
if physGear.Parent == player.Character then
|
||||
physGear.Parent = player.Backpack
|
||||
|
||||
if gearSlots[numKey] ~= "empty" then
|
||||
gearSlots[numKey].Selected = false
|
||||
normaliseButton(gearSlots[numKey])
|
||||
end
|
||||
else
|
||||
--player.Character.Humanoid:EquipTool(physGear)
|
||||
|
||||
physGear.Parent = player.Character
|
||||
gearSlots[numKey].Selected = true
|
||||
|
||||
enlargeButton(gearSlots[numKey])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function activateGear(num)
|
||||
local numKey
|
||||
if num == "0" then
|
||||
numKey = 10 -- why do lua indexes have to start at 1? :(
|
||||
else
|
||||
numKey = tonumber(num)
|
||||
end
|
||||
|
||||
if numKey == nil then
|
||||
return
|
||||
end
|
||||
|
||||
if gearSlots[numKey] ~= "empty" then
|
||||
toolSwitcher(numKey)
|
||||
end
|
||||
end
|
||||
|
||||
local waitForDebounce = function()
|
||||
while debounce do
|
||||
wait()
|
||||
end
|
||||
end
|
||||
|
||||
function pointInRectangle(point, rectTopLeft, rectSize)
|
||||
local function pointInRectangle(point, rectTopLeft, rectSize)
|
||||
if point.x > rectTopLeft.x and point.x < (rectTopLeft.x + rectSize.x) then
|
||||
if
|
||||
point.y > rectTopLeft.y
|
||||
|
|
@ -555,7 +546,7 @@ function pointInRectangle(point, rectTopLeft, rectSize)
|
|||
return false
|
||||
end
|
||||
|
||||
function swapGear(gearClone, toFrame)
|
||||
local function swapGear(gearClone, toFrame)
|
||||
local toFrameChildren = toFrame:GetChildren()
|
||||
if #toFrameChildren == 1 then
|
||||
if toFrameChildren[1]:FindFirstChild "SlotNumber" then
|
||||
|
|
@ -625,7 +616,7 @@ function swapGear(gearClone, toFrame)
|
|||
end
|
||||
end
|
||||
|
||||
function resolveDrag(gearClone, x, y)
|
||||
local function resolveDrag(gearClone, x, y)
|
||||
local mousePoint = Vector2.new(x, y)
|
||||
|
||||
local frame = gearClone.Parent
|
||||
|
|
@ -666,7 +657,7 @@ function resolveDrag(gearClone, x, y)
|
|||
return -1
|
||||
end
|
||||
|
||||
function unequipAllItems(dontEquipThis)
|
||||
local function unequipAllItems(dontEquipThis)
|
||||
for i = 1, #gearSlots do
|
||||
if gearSlots[i] == "empty" then
|
||||
break
|
||||
|
|
@ -686,7 +677,7 @@ function unequipAllItems(dontEquipThis)
|
|||
end
|
||||
end
|
||||
|
||||
function showToolTip(button, tip)
|
||||
local function showToolTip(button, tip)
|
||||
if
|
||||
button
|
||||
and button:FindFirstChild "ToolTipLabel"
|
||||
|
|
@ -701,7 +692,7 @@ function showToolTip(button, tip)
|
|||
end
|
||||
end
|
||||
|
||||
function hideToolTip(button, _)
|
||||
local function hideToolTip(button, _)
|
||||
if
|
||||
button
|
||||
and button:FindFirstChild "ToolTipLabel"
|
||||
|
|
@ -711,7 +702,16 @@ function hideToolTip(button, _)
|
|||
end
|
||||
end
|
||||
|
||||
local addingPlayerChild = function(
|
||||
local function removeFromInventory(child)
|
||||
for i = 1, #inventory do
|
||||
if inventory[i] == child then
|
||||
table.remove(inventory, i)
|
||||
inventory[i] = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function addingPlayerChild(
|
||||
child,
|
||||
equipped,
|
||||
addToSlot,
|
||||
|
|
@ -845,7 +845,6 @@ local addingPlayerChild = function(
|
|||
)
|
||||
end
|
||||
|
||||
local dragBeginPos
|
||||
local clickCon, buttonDeleteCon, mouseEnterCon, mouseLeaveCon, dragStop, dragBegin
|
||||
clickCon = gearClone.MouseButton1Click:connect(function()
|
||||
if characterInWorkspace() then
|
||||
|
|
@ -924,8 +923,8 @@ local addingPlayerChild = function(
|
|||
|
||||
local childCon
|
||||
local childChangeCon
|
||||
childCon = child.AncestryChanged:connect(function(newChild, parent)
|
||||
if not checkToolAncestry(newChild, parent) then
|
||||
childCon = child.AncestryChanged:connect(function(newChild, newParent)
|
||||
if not checkToolAncestry(newChild, newParent) then
|
||||
if childCon then
|
||||
childCon:disconnect()
|
||||
end
|
||||
|
|
@ -933,8 +932,8 @@ local addingPlayerChild = function(
|
|||
childChangeCon:disconnect()
|
||||
end
|
||||
removeFromInventory(child)
|
||||
elseif parent == game.Players.LocalPlayer.Backpack then
|
||||
normalizeButton(gearClone)
|
||||
elseif newParent == game.Players.LocalPlayer.Backpack then
|
||||
normaliseButton(gearClone)
|
||||
end
|
||||
end)
|
||||
|
||||
|
|
@ -947,7 +946,7 @@ local addingPlayerChild = function(
|
|||
if child and child:IsA "HopperBin" then
|
||||
if not child.Active then
|
||||
gearClone.Selected = false
|
||||
normalizeButton(gearClone)
|
||||
normaliseButton(gearClone)
|
||||
end
|
||||
end
|
||||
elseif prop == "TextureId" then
|
||||
|
|
@ -973,7 +972,7 @@ local addingPlayerChild = function(
|
|||
end)
|
||||
end
|
||||
|
||||
function addToInventory(child)
|
||||
local function addToInventory(child)
|
||||
if not child:IsA "Tool" or not child:IsA "HopperBin" then
|
||||
return
|
||||
end
|
||||
|
|
@ -996,17 +995,8 @@ function addToInventory(child)
|
|||
end
|
||||
end
|
||||
|
||||
function removeFromInventory(child)
|
||||
for i = 1, #inventory do
|
||||
if inventory[i] == child then
|
||||
table.remove(inventory, i)
|
||||
inventory[i] = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local spreadOutGear = function()
|
||||
loadoutChildren = currentLoadout:GetChildren()
|
||||
local loadoutChildren = currentLoadout:GetChildren()
|
||||
|
||||
for i = 1, #loadoutChildren do
|
||||
if loadoutChildren[i]:IsA "Frame" then
|
||||
|
|
@ -1037,7 +1027,7 @@ local spreadOutGear = function()
|
|||
end
|
||||
|
||||
local centerGear = function()
|
||||
loadoutChildren = currentLoadout:GetChildren()
|
||||
local loadoutChildren = currentLoadout:GetChildren()
|
||||
local gearButtons = {}
|
||||
local lastSlotAdd
|
||||
|
||||
|
|
@ -1080,20 +1070,20 @@ local centerGear = function()
|
|||
end
|
||||
end
|
||||
|
||||
function editLoadout()
|
||||
local function editLoadout()
|
||||
backpackWasOpened = true
|
||||
if inGearTab then
|
||||
spreadOutGear()
|
||||
end
|
||||
end
|
||||
|
||||
function readonlyLoadout()
|
||||
local function readonlyLoadout()
|
||||
if not inGearTab then
|
||||
centerGear()
|
||||
end
|
||||
end
|
||||
|
||||
function setupBackpackListener()
|
||||
local function setupBackpackListener()
|
||||
if backpackChildCon then
|
||||
backpackChildCon:disconnect()
|
||||
backpackChildCon = nil
|
||||
|
|
@ -1111,20 +1101,20 @@ function setupBackpackListener()
|
|||
end)
|
||||
end
|
||||
|
||||
function playerCharacterChildAdded(child)
|
||||
local function playerCharacterChildAdded(child)
|
||||
addingPlayerChild(child, true)
|
||||
addToInventory(child)
|
||||
end
|
||||
|
||||
function activateLoadout()
|
||||
local function activateLoadout()
|
||||
currentLoadout.Visible = true
|
||||
end
|
||||
|
||||
function deactivateLoadout()
|
||||
local function deactivateLoadout()
|
||||
currentLoadout.Visible = false
|
||||
end
|
||||
|
||||
function tabHandler(inFocus)
|
||||
local function tabHandler(inFocus)
|
||||
inGearTab = inFocus
|
||||
if inFocus then
|
||||
editLoadout()
|
||||
|
|
@ -1133,7 +1123,7 @@ function tabHandler(inFocus)
|
|||
end
|
||||
end
|
||||
|
||||
function coreGuiChanged(coreGuiType, enabled)
|
||||
local function coreGuiChanged(coreGuiType, enabled)
|
||||
if
|
||||
coreGuiType == Enum.CoreGuiType.Backpack
|
||||
or coreGuiType == Enum.CoreGuiType.All
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
-- Script Context.CoreScripts/Sections
|
||||
print "[Mercury]: Loaded corescript 59002209"
|
||||
|
|
@ -212,11 +212,11 @@ end
|
|||
|
||||
local JsonReader = {
|
||||
escapes = {
|
||||
["t"] = "\t",
|
||||
["n"] = "\n",
|
||||
["f"] = "\f",
|
||||
["r"] = "\r",
|
||||
["b"] = "\b",
|
||||
t = "\t",
|
||||
n = "\n",
|
||||
f = "\f",
|
||||
r = "\r",
|
||||
b = "\b",
|
||||
},
|
||||
}
|
||||
|
||||
|
|
@ -338,7 +338,7 @@ function JsonReader:ReadBlockComment()
|
|||
done = true
|
||||
end
|
||||
if not done and ch == "/" and self:Peek() == "*" then
|
||||
error(string.format(`Invalid comment: {self:All()}, '/*' illegal.`))
|
||||
error(`Invalid comment: {self:All()}, '/*' illegal.`)
|
||||
end
|
||||
end
|
||||
self:Next()
|
||||
|
|
@ -488,7 +488,7 @@ end
|
|||
|
||||
t.SelectTerrainRegion = function(
|
||||
regionToSelect,
|
||||
color,
|
||||
colour,
|
||||
selectEmptyCells,
|
||||
selectionParent
|
||||
)
|
||||
|
|
@ -498,7 +498,7 @@ t.SelectTerrainRegion = function(
|
|||
end
|
||||
|
||||
assert(regionToSelect)
|
||||
assert(color)
|
||||
assert(colour)
|
||||
|
||||
if type(regionToSelect) ~= "Region3" then
|
||||
error(
|
||||
|
|
@ -507,10 +507,10 @@ t.SelectTerrainRegion = function(
|
|||
)}`
|
||||
)
|
||||
end
|
||||
if type(color) ~= "BrickColor" then
|
||||
if type(colour) ~= "BrickColor" then
|
||||
error(
|
||||
`color (second arg), should be of type BrickColor, but is type {type(
|
||||
color
|
||||
colour
|
||||
)}`
|
||||
)
|
||||
end
|
||||
|
|
@ -548,26 +548,8 @@ t.SelectTerrainRegion = function(
|
|||
|
||||
local selectionBox = Instance.new "SelectionBox"
|
||||
|
||||
-- srs translation from region3 to region3int16
|
||||
-- local function Region3ToRegion3int16(region3)
|
||||
-- local theLowVec = region3.CFrame.p
|
||||
-- - (region3.Size / 2)
|
||||
-- + Vector3.new(2, 2, 2)
|
||||
-- local lowCell = WorldToCellPreferSolid(terrain, theLowVec)
|
||||
|
||||
-- local theHighVec = region3.CFrame.p
|
||||
-- + (region3.Size / 2)
|
||||
-- - Vector3.new(2, 2, 2)
|
||||
-- local highCell = WorldToCellPreferSolid(terrain, theHighVec)
|
||||
|
||||
-- local highIntVec = Vector3int16.new(highCell.x, highCell.y, highCell.z)
|
||||
-- local lowIntVec = Vector3int16.new(lowCell.x, lowCell.y, lowCell.z)
|
||||
|
||||
-- return Region3int16.new(lowIntVec, highIntVec)
|
||||
-- end
|
||||
|
||||
-- helper function that creates the basis for a selection box
|
||||
local function createAdornment(theColor)
|
||||
local function createAdornment(theColour)
|
||||
local selectionPartClone
|
||||
local selectionBoxClone
|
||||
|
||||
|
|
@ -592,8 +574,8 @@ t.SelectTerrainRegion = function(
|
|||
selectionBoxClone.Parent = selectionContainer
|
||||
end
|
||||
|
||||
if theColor then
|
||||
selectionBoxClone.Color = theColor
|
||||
if theColour then
|
||||
selectionBoxClone.Color = theColour
|
||||
end
|
||||
|
||||
return selectionPartClone, selectionBoxClone
|
||||
|
|
@ -623,7 +605,7 @@ t.SelectTerrainRegion = function(
|
|||
end
|
||||
|
||||
-- finds full cells in region and adorns each cell with a box, with the argument color
|
||||
local function adornFullCellsInRegion(region, color)
|
||||
local function adornFullCellsInRegion(region, newColour)
|
||||
local regionBegin = region.CFrame.p
|
||||
- (region.Size / 2)
|
||||
+ Vector3.new(2, 2, 2)
|
||||
|
|
@ -648,8 +630,8 @@ t.SelectTerrainRegion = function(
|
|||
for cellPosAdorn, adornTable in pairs(adornments) do
|
||||
if cellPosAdorn == cellPos then
|
||||
adornTable.KeepAlive = currentKeepAliveTag
|
||||
if color then
|
||||
adornTable.SelectionBox.Color = color
|
||||
if newColour then
|
||||
adornTable.SelectionBox.Color = newColour
|
||||
end
|
||||
updated = true
|
||||
break
|
||||
|
|
@ -657,8 +639,8 @@ t.SelectTerrainRegion = function(
|
|||
end
|
||||
|
||||
if not updated then
|
||||
local selectionPart, selectionBox =
|
||||
createAdornment(color)
|
||||
selectionPart, selectionBox =
|
||||
createAdornment(newColour)
|
||||
selectionPart.Size = Vector3.new(4, 4, 4)
|
||||
selectionPart.CFrame = CFrame.new(cframePos)
|
||||
local adornTable = {
|
||||
|
|
@ -679,7 +661,7 @@ t.SelectTerrainRegion = function(
|
|||
lastRegion = regionToSelect
|
||||
|
||||
if selectEmptyCells then -- use one big selection to represent the area selected
|
||||
local selectionPart, selectionBox = createAdornment(color)
|
||||
selectionPart, selectionBox = createAdornment(colour)
|
||||
|
||||
selectionPart.Size = regionToSelect.Size
|
||||
selectionPart.CFrame = regionToSelect.CFrame
|
||||
|
|
@ -687,22 +669,22 @@ t.SelectTerrainRegion = function(
|
|||
adornments.SelectionPart = selectionPart
|
||||
adornments.SelectionBox = selectionBox
|
||||
|
||||
updateSelection = function(newRegion, color)
|
||||
updateSelection = function(newRegion, newColour)
|
||||
if newRegion and newRegion ~= lastRegion then
|
||||
lastRegion = newRegion
|
||||
selectionPart.Size = newRegion.Size
|
||||
selectionPart.CFrame = newRegion.CFrame
|
||||
end
|
||||
if color then
|
||||
selectionBox.Color = color
|
||||
if newColour then
|
||||
selectionBox.Color = newColour
|
||||
end
|
||||
end
|
||||
else -- use individual cell adorns to represent the area selected
|
||||
adornFullCellsInRegion(regionToSelect, color)
|
||||
updateSelection = function(newRegion, color)
|
||||
adornFullCellsInRegion(regionToSelect, colour)
|
||||
updateSelection = function(newRegion, newColour)
|
||||
if newRegion and newRegion ~= lastRegion then
|
||||
lastRegion = newRegion
|
||||
adornFullCellsInRegion(newRegion, color)
|
||||
adornFullCellsInRegion(newRegion, newColour)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -776,7 +758,7 @@ function t.CreateSignal()
|
|||
local cn = mBindableEvent.Event:connect(func)
|
||||
mAllCns[cn] = true
|
||||
local pubCn = {}
|
||||
function pubCn:disconnect()
|
||||
function pubCn.disconnect(_)
|
||||
cn:disconnect()
|
||||
mAllCns[cn] = nil
|
||||
end
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ print "[Mercury]: Loaded corescript 60595695"
|
|||
-- 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
|
||||
|
||||
|
|
@ -20,9 +19,6 @@ if sc then
|
|||
sc:RegisterLibrary("Libraries/RbxRed", "10000002")
|
||||
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()
|
||||
|
|
|
|||
|
|
@ -3,13 +3,7 @@ print "[Mercury]: Loaded corescript 73157242"
|
|||
|
||||
local ChangeHistoryService = game:GetService "ChangeHistoryService"
|
||||
|
||||
local t = {}
|
||||
|
||||
-- function waitForChild(instance, name)
|
||||
-- while not instance:FindFirstChild(name) do
|
||||
-- instance.ChildAdded:wait()
|
||||
-- end
|
||||
-- end
|
||||
local RbxStamper = {}
|
||||
|
||||
-- Do a line/plane intersection. The line starts at the camera. The plane is at y == 0, normal(0, 1, 0)
|
||||
--
|
||||
|
|
@ -743,7 +737,7 @@ local function restoreTheWelds(manualWeldTable, manualWeldParentTable)
|
|||
end
|
||||
end
|
||||
|
||||
t.CanEditRegion = function(partOrModel, EditRegion) -- todo: use model and stamper metadata
|
||||
RbxStamper.CanEditRegion = function(partOrModel, EditRegion) -- todo: use model and stamper metadata
|
||||
if not EditRegion then
|
||||
return true, false
|
||||
end
|
||||
|
|
@ -769,7 +763,7 @@ t.CanEditRegion = function(partOrModel, EditRegion) -- todo: use model and stamp
|
|||
return true, false
|
||||
end
|
||||
|
||||
t.GetStampModel = function(assetId, terrainShape, useAssetVersionId)
|
||||
RbxStamper.GetStampModel = function(assetId, terrainShape, useAssetVersionId)
|
||||
if assetId == 0 then
|
||||
return nil, "No Asset"
|
||||
end
|
||||
|
|
@ -859,7 +853,7 @@ t.GetStampModel = function(assetId, terrainShape, useAssetVersionId)
|
|||
local inverseCornerWedgeMesh = Instance.new "SpecialMesh"
|
||||
inverseCornerWedgeMesh.MeshType = "FileMesh"
|
||||
inverseCornerWedgeMesh.MeshId =
|
||||
"http://banland.xyz/asset?id=66832495"
|
||||
"https://banland.xyz/asset?id=66832495"
|
||||
inverseCornerWedgeMesh.Scale = Vector3.new(2, 2, 2)
|
||||
inverseCornerWedgeMesh.Parent = newTerrainPiece
|
||||
end
|
||||
|
|
@ -986,7 +980,7 @@ t.GetStampModel = function(assetId, terrainShape, useAssetVersionId)
|
|||
return root
|
||||
end
|
||||
|
||||
t.SetupStamperDragger = function(
|
||||
RbxStamper.SetupStamperDragger = function(
|
||||
modelToStamp,
|
||||
Mouse,
|
||||
StampInModel,
|
||||
|
|
@ -1161,7 +1155,7 @@ t.SetupStamperDragger = function(
|
|||
-- take out any component of line2 along line1, so you get perpendicular to line1 component
|
||||
line2 -= line.unit * line.unit:Dot(line2)
|
||||
|
||||
tempCFrame = CFrame.new(
|
||||
local tempCFrame = CFrame.new(
|
||||
HighScalabilityLine.Start,
|
||||
HighScalabilityLine.Start + line
|
||||
)
|
||||
|
|
@ -1193,7 +1187,7 @@ t.SetupStamperDragger = function(
|
|||
end
|
||||
|
||||
-- resize the "line" graphic to be the correct size and orientation
|
||||
tempCFrame = CFrame.new(
|
||||
local tempCFrame = CFrame.new(
|
||||
HighScalabilityLine.Start,
|
||||
HighScalabilityLine.Start + line
|
||||
)
|
||||
|
|
@ -1244,21 +1238,21 @@ t.SetupStamperDragger = function(
|
|||
end
|
||||
end
|
||||
|
||||
local function DoStamperMouseMove(Mouse)
|
||||
if not Mouse then
|
||||
local function DoStamperMouseMove(mouse)
|
||||
if not mouse then
|
||||
error "Error: RbxStamper.DoStamperMouseMove: Mouse is nil"
|
||||
return
|
||||
end
|
||||
if not Mouse:IsA "Mouse" then
|
||||
if not mouse:IsA "Mouse" then
|
||||
error(
|
||||
`Error: RbxStamper.DoStamperMouseMove: Mouse is of type {Mouse.className} should be of type Mouse`
|
||||
`Error: RbxStamper.DoStamperMouseMove: Mouse is of type {mouse.className} should be of type Mouse`
|
||||
)
|
||||
return
|
||||
end
|
||||
|
||||
-- There wasn't a target (no part or terrain), so check for plane intersection.
|
||||
if not Mouse.Target then
|
||||
local cellPos = GetTerrainForMouse(Mouse)
|
||||
if not mouse.Target then
|
||||
local cellPos = GetTerrainForMouse(mouse)
|
||||
if nil == cellPos then
|
||||
return
|
||||
end
|
||||
|
|
@ -1271,7 +1265,7 @@ t.SetupStamperDragger = function(
|
|||
-- don't move with dragger - will move in one step on mouse down
|
||||
-- draw ghost at acceptable positions
|
||||
configFound, targetCFrame, targetSurface =
|
||||
findConfigAtMouseTarget(Mouse, stampData)
|
||||
findConfigAtMouseTarget(mouse, stampData)
|
||||
if not configFound then
|
||||
error "RbxStamper.DoStamperMouseMove No configFound, returning"
|
||||
return
|
||||
|
|
@ -1405,10 +1399,10 @@ t.SetupStamperDragger = function(
|
|||
end
|
||||
|
||||
-- auto break joints code
|
||||
if Mouse and Mouse.Target and Mouse.Target.Parent then
|
||||
local modelInfo = Mouse.Target:FindFirstChild "RobloxModel"
|
||||
if mouse and mouse.Target and mouse.Target.Parent then
|
||||
local modelInfo = mouse.Target:FindFirstChild "RobloxModel"
|
||||
if not modelInfo then
|
||||
modelInfo = Mouse.Target.Parent:FindFirstChild "RobloxModel"
|
||||
modelInfo = mouse.Target.Parent:FindFirstChild "RobloxModel"
|
||||
end
|
||||
|
||||
local myModelInfo =
|
||||
|
|
@ -1433,7 +1427,7 @@ t.SetupStamperDragger = function(
|
|||
hitFace = modelTargetSurface(
|
||||
modelInfo.Parent,
|
||||
game.Workspace.CurrentCamera.CoordinateFrame.p,
|
||||
Mouse.Hit.p
|
||||
mouse.Hit.p
|
||||
)
|
||||
end
|
||||
|
||||
|
|
@ -1450,7 +1444,7 @@ t.SetupStamperDragger = function(
|
|||
-- now we have to cast the ray back in the other direction to find the surface we're stamping FROM
|
||||
hitFace = modelTargetSurface(
|
||||
stampData.CurrentParts,
|
||||
Mouse.Hit.p,
|
||||
mouse.Hit.p,
|
||||
game.Workspace.CurrentCamera.CoordinateFrame.p
|
||||
)
|
||||
|
||||
|
|
@ -1476,9 +1470,9 @@ t.SetupStamperDragger = function(
|
|||
if
|
||||
not pcall(function()
|
||||
if
|
||||
Mouse
|
||||
and Mouse.Target
|
||||
and Mouse.Target.Parent:FindFirstChild "RobloxModel"
|
||||
mouse
|
||||
and mouse.Target
|
||||
and mouse.Target.Parent:FindFirstChild "RobloxModel"
|
||||
== nil
|
||||
then
|
||||
return
|
||||
|
|
@ -1488,17 +1482,17 @@ t.SetupStamperDragger = function(
|
|||
end)
|
||||
then
|
||||
game.JointsService:ClearJoinAfterMoveJoints()
|
||||
Mouse = nil
|
||||
mouse = nil
|
||||
error "Error: RbxStamper.DoStamperMouseMove Mouse is nil on second check"
|
||||
return
|
||||
end
|
||||
|
||||
if
|
||||
Mouse
|
||||
and Mouse.Target
|
||||
and Mouse.Target.Parent:FindFirstChild "RobloxModel" == nil
|
||||
mouse
|
||||
and mouse.Target
|
||||
and mouse.Target.Parent:FindFirstChild "RobloxModel" == nil
|
||||
then
|
||||
game.JointsService:SetJoinAfterMoveTarget(Mouse.Target)
|
||||
game.JointsService:SetJoinAfterMoveTarget(mouse.Target)
|
||||
else
|
||||
game.JointsService:SetJoinAfterMoveTarget(nil)
|
||||
end
|
||||
|
|
@ -1514,7 +1508,7 @@ t.SetupStamperDragger = function(
|
|||
end
|
||||
end
|
||||
|
||||
local function setupKeyListener(key, Mouse)
|
||||
local function setupKeyListener(key, mouse)
|
||||
if control and control.Paused then
|
||||
return
|
||||
end -- don't do this if we have no stamp
|
||||
|
|
@ -1552,12 +1546,12 @@ t.SetupStamperDragger = function(
|
|||
|
||||
-- After rotating, update the position
|
||||
configFound, targetCFrame =
|
||||
findConfigAtMouseTarget(Mouse, stampData)
|
||||
findConfigAtMouseTarget(mouse, stampData)
|
||||
if configFound then
|
||||
positionPartsAtCFrame3(targetCFrame, stampData.CurrentParts)
|
||||
|
||||
-- update everything else in MouseMove
|
||||
DoStamperMouseMove(Mouse)
|
||||
DoStamperMouseMove(mouse)
|
||||
end
|
||||
elseif key == "c" then -- try to expand our high scalability dragger dimension
|
||||
if
|
||||
|
|
@ -1593,12 +1587,12 @@ t.SetupStamperDragger = function(
|
|||
|
||||
local function flashRedBox()
|
||||
local gui = game.CoreGui
|
||||
if game:FindFirstChild "Players" then
|
||||
if game.Players.LocalPlayer then
|
||||
if game.Players.LocalPlayer:FindFirstChild "PlayerGui" then
|
||||
gui = game.Players.LocalPlayer.PlayerGui
|
||||
end
|
||||
end
|
||||
if
|
||||
game:FindFirstChild "Players"
|
||||
and game.Players.LocalPlayer
|
||||
and game.Players.LocalPlayer:FindFirstChild "PlayerGui"
|
||||
then
|
||||
gui = game.Players.LocalPlayer.PlayerGui
|
||||
end
|
||||
if not stampData.ErrorBox then
|
||||
return
|
||||
|
|
@ -1624,21 +1618,19 @@ t.SetupStamperDragger = function(
|
|||
end
|
||||
if stampData.ErrorBox then
|
||||
stampData.ErrorBox.Adornee = nil
|
||||
stampData.ErrorBox.Parent = Tool
|
||||
stampData.ErrorBox.Parent = Tool -- ?
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
local function DoStamperMouseDown(Mouse)
|
||||
if not Mouse then
|
||||
local function DoStamperMouseDown(mouse)
|
||||
if not mouse then
|
||||
error "Error: RbxStamper.DoStamperMouseDown: Mouse is nil"
|
||||
return
|
||||
end
|
||||
if not Mouse:IsA "Mouse" then
|
||||
if not mouse:IsA "Mouse" then
|
||||
error(
|
||||
"Error: RbxStamper.DoStamperMouseDown: Mouse is of type",
|
||||
Mouse.className,
|
||||
"should be of type Mouse"
|
||||
`Error: RbxStamper.DoStamperMouseDown: Mouse is of type {mouse.className}, should be of type Mouse`
|
||||
)
|
||||
return
|
||||
end
|
||||
|
|
@ -1647,7 +1639,7 @@ t.SetupStamperDragger = function(
|
|||
end
|
||||
|
||||
if isMegaClusterPart() then
|
||||
if Mouse and HighScalabilityLine then
|
||||
if mouse and HighScalabilityLine then
|
||||
local megaCube = stampData.CurrentParts:FindFirstChild(
|
||||
"MegaClusterCube",
|
||||
true
|
||||
|
|
@ -1938,7 +1930,7 @@ t.SetupStamperDragger = function(
|
|||
|
||||
if checkHighScalabilityStamp then -- check to see if cell is in region, if not we'll skip set
|
||||
if allowedStampRegion then
|
||||
local cellPos = cellCenterToWorld(
|
||||
cellPos = cellCenterToWorld(
|
||||
game.Workspace.Terrain,
|
||||
cellPos.X,
|
||||
cellPos.Y,
|
||||
|
|
@ -2231,16 +2223,14 @@ t.SetupStamperDragger = function(
|
|||
return cellSet
|
||||
end
|
||||
|
||||
local function DoStamperMouseUp(Mouse)
|
||||
if not Mouse then
|
||||
local function DoStamperMouseUp(mouse)
|
||||
if not mouse then
|
||||
error "Error: RbxStamper.DoStamperMouseUp: Mouse is nil"
|
||||
return false
|
||||
end
|
||||
if not Mouse:IsA "Mouse" then
|
||||
if not mouse:IsA "Mouse" then
|
||||
error(
|
||||
"Error: RbxStamper.DoStamperMouseUp: Mouse is of type",
|
||||
Mouse.className,
|
||||
"should be of type Mouse"
|
||||
`Error: RbxStamper.DoStamperMouseUp: Mouse is of type {mouse.className}, should be of type Mouse`
|
||||
)
|
||||
return false
|
||||
end
|
||||
|
|
@ -2269,8 +2259,10 @@ t.SetupStamperDragger = function(
|
|||
canStamp = true
|
||||
checkHighScalabilityStamp = true
|
||||
else
|
||||
canStamp, checkHighScalabilityStamp =
|
||||
t.CanEditRegion(stampData.CurrentParts, allowedStampRegion)
|
||||
canStamp, checkHighScalabilityStamp = RbxStamper.CanEditRegion(
|
||||
stampData.CurrentParts,
|
||||
allowedStampRegion
|
||||
)
|
||||
end
|
||||
|
||||
if not canStamp then
|
||||
|
|
@ -2288,8 +2280,9 @@ t.SetupStamperDragger = function(
|
|||
end
|
||||
|
||||
-- recheck if we can stamp, as we just moved part
|
||||
local canStamp
|
||||
canStamp, checkHighScalabilityStamp =
|
||||
t.CanEditRegion(stampData.CurrentParts, allowedStampRegion)
|
||||
RbxStamper.CanEditRegion(stampData.CurrentParts, allowedStampRegion)
|
||||
if not canStamp then
|
||||
if stampFailedFunc then
|
||||
stampFailedFunc()
|
||||
|
|
@ -2305,7 +2298,7 @@ t.SetupStamperDragger = function(
|
|||
-- HotThoth's note: Now that above CurrentParts positioning has been commented out, to be truly correct, we would need to use the
|
||||
-- value of configFound from the previous onStamperMouseMove call which moved the CurrentParts
|
||||
-- Shouldn't this be true when lastTargetCFrame has been set and false otherwise?
|
||||
configFound, targetCFrame = findConfigAtMouseTarget(Mouse, stampData)
|
||||
configFound, targetCFrame = findConfigAtMouseTarget(mouse, stampData)
|
||||
|
||||
if configFound and not HighScalabilityLine.Adorn.Parent then
|
||||
if
|
||||
|
|
@ -2612,9 +2605,9 @@ t.SetupStamperDragger = function(
|
|||
end
|
||||
|
||||
-- make sure all the joints are activated before restoring anchor states
|
||||
if not createJoints then
|
||||
game.JointsService:CreateJoinAfterMoveJoints()
|
||||
end
|
||||
-- if not createJoints then
|
||||
game.JointsService:CreateJoinAfterMoveJoints()
|
||||
-- end
|
||||
|
||||
-- Restore the original properties for all parts being stamped
|
||||
for part, transparency in pairs(stampData.TransparencyTable) do
|
||||
|
|
@ -2663,9 +2656,9 @@ t.SetupStamperDragger = function(
|
|||
end
|
||||
|
||||
-- and make sure we don't delete it, now that it's not a ghost part
|
||||
if ghostRemovalScript then
|
||||
ghostRemovalScript.Parent = nil
|
||||
end
|
||||
-- if ghostRemovalScript then
|
||||
-- ghostRemovalScript.Parent = nil
|
||||
-- end
|
||||
|
||||
--Re-enable the scripts
|
||||
for _, script in pairs(stampData.DisabledScripts) do
|
||||
|
|
@ -2979,20 +2972,20 @@ t.SetupStamperDragger = function(
|
|||
return control
|
||||
end
|
||||
|
||||
t.Help = function(funcNameOrFunc)
|
||||
RbxStamper.Help = function(funcNameOrFunc)
|
||||
--input argument can be a string or a function. Should return a description (of arguments and expected side effects)
|
||||
if
|
||||
funcNameOrFunc == "GetStampModel"
|
||||
or funcNameOrFunc == t.GetStampModel
|
||||
or funcNameOrFunc == RbxStamper.GetStampModel
|
||||
then
|
||||
return "Function GetStampModel. Arguments: assetId, useAssetVersionId. assetId is the asset to load in, define useAssetVersionId as true if assetId is a version id instead of a relative assetId. Side effect: returns a model of the assetId, or a string with error message if something fails"
|
||||
end
|
||||
if
|
||||
funcNameOrFunc == "SetupStamperDragger"
|
||||
or funcNameOrFunc == t.SetupStamperDragger
|
||||
or funcNameOrFunc == RbxStamper.SetupStamperDragger
|
||||
then
|
||||
return "Function SetupStamperDragger. Side Effect: Creates 4x4 stamping mechanism for building out parts quickly. Arguments: ModelToStamp, Mouse, LegalStampCheckFunction. ModelToStamp should be a Model or Part, preferrably loaded from RbxStamper.GetStampModel and should have extents that are multiples of 4. Mouse should be a mouse object (obtained from things such as Tool.OnEquipped), used to drag parts around 'stamp' them out. LegalStampCheckFunction is optional, used as a callback with a table argument (table is full of instances about to be stamped). Function should return either true or false, false stopping the stamp action."
|
||||
end
|
||||
end
|
||||
|
||||
return t
|
||||
return RbxStamper
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ end
|
|||
|
||||
function robloxLock(instance)
|
||||
instance.RobloxLocked = true
|
||||
children = instance:GetChildren()
|
||||
local children = instance:GetChildren()
|
||||
if children then
|
||||
for _, child in ipairs(children) do
|
||||
robloxLock(child)
|
||||
|
|
@ -292,6 +292,29 @@ function findEmptySlot()
|
|||
return smallestNum
|
||||
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, newGearButton)
|
||||
if not swapSlot.Value then -- signal loadout to swap a gear out
|
||||
swapSlot.Slot.Value = slot
|
||||
swapSlot.GearButton.Value = newGearButton
|
||||
swapSlot.Value = true
|
||||
updateGridActive()
|
||||
end
|
||||
end
|
||||
|
||||
function checkForSwap(button, x, y)
|
||||
local loadoutChildren = currentLoadout:GetChildren()
|
||||
for i = 1, #loadoutChildren do
|
||||
|
|
@ -320,6 +343,163 @@ function checkForSwap(button, x, y)
|
|||
return false
|
||||
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 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 resizeGrid()
|
||||
for _, v in pairs(backpackItems) do
|
||||
if not v:FindFirstChild "RobloxBuildTool" then
|
||||
|
|
@ -565,56 +745,6 @@ end
|
|||
-- 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()
|
||||
|
|
@ -737,136 +867,6 @@ function nukeBackpack()
|
|||
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
|
||||
|
|
@ -944,8 +944,8 @@ player.ChildAdded:connect(function(child)
|
|||
backpackAddCon:disconnect()
|
||||
end
|
||||
backpackAddCon = game.Players.LocalPlayer.Backpack.ChildAdded:connect(
|
||||
function(child)
|
||||
addToGrid(child)
|
||||
function(child2)
|
||||
addToGrid(child2)
|
||||
end
|
||||
)
|
||||
end
|
||||
|
|
@ -985,7 +985,7 @@ resize()
|
|||
resizeGrid()
|
||||
|
||||
-- make sure any items in the loadout are accounted for in inventory
|
||||
local loadoutChildren = currentLoadout:GetChildren()
|
||||
loadoutChildren = currentLoadout:GetChildren()
|
||||
for i = 1, #loadoutChildren do
|
||||
loadoutCheck(loadoutChildren[i], false)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -215,7 +215,7 @@ function showBackpack()
|
|||
backpackOpenEvent:Fire(currentTab)
|
||||
canToggle = true
|
||||
readyForNextEvent = true
|
||||
backpackButton.Image = "http://banland.xyz/asset/?id=97644093"
|
||||
backpackButton.Image = "https://banland.xyz/asset/?id=97644093"
|
||||
backpackButton.Position =
|
||||
UDim2.new(0.5, -60, 1, -backpackSize.Y.Offset - 103)
|
||||
end)
|
||||
|
|
@ -240,7 +240,7 @@ function toggleBackpack()
|
|||
backpackIsOpen = not backpackIsOpen
|
||||
|
||||
if backpackIsOpen then
|
||||
loadoutBackground.Image = "http://banland.xyz/asset/?id=97623721"
|
||||
loadoutBackground.Image = "https://banland.xyz/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
|
||||
|
|
@ -250,8 +250,8 @@ function toggleBackpack()
|
|||
backpackButton.Position = UDim2.new(0.5, -60, 1, -44)
|
||||
loadoutBackground.Visible = false
|
||||
backpackButton.Selected = false
|
||||
backpackButton.Image = "http://banland.xyz/asset/?id=97617958"
|
||||
loadoutBackground.Image = "http://banland.xyz/asset/?id=96536002"
|
||||
backpackButton.Image = "https://banland.xyz/asset/?id=97617958"
|
||||
loadoutBackground.Image = "https://banland.xyz/asset/?id=96536002"
|
||||
loadoutBackground.Position = UDim2.new(-0.1, 0, -0.1, 0)
|
||||
loadoutBackground.Size = UDim2.new(1.2, 0, 1.2, 0)
|
||||
hideBackpack()
|
||||
|
|
|
|||
|
|
@ -179,45 +179,6 @@ local Chat = {
|
|||
Messages_List = {},
|
||||
MessageThread = nil,
|
||||
|
||||
-- Admins_List = {
|
||||
-- "Sorcus",
|
||||
-- "Shedletsky",
|
||||
-- "Telamon",
|
||||
-- "Tarabyte",
|
||||
-- "StickMasterLuke",
|
||||
-- "OnlyTwentyCharacters",
|
||||
-- "FusRoblox",
|
||||
-- "SolarCrane",
|
||||
-- "HotThoth",
|
||||
-- "JediTkacheff",
|
||||
-- "Builderman",
|
||||
-- "Brighteyes",
|
||||
-- "ReeseMcblox",
|
||||
-- "GemLocker",
|
||||
-- "GongfuTiger",
|
||||
-- "Erik.Cassel",
|
||||
-- "Matt Dusek",
|
||||
-- "Keith",
|
||||
-- "Totbl",
|
||||
-- "LordRugDump",
|
||||
-- "David.Baszucki",
|
||||
-- "Dbapostle",
|
||||
-- "DaveYorkRBX",
|
||||
-- "nJay",
|
||||
-- "OstrichSized",
|
||||
-- "TobotRobot",
|
||||
-- "twberg",
|
||||
-- "Mercury",
|
||||
-- "RBAdam",
|
||||
-- "Doughtless",
|
||||
-- "Anaminus",
|
||||
-- "Stravant",
|
||||
-- "Cr3470r",
|
||||
-- "CodeWriter",
|
||||
-- "Games",
|
||||
-- "AcesWayUpHigh",
|
||||
-- "Phil",
|
||||
-- },
|
||||
Admins_List = { "taskmanager", "Heliodex", "tako" },
|
||||
|
||||
SafeChat_List = {
|
||||
|
|
@ -1454,7 +1415,7 @@ function Chat:CreateSafeChatGui()
|
|||
Size = UDim2.new(0, 44, 0, 31),
|
||||
Position = UDim2.new(0, 1, 0.35, 0),
|
||||
BackgroundTransparency = 1,
|
||||
Image = "http://banland.xyz/asset/?id=97080365",
|
||||
Image = "https://banland.xyz/asset/?id=97080365",
|
||||
},
|
||||
}
|
||||
|
||||
|
|
@ -1501,7 +1462,7 @@ function Chat:CreateTouchButton()
|
|||
Size = UDim2.new(1, 0, 1, 0),
|
||||
Position = UDim2.new(0, 0, 0, 0),
|
||||
BackgroundTransparency = 1,
|
||||
Image = "http://banland.xyz/asset/?id=97078724",
|
||||
Image = "https://banland.xyz/asset/?id=97078724",
|
||||
},
|
||||
}
|
||||
self.TapToChatLabel = self.ChatTouchFrame.ChatLabel
|
||||
|
|
@ -1606,7 +1567,7 @@ function Chat:CreateGui()
|
|||
|
||||
Gui.Create "ImageLabel" {
|
||||
Name = "Background",
|
||||
Image = "http://banland.xyz/asset/?id=97120937", --96551212';
|
||||
Image = "https://banland.xyz/asset/?id=97120937", --96551212';
|
||||
Size = UDim2.new(1.3, 0, 1.64, 0),
|
||||
Position = UDim2.new(0, 0, 0, 0),
|
||||
BackgroundTransparency = 1,
|
||||
|
|
|
|||
|
|
@ -7,6 +7,14 @@ local BadgeService = game:GetService "BadgeService"
|
|||
local FriendService = game:GetService "FriendService"
|
||||
local ScriptContext = game:GetService "ScriptContext"
|
||||
local RunService = game:GetService "RunService"
|
||||
local ScriptInformationProvider = game:GetService "ScriptInformationProvider"
|
||||
local ChangeHistoryService = game:GetService "ChangeHistoryService"
|
||||
local ContentProvider = game:GetService "ContentProvider"
|
||||
local Players = game:GetService "Players"
|
||||
local Visit = game:GetService "Visit"
|
||||
|
||||
-- establish this peer as the Server
|
||||
local NetworkServer = game:GetService "NetworkServer"
|
||||
|
||||
-- StartGame --
|
||||
pcall(function()
|
||||
|
|
@ -93,23 +101,20 @@ end)
|
|||
ScriptContext.ScriptsDisabled = true
|
||||
|
||||
-- game:SetPlaceID(nil, false)
|
||||
game:GetService("ChangeHistoryService"):SetEnabled(false)
|
||||
|
||||
-- establish this peer as the Server
|
||||
local ns = game:GetService "NetworkServer"
|
||||
ChangeHistoryService:SetEnabled(false)
|
||||
|
||||
if url ~= nil then
|
||||
pcall(function()
|
||||
game:GetService("Players"):SetAbuseReportUrl(`{url}/Report/Games.ashx`)
|
||||
Players:SetAbuseReportUrl(`{url}/Report/Games.ashx`)
|
||||
end)
|
||||
pcall(function()
|
||||
game:GetService("ScriptInformationProvider"):SetAssetUrl(`{url}/Asset/`)
|
||||
ScriptInformationProvider:SetAssetUrl(`{url}/Asset/`)
|
||||
end)
|
||||
pcall(function()
|
||||
game:GetService("ContentProvider"):SetBaseUrl(`{url}/`)
|
||||
ContentProvider:SetBaseUrl(`{url}/`)
|
||||
end)
|
||||
-- pcall(function()
|
||||
-- game:GetService("Players"):SetChatFilterUrl(
|
||||
-- Players:SetChatFilterUrl(
|
||||
-- `{url}/Game/ChatFilter.ashx`
|
||||
-- )
|
||||
-- end)
|
||||
|
|
@ -144,7 +149,7 @@ if url ~= nil then
|
|||
`{url}/Game/Tools/InsertAsset.ashx?nsets=20&type=user&userid=%d`
|
||||
)
|
||||
InsertService:SetCollectionUrl(`{url}/Game/Tools/InsertAsset.ashx?sid=%d`)
|
||||
InsertService:SetAssetUrl(`{url}/Asset/?id=%d`)
|
||||
InsertService:SetAssetUrl(`{url}/asset?id=%d`)
|
||||
InsertService:SetAssetVersionUrl(`{url}/Asset/?assetversionid=%d`)
|
||||
|
||||
pcall(function()
|
||||
|
|
@ -161,15 +166,9 @@ if url ~= nil then
|
|||
end
|
||||
|
||||
pcall(function()
|
||||
game:GetService("NetworkServer"):SetIsPlayerAuthenticationRequired(true)
|
||||
NetworkServer:SetIsPlayerAuthenticationRequired(true)
|
||||
end)
|
||||
settings().Diagnostics.LuaRamLimit = 0
|
||||
--settings().Network:SetThroughputSensitivity(0.08, 0.01)
|
||||
--settings().Network.SendRate = 35
|
||||
--settings().Network.PhysicsSend = 0 -- 1==RoundRobin
|
||||
|
||||
--shared.__time = 0
|
||||
--game:GetService("RunService").Stepped:connect(function (time) shared.__time = time end)
|
||||
|
||||
if placeId ~= nil and killID ~= nil and deathID ~= nil and url ~= nil then
|
||||
-- listen for the death of a Player
|
||||
|
|
@ -184,7 +183,7 @@ if placeId ~= nil and killID ~= nil and deathID ~= nil and url ~= nil then
|
|||
end
|
||||
|
||||
-- listen to all Players' Characters
|
||||
game:GetService("Players").ChildAdded:connect(function(player)
|
||||
Players.ChildAdded:connect(function(player)
|
||||
createDeathMonitor(player)
|
||||
player.Changed:connect(function(property)
|
||||
if property == "Character" then
|
||||
|
|
@ -194,7 +193,7 @@ if placeId ~= nil and killID ~= nil and deathID ~= nil and url ~= nil then
|
|||
end)
|
||||
end
|
||||
|
||||
game:GetService("Players").PlayerAdded:connect(function(player)
|
||||
Players.PlayerAdded:connect(function(player)
|
||||
print(`Player {player.userId} added`)
|
||||
|
||||
if url and access and placeId and player and player.userId then
|
||||
|
|
@ -207,7 +206,7 @@ game:GetService("Players").PlayerAdded:connect(function(player)
|
|||
end
|
||||
end)
|
||||
|
||||
game:GetService("Players").PlayerRemoving:connect(function(player)
|
||||
Players.PlayerRemoving:connect(function(player)
|
||||
print(`Player {player.userId} leaving`)
|
||||
|
||||
if url and access and placeId and player and player.userId then
|
||||
|
|
@ -234,9 +233,9 @@ if _MAP_LOCATION_EXISTS then
|
|||
end
|
||||
|
||||
-- Now start the connection
|
||||
ns:Start(_SERVER_PORT, sleeptime)
|
||||
NetworkServer:Start(_SERVER_PORT, sleeptime)
|
||||
|
||||
game:GetService("Visit"):SetPing("_SERVER_PRESENCE_URL", 30)
|
||||
Visit:SetPing("_SERVER_PRESENCE_URL", 30)
|
||||
|
||||
if timeout then
|
||||
ScriptContext:SetTimeout(timeout)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ local ContentProvider = game:GetService "ContentProvider"
|
|||
local SocialService = game:GetService "SocialService"
|
||||
local GamePassService = game:GetService "GamePassService"
|
||||
local MarketplaceService = game:GetService "MarketplaceService"
|
||||
-- local UserInputService = game:GetService "UserInputService"
|
||||
local Players = game:GetService "Players"
|
||||
local Client = game:GetService "NetworkClient"
|
||||
local Visit = game:GetService "Visit"
|
||||
|
|
@ -51,29 +50,29 @@ print "! Joining game '_PLACE_ID' place _PLACE_ID at _SERVER_ADDRESS"
|
|||
|
||||
ChangeHistoryService:SetEnabled(false)
|
||||
ContentProvider:SetThreadPool(16)
|
||||
InsertService:SetBaseSetsUrl "http://banland.xyz/game/tools/insertasset?nsets=10&type=base"
|
||||
InsertService:SetUserSetsUrl "http://banland.xyz/game/tools/insertasset?nsets=20&type=user&userid=%d"
|
||||
InsertService:SetCollectionUrl "http://banland.xyz/game/tools/insertasset?sid=%d"
|
||||
InsertService:SetAssetUrl "http://banland.xyz/asset?id=%d"
|
||||
InsertService:SetAssetVersionUrl "http://banland.xyz/asset?assetversionid=%d"
|
||||
InsertService:SetBaseSetsUrl "https://banland.xyz/game/tools/insertasset?nsets=10&type=base"
|
||||
InsertService:SetUserSetsUrl "https://banland.xyz/game/tools/insertasset?nsets=20&type=user&userid=%d"
|
||||
InsertService:SetCollectionUrl "https://banland.xyz/game/tools/insertasset?sid=%d"
|
||||
InsertService:SetAssetUrl "https://banland.xyz/asset?id=%d"
|
||||
InsertService:SetAssetVersionUrl "https://banland.xyz/asset?assetversionid=%d"
|
||||
|
||||
pcall(function()
|
||||
SocialService:SetFriendUrl "http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsFriendsWith&playerid=%d&userid=%d"
|
||||
SocialService:SetFriendUrl "https://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsFriendsWith&playerid=%d&userid=%d"
|
||||
end)
|
||||
pcall(function()
|
||||
SocialService:SetBestFriendUrl "http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsBestFriendsWith&playerid=%d&userid=%d"
|
||||
SocialService:SetBestFriendUrl "https://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsBestFriendsWith&playerid=%d&userid=%d"
|
||||
end)
|
||||
pcall(function()
|
||||
SocialService:SetGroupUrl "http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsInGroup&playerid=%d&groupid=%d"
|
||||
SocialService:SetGroupUrl "https://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsInGroup&playerid=%d&groupid=%d"
|
||||
end)
|
||||
pcall(function()
|
||||
SocialService:SetGroupRankUrl "http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=GetGroupRank&playerid=%d&groupid=%d"
|
||||
SocialService:SetGroupRankUrl "https://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=GetGroupRank&playerid=%d&groupid=%d"
|
||||
end)
|
||||
pcall(function()
|
||||
SocialService:SetGroupRoleUrl "http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=GetGroupRole&playerid=%d&groupid=%d"
|
||||
SocialService:SetGroupRoleUrl "https://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=GetGroupRole&playerid=%d&groupid=%d"
|
||||
end)
|
||||
pcall(function()
|
||||
GamePassService:SetPlayerHasPassUrl "http://banland.xyz/Game/GamePass/GamePassHandler.ashx?Action=HasPass&UserID=%d&PassID=%d"
|
||||
GamePassService:SetPlayerHasPassUrl "https://banland.xyz/Game/GamePass/GamePassHandler.ashx?Action=HasPass&UserID=%d&PassID=%d"
|
||||
end)
|
||||
pcall(function()
|
||||
MarketplaceService:SetProductInfoUrl "https://banland.xyz/marketplace/productinfo?assetId=%d"
|
||||
|
|
@ -293,6 +292,6 @@ pcall(function()
|
|||
game:SetScreenshotInfo ""
|
||||
end)
|
||||
pcall(function()
|
||||
game:SetVideoInfo '<?xml version="1.0"?><entry xmlns="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" xmlns:yt="http://gdata.youtube.com/schemas/2007"><media:group><media:title type="plain"><![CDATA[Mercury Place]]></media:title><media:description type="plain"><![CDATA[ For more games visit http://banland.xyz]]></media:description><media:category scheme="http://gdata.youtube.com/schemas/2007/categories.cat">Games</media:category><media:keywords>Mercury, video, free game, online virtual world</media:keywords></media:group></entry>'
|
||||
game:SetVideoInfo '<?xml version="1.0"?><entry xmlns="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" xmlns:yt="http://gdata.youtube.com/schemas/2007"><media:group><media:title type="plain"><![CDATA[Mercury Place]]></media:title><media:description type="plain"><![CDATA[ For more games visit https://banland.xyz]]></media:description><media:category scheme="http://gdata.youtube.com/schemas/2007/categories.cat">Games</media:category><media:keywords>Mercury, video, free game, online virtual world</media:keywords></media:group></entry>'
|
||||
end)
|
||||
-- use single quotes here because the video info string may have unescaped double quotes
|
||||
|
|
|
|||
|
|
@ -7,37 +7,37 @@ local ScriptInformationProvider = game:GetService "ScriptInformationProvider"
|
|||
local ScriptContext = game:GetService "ScriptContext"
|
||||
-- Setup studio cmd bar & load core scripts
|
||||
pcall(function()
|
||||
InsertService:SetFreeModelUrl "http://banland.xyz/game/tools/insertasset?type=fm&q=%s&pg=%d&rs=%d"
|
||||
InsertService:SetFreeModelUrl "https://banland.xyz/game/tools/insertasset?type=fm&q=%s&pg=%d&rs=%d"
|
||||
end)
|
||||
pcall(function()
|
||||
InsertService:SetFreeDecalUrl "http://banland.xyz/game/tools/insertasset?type=fd&q=%s&pg=%d&rs=%d"
|
||||
InsertService:SetFreeDecalUrl "https://banland.xyz/game/tools/insertasset?type=fd&q=%s&pg=%d&rs=%d"
|
||||
end)
|
||||
|
||||
ScriptInformationProvider:SetAssetUrl "http://banland.xyz/Asset/"
|
||||
InsertService:SetBaseSetsUrl "http://banland.xyz/game/tools/insertasset?nsets=10&type=base"
|
||||
InsertService:SetUserSetsUrl "http://banland.xyz/game/tools/insertasset?nsets=20&type=user&userid=%d"
|
||||
InsertService:SetCollectionUrl "http://banland.xyz/game/tools/insertasset?sid=%d"
|
||||
InsertService:SetAssetUrl "http://banland.xyz/Asset/?id=%d"
|
||||
InsertService:SetAssetVersionUrl "http://banland.xyz/Asset/?assetversionid=%d"
|
||||
ScriptInformationProvider:SetAssetUrl "https://banland.xyz/asset/"
|
||||
InsertService:SetBaseSetsUrl "https://banland.xyz/game/tools/insertasset?nsets=10&type=base"
|
||||
InsertService:SetUserSetsUrl "https://banland.xyz/game/tools/insertasset?nsets=20&type=user&userid=%d"
|
||||
InsertService:SetCollectionUrl "https://banland.xyz/game/tools/insertasset?sid=%d"
|
||||
InsertService:SetAssetUrl "https://banland.xyz/asset/?id=%d"
|
||||
InsertService:SetAssetVersionUrl "https://banland.xyz/asset/?assetversionid=%d"
|
||||
InsertService:SetTrustLevel(0)
|
||||
|
||||
pcall(function()
|
||||
SocialService:SetFriendUrl "http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsFriendsWith&playerid=%d&userid=%d"
|
||||
SocialService:SetFriendUrl "https://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsFriendsWith&playerid=%d&userid=%d"
|
||||
end)
|
||||
pcall(function()
|
||||
SocialService:SetBestFriendUrl "http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsBestFriendsWith&playerid=%d&userid=%d"
|
||||
SocialService:SetBestFriendUrl "https://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsBestFriendsWith&playerid=%d&userid=%d"
|
||||
end)
|
||||
pcall(function()
|
||||
SocialService:SetGroupUrl "http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsInGroup&playerid=%d&groupid=%d"
|
||||
SocialService:SetGroupUrl "https://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsInGroup&playerid=%d&groupid=%d"
|
||||
end)
|
||||
pcall(function()
|
||||
SocialService:SetGroupRankUrl "http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=GetGroupRank&playerid=%d&groupid=%d"
|
||||
SocialService:SetGroupRankUrl "https://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=GetGroupRank&playerid=%d&groupid=%d"
|
||||
end)
|
||||
pcall(function()
|
||||
SocialService:SetGroupRoleUrl "http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=GetGroupRole&playerid=%d&groupid=%d"
|
||||
SocialService:SetGroupRoleUrl "https://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=GetGroupRole&playerid=%d&groupid=%d"
|
||||
end)
|
||||
pcall(function()
|
||||
GamePassService:SetPlayerHasPassUrl "http://banland.xyz/Game/GamePass/GamePassHandler.ashx?Action=HasPass&UserID=%d&PassID=%d"
|
||||
GamePassService:SetPlayerHasPassUrl "https://banland.xyz/Game/GamePass/GamePassHandler.ashx?Action=HasPass&UserID=%d&PassID=%d"
|
||||
end)
|
||||
pcall(function()
|
||||
MarketplaceService:SetProductInfoUrl "https://banland.xyz/marketplace/productinfo?assetId=%d"
|
||||
|
|
|
|||
|
|
@ -24,40 +24,40 @@ local message = Instance.new "Message"
|
|||
message.Parent = workspace
|
||||
message.archivable = false
|
||||
|
||||
ScriptInformationProvider:SetAssetUrl "http://banland.xyz/Asset/"
|
||||
ScriptInformationProvider:SetAssetUrl "https://banland.xyz/Asset/"
|
||||
ContentProvider:SetThreadPool(16)
|
||||
pcall(function()
|
||||
InsertService:SetFreeModelUrl "http://banland.xyz/game/tools/insertasset?type=fm&q=%s&pg=%d&rs=%d"
|
||||
InsertService:SetFreeModelUrl "https://banland.xyz/game/tools/insertasset?type=fm&q=%s&pg=%d&rs=%d"
|
||||
end) -- Used for free model search (insert tool)
|
||||
pcall(function()
|
||||
InsertService:SetFreeDecalUrl "http://banland.xyz/game/tools/insertasset?type=fd&q=%s&pg=%d&rs=%d"
|
||||
InsertService:SetFreeDecalUrl "https://banland.xyz/game/tools/insertasset?type=fd&q=%s&pg=%d&rs=%d"
|
||||
end) -- Used for free decal search (insert tool)
|
||||
|
||||
settings().Diagnostics:LegacyScriptMode()
|
||||
|
||||
InsertService:SetBaseSetsUrl "http://banland.xyz/game/tools/insertasset?nsets=10&type=base"
|
||||
InsertService:SetUserSetsUrl "http://banland.xyz/game/tools/insertasset?nsets=20&type=user&userid=%d"
|
||||
InsertService:SetCollectionUrl "http://banland.xyz/game/tools/insertasset?sid=%d"
|
||||
InsertService:SetAssetUrl "http://banland.xyz/Asset/?id=%d"
|
||||
InsertService:SetAssetVersionUrl "http://banland.xyz/Asset/?assetversionid=%d"
|
||||
InsertService:SetBaseSetsUrl "https://banland.xyz/game/tools/insertasset?nsets=10&type=base"
|
||||
InsertService:SetUserSetsUrl "https://banland.xyz/game/tools/insertasset?nsets=20&type=user&userid=%d"
|
||||
InsertService:SetCollectionUrl "https://banland.xyz/game/tools/insertasset?sid=%d"
|
||||
InsertService:SetAssetUrl "https://banland.xyz/Asset/?id=%d"
|
||||
InsertService:SetAssetVersionUrl "https://banland.xyz/Asset/?assetversionid=%d"
|
||||
|
||||
pcall(function()
|
||||
SocialService:SetFriendUrl "http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsFriendsWith&playerid=%d&userid=%d"
|
||||
SocialService:SetFriendUrl "https://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsFriendsWith&playerid=%d&userid=%d"
|
||||
end)
|
||||
pcall(function()
|
||||
SocialService:SetBestFriendUrl "http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsBestFriendsWith&playerid=%d&userid=%d"
|
||||
SocialService:SetBestFriendUrl "https://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsBestFriendsWith&playerid=%d&userid=%d"
|
||||
end)
|
||||
pcall(function()
|
||||
SocialService:SetGroupUrl "http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsInGroup&playerid=%d&groupid=%d"
|
||||
SocialService:SetGroupUrl "https://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsInGroup&playerid=%d&groupid=%d"
|
||||
end)
|
||||
pcall(function()
|
||||
SocialService:SetGroupRankUrl "http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=GetGroupRank&playerid=%d&groupid=%d"
|
||||
SocialService:SetGroupRankUrl "https://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=GetGroupRank&playerid=%d&groupid=%d"
|
||||
end)
|
||||
pcall(function()
|
||||
SocialService:SetGroupRoleUrl "http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=GetGroupRole&playerid=%d&groupid=%d"
|
||||
SocialService:SetGroupRoleUrl "https://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=GetGroupRole&playerid=%d&groupid=%d"
|
||||
end)
|
||||
pcall(function()
|
||||
GamePassService:SetPlayerHasPassUrl "http://banland.xyz/Game/GamePass/GamePassHandler.ashx?Action=HasPass&UserID=%d&PassID=%d"
|
||||
GamePassService:SetPlayerHasPassUrl "https://banland.xyz/Game/GamePass/GamePassHandler.ashx?Action=HasPass&UserID=%d&PassID=%d"
|
||||
end)
|
||||
pcall(function()
|
||||
game:SetCreatorID(0, Enum.CreatorType.User)
|
||||
|
|
@ -80,7 +80,7 @@ end)
|
|||
|
||||
ChangeHistoryService:SetEnabled(false)
|
||||
pcall(function()
|
||||
Players:SetBuildUserPermissionsUrl "http://banland.xyz/Game/BuildActionPermissionCheck.ashx?assetId=0&userId=%d&isSolo=true"
|
||||
Players:SetBuildUserPermissionsUrl "https://banland.xyz/Game/BuildActionPermissionCheck.ashx?assetId=0&userId=%d&isSolo=true"
|
||||
end)
|
||||
|
||||
workspace:SetPhysicsThrottleEnabled(true)
|
||||
|
|
|
|||
Loading…
Reference in New Issue