Corescript formatting improvements and fixes

This commit is contained in:
Lewin Kelly 2024-03-23 20:22:08 +00:00
parent 7e5b593cd9
commit ab301bf734
20 changed files with 767 additions and 788 deletions

View File

@ -199,7 +199,7 @@ humanoid.Died:connect(function() HealthChanged(0) end)</ProtectedString>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="Draggable">false</bool>
<Content name="Image"><url>http://banland.xyz/asset/?id=34854607</url></Content>
<Content name="Image"><url>http://banland.xyz/asset?id=34854607</url></Content>
<string name="Name">hurtOverlay</string>
<UDim2 name="Position">
<XS>2</XS>
@ -254,7 +254,7 @@ humanoid.Died:connect(function() HealthChanged(0) end)</ProtectedString>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="Draggable">false</bool>
<Content name="Image"><url>http://banland.xyz/asset/?id=35238000</url></Content>
<Content name="Image"><url>http://banland.xyz/asset?id=35238000</url></Content>
<string name="Name">bkg</string>
<UDim2 name="Position">
<XS>0</XS>
@ -282,7 +282,7 @@ humanoid.Died:connect(function() HealthChanged(0) end)</ProtectedString>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="Draggable">false</bool>
<Content name="Image"><url>http://banland.xyz/asset/?id=35238036</url></Content>
<Content name="Image"><url>http://banland.xyz/asset?id=35238036</url></Content>
<string name="Name">barRed</string>
<UDim2 name="Position">
<XS>0.0189999994</XS>
@ -338,7 +338,7 @@ humanoid.Died:connect(function() HealthChanged(0) end)</ProtectedString>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<bool name="Draggable">false</bool>
<Content name="Image"><url>http://banland.xyz/asset/?id=35238053</url></Content>
<Content name="Image"><url>http://banland.xyz/asset?id=35238053</url></Content>
<string name="Name">bar</string>
<UDim2 name="Position">
<XS>0.0189999994</XS>
@ -366,7 +366,7 @@ humanoid.Died:connect(function() HealthChanged(0) end)</ProtectedString>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">0</int>
<bool name="Draggable">false</bool>
<Content name="Image"><url>http://banland.xyz/asset/?id=34816363</url></Content>
<Content name="Image"><url>http://banland.xyz/asset?id=34816363</url></Content>
<string name="Name">label</string>
<UDim2 name="Position">
<XS>0.680000007</XS>

View File

@ -34,7 +34,7 @@ local function logErrorNonFatal(messageID: string, errObj: Types.Error?, ...)
end
coroutine.wrap(function()
error(errorString:gsub("\n", "\n "), 0)
error(string.gsub(errorString, "\n", "\n "), 0)
end)()
end

View File

@ -16,7 +16,7 @@ local function parseError(err: string): Types.Error
return {
type = "Error",
raw = err,
message = err:gsub("^.+:%d+:%s*", ""),
message = string.gsub(err, "^.+:%d+:%s*", ""),
trace = trace or "Traceback not available",
}
end

15
Modules/Waiter.luau Normal file
View File

@ -0,0 +1,15 @@
-- Imagine a go waitgroup if it was good
return function(waitFunction: () -> ())
return function(count: number)
return {
wait = function()
repeat
waitFunction()
until count == 0
end,
finish = function()
count -= 1
end,
}
end
end

View File

@ -5,6 +5,7 @@ local fs = require "@lune/fs"
local process = require "@lune/process"
local stdio = require "@lune/stdio"
local task = require "@lune/task"
local waiter = require "./Modules/Waiter"(task.wait)
local colour = stdio.color
@ -23,10 +24,12 @@ local plugins = {}
-- Allow for running from the base or corescripts directories
local cwd = process.cwd
local fromCoresDir = not not string.match(cwd, "corescripts/$")
local normalCoresDir = if fromCoresDir then "./luau" else "./corescripts/luau"
local normalPluginsDir = if fromCoresDir
then "./terrain plugins"
else "./corescripts/terrain plugins"
local coresDir = if fromCoresDir then "." else "./corescripts"
-- local normalCoresDir = if fromCoresDir then "./luau" else "./corescripts/luau"
local normalCoresDir = `{coresDir}/luau`
local normalPluginsDir = `{coresDir}/terrain plugins`
local outputDir = `{coresDir}/processed`
for _, core in ipairs(fs.readDir(normalCoresDir)) do
table.insert(
@ -36,11 +39,9 @@ for _, core in ipairs(fs.readDir(normalCoresDir)) do
)
end
for _, core in ipairs(fs.readDir(normalPluginsDir)) do
print(core)
table.insert(plugins, core)
end
local coresDir = if fromCoresDir then "." else "./corescripts"
local pluginsDir = if fromCoresDir
then "../Client deployer"
else "./Client deployer"
@ -56,13 +57,13 @@ local function processCores(
then `../{config}.json5`
else `{config}.json5`
local w = waiter(#scripts)
for i, core in ipairs(scripts) do
local newCore = if libraries
then `{10000000 + i}.lua`
else string.gsub(core, "%.luau$", ".lua")
print(`{coresDir}/{startDir}/{core}`, `{endDir}/{newCore}`)
task.spawn(function()
local cmd = process.spawn("darklua", {
"process",
@ -77,33 +78,47 @@ local function processCores(
then `{green}Processed {core}{reset}`
else `{red}Error processing {core}: {cmd.stderr}{reset}`
)
w.finish()
end)
end
w.wait()
end
task.spawn(function()
processCores(
libraryCores,
"Libraries",
`{coresDir}/processed`,
"dense",
true
)
end)
task.spawn(function()
processCores(
local args: { { any } } = {
{ libraryCores, "Libraries", outputDir, "dense", true },
{
plugins,
"terrain plugins",
`{pluginsDir}/staging/BuiltInPlugins/terrain`,
"lines"
)
end)
"lines",
},
{ normalCores, "luau", outputDir, "dense" },
{ otherCores, "luau", outputDir, "lines" },
}
task.spawn(function()
processCores(normalCores, "luau", `{coresDir}/processed`, "dense")
end)
local w = waiter(#args)
task.spawn(function()
processCores(otherCores, "luau", `{coresDir}/processed`, "lines")
end)
for _, arg in ipairs(args) do
task.spawn(function()
processCores(unpack(arg))
w.finish()
end)
end
if #process.args == 0 then
return
end
w.wait()
local totalBytes = 0
for _, core in ipairs(fs.readDir(outputDir)) do
local file = fs.readFile(`{outputDir}/{core}`)
if not string.match(core, "%d+%.lua") then
continue
end
totalBytes += #file
end
print(`Total: {totalBytes / 1000} kb`)

View File

@ -4248,6 +4248,7 @@ declare class ContentProvider extends Instance
function RegisterEncryptedAsset(self, assetId: Content, encryptionKey: string): nil
function RegisterSessionEncryptedAsset(self, contentId: Content, sessionKey: string): nil
function SetBaseUrl(self, url: string): nil
function SetThreadPool(self, count: number): nil
function UnregisterDefaultEncryptionKey(self): nil
function UnregisterEncryptedAsset(self, assetId: Content): nil
end
@ -4793,6 +4794,7 @@ end
declare class GamePassService extends Instance
function SetPlayerHasPassUrl(self, playerHasPassUrl: string): nil
end
declare class GameSettings extends Instance
@ -5550,8 +5552,10 @@ declare class InsertService extends Instance
function LoadPackageAsset(self, url: Content): { Instance }
function LoadPackageAssetAsync(self, url: Content): { Instance }
function SetAssetUrl(self, assetUrl: Content): nil
function SetAssetVersionUrl(self, assetVersionUrl: Content): nil
function SetAssetUrl(self, assetUrl: string): nil
function SetAssetVersionUrl(self, assetVersionUrl: string): nil
function SetBaseSetsUrl(self, baseSetsUrl: string): nil
function SetCollectionUrl(self, collectionUrl: string): nil
end
declare class JointInstance extends Instance
@ -5815,6 +5819,9 @@ declare class MarketplaceService extends Instance
function SignalPromptPurchaseFinished(self, player: Instance, assetId: number, success: boolean): nil
function SignalServerLuaDialogClosed(self, value: boolean): nil
function UserOwnsGamePassAsync(self, userId: number, gamePassId: number): boolean
function SetProductInfoUrl(self, url: string): nil
function SetPlayerOwnsAssetUrl(self, url: string): nil
end
declare class MaterialGenerationService extends Instance
@ -7527,9 +7534,9 @@ declare class DataModel extends ServiceProvider
function GetObjectsList(self, urls: { any }): { any }
function GetPlaySessionId(self): string
function HttpGet(self, url: string, synchronous: boolean, httpRequestType: EnumHttpRequestType?, doNotAllowDiabolicalMode: boolean?): string
function HttpGetAsync(self, url: string, synchronous: boolean, httpRequestType: EnumHttpRequestType?, doNotAllowDiabolicalMode: boolean?): string
function HttpGetAsync(self, url: string, synchronous: boolean?, httpRequestType: EnumHttpRequestType?, doNotAllowDiabolicalMode: boolean?): string
function HttpPost(self, url: string, data: string, synchronous: boolean, contentType: string?, httpRequestType: EnumHttpRequestType?, doNotAllowDiabolicalMode: boolean?): string
function HttpPostAsync(self, url: string, data: string, synchronous: boolean, contentType: string?, httpRequestType: EnumHttpRequestType?, doNotAllowDiabolicalMode: boolean?): string
function HttpPostAsync(self, url: string, data: string?, synchronous: boolean?, contentType: string?, httpRequestType: EnumHttpRequestType?, doNotAllowDiabolicalMode: boolean?): string
function InsertObjectsAndJoinIfLegacyAsync(self, url: Content): { Instance }
function IsContentLoaded(self): boolean
function IsLoaded(self): boolean
@ -7624,6 +7631,8 @@ declare class SocialService extends Instance
function SetBestFriendUrl(self, bestFriendUrl: string): nil
function SetStuffUrl(self, stuffUrl: string): nil
function SetPackageContentsUrl(self, stuffUrl: string): nil
function SetGroupUrl(self, groupUrl: string): nil
end
declare class Sound extends Instance
@ -9132,4 +9141,4 @@ declare LoadLibrary: ((libraryName: "RbxFusion") -> Fusion) & ((libraryName: "Rb
declare function settings(): GlobalSettings
declare function UserSettings(): UserSettings
declare function PluginManager(): PluginManager
declare function ypcall(f: () -> any, ...: any): (boolean, any)
declare function ypcall(f: (() -> any) | (() -> ()), ...: any): (boolean, any)

View File

@ -1,3 +1,4 @@
--!strict
-- CoreGui.RobloxGui.CoreScripts/PurchasePromptScript
print "[Mercury]: Loaded corescript 107893730"
@ -25,7 +26,7 @@ end
-------------------------------- Global Variables ----------------------------------------
-- utility variables
local baseUrl = ContentProvider.BaseUrl:lower()
local baseUrl = string.lower(ContentProvider.BaseUrl)
-- data variables
local currentProductInfo, currentAssetId, currentCurrencyType, currentCurrencyAmount, currentEquipOnPurchase, currentProductId, currentServerResponseTable
@ -205,7 +206,7 @@ local function userPurchaseActionsEnded(isSuccess: boolean)
end
-- enums have no implicit conversion to numbers in lua, has to have a function to do this
local function currencyEnumToInt(currencyEnum: Enum.CurrencyType)
local function currencyEnumToInt(currencyEnum: EnumItem)
if currencyEnum == Enum.CurrencyType.Tix then
return 2
end
@ -439,9 +440,7 @@ local function getPlayerBalance()
if not success then
print("Get player balance failed because", errorCode)
return
end
if playerBalance == "" then
elseif playerBalance == "" then
return
end
@ -506,9 +505,11 @@ local function canPurchaseItem()
end
if currentProductInfo == nil or not success then
descText =
return true,
nil,
nil,
true,
"In-game sales are temporarily disabled. Please try again later."
return true, nil, nil, true, descText
end
if not purchasingConsumable then
@ -976,7 +977,7 @@ local function userPurchaseProductActionsEnded(userIsClosingDialog)
if currentServerResponseTable then
local isPurchased = false
if
tostring(currentServerResponseTable.isValid):lower()
string.lower(tostring(currentServerResponseTable.isValid))
== "true"
then
isPurchased = true
@ -1244,47 +1245,6 @@ local function createPurchasePromptGui()
)
end
-- next two functions control the "Purchasing..." overlay
-- next 2 functions are convenienvce creation functions for guis
-- local function cutSizeInHalfRecursive(_)
-- todo: change the gui size based on how much space we have
-- changeSize(instance, 0.5)
-- local children = instance:GetChildren()
-- for i = 1, #children do
-- cutSizeInHalfRecursive(children[i])
-- end
-- end
-- local function doubleSizeRecursive(_)
-- todo: change the gui size based on how much space we have
-- changeSize(instance, 2)
-- local children = instance:GetChildren()
-- for i = 1, #children do
-- doubleSizeRecursive(children[i])
-- end
-- end
-- local function modifyForSmallScreen()
-- cutSizeInHalfRecursive(purchaseDialog)
-- end
-- local function modifyForLargeScreen()
-- doubleSizeRecursive(purchaseDialog)
-- end
-- depending on screen size, we need to change the gui
-- local function changeGuiToScreenSize(smallScreen)
-- if smallScreen then
-- modifyForSmallScreen()
-- else
-- modifyForLargeScreen()
-- end
-- end
local function doPurchasePrompt(
player,
assetId,
@ -1359,21 +1319,3 @@ if enableBrowserWindowClosedEvent then
doPlayerFundsCheck(false)
end)
end
-- Game.CoreGui.RobloxGui.Changed:connect(function()
-- local nowIsSmallScreen = (
-- game.CoreGui.RobloxGui.AbsoluteSize.Y <= smallScreenThreshold
-- )
-- if nowIsSmallScreen and not isSmallScreen then
-- changeGuiToScreenSize(true)
-- elseif not nowIsSmallScreen and isSmallScreen then
-- changeGuiToScreenSize(false)
-- end
-- isSmallScreen = nowIsSmallScreen
-- end)
-- isSmallScreen = (game.CoreGui.RobloxGui.AbsoluteSize.Y <= smallScreenThreshold)
-- if isSmallScreen then
-- changeGuiToScreenSize(true)
-- end

View File

@ -1,3 +1,4 @@
--!strict
-- Script Context.StarterScript
print "[Mercury]: Loaded corescript 37801172"

View File

@ -5,6 +5,9 @@ local News = require "../Modules/New"
local New = News.New
local Hydrate = News.Hydrate
local ContentProvider = game:GetService "ContentProvider"
local InsertService = game:GetService "InsertService"
local RbxGui = {}
local function ScopedConnect(
@ -140,6 +143,45 @@ local function cancelSlide(areaSoak)
end
end
RbxGui.CreateMessageDialog = function(title, message, buttons)
local frame = New "Frame" {
Size = UDim2.new(0.5, 0, 0.5, 0),
Position = UDim2.new(0.25, 0, 0.25, 0),
Name = "MessageDialog",
Active = true,
Style = Enum.FrameStyle.RobloxRound,
New "TextLabel" {
Name = "Title",
Text = title,
BackgroundTransparency = 1,
TextColor3 = Colour3(221, 221, 221),
Position = UDim2.new(0, 0, 0, 0),
Size = UDim2.new(1, 0, 0.15, 0),
Font = Enum.Font.ArialBold,
FontSize = Enum.FontSize.Size36,
TextXAlignment = Enum.TextXAlignment.Center,
TextYAlignment = Enum.TextYAlignment.Center,
},
New "TextLabel" {
Name = "Message",
Text = message,
TextColor3 = Colour3(221, 221, 221),
Position = UDim2.new(0.025, 0, 0.175, 0),
Size = UDim2.new(0.95, 0, 0.55, 0),
BackgroundTransparency = 1,
Font = Enum.Font.Arial,
FontSize = Enum.FontSize.Size18,
TextWrap = true,
TextXAlignment = Enum.TextXAlignment.Left,
TextYAlignment = Enum.TextYAlignment.Top,
},
}
CreateButtons(frame, buttons, UDim.new(0.8, 0), UDim.new(0.15, 0))
return frame
end
RbxGui.CreateStyledMessageDialog = function(title, message, style, buttons)
local frame = New "Frame" {
Size = UDim2.new(0.5, 0, 0, 165),
@ -201,45 +243,6 @@ RbxGui.CreateStyledMessageDialog = function(title, message, style, buttons)
return frame
end
RbxGui.CreateMessageDialog = function(title, message, buttons)
local frame = New "Frame" {
Size = UDim2.new(0.5, 0, 0.5, 0),
Position = UDim2.new(0.25, 0, 0.25, 0),
Name = "MessageDialog",
Active = true,
Style = Enum.FrameStyle.RobloxRound,
New "TextLabel" {
Name = "Title",
Text = title,
BackgroundTransparency = 1,
TextColor3 = Colour3(221, 221, 221),
Position = UDim2.new(0, 0, 0, 0),
Size = UDim2.new(1, 0, 0.15, 0),
Font = Enum.Font.ArialBold,
FontSize = Enum.FontSize.Size36,
TextXAlignment = Enum.TextXAlignment.Center,
TextYAlignment = Enum.TextYAlignment.Center,
},
New "TextLabel" {
Name = "Message",
Text = message,
TextColor3 = Colour3(221, 221, 221),
Position = UDim2.new(0.025, 0, 0.175, 0),
Size = UDim2.new(0.95, 0, 0.55, 0),
BackgroundTransparency = 1,
Font = Enum.Font.Arial,
FontSize = Enum.FontSize.Size18,
TextWrap = true,
TextXAlignment = Enum.TextXAlignment.Left,
TextYAlignment = Enum.TextYAlignment.Top,
},
}
CreateButtons(frame, buttons, UDim.new(0.8, 0), UDim.new(0.15, 0))
return frame
end
local scrollMouseCount
RbxGui.CreateDropDownMenu = function(items, onSelect, forRoblox)
local width = UDim.new(0, 100)
@ -269,7 +272,7 @@ RbxGui.CreateDropDownMenu = function(items, onSelect, forRoblox)
New "ImageLabel" {
Name = "Icon",
Active = false,
Image = "http://banland.xyz/asset/?id=45732894",
Image = "http://banland.xyz/asset?id=45732894",
BackgroundTransparency = 1,
Size = UDim2.new(0, 11, 0, 6),
Position = UDim2.new(1, -11, 0.5, -2),
@ -816,24 +819,27 @@ RbxGui.LayoutGuiObjects = function(frame, guiObjects, settingsTable)
end
RbxGui.CreateSlider = function(steps, width, position)
local sliderGui = Instance.new "Frame"
sliderGui.Size = UDim2.new(1, 0, 1, 0)
sliderGui.BackgroundTransparency = 1
sliderGui.Name = "SliderGui"
local sliderGui = New "Frame" {
Size = UDim2.new(1, 0, 1, 0),
BackgroundTransparency = 1,
Name = "SliderGui",
}
local sliderSteps = Instance.new "IntValue"
sliderSteps.Name = "SliderSteps"
sliderSteps.Value = steps
sliderSteps.Parent = sliderGui
local sliderSteps = New "IntValue" {
Name = "SliderSteps",
Value = steps,
Parent = sliderGui,
}
local areaSoak = Instance.new "TextButton"
areaSoak.Name = "AreaSoak"
areaSoak.Text = ""
areaSoak.BackgroundTransparency = 1
areaSoak.Active = false
areaSoak.Size = UDim2.new(1, 0, 1, 0)
areaSoak.Visible = false
areaSoak.ZIndex = 4
local areaSoak = New "TextButton" {
Name = "AreaSoak",
Text = "",
BackgroundTransparency = 1,
Active = false,
Size = UDim2.new(1, 0, 1, 0),
Visible = false,
ZIndex = 4,
}
sliderGui.AncestryChanged:connect(function(_, parent)
if parent == nil then
@ -843,24 +849,23 @@ RbxGui.CreateSlider = function(steps, width, position)
end
end)
local sliderPosition = Instance.new "IntValue"
sliderPosition.Name = "SliderPosition"
sliderPosition.Value = 0
sliderPosition.Parent = sliderGui
local sliderPosition = New "IntValue" {
Name = "SliderPosition",
Value = 1,
Parent = sliderGui,
}
local bar = Instance.new "TextButton"
bar.Text = ""
bar.AutoButtonColor = false
bar.Name = "Bar"
bar.BackgroundColor3 = Color3.new(0, 0, 0)
if type(width) == "number" then
bar.Size = UDim2.new(0, width, 0, 5)
else
bar.Size = UDim2.new(0, 200, 0, 5)
end
bar.BorderColor3 = Colour3(95, 95, 95)
bar.ZIndex = 2
bar.Parent = sliderGui
local bar = New "TextButton" {
Text = "",
AutoButtonColor = false,
Name = "Bar",
BackgroundColor3 = Color3.new(0, 0, 0),
Size = type(width) == "number" and UDim2.new(0, width, 0, 5)
or UDim2.new(0, 200, 0, 5),
BorderColor3 = Colour3(95, 95, 95),
ZIndex = 2,
Parent = sliderGui,
}
if
position.X
@ -873,14 +878,15 @@ RbxGui.CreateSlider = function(steps, width, position)
bar.Position = position
end
local slider = Instance.new "ImageButton"
slider.Name = "Slider"
slider.BackgroundTransparency = 1
slider.Image = "rbxasset://textures/ui/Slider.png"
slider.Position = UDim2.new(0, 0, 0.5, -10)
slider.Size = UDim2.new(0, 20, 0, 20)
slider.ZIndex = 3
slider.Parent = bar
local slider = New "TextButton" {
Name = "Slider",
BackgroundTransparency = 1,
Image = "rbxasset://textures/ui/Slider.png",
Position = UDim2.new(0, 0, 0.5, -10),
Size = UDim2.new(0, 20, 0, 20),
ZIndex = 3,
Parent = bar,
}
areaSoak.MouseLeave:connect(function()
if areaSoak.Visible then
@ -937,48 +943,54 @@ RbxGui.CreateTrueScrollingFrame = function()
local descendantsChangeConMap = {}
local scrollingFrame = Instance.new "Frame"
scrollingFrame.Name = "ScrollingFrame"
scrollingFrame.Active = true
scrollingFrame.Size = UDim2.new(1, 0, 1, 0)
scrollingFrame.ClipsDescendants = true
local scrollingFrame = New "Frame" {
Name = "ScrollingFrame",
Active = true,
Size = UDim2.new(1, 0, 1, 0),
ClipsDescendants = true,
}
local controlFrame = Instance.new "Frame"
controlFrame.Name = "ControlFrame"
controlFrame.BackgroundTransparency = 1
controlFrame.Size = UDim2.new(0, 18, 1, 0)
controlFrame.Position = UDim2.new(1, -20, 0, 0)
controlFrame.Parent = scrollingFrame
local controlFrame = New "Frame" {
Name = "ControlFrame",
BackgroundTransparency = 1,
Size = UDim2.new(0, 18, 1, 0),
Position = UDim2.new(1, -20, 0, 0),
Parent = scrollingFrame,
}
local scrollBottom = Instance.new "BoolValue"
scrollBottom.Value = false
scrollBottom.Name = "ScrollBottom"
scrollBottom.Parent = controlFrame
local scrollBottom = New "BoolValue" {
Value = false,
Name = "ScrollBottom",
Parent = controlFrame,
}
local scrollUpValue = Instance.new "BoolValue"
scrollUpValue.Value = false
scrollUpValue.Name = "scrollUp"
scrollUpValue.Parent = controlFrame
local scrollUpValue = New "BoolValue" {
Value = false,
Name = "scrollUp",
Parent = controlFrame,
}
local scrollUpButton = Instance.new "TextButton"
scrollUpButton.Name = "ScrollUpButton"
scrollUpButton.Text = ""
scrollUpButton.AutoButtonColor = false
scrollUpButton.BackgroundColor3 = Color3.new(0, 0, 0)
scrollUpButton.BorderColor3 = Color3.new(1, 1, 1)
scrollUpButton.BackgroundTransparency = 0.5
scrollUpButton.Size = UDim2.new(0, 18, 0, 18)
scrollUpButton.ZIndex = 2
scrollUpButton.Parent = controlFrame
local scrollUpButton = New "TextButton" {
Name = "ScrollUpButton",
Text = "",
AutoButtonColor = false,
BackgroundColor3 = Color3.new(0, 0, 0),
BorderColor3 = Color3.new(1, 1, 1),
BackgroundTransparency = 0.5,
Size = UDim2.new(0, 18, 0, 18),
ZIndex = 2,
Parent = controlFrame,
}
for i = 1, 6 do
local triFrame = Instance.new "Frame"
triFrame.BorderColor3 = Color3.new(1, 1, 1)
triFrame.Name = "tri" .. tostring(i)
triFrame.ZIndex = 3
triFrame.BackgroundTransparency = 0.5
triFrame.Size = UDim2.new(0, 12 - ((i - 1) * 2), 0, 0)
triFrame.Position = UDim2.new(0, 3 + (i - 1), 0.5, 2 - (i - 1))
triFrame.Parent = scrollUpButton
New "Frame" {
BorderColor3 = Color3.new(1, 1, 1),
Name = "tri" .. i,
ZIndex = 3,
BackgroundTransparency = 0.5,
Size = UDim2.new(0, 12 - ((i - 1) * 2), 0, 0),
Position = UDim2.new(0, 3 + (i - 1), 0.5, 2 - (i - 1)),
Parent = scrollUpButton,
}
end
scrollUpButton.MouseEnter:connect(function()
scrollUpButton.BackgroundTransparency = 0.1
@ -1018,43 +1030,48 @@ RbxGui.CreateTrueScrollingFrame = function()
end)
scrollDownButton.Parent = controlFrame
local scrollTrack = Instance.new "Frame"
scrollTrack.Name = "ScrollTrack"
scrollTrack.BackgroundTransparency = 1
scrollTrack.Size = UDim2.new(0, 18, 1, -38)
scrollTrack.Position = UDim2.new(0, 0, 0, 19)
scrollTrack.Parent = controlFrame
local scrollTrack = New "Frame" {
Name = "ScrollTrack",
BackgroundTransparency = 1,
Size = UDim2.new(0, 18, 1, -38),
Position = UDim2.new(0, 0, 0, 19),
Parent = controlFrame,
}
local scrollbar = Instance.new "TextButton"
scrollbar.BackgroundColor3 = Color3.new(0, 0, 0)
scrollbar.BorderColor3 = Color3.new(1, 1, 1)
scrollbar.BackgroundTransparency = 0.5
scrollbar.AutoButtonColor = false
scrollbar.Text = ""
scrollbar.Active = true
scrollbar.Name = "ScrollBar"
scrollbar.ZIndex = 2
scrollbar.BackgroundTransparency = 0.5
scrollbar.Size = UDim2.new(0, 18, 0.1, 0)
scrollbar.Position = UDim2.new(0, 0, 0, 0)
scrollbar.Parent = scrollTrack
local scrollbar = New "TextButton" {
BackgroundColor3 = Color3.new(0, 0, 0),
BorderColor3 = Color3.new(1, 1, 1),
BackgroundTransparency = 0.5,
AutoButtonColor = false,
Text = "",
Active = true,
Name = "ScrollBar",
ZIndex = 2,
Size = UDim2.new(0, 18, 0.1, 0),
Position = UDim2.new(0, 0, 0, 0),
Parent = scrollTrack,
}
local scrollNub = Instance.new "Frame"
scrollNub.Name = "ScrollNub"
scrollNub.BorderColor3 = Color3.new(1, 1, 1)
scrollNub.Size = UDim2.new(0, 10, 0, 0)
scrollNub.Position = UDim2.new(0.5, -5, 0.5, 0)
scrollNub.ZIndex = 2
scrollNub.BackgroundTransparency = 0.5
scrollNub.Parent = scrollbar
local function nub()
return New "Frame" {
Name = "ScrollNub",
BorderColor3 = Color3.new(1, 1, 1),
Size = UDim2.new(0, 10, 0, 0),
ZIndex = 2,
BackgroundTransparency = 0.5,
Parent = scrollbar,
}
end
local newNub = scrollNub:Clone()
newNub.Position = UDim2.new(0.5, -5, 0.5, -2)
newNub.Parent = scrollbar
local lastNub = scrollNub:Clone()
lastNub.Position = UDim2.new(0.5, -5, 0.5, 2)
lastNub.Parent = scrollbar
local scrollNub = Hydrate(nub()) {
Position = UDim2.new(0.5, -5, 0.5, 0),
}
local newNub = Hydrate(nub()) {
Position = UDim2.new(0.5, -5, 0.5, -2),
}
local lastNub = Hydrate(nub()) {
Position = UDim2.new(0.5, -5, 0.5, 2),
}
scrollbar.MouseEnter:connect(function()
scrollbar.BackgroundTransparency = 0.1
@ -1069,14 +1086,15 @@ RbxGui.CreateTrueScrollingFrame = function()
lastNub.BackgroundTransparency = 0.5
end)
local mouseDrag = Instance.new "ImageButton"
mouseDrag.Active = false
mouseDrag.Size = UDim2.new(1.5, 0, 1.5, 0)
mouseDrag.AutoButtonColor = false
mouseDrag.BackgroundTransparency = 1
mouseDrag.Name = "mouseDrag"
mouseDrag.Position = UDim2.new(-0.25, 0, -0.25, 0)
mouseDrag.ZIndex = 10
local mouseDrag = New "ImageButton" {
Active = false,
Size = UDim2.new(1.5, 0, 1.5, 0),
AutoButtonColor = false,
BackgroundTransparency = 1,
Name = "mouseDrag",
Position = UDim2.new(-0.25, 0, -0.25, 0),
ZIndex = 10,
}
local function positionScrollBar(_, y, offset)
local oldPos = scrollbar.Position
@ -1549,7 +1567,7 @@ RbxGui.CreateScrollingFrame = function(orderList, scrollStyle)
local scrollStamp = 0
local scrollDrag = New "ImageButton" {
Image = "http://banland.xyz/asset/?id=61367186",
Image = "http://banland.xyz/asset?id=61367186",
Size = UDim2.new(1, 0, 0, 16),
BackgroundTransparency = 1,
Name = "ScrollDrag",
@ -2773,7 +2791,7 @@ RbxGui.CreateSetPanel = function(
local SmallThumbnailUrl
local LargeThumbnailUrl
local BaseUrl = game:GetService("ContentProvider").BaseUrl:lower()
local BaseUrl = string.lower(ContentProvider.BaseUrl)
local ThumbUrl = `{BaseUrl}Game/Tools/ThumbnailAsset.ashx?fmt=png&wd=`
if useAssetVersionId then
@ -3118,7 +3136,7 @@ RbxGui.CreateSetPanel = function(
local function showLargePreview(insertButton)
if insertButton:FindFirstChild "AssetId" then
delay(0, function()
game:GetService("ContentProvider"):Preload(
ContentProvider:Preload(
LargeThumbnailUrl .. tostring(insertButton.AssetId.Value)
)
setGui.SetPanel.ItemPreview.LargePreview.Image = LargeThumbnailUrl
@ -3212,17 +3230,9 @@ RbxGui.CreateSetPanel = function(
end
local function createDropDownMenuButton(parent)
-- local dropDownButton = Instance.new "ImageButton"
-- dropDownButton.Name = "DropDownButton"
-- dropDownButton.Image = "http://banland.xyz/asset/?id=67581509"
-- dropDownButton.BackgroundTransparency = 1
-- dropDownButton.Size = UDim2.new(0, 16, 0, 16)
-- dropDownButton.Position = UDim2.new(1, -24, 0, 6)
-- dropDownButton.ZIndex = parent.ZIndex + 2
-- dropDownButton.Parent = parent
local dropDownButton = New "ImageButton" {
Name = "DropDownButton",
Image = "http://banland.xyz/asset/?id=67581509",
Image = "http://banland.xyz/asset?id=67581509",
BackgroundTransparency = 1,
Size = UDim2.new(0, 16, 0, 16),
Position = UDim2.new(1, -24, 0, 6),
@ -3295,8 +3305,7 @@ RbxGui.CreateSetPanel = function(
local newImageUrl = SmallThumbnailUrl .. assetId
if newImageUrl ~= insertFrame.Button.ButtonImage.Image then
delay(0, function()
game:GetService("ContentProvider")
:Preload(SmallThumbnailUrl .. assetId)
ContentProvider:Preload(SmallThumbnailUrl .. assetId)
insertFrame.Button.ButtonImage.Image = SmallThumbnailUrl
.. assetId
end)
@ -3416,8 +3425,7 @@ RbxGui.CreateSetPanel = function(
Data.Category[Data.CurrentCategory].Button = button
if SetCache[setId] == nil then
SetCache[setId] = game:GetService("InsertService")
:GetCollection(setId)
SetCache[setId] = InsertService:GetCollection(setId)
end
Data.Category[Data.CurrentCategory].Contents = SetCache[setId]
@ -3585,8 +3593,7 @@ RbxGui.CreateSetPanel = function(
local userData = {}
for id = 1, #userIdsForSets do
local newUserData = game:GetService("InsertService")
:GetUserSets(userIdsForSets[id])
local newUserData = InsertService:GetUserSets(userIdsForSets[id])
if newUserData and #newUserData > 2 then
-- start at #3 to skip over My Decals and My Models for each account
for category = 3, #newUserData do
@ -3745,7 +3752,7 @@ RbxGui.CreateTerrainMaterialSelector = function(size, position)
end
materialToImageMap[v] =
{ Regular = `http://banland.xyz/asset/?id={toAdd}` }
{ Regular = `http://banland.xyz/asset?id={toAdd}` }
end
local scrollFrame, scrollUp, scrollDown, recalculateScroll =
@ -3855,8 +3862,7 @@ RbxGui.CreateTerrainMaterialSelector = function(size, position)
end
RbxGui.CreateLoadingFrame = function(name, size, position)
game:GetService("ContentProvider")
:Preload "http://banland.xyz/asset/?id=35238053"
ContentProvider:Preload "http://banland.xyz/asset?id=35238053"
local loadingFrame = New "Frame" {
Name = "LoadingFrame",
@ -3888,7 +3894,7 @@ RbxGui.CreateLoadingFrame = function(name, size, position)
local loadingGreenBar = New "ImageLabel" {
Name = "LoadingGreenBar",
Image = "http://banland.xyz/asset/?id=35238053",
Image = "http://banland.xyz/asset?id=35238053",
Position = UDim2.new(0, 0, 0, 0),
Size = UDim2.new(0, 0, 1, 0),
Visible = false,
@ -4316,7 +4322,7 @@ RbxGui.CreatePluginFrame = function(name, size, position, scrollable, parent)
draggingVertical = false
areaSoak.Visible = false
end)
areaSoak.MouseMoved:connect(function(_, y)
areaSoak.MouseMoved:connect(function(_, y: number)
if not draggingVertical then
return
end

View File

@ -28,7 +28,7 @@ local helpButton, updateCameraDropDownSelection, updateVideoCaptureDropDownSelec
local tweenTime = 0.2
local mouseLockLookScreenUrl = "http://banland.xyz/asset?id=54071825"
local classicLookScreenUrl = "http://banland.xyz/Asset?id=45915798"
local classicLookScreenUrl = "http://banland.xyz/asset?id=45915798"
local hasGraphicsSlider = true
local GraphicsQualityLevels = 10 -- how many levels we allow on graphics slider
@ -417,17 +417,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 = "http://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 = "http://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 = "http://banland.xyz/asset?id=45915825"
end
CreateTextButtons(buttonRow, buttons, UDim.new(0, 0), UDim.new(1, 0))
@ -2025,7 +2025,7 @@ local createSaveDialogs = function()
-8
)
spinnerImage.BackgroundTransparency = 1
spinnerImage.Image = "http://banland.xyz/Asset?id=45880710"
spinnerImage.Image = "http://banland.xyz/asset?id=45880710"
spinnerImage.Parent = spinnerFrame
spinnerIcons[spinnerNum] = spinnerImage
@ -2047,10 +2047,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"
"http://banland.xyz/asset?id=45880668"
else
spinnerIcons[pos + 1].Image =
"http://banland.xyz/Asset?id=45880710"
"http://banland.xyz/asset?id=45880710"
end
pos += 1

View File

@ -25,7 +25,7 @@ local popupFrame = New "Frame" {
Name = "Backing",
BackgroundTransparency = 1,
Size = UDim2.new(1, 0, 1, 0),
Image = "http://banland.xyz/asset/?id=47574181",
Image = "http://banland.xyz/asset?id=47574181",
ZIndex = 2,
},
},

View File

@ -77,7 +77,7 @@ local CurrentLoadout = New "Frame" {
New "ImageLabel" {
Name = "Background",
Size = UDim2.new(1.2, 0, 1.2, 0),
Image = "http://banland.xyz/asset/?id=96536002",
Image = "http://banland.xyz/asset?id=96536002",
BackgroundTransparency = 1,
Position = UDim2.new(-0.1, 0, -0.1, 0),
ZIndex = 0.0,
@ -85,7 +85,7 @@ local CurrentLoadout = New "Frame" {
New "ImageLabel" {
Size = UDim2.new(1, 0, 0.025, 1),
Position = UDim2.new(0, 0, 0, 0),
Image = "http://banland.xyz/asset/?id=97662207",
Image = "http://banland.xyz/asset?id=97662207",
BackgroundTransparency = 1,
},
},
@ -105,13 +105,13 @@ local CurrentLoadout = New "Frame" {
New "ImageLabel" {
Name = "Background",
BackgroundTransparency = 1,
Image = "http://banland.xyz/asset/?id=97613075",
Image = "http://banland.xyz/asset?id=97613075",
Size = UDim2.new(1, 0, 1, 0),
},
-- New "ImageLabel" {
-- Name = "Highlight",
-- BackgroundTransparency = 1,
-- Image = "http://banland.xyz/asset/?id=97643886",
-- Image = "http://banland.xyz/asset?id=97643886",
-- Size = UDim2.new(1, 0, 1, 0),
-- Visible = false,
-- }
@ -183,7 +183,7 @@ New "ImageButton" {
Visible = false,
Name = "BackpackButton",
BackgroundTransparency = 1,
Image = "http://banland.xyz/asset/?id=97617958",
Image = "http://banland.xyz/asset?id=97617958",
Position = UDim2.new(0.5, -60, 1, -108),
Size = UDim2.new(0, 120, 0, 18),
Parent = gui.ControlFrame,
@ -283,7 +283,7 @@ New "Frame" {
New "ImageLabel" {
RobloxLocked = true,
Name = "XImage",
Image = "http://banland.xyz/asset/?id=75547445",
Image = "http://banland.xyz/asset?id=75547445",
BackgroundTransparency = 1,
Position = UDim2.new(-0.25, -1, -0.25, -1),
Size = UDim2.new(1.5, 2, 1.5, 2),
@ -495,7 +495,7 @@ New "Frame" {
New "ImageLabel" {
Name = "Background",
BackgroundTransparency = 1,
Image = "http://banland.xyz/asset/?id=97613075",
Image = "http://banland.xyz/asset?id=97613075",
Size = UDim2.new(1, 0, 1, 0),
},
New "ObjectValue" {

View File

@ -12,7 +12,7 @@ local RbxStamper = {}
-- Return:
-- cellPos - The terrain cell intersection point if there is one, vectorPos if there isn't.
-- hit - Whether there was a plane intersection. Value is true if there was, false if not.
function PlaneIntersection(vectorPos)
local function PlaneIntersection(vectorPos)
local hit = false
local currCamera = game.Workspace.CurrentCamera
local startPos = Vector3.new(

View File

@ -1,19 +1,19 @@
-- CoreGui.RobloxGui.Backpack.CoreScripts/BackpackScripts/Back (1?)
print "[Mercury]: Loaded corescript 89449008"
local News = require "../Modules/New"
local New = News.New
local Hydrate = News.Hydrate
-- A couple of necessary functions
local function waitForChild(instance, name)
assert(instance)
assert(name)
local function waitForChild(instance: Instance, name: string)
while not instance:FindFirstChild(name) do
print("Waiting for ...", instance, name)
instance.ChildAdded:wait()
end
return instance:FindFirstChild(name)
end
local function waitForProperty(instance, property)
assert(instance)
assert(property)
local function waitForProperty(instance: Instance, property: string)
while not instance[property] do
instance.Changed:wait()
end
@ -42,7 +42,7 @@ local StaticTabName = "gear"
local backpack = script.Parent
local backpackItems = {}
local backpackItems: { Tool | HopperBin } = {}
local buttons = {}
local debounce = false
@ -108,38 +108,30 @@ scrollFrameLoadout.Position = UDim2.new(0, 0, 0, 0)
scrollFrameLoadout.Size = UDim2.new(1, 0, 1, 0)
scrollFrameLoadout.Parent = backpack.Gear.GearLoadouts.LoadoutsList
local LoadoutButton = Instance.new "TextButton"
LoadoutButton.RobloxLocked = true
LoadoutButton.Name = "LoadoutButton"
LoadoutButton.Font = Enum.Font.ArialBold
LoadoutButton.FontSize = Enum.FontSize.Size14
LoadoutButton.Position = UDim2.new(0, 0, 0, 0)
LoadoutButton.Size = UDim2.new(1, 0, 0, 32)
LoadoutButton.Style = Enum.ButtonStyle.RobloxButton
LoadoutButton.Text = "Loadout #1"
LoadoutButton.TextColor3 = Color3.new(1, 1, 1)
LoadoutButton.Parent = scrollFrameLoadout
for i = 1, 4 do
New "TextButton" {
RobloxLocked = true,
Name = "LoadoutButton",
Font = Enum.Font.ArialBold,
FontSize = Enum.FontSize.Size14,
Position = UDim2.new(0, 0, 0, 0),
Size = UDim2.new(1, 0, 0, 32),
Style = Enum.ButtonStyle.RobloxButton,
Text = "Loadout #" .. i,
TextColor3 = Color3.new(1, 1, 1),
Parent = scrollFrameLoadout,
}
end
local LoadoutButtonTwo = LoadoutButton:clone()
LoadoutButtonTwo.Text = "Loadout #2"
LoadoutButtonTwo.Parent = scrollFrameLoadout
local LoadoutButtonThree = LoadoutButton:clone()
LoadoutButtonThree.Text = "Loadout #3"
LoadoutButtonThree.Parent = scrollFrameLoadout
local LoadoutButtonFour = LoadoutButton:clone()
LoadoutButtonFour.Text = "Loadout #4"
LoadoutButtonFour.Parent = scrollFrameLoadout
local scrollBarLoadout = Instance.new "Frame"
scrollBarLoadout.Name = "ScrollBarLoadout"
scrollBarLoadout.BackgroundTransparency = 0.9
scrollBarLoadout.BackgroundColor3 = Color3.new(1, 1, 1)
scrollBarLoadout.BorderSizePixel = 0
scrollBarLoadout.Size = UDim2.new(0, 17, 1, -36)
scrollBarLoadout.Position = UDim2.new(0, 0, 0, 18)
scrollBarLoadout.Parent = backpack.Gear.GearLoadouts.GearLoadoutsScrollingArea
New "Frame" {
Name = "ScrollBarLoadout",
BackgroundTransparency = 0.9,
BackgroundColor3 = Color3.new(1, 1, 1),
BorderSizePixel = 0,
Size = UDim2.new(0, 17, 1, -36),
Position = UDim2.new(0, 0, 0, 18),
Parent = backpack.Gear.GearLoadouts.GearLoadoutsScrollingArea,
}
scrollDownLoadout.Position = UDim2.new(0, 0, 1, -17)
@ -147,7 +139,7 @@ scrollUpLoadout.Parent = backpack.Gear.GearLoadouts.GearLoadoutsScrollingArea
scrollDownLoadout.Parent = backpack.Gear.GearLoadouts.GearLoadoutsScrollingArea
-- Begin Functions
function removeFromMap(map, object)
local function removeFromMap(map, object)
for i = 1, #map do
if map[i] == object then
table.remove(map, i)
@ -156,7 +148,7 @@ function removeFromMap(map, object)
end
end
function robloxLock(instance)
local function robloxLock(instance)
instance.RobloxLocked = true
local children = instance:GetChildren()
if children then
@ -166,105 +158,14 @@ function robloxLock(instance)
end
end
function resize()
local size = 0
if gearPreview.AbsoluteSize.Y > gearPreview.AbsoluteSize.X then
size = gearPreview.AbsoluteSize.X * 0.75
else
size = gearPreview.AbsoluteSize.Y * 0.75
end
waitForChild(gearPreview, "GearImage")
gearPreview.GearImage.Size = UDim2.new(0, size, 0, size)
gearPreview.GearImage.Position =
UDim2.new(0, gearPreview.AbsoluteSize.X / 2 - size / 2, 0.75, -size)
resizeGrid()
end
function addToGrid(child)
if not child:IsA "Tool" then
if not child:IsA "HopperBin" then
return
end
end
if child:FindFirstChild "RobloxBuildTool" then
return
end
for _, v in pairs(backpackItems) do -- check to see if we already have this gear registered
if v == child then
return
end
end
table.insert(backpackItems, child)
local changeCon = child.Changed:connect(function(prop)
if prop == "Name" then
if buttons[child] then
if buttons[child].Image == "" then
buttons[child].GearText.Text = child.Name
end
end
end
end)
local ancestryCon
ancestryCon = child.AncestryChanged:connect(function(_, _)
local thisObject
for _, v in pairs(backpackItems) do
if v == child then
thisObject = v
break
end
end
waitForProperty(player, "Character")
waitForChild(player, "Backpack")
if
child.Parent ~= player.Backpack
and child.Parent ~= player.Character
then
if ancestryCon then
ancestryCon:disconnect()
end
if changeCon then
changeCon:disconnect()
end
for _, v in pairs(backpackItems) do
if v == thisObject then
if mouseEnterCons[buttons[v]] then
mouseEnterCons[buttons[v]]:disconnect()
end
if mouseClickCons[buttons[v]] then
mouseClickCons[buttons[v]]:disconnect()
end
buttons[v].Parent = nil
buttons[v] = nil
break
end
end
removeFromMap(backpackItems, thisObject)
resizeGrid()
else
resizeGrid()
end
updateGridActive()
end)
resizeGrid()
end
function buttonClick(button)
local function buttonClick(button)
if button:FindFirstChild "UnequipContextMenu" and not button.Active then
button.UnequipContextMenu.Visible = true
browsingMenu = true
end
end
function previewGear(button)
local function previewGear(button)
if not browsingMenu then
gearPreview.Visible = false
gearPreview.GearImage.Image = button.Image
@ -272,7 +173,7 @@ function previewGear(button)
end
end
function findEmptySlot()
local function findEmptySlot()
local smallestNum
local loadout = currentLoadout:GetChildren()
for i = 1, #loadout do
@ -286,27 +187,46 @@ function findEmptySlot()
end
end
end
if smallestNum == 10 then
smallestNum = 0
return smallestNum == 10 and 0 or smallestNum
end
local function inLoadout(gear)
local children = currentLoadout:GetChildren()
for i = 1, #children do
if children[i]:IsA "Frame" then
local button = children[i]:GetChildren()
if
#button > 0
and button[1].GearReference.Value
and button[1].GearReference.Value == gear
then
return true
end
end
end
return smallestNum
return false
end
function unequipGear(physGear)
physGear.Parent = playerBackpack
updateGridActive()
local function updateGridActive()
for _, v in pairs(backpackItems) do
if buttons[v] then
local gear
local gearRef = buttons[v]:FindFirstChild "GearReference"
if gearRef then
gear = gearRef.Value
end
if (not gear) or inLoadout(gear) then
buttons[v].Active = false
else
buttons[v].Active = true
end
end
end
end
function 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)
local function swapGearSlot(slot, newGearButton)
if not swapSlot.Value then -- signal loadout to swap a gear out
swapSlot.Slot.Value = slot
swapSlot.GearButton.Value = newGearButton
@ -315,200 +235,16 @@ function swapGearSlot(slot, newGearButton)
end
end
function checkForSwap(button, x, y)
local loadoutChildren = currentLoadout:GetChildren()
for i = 1, #loadoutChildren do
if
loadoutChildren[i]:IsA "Frame"
and string.find(loadoutChildren[i].Name, "Slot")
then
if
x >= loadoutChildren[i].AbsolutePosition.x
and x
<= (loadoutChildren[i].AbsolutePosition.x + loadoutChildren[i].AbsoluteSize.x)
then
if
y >= loadoutChildren[i].AbsolutePosition.y
and y
<= (loadoutChildren[i].AbsolutePosition.y + loadoutChildren[i].AbsoluteSize.y)
then
local slot =
tonumber(string.sub(loadoutChildren[i].Name, 5))
swapGearSlot(slot, button)
return true
end
end
end
end
return false
end
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()
local function resizeGrid()
for _, v in pairs(backpackItems) do
if not v:FindFirstChild "RobloxBuildTool" then
if not buttons[v] then
local buttonClone = gearButton:clone()
buttonClone.Parent = grid.ScrollingFrame
buttonClone.Visible = true
buttonClone.Image = v.TextureId
if buttonClone.Image == "" then
local buttonClone = Hydrate(gearButton:clone()) {
Parent = grid.ScrollingFrame,
Visible = true,
Image = v.TextureId,
}
if v.TextureId == "" then
buttonClone.GearText.Text = v.Name
end
@ -582,7 +318,294 @@ function resizeGrid()
recalculateScroll()
end
function showPartialGrid(subset)
local function resize()
local size = gearPreview.AbsoluteSize.Y > gearPreview.AbsoluteSize.X
and gearPreview.AbsoluteSize.X * 0.75
or gearPreview.AbsoluteSize.Y * 0.75
waitForChild(gearPreview, "GearImage")
gearPreview.GearImage.Size = UDim2.new(0, size, 0, size)
gearPreview.GearImage.Position =
UDim2.new(0, gearPreview.AbsoluteSize.X / 2 - size / 2, 0.75, -size)
resizeGrid()
end
local function addToGrid(child: Tool | HopperBin)
if
not (child:IsA "Tool" or child:IsA "HopperBin")
or child:FindFirstChild "RobloxBuildTool"
then
return
end
for _, v in pairs(backpackItems) do -- check to see if we already have this gear registered
if v == child then
return
end
end
table.insert(backpackItems, child)
local changeCon = child.Changed:connect(function(prop)
if prop == "Name" and buttons[child] and buttons[child].Image == "" then
buttons[child].GearText.Text = child.Name
end
end)
local ancestryCon
ancestryCon = child.AncestryChanged:connect(function()
local thisObject
for _, v in pairs(backpackItems) do
if v == child then
thisObject = v
break
end
end
waitForProperty(player, "Character")
waitForChild(player, "Backpack")
if
child.Parent ~= player.Backpack
and child.Parent ~= player.Character
then
if ancestryCon then
ancestryCon:disconnect()
end
if changeCon then
changeCon:disconnect()
end
for _, v in pairs(backpackItems) do
if v == thisObject then
if mouseEnterCons[buttons[v]] then
mouseEnterCons[buttons[v]]:disconnect()
end
if mouseClickCons[buttons[v]] then
mouseClickCons[buttons[v]]:disconnect()
end
buttons[v].Parent = nil
buttons[v] = nil
break
end
end
removeFromMap(backpackItems, thisObject)
end
resizeGrid()
updateGridActive()
end)
resizeGrid()
end
local function unequipGear(physGear)
physGear.Parent = playerBackpack
updateGridActive()
end
local function highlight(button)
button.TextColor3 = Color3.new(0, 0, 0)
button.BackgroundColor3 = Color3.new(0.8, 0.8, 0.8)
end
local function clearHighlight(button)
button.TextColor3 = Color3.new(1, 1, 1)
button.BackgroundColor3 = Color3.new(0, 0, 0)
end
function checkForSwap(button, x, y)
local loadoutChildren = currentLoadout:GetChildren()
for i = 1, #loadoutChildren do
if
loadoutChildren[i]:IsA "Frame"
and string.find(loadoutChildren[i].Name, "Slot")
then
if
x >= loadoutChildren[i].AbsolutePosition.x
and x
<= (loadoutChildren[i].AbsolutePosition.x + loadoutChildren[i].AbsoluteSize.x)
then
if
y >= loadoutChildren[i].AbsolutePosition.y
and y
<= (loadoutChildren[i].AbsolutePosition.y + loadoutChildren[i].AbsoluteSize.y)
then
local slot =
tonumber(string.sub(loadoutChildren[i].Name, 5))
swapGearSlot(slot, button)
return true
end
end
end
end
return false
end
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
local function clearPreview()
gearPreview.GearImage.Image = ""
gearPreview.GearStats.GearName.Text = ""
end
function getGearContextMenu()
local gearContextMenu = New "Frame" {
Active = true,
Name = "UnequipContextMenu",
Size = UDim2.new(0, 115, 0, 70),
Position = UDim2.new(0, -16, 0, -16),
BackgroundTransparency = 1,
Visible = false,
}
local gearContextMenuButton = New "TextButton" {
Name = "UnequipContextMenuButton",
Text = "",
Style = Enum.ButtonStyle.RobloxButtonDefault,
ZIndex = 8,
Size = UDim2.new(1, 0, 1, -20),
Visible = true,
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 = New "TextButton" {
Name = "UnequipContextButton" .. i,
BackgroundColor3 = Color3.new(0, 0, 0),
BorderSizePixel = 0,
TextXAlignment = Enum.TextXAlignment.Left,
Text = ` {contextElement.Text}`,
Font = Enum.Font.Arial,
FontSize = Enum.FontSize.Size14,
Size = UDim2.new(1, 8, 0, elementHeight),
Position = UDim2.new(0, 0, 0, elementHeight * i),
TextColor3 = Color3.new(1, 1, 1),
ZIndex = 9,
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)
element.Label1 = New "TextLabel" {
Name = "Text1",
BackgroundTransparency = 1,
BackgroundColor3 = Color3.new(1, 1, 1),
BorderSizePixel = 0,
TextXAlignment = Enum.TextXAlignment.Left,
Font = Enum.Font.ArialBold,
FontSize = Enum.FontSize.Size14,
Position = UDim2.new(0, 0, 0, 0),
Size = UDim2.new(0.5, 0, 1, 0),
TextColor3 = Color3.new(1, 1, 1),
ZIndex = 9,
Parent = frame,
}
if element.GetText2 then
element.Label2 = New "TextLabel" {
Name = "Text2",
BackgroundTransparency = 1,
BackgroundColor3 = Color3.new(1, 1, 1),
BorderSizePixel = 0,
TextXAlignment = Enum.TextXAlignment.Right,
Font = Enum.Font.Arial,
FontSize = Enum.FontSize.Size14,
Position = UDim2.new(0.5, 0, 0, 0),
Size = UDim2.new(0.5, 0, 1, 0),
TextColor3 = Color3.new(1, 1, 1),
ZIndex = 9,
Parent = frame,
}
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
local function showPartialGrid(subset)
for _, v in pairs(buttons) do
v.Parent = nil
end
@ -594,51 +617,14 @@ function showPartialGrid(subset)
recalculateScroll()
end
function showEntireGrid()
local function showEntireGrid()
for _, v in pairs(buttons) do
v.Parent = grid.ScrollingFrame
end
recalculateScroll()
end
function inLoadout(gear)
local children = currentLoadout:GetChildren()
for i = 1, #children do
if children[i]:IsA "Frame" then
local button = children[i]:GetChildren()
if #button > 0 then
if
button[1].GearReference.Value
and button[1].GearReference.Value == gear
then
return true
end
end
end
end
return false
end
function updateGridActive()
for _, v in pairs(backpackItems) do
if buttons[v] then
local gear
local gearRef = buttons[v]:FindFirstChild "GearReference"
if gearRef then
gear = gearRef.Value
end
if (not gear) or inLoadout(gear) then
buttons[v].Active = false
else
buttons[v].Active = true
end
end
end
end
function centerGear(loadoutChildren)
local function centerGear(loadoutChildren)
local gearButtons = {}
local lastSlotAdd
for i = 1, #loadoutChildren do
@ -669,15 +655,7 @@ function centerGear(loadoutChildren)
end
end
function tabClickHandler(tabName)
if tabName == StaticTabName then
backpackOpenHandler(tabName)
else
backpackCloseHandler(tabName)
end
end
function backpackOpenHandler(currentTab)
local function backpackOpenHandler(currentTab)
if currentTab and currentTab ~= StaticTabName then
backpack.Gear.Visible = false
return
@ -691,7 +669,7 @@ function backpackOpenHandler(currentTab)
tellBackpackReadyFunc:Invoke()
end
function backpackCloseHandler(currentTab)
local function backpackCloseHandler(currentTab)
if currentTab and currentTab ~= StaticTabName then
backpack.Gear.Visible = false
return
@ -704,7 +682,20 @@ function backpackCloseHandler(currentTab)
tellBackpackReadyFunc:Invoke()
end
function loadoutCheck(child, selectState)
local function tabClickHandler(tabName)
if tabName == StaticTabName then
backpackOpenHandler(tabName)
else
backpackCloseHandler(tabName)
end
end
local function loadoutCheck(
child: Instance & {
GearReference: ObjectValue,
},
selectState
)
if not child:IsA "ImageButton" then
return
end
@ -713,39 +704,35 @@ function loadoutCheck(child, selectState)
if
child:FindFirstChild "GearReference"
and buttons[v]:FindFirstChild "GearReference"
and buttons[v].GearReference.Value
== child.GearReference.Value
then
if
buttons[v].GearReference.Value == child.GearReference.Value
then
buttons[v].Active = selectState
break
end
buttons[v].Active = selectState
break
end
end
end
end
function clearPreview()
gearPreview.GearImage.Image = ""
gearPreview.GearStats.GearName.Text = ""
end
-- function removeAllEquippedGear(physGear)
-- local function removeAllEquippedGear(physGear)
-- local stuff = player.Character:GetChildren()
-- for i = 1, #stuff do
-- if (stuff[i]:IsA "Tool" or stuff[i]:IsA "HopperBin") and stuff[i] ~= physGear then
-- if
-- (stuff[i]:IsA "Tool" or stuff[i]:IsA "HopperBin")
-- and stuff[i] ~= physGear
-- then
-- stuff[i].Parent = playerBackpack
-- end
-- end
-- end
-- function equipGear(physGear)
-- local function equipGear(physGear)
-- removeAllEquippedGear(physGear)
-- physGear.Parent = player.Character
-- updateGridActive()
-- end
function setupCharacterConnections()
local function setupCharacterConnections()
if backpackAddCon then
backpackAddCon:disconnect()
end
@ -796,19 +783,20 @@ function removeCharacterConnections()
end
end
function trim(s)
return (s:gsub("^%s*(.-)%s*$", "%1"))
local function trim(s)
return (string.gsub(s, "^%s*(.-)%s*$", "%1"))
end
function filterGear(terms)
local function filterGear(terms)
local filteredGear = {}
for _, v in pairs(backpackItems) do
if buttons[v] then
local gearString = string.lower(buttons[v].GearReference.Value.Name)
local button = buttons[v]
if button then
local gearString = string.lower(button.GearReference.Value.Name)
gearString = trim(gearString)
for i = 1, #terms do
if string.match(gearString, terms[i]) then
table.insert(filteredGear, buttons[v])
table.insert(filteredGear, button)
break
end
end
@ -817,7 +805,8 @@ function filterGear(terms)
return filteredGear
end
function splitByWhitespace(text)
local function splitByWhitespace(text)
if type(text) ~= "string" then
return nil
end
@ -830,7 +819,8 @@ function splitByWhitespace(text)
end
return terms
end
function showSearchGear(searchTerms)
local function showSearchGear(searchTerms)
if not backpack.Gear.Visible then
return
end -- currently not active tab
@ -852,7 +842,7 @@ function showSearchGear(searchTerms)
showPartialGrid(filteredButtons)
end
function nukeBackpack()
local function nukeBackpack()
while #buttons > 0 do
table.remove(buttons)
end
@ -867,7 +857,7 @@ function nukeBackpack()
end
end
function coreGuiChanged(coreGuiType, enabled)
local function coreGuiChanged(coreGuiType, enabled)
if
coreGuiType == Enum.CoreGuiType.Backpack
or coreGuiType == Enum.CoreGuiType.All

View File

@ -81,14 +81,14 @@ end
---------------------------------------- Public Event Setup ----------------------------------------
function publicEvent(eventName: string)
local function publicEvent(eventName: string)
return New "BindableEvent" {
Name = eventName,
Parent = script,
}
end
function publicFunction(funcName: string, invokeFunc: () -> ())
local function publicFunction(funcName: string, invokeFunc: () -> ())
return New "BindableFunction" {
Name = funcName,
OnInvoke = invokeFunc,
@ -156,12 +156,22 @@ local function showBackpack()
backpackOpenEvent:Fire(currentTab)
canToggle = true
readyForNextEvent = true
backpackButton.Image = "http://banland.xyz/asset/?id=97644093"
backpackButton.Image = "http://banland.xyz/asset?id=97644093"
backpackButton.Position =
UDim2.new(0.5, -60, 1, -backpackSize.Y.Offset - 103)
end)
end
local function resetSearchBoxGui()
resetButton.Visible = false
searchBox.Text = searchDefaultText
end
local function resetSearch()
resetSearchBoxGui()
searchRequestedEvent:Fire()
end
local function hideBackpack()
backpackIsOpen = false
readyForNextEvent = false
@ -210,7 +220,7 @@ local function toggleBackpack()
if backpackIsOpen then
Hydrate(loadoutBackground) {
Image = "http://banland.xyz/asset/?id=97623721",
Image = "http://banland.xyz/asset?id=97623721",
Position = UDim2.new(-0.03, 0, -0.17, 0),
Size = UDim2.new(1.05, 0, 1.25, 0),
ZIndex = 2.0,
@ -218,14 +228,13 @@ local function toggleBackpack()
}
showBackpack()
else
Hydrate(backpackButton) {
Position = UDim2.new(0.5, -60, 1, -44),
Selected = false,
Image = "http://banland.xyz/asset/?id=97617958",
}
-- No, it doesn't work if it's not in this exact order
backpackButton.Position = UDim2.new(0.5, -60, 1, -44)
loadoutBackground.Visible = false
backpackButton.Selected = false
backpackButton.Image = "http://banland.xyz/asset?id=97617958"
Hydrate(loadoutBackground) {
Visible = false,
Image = "http://banland.xyz/asset/?id=96536002",
Image = "http://banland.xyz/asset?id=96536002",
Position = UDim2.new(-0.1, 0, -0.1, 0),
Size = UDim2.new(1.2, 0, 1.2, 0),
}
@ -292,12 +301,7 @@ local function newTabClicked()
end
local function trim(s)
return (s:gsub("^%s*(.-)%s*$", "%1"))
end
local function resetSearchBoxGui()
resetButton.Visible = false
searchBox.Text = searchDefaultText
return (string.gsub(s, "^%s*(.-)%s*$", "%1"))
end
local function doSearch()
@ -311,16 +315,11 @@ local function doSearch()
searchRequestedEvent:Fire(searchText) -- todo: replace this with termtable when table passing is possible
end
function resetSearch()
resetSearchBoxGui()
searchRequestedEvent:Fire()
end
local backpackReady = function()
local function backpackReady()
readyForNextEvent = true
end
function coreGuiChanged(coreGuiType, enabled)
local function coreGuiChanged(coreGuiType, enabled)
if
coreGuiType == Enum.CoreGuiType.Backpack
or coreGuiType == Enum.CoreGuiType.All

View File

@ -677,7 +677,7 @@ function Chat:CreateGui()
New "ImageLabel" {
Name = "Background",
Image = "http://banland.xyz/asset/?id=97120937", --96551212';
Image = "http://banland.xyz/asset?id=97120937", --96551212';
Size = UDim2.new(1.3, 0, 1.64, 0),
Position = UDim2.new(0, 0, 0, 0),
BackgroundTransparency = 1,

View File

@ -1,3 +1,4 @@
--!strict
print "[Mercury]: Loaded Join corescript"
local InsertService = game:GetService "InsertService"
local ChangeHistoryService = game:GetService "ChangeHistoryService"
@ -194,7 +195,7 @@ local function onConnectionFailed(_, err)
end
-- called when the client connection is rejected
function onConnectionRejected()
local function onConnectionRejected()
connectionFailed:disconnect()
setMessage "This place is not available. Please try another"
end

View File

@ -1,9 +1,10 @@
--!strict
print "[Mercury]: Loaded Studio corescript"
local MarketplaceService = game:GetService "MarketplaceService"
-- local MarketplaceService = game:GetService "MarketplaceService"
local InsertService = game:GetService "InsertService"
local SocialService = game:GetService "SocialService"
local GamePassService = game:GetService "GamePassService"
-- local SocialService = game:GetService "SocialService"
-- local GamePassService = game:GetService "GamePassService"
local ScriptInformationProvider = game:GetService "ScriptInformationProvider"
local ScriptContext = game:GetService "ScriptContext"
-- Setup studio cmd bar & load core scripts
@ -18,37 +19,37 @@ 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:SetAssetUrl "http://banland.xyz/asset?id=%d"
InsertService:SetAssetVersionUrl "http://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"
end)
pcall(function()
SocialService:SetBestFriendUrl "http://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"
end)
pcall(function()
SocialService:SetGroupRankUrl "http://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"
end)
pcall(function()
GamePassService:SetPlayerHasPassUrl "http://banland.xyz/Game/GamePass/GamePassHandler.ashx?Action=HasPass&UserID=%d&PassID=%d"
end)
pcall(function()
MarketplaceService:SetProductInfoUrl "http://banland.xyz/marketplace/productinfo?assetId=%d"
end)
pcall(function()
MarketplaceService:SetDevProductInfoUrl "http://banland.xyz/marketplace/productDetails?productId=%d"
end)
pcall(function()
MarketplaceService:SetPlayerOwnsAssetUrl "http://banland.xyz/ownership/hasasset?userId=%d&assetId=%d"
end)
-- pcall(function()
-- SocialService:SetFriendUrl "http://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"
-- end)
-- pcall(function()
-- SocialService:SetGroupUrl "http://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"
-- end)
-- pcall(function()
-- SocialService:SetGroupRoleUrl "http://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"
-- end)
-- pcall(function()
-- MarketplaceService:SetProductInfoUrl "http://banland.xyz/marketplace/productinfo?assetId=%d"
-- end)
-- pcall(function()
-- MarketplaceService:SetDevProductInfoUrl "http://banland.xyz/marketplace/productDetails?productId=%d"
-- end)
-- pcall(function()
-- MarketplaceService:SetPlayerOwnsAssetUrl "http://banland.xyz/ownership/hasasset?userId=%d&assetId=%d"
-- end)
local result, _ = pcall(function()
ScriptContext:AddStarterScript(37801172)

View File

@ -37,7 +37,7 @@ 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:SetAssetUrl "http://banland.xyz/asset?id=%d"
InsertService:SetAssetVersionUrl "http://banland.xyz/Asset/?assetversionid=%d"
pcall(function()
@ -84,7 +84,7 @@ end)
workspace:SetPhysicsThrottleEnabled(true)
function doVisit()
local function doVisit()
message.Text = "Loading Game"
pcall(function()

View File

@ -71,7 +71,7 @@ local currentMaterial = 1
-- load our libraries
local RbxGui = LoadLibrary "RbxGui"
-- local RbxUtil = LoadLibrary "RbxUtility"
ContentProvider:Preload "http://banland.xyz/asset/?id=82741829"
ContentProvider:Preload "http://banland.xyz/asset?id=82741829"
------------------------- OBJECT DEFINITIONS ---------------------
@ -175,7 +175,7 @@ function MouseHighlighter.Create(mouseUse)
imageLabel.BackgroundTransparency = 1
imageLabel.Size = UDim2.new(1, 0, 1, 0)
imageLabel.Position = UDim2.new(-0.35, 0, -0.5, 0)
imageLabel.Image = "http://banland.xyz/asset/?id=82741829"
imageLabel.Image = "http://banland.xyz/asset?id=82741829"
imageLabel.Parent = billboardGui
local lastTweenChange
@ -617,7 +617,7 @@ function LoadProgressBar(text)
-8
)
spinnerImage.BackgroundTransparency = 1
spinnerImage.Image = "http://banland.xyz/asset/?id=45880710"
spinnerImage.Image = "http://banland.xyz/asset?id=45880710"
spinnerImage.Parent = spinnerFrame
spinnerIcons[spinnerNum] = spinnerImage
@ -633,10 +633,10 @@ function LoadProgressBar(text)
while pos < 8 do
if pos == spinPos or pos == ((spinPos + 1) % 8) then
spinnerIcons[pos + 1].Image =
"http://banland.xyz/asset/?id=45880668"
"http://banland.xyz/asset?id=45880668"
else
spinnerIcons[pos + 1].Image =
"http://banland.xyz/asset/?id=45880710"
"http://banland.xyz/asset?id=45880710"
end
pos = pos + 1