Regenerate Luau definitions file and derive site domain from ContentProvider.BaseUrl

This commit is contained in:
Lewin Kelly 2024-04-14 09:40:29 +01:00
parent f732e55073
commit 333fda23d1
33 changed files with 2087 additions and 2562 deletions

View File

@ -1,4 +1,7 @@
--!strict
local BaseUrl = require "../Modules/BaseUrl"
local path = BaseUrl.path
local Load = {}
function Load.Help()
@ -6,7 +9,7 @@ function Load.Help()
end
function Load.Start(ticket: string)
dofile("http://banland.xyz/game/host?ticket=" .. ticket)
dofile(path "game/host?ticket=" .. ticket)
end
return Load

View File

@ -1,2 +1,15 @@
--!strict
local ContentProvider = game:GetService "ContentProvider"
-- remove www
local url = string.gsub(ContentProvider.BaseUrl, "www.", "")
local BaseUrl = {
url = url,
}
function BaseUrl.path(path: string)
return url .. path
end
return BaseUrl

View File

@ -10,7 +10,7 @@ function TweenInfo.new(
repeatCount: number?,
reverses: boolean?,
delayTime: number?
)
): FakeTweenInfo
local proxy = newproxy(true)
local mt = getmetatable(proxy)
@ -92,7 +92,7 @@ function TweenInfo.new(
-- When attempting to assign to properties, throw an error
mt.__newindex = function(_, prop)
error(prop .. " cannot be assigned to", math.huge) -- lmfao
error(prop .. " cannot be assigned to", 99)
end
mt.__tostring = function()

3092
defs.d.lua

File diff suppressed because it is too large Load Diff

View File

@ -6,6 +6,8 @@ local News = require "../Modules/New"
local New = News.New
local Hydrate = News.Hydrate
local CoreGui = game:GetService "CoreGui"
local Chat = game:GetService "Chat"
local InsertService = game:GetService "InsertService"
local RunService = game:GetService "RunService"
@ -42,14 +44,13 @@ local player, chatNotificationGui, messageDialog, timeoutScript, reenableDialogS
local dialogMap = {}
local dialogConnections = {}
local gui
waitForChild(game, "CoreGui")
waitForChild(game.CoreGui, "RobloxGui")
if game.CoreGui.RobloxGui:FindFirstChild "ControlFrame" then
gui = game.CoreGui.RobloxGui.ControlFrame
else
gui = game.CoreGui.RobloxGui
end
waitForChild(CoreGui, "RobloxGui")
local MercuryGui = CoreGui:FindFirstChild "RobloxGui" :: ScreenGui & {
ControlFrame: Frame,
}
local gui = MercuryGui:FindFirstChild "ControlFrame" or MercuryGui
local function currentTone()
if currentConversationDialog then
@ -333,7 +334,7 @@ local function selectChoice(choice)
--First hide the Gui
mainFrame.Visible = false
if choice == lastChoice then
game.Chat:Chat(
Chat:Chat(
localPlayer.Character,
"Goodbye!",
getChatColor(currentTone())
@ -343,7 +344,7 @@ local function selectChoice(choice)
else
local dialogChoice = choiceMap[choice]
game.Chat:Chat(
Chat:Chat(
localPlayer.Character,
sanitiseMessage(dialogChoice.UserDialog),
getChatColor(currentTone())
@ -353,7 +354,7 @@ local function selectChoice(choice)
player,
dialogChoice
)
game.Chat:Chat(
Chat:Chat(
currentConversationPartner,
sanitiseMessage(dialogChoice.ResponseDialog),
getChatColor(currentTone())
@ -447,8 +448,8 @@ local function initialize(parent)
lastChoice.Parent = mainFrame
end
local function doDialog(dialog)
local il = Instance.Lock(dialog, player)
local function doDialog(dialog: Dialog)
local il = Instance.Lock(dialog, player) -- does this even do anything in 2013
print("for instance", il)
while not il do
RunService.Heartbeat:wait()
@ -467,7 +468,7 @@ local function doDialog(dialog)
Instance.Unlock(dialog)
currentConversationDialog = dialog
game.Chat:Chat(
Chat:Chat(
dialog.Parent,
dialog.InitialPrompt,
getChatColor(dialog.Tone)
@ -534,7 +535,7 @@ local function addDialog(dialog: Dialog)
Enabled = not dialog.InUse,
Adornee = dialog.Parent,
RobloxLocked = true,
Parent = game.CoreGui,
Parent = CoreGui,
}
chatGui.Image.Button.MouseButton1Click:connect(function()
startDialog(dialog)

View File

@ -2,14 +2,16 @@
-- RbxGui
print "[Mercury]: Loaded corescript 45284430"
local News = require "../Modules/New"
local New = News.New
local Hydrate = News.Hydrate
local ContentProvider = game:GetService "ContentProvider"
local InsertService = game:GetService "InsertService"
local RunService = game:GetService "RunService"
local News = require "../Modules/New"
local New = News.New
local Hydrate = News.Hydrate
local BaseUrl = require "../Modules/BaseUrl"
local path = BaseUrl.path
local RbxGui = {}
local function ScopedConnect(
@ -230,13 +232,13 @@ function RbxGui.CreateStyledMessageDialog(title, message, style, buttons)
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 = path "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 = path "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 = path "asset?id=42557901"
else
return RbxGui.CreateMessageDialog(title, message, buttons)
end
@ -280,7 +282,7 @@ function RbxGui.CreateDropDownMenu(
New "ImageLabel" {
Name = "Icon",
Active = false,
Image = "http://banland.xyz/asset?id=45732894",
Image = path "asset?id=45732894",
BackgroundTransparency = 1,
Size = UDim2.new(0, 11, 0, 6),
Position = UDim2.new(1, -11, 0.5, -2),
@ -944,8 +946,8 @@ function RbxGui.CreateSlider(steps: number, width: number, position)
end
function RbxGui.CreateTrueScrollingFrame()
local lowY
local highY
local lowY: number?
local highY: number?
local dragCon: RBXScriptConnection?
local upCon: RBXScriptConnection?
@ -1575,7 +1577,7 @@ function RbxGui.CreateScrollingFrame(orderList: { GuiObject }?, scrollStyle)
local scrollStamp = 0
local scrollDrag = New "ImageButton" {
Image = "http://banland.xyz/asset?id=61367186",
Image = path "asset?id=61367186",
Size = UDim2.new(1, 0, 0, 16),
BackgroundTransparency = 1,
Name = "ScrollDrag",
@ -3014,7 +3016,7 @@ function RbxGui.CreateSetPanel(
New "ImageLabel" {
Name = "CancelImage",
BackgroundTransparency = 1,
Image = "http://banland.xyz/asset?id=54135717",
Image = path "asset?id=54135717",
Position = UDim2.new(0, -2, 0, -2),
Size = UDim2.new(0, 16, 0, 16),
ZIndex = 6,
@ -3254,7 +3256,7 @@ function RbxGui.CreateSetPanel(
local function createDropDownMenuButton(parent: Frame)
local dropDownButton = New "ImageButton" {
Name = "DropDownButton",
Image = "http://banland.xyz/asset?id=67581509",
Image = path "asset?id=67581509",
BackgroundTransparency = 1,
Size = UDim2.new(0, 16, 0, 16),
Position = UDim2.new(1, -24, 0, 6),
@ -3767,8 +3769,9 @@ function RbxGui.CreateTerrainMaterialSelector(size, position)
toAdd = 66887593
end
materialToImageMap[v] =
{ Regular = `http://banland.xyz/asset?id={toAdd}` }
materialToImageMap[v] = {
Regular = path "asset?id=" .. toAdd,
}
end
local scrollFrame, scrollUp, scrollDown, recalculateScroll =
@ -3879,7 +3882,7 @@ function RbxGui.CreateTerrainMaterialSelector(size, position)
end
function RbxGui.CreateLoadingFrame(name, size, position)
ContentProvider:Preload "http://banland.xyz/asset?id=35238053"
ContentProvider:Preload(path "asset?id=35238053")
local loadingFrame = New "Frame" {
Name = "LoadingFrame",
@ -3911,7 +3914,7 @@ function RbxGui.CreateLoadingFrame(name, size, position)
local loadingGreenBar = New "ImageLabel" {
Name = "LoadingGreenBar",
Image = "http://banland.xyz/asset?id=35238053",
Image = path "asset?id=35238053",
Position = UDim2.new(0, 0, 0, 0),
Size = UDim2.new(0, 0, 1, 0),
Visible = false,

View File

@ -2,20 +2,20 @@
-- CoreGui.RobloxGui.CoreScripts/Settings
print "[Mercury]: Loaded corescript 46295863"
local GuiService = game:GetService "GuiService"
local Players = game:GetService "Players"
local News = require "../Modules/New"
local New = News.New
local Hydrate = News.Hydrate
local CoreGui = game:GetService "CoreGui"
local GuiService = game:GetService "GuiService"
local Players = game:GetService "Players"
local BaseUrl = require "../Modules/BaseUrl"
local path = BaseUrl.path
local function waitForChild(instance, name)
while not instance:FindFirstChild(name) do
instance.ChildAdded:wait()
end
end
local function waitForProperty(instance, property)
while not instance[property] do
instance.Changed:wait()
@ -23,16 +23,16 @@ local function waitForProperty(instance, property)
end
-- A Few Script Globals
local mercuryGui = script.Parent :: ScreenGui & { ControlFrame: Frame }
local gui = mercuryGui:FindFirstChild "ControlFrame" and mercuryGui.ControlFrame
or mercuryGui
local MercuryGui = script.Parent :: ScreenGui & { ControlFrame: Frame }
local gui = MercuryGui:FindFirstChild "ControlFrame" and MercuryGui.ControlFrame
or MercuryGui
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 = path "asset?id=54071825"
local classicLookScreenUrl = path "asset?id=45915798"
local hasGraphicsSlider = true
local GraphicsQualityLevels = 10 -- how many levels we allow on graphics slider
@ -51,7 +51,7 @@ local inStudioMode = UserSettings().GameSettings:InStudioMode()
local macClient = false
local ok, isMac = pcall(function()
return not game.GuiService.IsWindows
return not GuiService.IsWindows
end)
macClient = ok and isMac
@ -83,9 +83,9 @@ local function resumeGameFunction(shield)
shield.Visible = false
for i = 1, #centerDialogs do
centerDialogs[i].Visible = false
game.GuiService:RemoveCenterDialog(centerDialogs[i])
GuiService:RemoveCenterDialog(centerDialogs[i])
end
game.GuiService:RemoveCenterDialog(shield)
GuiService:RemoveCenterDialog(shield)
settingsButton.Active = true
currentMenuSelection = nil
lastMenuSelection = {}
@ -182,7 +182,7 @@ local function goToMenu(container, menuName, moveDirection, size, position)
end
local function resetLocalCharacter()
local player = game.Players.LocalPlayer
local player = Players.LocalPlayer
if player and player.Character then
local humanoid = (player.Character:FindFirstChild "Humanoid") :: Humanoid
if humanoid then
@ -298,11 +298,11 @@ local function backToGame(buttonClicked, shield, settingsButton2)
buttonClicked.Parent.Parent.Parent.Parent.Visible = false
shield.Visible = false
for i = 1, #centerDialogs do
game.GuiService:RemoveCenterDialog(centerDialogs[i])
GuiService:RemoveCenterDialog(centerDialogs[i])
centerDialogs[i].Visible = false
end
centerDialogs = {}
game.GuiService:RemoveCenterDialog(shield)
GuiService:RemoveCenterDialog(shield)
settingsButton2.Active = true
end
@ -417,19 +417,19 @@ local function createHelpDialog(baseZIndex)
{
Text = "Move",
Function = function()
image.Image = "http://banland.xyz/asset?id=45915811"
image.Image = path "asset?id=45915811"
end,
},
{
Text = "Gear",
Function = function()
image.Image = "http://banland.xyz/asset?id=45917596"
image.Image = path "asset?id=45917596"
end,
},
{
Text = "Zoom",
Function = function()
image.Image = "http://banland.xyz/asset?id=45915825"
image.Image = path "asset?id=45915825"
end,
},
}, UDim.new(0, 0), UDim.new(1, 0))
@ -481,7 +481,7 @@ local function createHelpDialog(baseZIndex)
Parent = helpDialog,
}).MouseButton1Click:connect(function()
shield.Visible = false
game.GuiService:RemoveCenterDialog(shield)
GuiService:RemoveCenterDialog(shield)
end)
robloxLock(shield)
@ -695,7 +695,7 @@ local function createGameMainMenu(baseZIndex, shield)
helpButton.MouseButton1Click:connect(function()
table.insert(centerDialogs, helpDialog)
game.GuiService:AddCenterDialog(
GuiService:AddCenterDialog(
helpDialog,
Enum.CenterDialogType.ModalDialog,
--ShowFunction
@ -843,9 +843,9 @@ local function createGameMainMenu(baseZIndex, shield)
gameSettingsButton.ZIndex = baseZIndex + 4
gameSettingsButton.Parent = gameMainMenuFrame
gameSettingsButton.MouseButton1Click:connect(function()
if game:FindFirstChild "Players" and game.Players.LocalPlayer then
if game:FindFirstChild "Players" and Players.LocalPlayer then
local loadingGui =
game.Players.LocalPlayer:FindFirstChild "PlayerLoadingGui"
Players.LocalPlayer:FindFirstChild "PlayerLoadingGui"
if loadingGui then
loadingGui.Visible = true
end
@ -872,7 +872,7 @@ end
local mouseLockLabel, syncVideoCaptureSetting
local function createGameSettingsMenu(baseZIndex, _)
local function createGameSettingsMenu(baseZIndex: number)
local function fullscreenShortcut()
return New "TextLabel" {
BackgroundTransparency = 1,
@ -1022,7 +1022,7 @@ local function createGameSettingsMenu(baseZIndex, _)
Parent = gameSettingsMenuFrame,
}
local graphicsSlider, graphicsLevel = RbxGui.CreateSlider(
local graphicsSlider, graphicsLevel: NumberValue = RbxGui.CreateSlider(
GraphicsQualityLevels,
150,
UDim2.new(0, 230, 0, 280)
@ -1098,7 +1098,7 @@ local function createGameSettingsMenu(baseZIndex, _)
settings().Rendering.QualityLevel = Enum.QualityLevel.Automatic
end
local function setGraphicsQualityLevel(newLevel)
local function setGraphicsQualityLevel(newLevel: number)
local percentage = newLevel / GraphicsQualityLevels
local newSetting = math.floor(
(settings().Rendering:GetMaxQualityLevel() - 1) * percentage
@ -1115,19 +1115,16 @@ local function createGameSettingsMenu(baseZIndex, _)
settings().Rendering.QualityLevel = newSetting
end
local function goToManualGraphics(explicitLevel)
local function goToManualGraphics(explicitLevel: number?)
setAutoGraphicsGui(false)
if explicitLevel then
graphicsLevel.Value = explicitLevel
else
graphicsLevel.Value = math.floor(
graphicsLevel.Value = explicitLevel
or math.floor(
(
settings().Rendering.AutoFRMLevel
/ (settings().Rendering:GetMaxQualityLevel() - 1)
) * GraphicsQualityLevels
)
end
if explicitLevel == graphicsLevel.Value then -- make sure we are actually in right graphics mode
setGraphicsQualityLevel(graphicsLevel.Value)
@ -1279,7 +1276,7 @@ local function createGameSettingsMenu(baseZIndex, _)
end
autoGraphicsButton.MouseButton1Click:connect(function()
if inStudioMode and not game.Players.LocalPlayer then
if inStudioMode and not Players.LocalPlayer then
return
elseif not isAutoGraphics then
goToAutoGraphics()
@ -1324,13 +1321,13 @@ local function createGameSettingsMenu(baseZIndex, _)
end
end)
game.Players.PlayerAdded:connect(function(player)
if player == game.Players.LocalPlayer and inStudioMode then
Players.PlayerAdded:connect(function(player)
if player == Players.LocalPlayer and inStudioMode then
enableGraphicsWidget()
end
end)
game.Players.PlayerRemoving:connect(function(player)
if player == game.Players.LocalPlayer and inStudioMode then
Players.PlayerRemoving:connect(function(player)
if player == Players.LocalPlayer and inStudioMode then
disableGraphicsWidget()
end
end)
@ -1354,7 +1351,7 @@ local function createGameSettingsMenu(baseZIndex, _)
local wasManualGraphics = (
settings().Rendering.QualityLevel ~= Enum.QualityLevel.Automatic
)
if inStudioMode and not game.Players.LocalPlayer then
if inStudioMode and not Players.LocalPlayer then
studioCheckbox.Text = "X"
disableGraphicsWidget()
elseif inStudioMode then
@ -1510,12 +1507,12 @@ local function createGameSettingsMenu(baseZIndex, _)
updateVideoCaptureDropDownSelection(videoNames[1])
elseif
UserSettings().GameSettings.VideoUploadPromptBehavior
== Enum.UploadSetting["Ask me first"]
== Enum.UploadSetting.Ask
then
updateVideoCaptureDropDownSelection(videoNames[2])
else
UserSettings().GameSettings.VideoUploadPromptBehavior =
Enum.UploadSetting["Ask me first"]
Enum.UploadSetting.Ask
updateVideoCaptureDropDownSelection(videoNames[2])
end
end
@ -1535,7 +1532,7 @@ local function createGameSettingsMenu(baseZIndex, _)
Parent = gameSettingsMenuFrame,
}
mouseLockLabel = CoreGui.RobloxGui:FindFirstChild("MouseLockLabel", true)
mouseLockLabel = MercuryGui:FindFirstChild("MouseLockLabel", true)
local enumItems = Enum.ControlMode:GetEnumItems()
local enumNames = {}
@ -1662,7 +1659,7 @@ if UserSettings then
end)
end
CoreGui.RobloxGui.Changed:connect(
MercuryGui.Changed:connect(
function(prop) -- We have stopped recording when we resize
if prop == "AbsoluteSize" and recordingVideo then
recordVideoClick(
@ -1674,24 +1671,24 @@ if UserSettings then
)
local function localPlayerChange()
gameMainMenu.ResetButton.Visible = game.Players.LocalPlayer
if game.Players.LocalPlayer then
gameMainMenu.ResetButton.Visible = Players.LocalPlayer
if Players.LocalPlayer then
settings().Rendering.EnableFRM = true
elseif inStudioMode then
settings().Rendering.EnableFRM = false
end
end
gameMainMenu.ResetButton.Visible = game.Players.LocalPlayer
if game.Players.LocalPlayer ~= nil then
game.Players.LocalPlayer.Changed:connect(function()
gameMainMenu.ResetButton.Visible = Players.LocalPlayer
if Players.LocalPlayer ~= nil then
Players.LocalPlayer.Changed:connect(function()
localPlayerChange()
end)
else
delay(0, function()
waitForProperty(game.Players, "LocalPlayer")
gameMainMenu.ResetButton.Visible = game.Players.LocalPlayer
game.Players.LocalPlayer.Changed:connect(function()
waitForProperty(Players, "LocalPlayer")
gameMainMenu.ResetButton.Visible = Players.LocalPlayer
Players.LocalPlayer.Changed:connect(function()
localPlayerChange()
end)
end)
@ -1806,7 +1803,7 @@ if UserSettings then
hotkeysConn = GuiService.KeyPressed:connect(leaveResetHotkeys)
end)
if currentMenuSelection == nil then
game.GuiService:AddCenterDialog(
GuiService:AddCenterDialog(
shield,
Enum.CenterDialogType.ModalDialog,
showFunction,
@ -1815,7 +1812,7 @@ if UserSettings then
elseif #lastMenuSelection > 0 then
if #centerDialogs > 0 then
for i = 1, #centerDialogs do
game.GuiService:RemoveCenterDialog(centerDialogs[i])
GuiService:RemoveCenterDialog(centerDialogs[i])
centerDialogs[i].Visible = false
end
centerDialogs = {}
@ -1872,7 +1869,7 @@ if UserSettings then
robloxLock(shield)
settingsButton.MouseButton1Click:connect(function()
game.GuiService:AddCenterDialog(
GuiService:AddCenterDialog(
shield,
Enum.CenterDialogType.ModalDialog,
--showFunction
@ -2091,7 +2088,7 @@ local function createSaveDialogs()
-8
),
BackgroundTransparency = 1,
Image = "http://banland.xyz/asset?id=45880710",
Image = path "asset?id=45880710",
Parent = spinnerFrame,
}
)
@ -2110,13 +2107,11 @@ local function createSaveDialogs()
local pos = 0
while pos < 8 do
if pos == spinPos or pos == ((spinPos + 1) % 8) then
spinnerIcons[pos + 1].Image =
"http://banland.xyz/asset?id=45880668"
else
spinnerIcons[pos + 1].Image =
"http://banland.xyz/asset?id=45880710"
end
spinnerIcons[pos + 1].Image = (
pos == spinPos or pos == ((spinPos + 1) % 8)
)
and path "asset?id=45880668"
or path "asset?id=45880710"
pos += 1
end
@ -2171,7 +2166,7 @@ local function createSaveDialogs()
errorDialogMessageBox.Visible = false
spinnerDialog.Visible = false
shield.Visible = false
game.GuiService:RemoveCenterDialog(shield)
GuiService:RemoveCenterDialog(shield)
end
robloxLock(shield)
@ -2184,8 +2179,8 @@ local function createReportAbuseDialog()
waitForChild(game, "NetworkClient")
waitForChild(game, "Players")
waitForProperty(game.Players, "LocalPlayer")
local localPlayer = game.Players.LocalPlayer
waitForProperty(Players, "LocalPlayer")
local localPlayer = Players.LocalPlayer
local reportAbuseButton
waitForChild(gui, "UserSettingsShield")
@ -2448,7 +2443,7 @@ local function createReportAbuseDialog()
if submitReportButton.Active then
if abuse and abusingPlayer then
frame.Visible = false
game.Players:ReportAbuse(
Players:ReportAbuse(
abusingPlayer,
abuse,
shortDescriptionBox.Text
@ -2499,7 +2494,7 @@ local function createReportAbuseDialog()
normalMessageBox.Visible = false
shield.Visible = false
reportAbuseButton.Active = true
game.GuiService:RemoveCenterDialog(shield)
GuiService:RemoveCenterDialog(shield)
end
cancelButton.MouseButton1Click:connect(closeAndResetDialog)
@ -2507,7 +2502,7 @@ local function createReportAbuseDialog()
reportAbuseButton.MouseButton1Click:connect(function()
createPlayersDropDown().Parent = reportAbuseFrame
table.insert(centerDialogs, shield)
game.GuiService:AddCenterDialog(
GuiService:AddCenterDialog(
shield,
Enum.CenterDialogType.ModalDialog,
--ShowFunction
@ -2539,7 +2534,7 @@ if isSaveDialogSupported then
function game.RequestShutdown()
table.insert(centerDialogs, saveDialogs)
game.GuiService:AddCenterDialog(
GuiService:AddCenterDialog(
saveDialogs,
Enum.CenterDialogType.QuitDialog,
--ShowFunction

View File

@ -2,12 +2,21 @@
-- CoreGui.RobloxGui.CoreScripts/PlayerListScript
print "[Mercury]: Loaded corescript 48488235"
local ContentProvider = game:GetService "ContentProvider"
local GuiService = game:GetService "GuiService"
local PersonalServerService =
game:GetService "PersonalServerService" :: PersonalServerService
local Players = game:GetService "Players"
local RunService = game:GetService "RunService"
local StarterGui = game:GetService "StarterGui"
local Teams = game:GetService "Teams"
local News = require "../Modules/New"
local New = News.New
local Hydrate = News.Hydrate
local log = require "../Modules/Logger"
local BaseUrl = require "../Modules/BaseUrl"
local path = BaseUrl.path
--------------------
-- Super Util
@ -16,9 +25,7 @@ local log = require "../Modules/Logger"
local ADMINS = {
taskmanager = 1,
heliodex = 1,
multako = "http://banland.xyz/asset?id=6923328292",
mercury = 1,
pizzaboxer = "http://banland.xyz/asset?id=6917566633",
}
local Images = {
@ -75,7 +82,7 @@ end
local function getMembershipTypeIcon(membershipType, playerName)
if ADMINS[string.lower(playerName)] ~= nil then
if ADMINS[string.lower(playerName)] == 1 then
return "http://banland.xyz/asset?id=6923330951"
return path "asset?id=6923330951"
end
return ADMINS[string.lower(playerName)]
elseif membershipType == Enum.MembershipType.None then
@ -86,9 +93,8 @@ local function getMembershipTypeIcon(membershipType, playerName)
return "rbxasset://textures/ui/TinyTbcIcon.png"
elseif membershipType == Enum.MembershipType.OutrageousBuildersClub then
return "rbxasset://textures/ui/TinyObcIcon.png"
else
error("Unknown membershipType " .. membershipType)
end
error("Unknown membershipType " .. membershipType)
end
local function getFriendStatusIcon(friendStatus)
@ -98,25 +104,15 @@ local function getFriendStatusIcon(friendStatus)
then
return ""
elseif friendStatus == Enum.FriendStatus.Friend then
return "http://banland.xyz/asset?id=99749771"
return path "asset?id=99749771"
elseif friendStatus == Enum.FriendStatus.FriendRequestSent then
return "http://banland.xyz/asset?id=99776888"
return path "asset?id=99776888"
elseif friendStatus == Enum.FriendStatus.FriendRequestReceived then
return "http://banland.xyz/asset?id=99776838"
else
error("Unknown FriendStatus " .. friendStatus)
return path "asset?id=99776838"
end
error("Unknown FriendStatus " .. friendStatus)
end
---------------------------
-- Workspace Objects
---------------------------
-- might want to move all this to an init function, wait for localplayer elsewhere
local ContentProvider = game:GetService "ContentProvider"
local PersonalServerService = game:GetService "PersonalServerService"
local Players = game:GetService "Players"
-- make sure this doesn't run on the server(it will if you dont do this)
while not Players.LocalPlayer do
Players.Changed:wait()
@ -156,7 +152,7 @@ local HeaderFrame = New "Frame" {
Position = UDim2.new(0, 0, 0, 0),
Size = UDim2.new(1, 0, 0.07, 0),
Parent = MainFrame,
MakeBackgroundGuiObj "http://banland.xyz/asset?id=94692054",
MakeBackgroundGuiObj(path "asset?id=94692054"),
}
local HeaderFrameHeight = HeaderFrame.Size.Y.Scale
local MaximizeButton = New "ImageButton" {
@ -213,7 +209,7 @@ local BottomFrame = New "Frame" {
Position = UDim2.new(0, 0, 0.07, 0),
Size = UDim2.new(1, 0, 0.03, 0),
Parent = BottomShiftFrame,
MakeBackgroundGuiObj "http://banland.xyz/asset?id=94754966",
MakeBackgroundGuiObj(path "asset?id=94754966"),
}
local ExtendButton = New "ImageButton" {
Name = "bigbutton",
@ -228,7 +224,7 @@ local ExtendTab = New "ImageButton" {
Name = "extendTab",
Active = true,
BackgroundTransparency = 1,
Image = "http://banland.xyz/asset?id=94692731",
Image = path "asset?id=94692731",
Position = UDim2.new(0.608, 0, 0.3, 0),
Size = UDim2.new(0.3, 0, 0.7, 0),
Parent = BottomFrame,
@ -386,7 +382,7 @@ local MiddleBGTemplate = New "Frame" {
BackgroundTransparency = 1,
Position = UDim2.new(100, 0, 0.07, 0),
Size = UDim2.new(0.5, 0, 0.025, 0), --UDim2.new(1, 0, .03, 0),
MakeBackgroundGuiObj "http://banland.xyz/asset?id=94692025",
MakeBackgroundGuiObj(path "asset?id=94692025"),
}
-- REPORT ABUSE OBJECTS
@ -417,7 +413,7 @@ local AbuseSettingsFrame = New "Frame" {
Size = UDim2.new(1, 0, 1, 0),
Active = true,
BackgroundTransparency = 1,
MakeBackgroundGuiObj "http://banland.xyz/asset?id=96488767", -- 96480351",
MakeBackgroundGuiObj(path "asset?id=96488767"), -- 96480351",
New "TextLabel" {
Name = "Title",
Text = "Report Abuse",
@ -496,7 +492,7 @@ local SubmitReportButton = New "ImageButton" {
Position = UDim2.new(0.5, -200, 1, -80),
Size = UDim2.new(0, 150, 0, 50),
AutoButtonColor = false,
Image = "http://banland.xyz/asset?id=96502438", -- 96501119',
Image = path "asset?id=96502438", -- 96501119',
Parent = AbuseSettingsFrame,
}
@ -506,7 +502,7 @@ local CancelReportButton = New "ImageButton" {
Position = UDim2.new(0.5, 50, 1, -80),
Size = UDim2.new(0, 150, 0, 50),
AutoButtonColor = true,
Image = "http://banland.xyz/asset?id=96500683",
Image = path "asset?id=96500683",
Parent = AbuseSettingsFrame,
}
@ -542,7 +538,7 @@ local CalmingAbuseBox = New "Frame" {
BackgroundTransparency = 1,
Position = UDim2.new(0.25, 0, 0.300000012, 0),
Size = UDim2.new(0.5, 0, 0.370000005, 0),
MakeBackgroundGuiObj "http://banland.xyz/asset?id=96506233",
MakeBackgroundGuiObj(path "asset?id=96506233"),
New "TextLabel" {
Name = "Header",
Position = UDim2.new(0, 10, 0.05, 0),
@ -575,7 +571,7 @@ local CalmingAbuseBox = New "Frame" {
Position = UDim2.new(0.5, -75, 1, -80),
Size = UDim2.new(0, 150, 0, 50),
AutoButtonColor = true,
Image = "http://banland.xyz/asset?id=96507959",
Image = path "asset?id=96507959",
},
}
local NormalAbuseBox = New "Frame" {
@ -583,7 +579,7 @@ local NormalAbuseBox = New "Frame" {
BackgroundTransparency = 1,
Position = UDim2.new(0.25, 0, 0.300000012, 0),
Size = UDim2.new(0.5, 0, 0.370000005, 0),
MakeBackgroundGuiObj "http://banland.xyz/asset?id=96506233",
MakeBackgroundGuiObj(path "asset?id=96506233"),
New "TextLabel" {
Name = "Header",
Position = UDim2.new(0, 10, 0.05, 0),
@ -616,7 +612,7 @@ local NormalAbuseBox = New "Frame" {
Position = UDim2.new(0.5, -75, 1, -80),
Size = UDim2.new(0, 150, 0, 50),
AutoButtonColor = true,
Image = "http://banland.xyz/asset?id=96507959",
Image = path "asset?id=96507959",
},
}
@ -653,7 +649,7 @@ local RbxGui = assert(LoadLibrary "RbxGui")
local DefaultEntriesOnScreen = 8
for _, i in pairs(Images) do
ContentProvider:Preload("http://banland.xyz/asset?id=" .. i)
ContentProvider:Preload(path "asset?id=" .. i)
end
-- ordered array of 'score data', each entry has:
@ -893,7 +889,7 @@ end
player player to change rank of
nrank new integer rank to give player
--]]
local function SetPrivilegeRank(player, nrank: number)
local function SetPrivilegeRank(player: Player, nrank: number)
while player.PersonalServerRank < nrank do
PersonalServerService:Promote(player)
end
@ -914,25 +910,20 @@ local function HighlightMyRank(
MemberButton,
AdminButton
)
BanPlayerButton.Image = "http://banland.xyz/asset?id="
.. Images.LightPopupMid
VisitorButton.Image = "http://banland.xyz/asset?id=" .. Images.DarkPopupMid
MemberButton.Image = "http://banland.xyz/asset?id=" .. Images.LightPopupMid
AdminButton.Image = "http://banland.xyz/asset?id=" .. Images.DarkPopupBottom
BanPlayerButton.Image = path "asset?id=" .. Images.LightPopupMid
VisitorButton.Image = path "asset?id=" .. Images.DarkPopupMid
MemberButton.Image = path "asset?id=" .. Images.LightPopupMid
AdminButton.Image = path "asset?id=" .. Images.DarkPopupBottom
local rank = player.PersonalServerRank
if rank <= PrivilegeLevel.Banned then
BanPlayerButton.Image =
`http://banland.xyz/asset?id={Images.LightBluePopupMid}`
BanPlayerButton.Image = path "asset?id=" .. Images.LightBluePopupMid
elseif rank <= PrivilegeLevel.Visitor then
VisitorButton.Image =
`http://banland.xyz/asset?id={Images.DarkBluePopupMid}`
VisitorButton.Image = path "asset?id=" .. Images.DarkBluePopupMid
elseif rank <= PrivilegeLevel.Member then
MemberButton.Image =
`http://banland.xyz/asset?id={Images.LightBluePopupMid}`
MemberButton.Image = path "asset?id=" .. Images.LightBluePopupMid
elseif rank <= PrivilegeLevel.Admin then
AdminButton.Image =
`http://banland.xyz/asset?id={Images.DarkBluePopupBottom}`
AdminButton.Image = path "asset?id=" .. Images.DarkBluePopupBottom
end
end
@ -971,7 +962,7 @@ end
local function CloseAbuseDialog()
AbuseName = nil
SubmitReportButton.Active = false
SubmitReportButton.Image = "http://banland.xyz/asset?id=96502438" -- 96501119",
SubmitReportButton.Image = path "asset?id=96502438" -- 96501119",
AbuseDescriptionBox:Destroy()
CalmingAbuseBox.Parent = nil
NormalAbuseBox.Parent = nil
@ -986,7 +977,7 @@ local function OnSubmitAbuse()
if SubmitReportButton.Active then
if AbuseName and SelectedPlayer then
AbuseSettingsFrame.Visible = false
game.Players:ReportAbuse(
Players:ReportAbuse(
SelectedPlayer,
AbuseName,
AbuseDescriptionBox.Text
@ -1053,7 +1044,7 @@ local function InitReportAbuse()
AbuseName = abuseText
if AbuseName and SelectedPlayer then
SubmitReportButton.Active = true
SubmitReportButton.Image = "http://banland.xyz/asset?id=96501119"
SubmitReportButton.Image = path "asset?id=96501119"
end
end
@ -1082,11 +1073,11 @@ end
@Return: enum of friend status
--]]
local function GetFriendStatus(player: Player)
if player == game.Players.LocalPlayer then
if player == Players.LocalPlayer then
return Enum.FriendStatus.NotFriend
end
local ok, result = pcall(function()
return game.Players.LocalPlayer:GetFriendStatus(player)
return Players.LocalPlayer:GetFriendStatus(player)
end)
if ok then
return result
@ -1352,17 +1343,13 @@ local function UpdateMaximize()
BASE_TWEEN * 1.2,
true
)
HeaderFrame.Background.Image = "http://banland.xyz/asset?id="
.. Images.LargeHeader
BottomFrame.Background.Image = "http://banland.xyz/asset?id="
.. Images.LargeBottom
HeaderFrame.Background.Image = path "asset?id=" .. Images.LargeHeader
BottomFrame.Background.Image = path "asset?id=" .. Images.LargeBottom
for index, i in ipairs(MiddleFrameBackgrounds) do
if (index % 2) ~= 1 then
i.Background.Image = "http://banland.xyz/asset?id="
.. Images.LargeDark
i.Background.Image = path "asset?id=" .. Images.LargeDark
else
i.Background.Image = "http://banland.xyz/asset?id="
.. Images.LargeLight
i.Background.Image = path "asset?id=" .. Images.LargeLight
end
end
for _, i in ipairs(MiddleFrames) do
@ -1422,17 +1409,13 @@ local function UpdateMaximize()
BASE_TWEEN * 1.2,
true
)
HeaderFrame.Background.Image = "http://banland.xyz/asset?id="
.. Images.NormalHeader
BottomFrame.Background.Image = "http://banland.xyz/asset?id="
.. Images.NormalBottom
HeaderFrame.Background.Image = path "asset?id=" .. Images.NormalHeader
BottomFrame.Background.Image = path "asset?id=" .. Images.NormalBottom
for index, i in ipairs(MiddleFrameBackgrounds) do
if index % 2 ~= 1 then
i.Background.Image = "http://banland.xyz/asset?id="
.. Images.midDark
i.Background.Image = path "asset?id=" .. Images.midDark
else
i.Background.Image = "http://banland.xyz/asset?id="
.. Images.midLight
i.Background.Image = path "asset?id=" .. Images.midLight
end
end
for _, i in ipairs(MiddleFrames) do
@ -1474,6 +1457,12 @@ local function UpdateMaximize()
end
end
type ValueBase = {
Value: any,
ConstrainedValue: number,
IsA: (self: ValueBase, name: string) -> boolean,
}
local function GetScoreValue(score: ValueBase): number
if
score:IsA "DoubleConstrainedValue" or score:IsA "IntConstrainedValue"
@ -1601,17 +1590,21 @@ local function AddTeamScores(team)
UpdateMinimize()
end
type SortableTeam = {
TeamScore: number,
ID: number,
MyPlayers: { any },
}
--[[
uses lua's table.sort to sort the teams
--]]
local function TeamSortFunc(a, b)
local function TeamSortFunc(a: SortableTeam, b: SortableTeam)
if a.TeamScore == b.TeamScore then
return a.ID < b.ID
end
if not a.TeamScore then
elseif not a.TeamScore then
return false
end
if not b.TeamScore then
elseif not b.TeamScore then
return true
end
return a.TeamScore < b.TeamScore
@ -1896,7 +1889,7 @@ function UpdateMinimize()
true
)
FocusFrame.Size = UDim2.new(1, 0, HeaderFrameHeight, 0)
ExtendTab.Image = "http://banland.xyz/asset?id=94692731"
ExtendTab.Image = path "asset?id=94692731"
else
if not IsMaximized.Value then
MainFrame:TweenSizeAndPosition(
@ -1921,7 +1914,7 @@ function UpdateMinimize()
)
BottomFrame.Position = UDim2.new(0, 0, bottomPositon, 0)
FocusFrame.Size = UDim2.new(1, 0, bottomPositon + HeaderFrameHeight, 0)
ExtendTab.Image = "http://banland.xyz/asset?id=94825585"
ExtendTab.Image = path "asset?id=94825585"
end
end
@ -2066,7 +2059,7 @@ local function StatAdded(nchild, playerEntry)
end
--returns whether any of the existing players has this stat
local function DoesStatExist(statName, exception)
local function DoesStatExist(statName, exception: Player)
for _, playerf in pairs(PlayerFrames) do
if
playerf.Player ~= exception
@ -2216,14 +2209,14 @@ local function MakePopupButton(nparent, ntext, index, last: boolean?)
Parent = nparent,
}
if index == 0 then
tobj.Image = "http://banland.xyz/asset?id=97108784"
tobj.Image = path "asset?id=97108784"
elseif last then
tobj.Image = index % 2 == 1
and "http://banland.xyz/asset?id=" .. Images.LightPopupBottom
or "http://banland.xyz/asset?id=" .. Images.DarkPopupBottom
and path "asset?id=" .. Images.LightPopupBottom
or path "asset?id=" .. Images.DarkPopupBottom
else
tobj.Image = index % 2 == 1 and "http://banland.xyz/asset?id=97112126"
or "http://banland.xyz/asset?id=97109338"
tobj.Image = index % 2 == 1 and path "asset?id=97112126"
or path "asset?id=97109338"
end
return tobj
end
@ -2555,7 +2548,7 @@ local function AddMiddleBGFrame()
UDim2.new(0.5, 0, (#MiddleFrameBackgrounds * nBGFrame.Size.Y.Scale), 0)
local function applyImage(id: string)
nBGFrame.Background.Image = "http://banland.xyz/asset?id=" .. id
nBGFrame.Background.Image = path "asset?id=" .. id
end
if (#MiddleFrameBackgrounds + 1) % 2 ~= 1 then
@ -2800,7 +2793,7 @@ local function SetPlayerToTeam(entry)
end
end
-- if player was set to an invalid team, then set it back to neutral
if not setToTeam and #(game.Teams:GetTeams()) > 0 then
if not setToTeam and #Teams:GetTeams() > 0 then
log(`{entry.Player.Name} could not find team`)
entry.MyTeam = nil
if not NeutralTeam then
@ -2827,7 +2820,7 @@ local function PlayerChanged(entry, property)
PlayerChangedLock = true
if property == "Neutral" then
-- if player changing to neutral
if entry.Player.Neutral and #(game.Teams:GetTeams()) > 0 then
if entry.Player.Neutral and #(Teams:GetTeams()) > 0 then
log(entry.Player.Name .. " setting to neutral")
FindRemovePlayerFromTeam(entry)
entry.MyTeam = nil
@ -2838,7 +2831,7 @@ local function PlayerChanged(entry, property)
log(entry.Player.Name .. " adding to neutral team")
AddPlayerToTeam(NeutralTeam, entry)
end
elseif #(game.Teams:GetTeams()) > 0 then -- else player switching to a team, or a weird edgecase
elseif #(Teams:GetTeams()) > 0 then -- else player switching to a team, or a weird edgecase
log(entry.Player.Name .. " has been set non-neutral")
SetPlayerToTeam(entry)
end
@ -3276,46 +3269,47 @@ end
--[[
code for attaching tab key to maximizing player list
--]]
game.GuiService:AddKey "\t"
GuiService:AddKey "\t"
local LastTabTime = time()
game.GuiService.KeyPressed:connect(function(key)
GuiService.KeyPressed:connect(function(key)
if key == "\t" then
log "caught tab key"
local modalCheck, isModal = pcall(function()
return game.GuiService.IsModalDialog
return GuiService.IsModalDialog
end)
if modalCheck == false or (modalCheck and isModal == false) then
if time() - LastTabTime > 0.4 then
LastTabTime = time()
if IsTabified.Value then
if not IsMaximized.Value then
ScreenGui:TweenPosition(
UDim2.new(0, 0, 0, 0),
"Out",
"Linear",
BASE_TWEEN * 1.2,
true
)
IsMaximized.Value = true
else
ScreenGui:TweenPosition(
UDim2.new(
NormalBounds.X.Scale,
NormalBounds.X.Offset - 10,
0,
0
),
"Out",
"Linear",
BASE_TWEEN * 1.2,
true
)
IsMaximized.Value = false
IsMinimized.Value = true
end
if
(modalCheck == false or (modalCheck and isModal == false))
and time() - LastTabTime > 0.4
then
LastTabTime = time()
if IsTabified.Value then
if not IsMaximized.Value then
ScreenGui:TweenPosition(
UDim2.new(0, 0, 0, 0),
"Out",
"Linear",
BASE_TWEEN * 1.2,
true
)
IsMaximized.Value = true
else
ToggleMaximize()
ScreenGui:TweenPosition(
UDim2.new(
NormalBounds.X.Scale,
NormalBounds.X.Offset - 10,
0,
0
),
"Out",
"Linear",
BASE_TWEEN * 1.2,
true
)
IsMaximized.Value = false
IsMinimized.Value = true
end
else
ToggleMaximize()
end
end
end
@ -3337,16 +3331,16 @@ end
pcall(function()
coreGuiChanged(
Enum.CoreGuiType.PlayerList,
game.StarterGui:GetCoreGuiEnabled(Enum.CoreGuiType.PlayerList)
StarterGui:GetCoreGuiEnabled(Enum.CoreGuiType.PlayerList)
)
game.StarterGui.CoreGuiChangedSignal:connect(coreGuiChanged)
StarterGui.CoreGuiChangedSignal:connect(coreGuiChanged)
end)
while not game:GetService "Teams" do
RunService.Heartbeat:wait()
log "Waiting For Teams"
end
for _, i in pairs(game.Teams:GetTeams()) do
for _, i in pairs(Teams:GetTeams()) do
TeamAdded(i)
end
for _, i in pairs(Players:GetPlayers()) do
@ -3385,8 +3379,8 @@ end
-- Hookups and initialization
----------------------------
game.Teams.ChildAdded:connect(TeamsChildAdded)
game.Teams.ChildRemoved:connect(TeamsChildRemoved)
Teams.ChildAdded:connect(TeamsChildAdded)
Teams.ChildRemoved:connect(TeamsChildRemoved)
Players.ChildAdded:connect(PlayersChildAdded)
InitReportAbuse()

View File

@ -1,26 +1,45 @@
--!strict
-- CoreGui.RobloxGui.CoreScripts/NotificationScript
print "[Mercury]: Loaded corescript 48488398"
local GuiService = game:GetService "GuiService"
local Players = game:GetService "Players"
local TeleportService = game:GetService "TeleportService"
local function waitForProperty(instance, property)
local BaseUrl = require "../Modules/BaseUrl"
local path = BaseUrl.path
local function waitForProperty(instance: Instance, property: string)
while not instance[property] do
instance.Changed:wait()
end
end
local function waitForChild(instance, name)
local function waitForChild(instance: Instance, name: string)
while not instance:FindFirstChild(name) do
instance.ChildAdded:wait()
end
end
waitForProperty(game.Players, "LocalPlayer")
waitForChild(script.Parent, "Popup")
waitForChild(script.Parent.Popup, "AcceptButton")
script.Parent.Popup.AcceptButton.Modal = true
type Popup = Frame & {
AcceptButton: TextButton,
OKButton: TextButton,
DeclineButton: TextButton,
PopupText: TextLabel,
PopupImage: ImageLabel,
}
local localPlayer = game.Players.LocalPlayer
local gui = script.Parent :: ScreenGui
local function getPopup()
return gui:FindFirstChild "Popup" :: Popup
end
waitForProperty(Players, "LocalPlayer")
waitForChild(gui, "Popup")
waitForChild(getPopup(), "AcceptButton")
getPopup().AcceptButton.Modal = true
local localPlayer = Players.LocalPlayer
local teleportUI
local friendRequestBlacklist = {}
@ -28,31 +47,33 @@ local friendRequestBlacklist = {}
local teleportEnabled = true
local function makePopupInvisible()
if script.Parent.Popup then
script.Parent.Popup.Visible = false
if getPopup() then
getPopup().Visible = false
end
end
local function showOneButton()
local popup = script.Parent:FindFirstChild "Popup"
if popup then
popup.OKButton.Visible = true
popup.DeclineButton.Visible = false
popup.AcceptButton.Visible = false
local popup = gui:FindFirstChild "Popup" :: Popup
if not popup then
return
end
popup.OKButton.Visible = true
popup.DeclineButton.Visible = false
popup.AcceptButton.Visible = false
end
local function showTwoButtons()
local popup = script.Parent:FindFirstChild "Popup"
if popup then
popup.OKButton.Visible = false
popup.DeclineButton.Visible = true
popup.AcceptButton.Visible = true
local popup = gui:FindFirstChild "Popup" :: Popup
if not popup then
return
end
popup.OKButton.Visible = false
popup.DeclineButton.Visible = true
popup.AcceptButton.Visible = true
end
local function makeFriend(fromPlayer, toPlayer)
local popup = script.Parent:FindFirstChild "Popup"
local popup = gui:FindFirstChild "Popup" :: Popup
if
popup == nil -- there is no popup!
or popup.Visible -- currently popping something, abort!
@ -63,7 +84,7 @@ local 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`
path(`thumbs/avatar.ashx?userId={fromPlayer.userId}&x=352&y=352`)
showTwoButtons()
popup.Visible = true
@ -120,7 +141,9 @@ local function makeFriend(fromPlayer, toPlayer)
end)
end
game.Players.FriendRequestEvent:connect(function(fromPlayer, toPlayer, event)
Players.FriendRequestEvent:connect(function(fromPlr, toPlr, event)
local toPlayer = toPlr :: Player
local fromPlayer = fromPlr :: Player
-- if this doesn't involve me, then do nothing
if fromPlayer ~= localPlayer and toPlayer ~= localPlayer then
return
@ -129,7 +152,7 @@ game.Players.FriendRequestEvent:connect(function(fromPlayer, toPlayer, event)
GuiService:SendNotification(
"You are Friends",
`With {toPlayer.Name}!`,
`http://banland.xyz/thumbs/avatar.ashx?userId={toPlayer.userId}&x=48&y=48`,
path(`thumbs/avatar.ashx?userId={toPlayer.userId}&x=48&y=48`),
5,
function() end
)
@ -142,7 +165,7 @@ game.Players.FriendRequestEvent:connect(function(fromPlayer, toPlayer, event)
GuiService:SendNotification(
"Friend Request",
`From {fromPlayer.Name}`,
`http://banland.xyz/thumbs/avatar.ashx?userId={fromPlayer.userId}&x=48&y=48`,
path(`thumbs/avatar.ashx?userId={fromPlayer.userId}&x=48&y=48`),
8,
function()
makeFriend(fromPlayer, toPlayer)
@ -152,7 +175,7 @@ game.Players.FriendRequestEvent:connect(function(fromPlayer, toPlayer, event)
GuiService:SendNotification(
"You are Friends",
`With {fromPlayer.Name}!`,
`http://banland.xyz/thumbs/avatar.ashx?userId={fromPlayer.userId}&x=48&y=48`,
path(`thumbs/avatar.ashx?userId={fromPlayer.userId}&x=48&y=48`),
5,
function() end
)
@ -162,7 +185,7 @@ end)
local function showTeleportUI(message, timer)
if teleportUI ~= nil then
teleportUI:Remove()
teleportUI:Destroy()
end
waitForChild(localPlayer, "PlayerGui")
teleportUI = Instance.new "Message"
@ -170,7 +193,7 @@ local function showTeleportUI(message, timer)
teleportUI.Parent = localPlayer.PlayerGui
if timer > 0 then
wait(timer)
teleportUI:Remove()
teleportUI:Destroy()
end
end
@ -195,7 +218,7 @@ if teleportEnabled then
localPlayer.OnTeleport:connect(onTeleport)
function TeleportService.ErrorCallback(message)
local popup = script.Parent:FindFirstChild "Popup"
local popup = gui:FindFirstChild "Popup" :: Popup
showOneButton()
popup.PopupText.Text = message
local clickCon
@ -204,9 +227,7 @@ if teleportEnabled then
if clickCon then
clickCon:disconnect()
end
game.GuiService:RemoveCenterDialog(
script.Parent:FindFirstChild "Popup"
)
GuiService:RemoveCenterDialog(gui:FindFirstChild "Popup" :: Popup)
popup:TweenSize(
UDim2.new(0, 0, 0, 0),
Enum.EasingDirection.Out,
@ -216,13 +237,13 @@ if teleportEnabled then
makePopupInvisible()
)
end)
game.GuiService:AddCenterDialog(
script.Parent:FindFirstChild "Popup",
GuiService:AddCenterDialog(
gui:FindFirstChild "Popup" :: Popup,
Enum.CenterDialogType.QuitDialog,
--ShowFunction
function()
showOneButton()
script.Parent:FindFirstChild("Popup").Visible = true
gui:FindFirstChild("Popup").Visible = true
popup:TweenSize(
UDim2.new(0, 330, 0, 350),
Enum.EasingDirection.Out,
@ -245,7 +266,7 @@ if teleportEnabled then
)
end
function TeleportService.ConfirmationCallback(message, placeId, spawnName)
local popup = script.Parent:FindFirstChild "Popup"
local popup = getPopup()
popup.PopupText.Text = message
popup.PopupImage.Image = ""
@ -258,9 +279,7 @@ if teleportEnabled then
if noCon then
noCon:disconnect()
end
game.GuiService:RemoveCenterDialog(
script.Parent:FindFirstChild "Popup"
)
GuiService:RemoveCenterDialog(getPopup())
popup:TweenSize(
UDim2.new(0, 0, 0, 0),
Enum.EasingDirection.Out,
@ -284,9 +303,7 @@ if teleportEnabled then
if clickCon then
clickCon:disconnect()
end
game.GuiService:RemoveCenterDialog(
script.Parent:FindFirstChild "Popup"
)
GuiService:RemoveCenterDialog(getPopup())
popup:TweenSize(
UDim2.new(0, 0, 0, 0),
Enum.EasingDirection.Out,
@ -296,13 +313,13 @@ if teleportEnabled then
makePopupInvisible()
)
end)
game.GuiService:AddCenterDialog(
script.Parent:FindFirstChild "Popup",
GuiService:AddCenterDialog(
getPopup(),
Enum.CenterDialogType.QuitDialog,
--ShowFunction
function()
showOneButton()
script.Parent:FindFirstChild("Popup").Visible = true
getPopup().Visible = true
popup:TweenSize(
UDim2.new(0, 330, 0, 350),
Enum.EasingDirection.Out,
@ -334,15 +351,15 @@ if teleportEnabled then
end)
local centerDialogSuccess = pcall(function()
game.GuiService:AddCenterDialog(
script.Parent:FindFirstChild "Popup",
GuiService:AddCenterDialog(
gui:FindFirstChild "Popup",
Enum.CenterDialogType.QuitDialog,
--ShowFunction
function()
showTwoButtons()
popup.AcceptButton.Text = "Leave"
popup.DeclineButton.Text = "Stay"
script.Parent:FindFirstChild("Popup").Visible = true
gui:FindFirstChild("Popup").Visible = true
popup:TweenSize(
UDim2.new(0, 330, 0, 350),
Enum.EasingDirection.Out,
@ -366,7 +383,7 @@ if teleportEnabled then
end)
if centerDialogSuccess == false then
script.Parent:FindFirstChild("Popup").Visible = true
gui:FindFirstChild("Popup").Visible = true
popup.AcceptButton.Text = "Leave"
popup.DeclineButton.Text = "Stay"
popup:TweenSize(

View File

@ -1,9 +1,12 @@
--!strict
-- CoreGui.RobloxGui.CoreScripts/PopupScript
print "[Mercury]: Loaded corescript 48488451"
local News = require "../Modules/New"
local New = News.New
local Hydrate = News.Hydrate
local BaseUrl = require "../Modules/BaseUrl"
local path = BaseUrl.path
-- build our gui
@ -25,7 +28,7 @@ local popupFrame = New "Frame" {
Name = "Backing",
BackgroundTransparency = 1,
Size = UDim2.new(1, 0, 1, 0),
Image = "http://banland.xyz/asset?id=47574181",
Image = path "asset?id=47574181",
ZIndex = 2,
},
},
@ -74,4 +77,4 @@ Hydrate(acceptButton:Clone()) {
Parent = popupFrame,
}
script:remove()
script:Destroy()

View File

@ -1,29 +1,33 @@
--!strict
-- CoreGui.RobloxGui.CoreScripts/BackpackScripts/BackpackBuild
print "[Mercury]: Loaded corescript 53878047"
local Players = game:GetService "Players"
local News = require "../Modules/New"
local New = News.New
local Hydrate = News.Hydrate
local BaseUrl = require "../Modules/BaseUrl"
local path = BaseUrl.path
-- This script creates almost all gui elements found in the backpack (warning: there are a lot!)
-- TODO: automate this process
local gui = script.Parent
local gui = script.Parent :: ScreenGui & { ControlFrame: Frame }
-- A couple of necessary functions
local function waitForChild(instance, name)
local function waitForChild(instance: Instance, name: string)
while not instance:FindFirstChild(name) do
instance.ChildAdded:wait()
end
end
local function waitForProperty(instance, property)
local function waitForProperty(instance: Instance, property: string)
while not instance[property] do
instance.Changed:wait()
end
end
waitForChild(game, "Players")
waitForProperty(game.Players, "LocalPlayer")
waitForProperty(Players, "LocalPlayer")
-- Components
@ -73,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 = path "asset?id=96536002",
BackgroundTransparency = 1,
Position = UDim2.new(-0.1, 0, -0.1, 0),
ZIndex = 0.0,
@ -81,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 = path "asset?id=97662207",
BackgroundTransparency = 1,
},
},
@ -101,13 +105,13 @@ local CurrentLoadout = New "Frame" {
New "ImageLabel" {
Name = "Background",
BackgroundTransparency = 1,
Image = "http://banland.xyz/asset?id=97613075",
Image = path "asset?id=97613075",
Size = UDim2.new(1, 0, 1, 0),
},
-- New "ImageLabel" {
-- Name = "Highlight",
-- BackgroundTransparency = 1,
-- Image = "http://banland.xyz/asset?id=97643886",
-- Image = path "asset?id=97643886",
-- Size = UDim2.new(1, 0, 1, 0),
-- Visible = false,
-- }
@ -184,7 +188,7 @@ New "ImageButton" {
Visible = false,
Name = "BackpackButton",
BackgroundTransparency = 1,
Image = "http://banland.xyz/asset?id=97617958",
Image = path "asset?id=97617958",
Position = UDim2.new(0.5, -60, 1, -108),
Size = UDim2.new(0, 120, 0, 18),
Parent = gui.ControlFrame,
@ -271,7 +275,7 @@ New "Frame" {
New "ImageLabel" {
RobloxLocked = true,
Name = "XImage",
Image = "http://banland.xyz/asset?id=75547445",
Image = path "asset?id=75547445",
BackgroundTransparency = 1,
Position = UDim2.new(-0.25, -1, -0.25, -1),
Size = UDim2.new(1.5, 2, 1.5, 2),
@ -483,7 +487,7 @@ New "Frame" {
New "ImageLabel" {
Name = "Background",
BackgroundTransparency = 1,
Image = "http://banland.xyz/asset?id=97613075",
Image = path "asset?id=97613075",
Size = UDim2.new(1, 0, 1, 0),
},
New "ObjectValue" {

View File

@ -3,7 +3,9 @@ print "[Mercury]: Loaded corescript 53878057"
local CoreGui = game:GetService "CoreGui"
local GuiService = game:GetService "GuiService"
local Players = game:GetService "Players"
local RunService = game:GetService "RunService"
local StarterGui = game:GetService "StarterGui"
local UserInputService = game:GetService "UserInputService"
-- A couple of necessary functions
@ -23,15 +25,15 @@ local currentLoadout = script.Parent
local StaticTabName = "gear"
local backpackEnabled = true
local mercuryGui = CoreGui:FindFirstChild "RobloxGui"
assert(mercuryGui)
local MercuryGui = CoreGui:FindFirstChild "RobloxGui"
assert(MercuryGui)
local controlFrame = waitForChild(mercuryGui, "ControlFrame")
local controlFrame = waitForChild(MercuryGui, "ControlFrame")
local backpackButton = waitForChild(controlFrame, "BackpackButton")
local backpack = waitForChild(mercuryGui, "Backpack")
waitForChild(mercuryGui, "CurrentLoadout")
waitForChild(mercuryGui.CurrentLoadout, "TempSlot")
waitForChild(mercuryGui.CurrentLoadout.TempSlot, "SlotNumber")
local backpack = waitForChild(MercuryGui, "Backpack")
waitForChild(MercuryGui, "CurrentLoadout")
waitForChild(MercuryGui.CurrentLoadout, "TempSlot")
waitForChild(MercuryGui.CurrentLoadout.TempSlot, "SlotNumber")
waitForChild(currentLoadout, "Background")
local clBackground = currentLoadout.Background
@ -59,9 +61,8 @@ local function setHealthBarVisible(pGui, visible)
end
--- Begin Locals
waitForChild(game, "Players")
waitForProperty(game.Players, "LocalPlayer")
local player = game.Players.LocalPlayer
waitForProperty(Players, "LocalPlayer")
local player = Players.LocalPlayer
waitForChild(player, "PlayerGui")
Spawn(function()
@ -149,7 +150,7 @@ local function unregisterNumberKeys()
end
local function characterInWorkspace()
local localPlayer = game.Players.LocalPlayer
local localPlayer = Players.LocalPlayer
return localPlayer
and localPlayer.Character
and localPlayer.Character ~= nil
@ -168,10 +169,10 @@ local function removeGear(gear)
if gearSlots[emptySlot].GearReference.Value then
if
gearSlots[emptySlot].GearReference.Value.Parent
== game.Players.LocalPlayer.Character
== Players.LocalPlayer.Character
then -- if we currently have this equipped, unequip it
gearSlots[emptySlot].GearReference.Value.Parent =
game.Players.LocalPlayer.Backpack
Players.LocalPlayer.Backpack
end
if
@ -635,7 +636,7 @@ local function unequipAllItems(dontEquipThis)
gearSlots[i].GearReference.Value:Disable()
elseif gearSlots[i].GearReference.Value:IsA "Tool" then
gearSlots[i].GearReference.Value.Parent =
game.Players.LocalPlayer.Backpack
Players.LocalPlayer.Backpack
end
gearSlots[i].Selected = false
end
@ -885,7 +886,7 @@ local function addingPlayerChild(
childChangeCon:disconnect()
end
removeFromInventory(child)
elseif newParent == game.Players.LocalPlayer.Backpack then
elseif newParent == Players.LocalPlayer.Backpack then
normaliseButton(gearClone)
end
end)
@ -1070,7 +1071,7 @@ local function coreGuiChanged(coreGuiType, enabled)
coreGuiType == Enum.CoreGuiType.Health
or coreGuiType == Enum.CoreGuiType.All
then
setHealthBarVisible(game.Players.LocalPlayer.PlayerGui, enabled)
setHealthBarVisible(Players.LocalPlayer.PlayerGui, enabled)
end
end
-- End Functions
@ -1081,13 +1082,13 @@ registerNumberKeys()
pcall(function()
coreGuiChanged(
Enum.CoreGuiType.Backpack,
game.StarterGui:GetCoreGuiEnabled(Enum.CoreGuiType.Backpack)
StarterGui:GetCoreGuiEnabled(Enum.CoreGuiType.Backpack)
)
coreGuiChanged(
Enum.CoreGuiType.Health,
game.StarterGui:GetCoreGuiEnabled(Enum.CoreGuiType.Health)
StarterGui:GetCoreGuiEnabled(Enum.CoreGuiType.Health)
)
game.StarterGui.CoreGuiChangedSignal:connect(coreGuiChanged)
StarterGui.CoreGuiChangedSignal:connect(coreGuiChanged)
end)
RunService.Heartbeat:wait() -- let stuff initialize incase this is first heartbeat...
@ -1147,8 +1148,8 @@ player.CharacterRemoving:connect(function()
end)
player.CharacterAdded:connect(function()
waitForProperty(game.Players, "LocalPlayer")
player = game.Players.LocalPlayer -- make sure we are still looking at the correct character
waitForProperty(Players, "LocalPlayer")
player = Players.LocalPlayer -- make sure we are still looking at the correct character
waitForChild(player, "Backpack")
delay(1, function()

View File

@ -1,3 +1,4 @@
--!strict
-- RbxUtility
print "[Mercury]: Loaded corescript 60595411"
@ -5,7 +6,7 @@ local News = require "../Modules/New"
local New = News.New
local Hydrate = News.Hydrate
local Terrain = game:GetService "Terrain"
local Terrain = workspace.Terrain
local RbxUtility = {}
@ -30,7 +31,7 @@ end
-- sets cell x, y, z to default material if parameter is provided, if not sets cell x, y, z to be whatever material it previously w
-- returns true if made a wedge, false if the cell remains a block
function RbxUtility.MakeWedge(x, y, z, _)
return Terrain:AutoWedgeCell(x, y, z)
return Terrain:AutowedgeCell(x, y, z)
end
function RbxUtility.SelectTerrainRegion(
@ -80,7 +81,15 @@ function RbxUtility.SelectTerrainRegion(
local currentKeepAliveTag -- a tag that determines whether adorns should be destroyed
local aliveCounter = 0 -- helper for currentKeepAliveTag
local lastRegion -- used to stop updates that do nothing
local adornments = {} -- contains all adornments
local adornments: {
[Vector3int16]: {
SelectionPart: BasePart,
SelectionBox: SelectionBox,
KeepAlive: number,
},
SelectionPart: BasePart?,
SelectionBox: SelectionBox?,
} = {} -- contains all adornments
local reusableAdorns = {}
local selectionPart = New "Part" {
@ -146,7 +155,7 @@ function RbxUtility.SelectTerrainRegion(
end
-- finds full cells in region and adorns each cell with a box, with the argument color
local function adornFullCellsInRegion(region, newColour)
local function adornFullCellsInRegion(region: Region3, newColour: BrickColor)
local regionBegin = region.CFrame.p
- (region.Size / 2)
+ Vector3.new(2, 2, 2)
@ -158,9 +167,9 @@ function RbxUtility.SelectTerrainRegion(
local cellPosEnd = WorldToCellPreferSolid(terrain, regionEnd)
currentKeepAliveTag = incrementAliveCounter()
for y = cellPosBegin.y, cellPosEnd.y do
for z = cellPosBegin.z, cellPosEnd.z do
for x = cellPosBegin.x, cellPosEnd.x do
for y = cellPosBegin.Y, cellPosEnd.Y do
for z = cellPosBegin.Z, cellPosEnd.Z do
for x = cellPosBegin.X, cellPosEnd.X do
local cellMaterial = GetCell(terrain, x, y, z)
if cellMaterial ~= emptyMaterial then
@ -222,7 +231,7 @@ function RbxUtility.SelectTerrainRegion(
end
else -- use individual cell adorns to represent the area selected
adornFullCellsInRegion(regionToSelect, colour)
function updateSelection(newRegion, newColour)
function updateSelection(newRegion: Region3, newColour)
if newRegion and newRegion ~= lastRegion then
lastRegion = newRegion
adornFullCellsInRegion(newRegion, newColour)
@ -433,9 +442,18 @@ Note: It is also perfectly legal to save a reference to the function returned by
local part = partCreatingFunction()
]]
--the Create function need to be created as a functor, not a function, in order to support the Create.E syntax, so it
--will be created in several steps rather than as a single function declaration.
local function Create_PrivImpl(objectType: string)
local Create_PrivImpl
-- create the functor:
RbxUtility.Create = setmetatable({}, {
__call = function(_, ...)
return Create_PrivImpl(...)
end,
})
-- the Create function need to be created as a functor, not a function, in order to support the Create.E syntax, so it
-- will be created in several steps rather than as a single function declaration.
function Create_PrivImpl(objectType: string)
if type(objectType) ~= "string" then
error("Argument of Create must be a string", 2)
end
@ -518,12 +536,7 @@ local function Create_PrivImpl(objectType: string)
end
end
--now, create the functor:
RbxUtility.Create = setmetatable({}, {
__call = function(_, ...)
return Create_PrivImpl(...)
end,
})
--and create the "Event.E" syntax stub. Really it's just a stub to construct a table which our Create
--function can recognize as special.

View File

@ -1,3 +1,4 @@
--!strict
-- Script Context./Libraries/LibraryRegistration/LibraryRegist
print "[Mercury]: Loaded corescript 60595695"
@ -17,18 +18,19 @@ for _ = 1, 4 do
RunService.Heartbeat:wait()
end
if ScriptContext then
for name, id in pairs {
Fusion = 10000001,
Red = 10000002,
Load = 10000003,
Gui = 45284430,
Utility = 60595411,
Stamper = 73157242,
} do
ScriptContext:RegisterLibrary("Libraries/Rbx" .. name, tostring(id))
end
ScriptContext:LibraryRegistrationComplete()
else
if not ScriptContext then
print "[Mercury]: Failed to find ScriptContext, libraries did not load"
return
end
for name, id in pairs {
Fusion = 10000001,
Red = 10000002,
Load = 10000003,
Gui = 45284430,
Utility = 60595411,
Stamper = 73157242,
} do
ScriptContext:RegisterLibrary("Libraries/Rbx" .. name, tostring(id))
end
ScriptContext:LibraryRegistrationComplete()

View File

@ -3,10 +3,15 @@ print "[Mercury]: Loaded corescript 73157242"
local ChangeHistoryService = game:GetService "ChangeHistoryService"
local InsertService = game:GetService "InsertService"
local JointsService = game:GetService "JointsService"
local Lighting = game:GetService "Lighting"
local Players = game:GetService "Players"
local News = require "../Modules/New"
local New = News.New
local Hydrate = News.Hydrate
local BaseUrl = require "../Modules/BaseUrl"
local path = BaseUrl.path
local RbxStamper = {}
@ -436,9 +441,7 @@ local function isBlocker(part: Instance) -- returns whether or not we want to ca
or part:FindFirstChild "RobloxModel"
then
return true
elseif
(part:IsA "Part" and not part.CanCollide) or (part == game.Lighting)
then
elseif (part:IsA "Part" and not part.CanCollide) or (part == Lighting) then
return false
end
return isBlocker(part.Parent)
@ -844,7 +847,7 @@ local function setupFakeTerrainPart(cellMat, cellType, cellOrient)
if cellType == 3 then
New "SpecialMesh" {
MeshType = "FileMesh",
MeshId = "http://banland.xyz/asset?id=66832495",
MeshId = path "asset?id=66832495",
Scale = Vector3.new(2, 2, 2),
Parent = newTerrainPiece,
}
@ -1116,8 +1119,8 @@ local function DoHighScalabilityRegionSelect(
-- make player able to see this ish
local gui
if game.Players.LocalPlayer then
gui = game.Players.LocalPlayer:FindFirstChild "PlayerGui"
if Players.LocalPlayer then
gui = Players.LocalPlayer:FindFirstChild "PlayerGui"
if
gui
and gui:IsA "PlayerGui"
@ -1148,10 +1151,10 @@ local function flashRedBox(stampData: {
local gui = game.CoreGui
if
game:FindFirstChild "Players"
and game.Players.LocalPlayer
and game.Players.LocalPlayer:FindFirstChild "PlayerGui"
and Players.LocalPlayer
and Players.LocalPlayer:FindFirstChild "PlayerGui"
then
gui = game.Players.LocalPlayer.PlayerGui
gui = Players.LocalPlayer.PlayerGui
end
if not stampData.ErrorBox then
return
@ -1872,7 +1875,7 @@ function RbxStamper.SetupStamperDragger(
if modelInfo then
hitFace = modelTargetSurface(
modelInfo.Parent,
workspace.CurrentCamera.CoordinateFrame.p,
(workspace.CurrentCamera :: Camera).CoordinateFrame.p,
mouse.Hit.p
)
end
@ -1882,7 +1885,7 @@ function RbxStamper.SetupStamperDragger(
if hitFace == tonumber(bf) then
-- return before we hit the JointsService code below!
unstampableSurface = true
game.JointsService:ClearJoinAfterMoveJoints() -- clear the JointsService cache
JointsService:ClearJoinAfterMoveJoints() -- clear the JointsService cache
return
end
end
@ -1891,14 +1894,14 @@ function RbxStamper.SetupStamperDragger(
hitFace = modelTargetSurface(
stampData.CurrentParts,
mouse.Hit.p,
workspace.CurrentCamera.CoordinateFrame.p
(workspace.CurrentCamera :: Camera).CoordinateFrame.p
)
-- are we stamping WITH an unstampable surface?
for bf in string.gmatch(myBreakingFaces, "[^,]+") do
if hitFace == tonumber(bf) then
unstampableSurface = true
game.JointsService:ClearJoinAfterMoveJoints() -- clear the JointsService cache
JointsService:ClearJoinAfterMoveJoints() -- clear the JointsService cache
return
end
end
@ -1910,7 +1913,7 @@ function RbxStamper.SetupStamperDragger(
-- to show joints during the mouse move
unstampableSurface = false
game.JointsService:SetJoinAfterMoveInstance(stampData.CurrentParts)
JointsService:SetJoinAfterMoveInstance(stampData.CurrentParts)
-- most common mouse inactive error occurs here, so check mouse active one more time in a pcall
local ok = pcall(function()
@ -1919,7 +1922,7 @@ function RbxStamper.SetupStamperDragger(
and not mouse.Target.Parent:FindFirstChild "RobloxModel"
end)
if not ok then
game.JointsService:ClearJoinAfterMoveJoints()
JointsService:ClearJoinAfterMoveJoints()
mouse = nil
error "Error: RbxStamper.DoStamperMouseMove Mouse is nil on second check"
return
@ -1930,11 +1933,11 @@ function RbxStamper.SetupStamperDragger(
and mouse.Target
and mouse.Target.Parent:FindFirstChild "RobloxModel" == nil
then
game.JointsService:SetJoinAfterMoveTarget(mouse.Target)
JointsService:SetJoinAfterMoveTarget(mouse.Target)
else
game.JointsService:SetJoinAfterMoveTarget(nil)
JointsService:SetJoinAfterMoveTarget(nil)
end
game.JointsService:ShowPermissibleJoints()
JointsService:ShowPermissibleJoints()
-- here we allow for a line of high-scalability parts
if
@ -2214,7 +2217,7 @@ function RbxStamper.SetupStamperDragger(
end
-- to show joints during the mouse move
game.JointsService:SetJoinAfterMoveInstance(stampData.CurrentParts)
JointsService:SetJoinAfterMoveInstance(stampData.CurrentParts)
return clone, parts
end
@ -2377,11 +2380,11 @@ function RbxStamper.SetupStamperDragger(
-- something will be stamped! so set the "StampedSomething" toggle to true
if
game:FindFirstChild "Players"
and game.Players.LocalPlayer
and game.Players.LocalPlayer.Character
and Players.LocalPlayer
and Players.LocalPlayer.Character
then
local stampTracker =
game.Players.LocalPlayer.Character:FindFirstChild "StampTracker"
Players.LocalPlayer.Character:FindFirstChild "StampTracker"
if stampTracker and not stampTracker.Value then
stampTracker.Value = true
end
@ -2534,8 +2537,8 @@ function RbxStamper.SetupStamperDragger(
end
local function getPlayer()
if game:FindFirstChild "Players" and game.Players.LocalPlayer then
return game.Players.LocalPlayer
if game:FindFirstChild "Players" and Players.LocalPlayer then
return Players.LocalPlayer
end
return nil
end
@ -2575,9 +2578,9 @@ function RbxStamper.SetupStamperDragger(
if
playerNameTag
and game:FindFirstChild "Players"
and game.Players.LocalPlayer
and Players.LocalPlayer
then
tempPlayerValue = game.Players.LocalPlayer
tempPlayerValue = Players.LocalPlayer
if tempPlayerValue then
playerNameTag.Value = tempPlayerValue.Name
end
@ -2611,7 +2614,7 @@ function RbxStamper.SetupStamperDragger(
-- make sure all the joints are activated before restoring anchor states
-- if not createJoints then
game.JointsService:CreateJoinAfterMoveJoints()
JointsService:CreateJoinAfterMoveJoints()
-- end
-- Restore the original properties for all parts being stamped
@ -2702,7 +2705,7 @@ function RbxStamper.SetupStamperDragger(
resetHighScalabilityLine()
game.JointsService:ClearJoinAfterMoveJoints()
JointsService:ClearJoinAfterMoveJoints()
end
local function prepareUnjoinableSurfaces(modelCFrame, parts, whichSurface)
@ -2815,11 +2818,11 @@ function RbxStamper.SetupStamperDragger(
mouseTarget
and mouseTarget.Parent:FindFirstChild "RobloxModel" == nil
then
game.JointsService:SetJoinAfterMoveTarget(mouseTarget)
JointsService:SetJoinAfterMoveTarget(mouseTarget)
else
game.JointsService:SetJoinAfterMoveTarget(nil)
JointsService:SetJoinAfterMoveTarget(nil)
end
game.JointsService:ShowPermissibleJoints()
JointsService:ShowPermissibleJoints()
for _, object in pairs(stampData.DisabledScripts) do
if object.Name == "GhostRemovalScript" then
@ -2905,6 +2908,7 @@ function RbxStamper.SetupStamperDragger(
return nil
end
resetStamperState(newStampModel)
return -- bruh
end
function control.ReloadModel() -- will automatically set stamper to get a new model of current model and start stamping with new model
@ -2945,7 +2949,7 @@ function RbxStamper.SetupStamperDragger(
keyCon:disconnect()
end
game.JointsService:ClearJoinAfterMoveJoints()
JointsService:ClearJoinAfterMoveJoints()
if adorn then
adorn:Destroy()

View File

@ -1,6 +1,8 @@
-- CoreGui.RobloxGui.Backpack.CoreScripts/BackpackScripts/Back (1?)
print "[Mercury]: Loaded corescript 89449008"
local Players = game:GetService "Players"
local StarterGui = game:GetService "StarterGui"
local UserInputService = game:GetService "UserInputService"
local News = require "../Modules/New"
@ -30,8 +32,8 @@ local function IsTouchDevice()
end
waitForChild(game, "Players")
waitForProperty(game.Players, "LocalPlayer")
local player = game.Players.LocalPlayer
waitForProperty(Players, "LocalPlayer")
local player = Players.LocalPlayer
local RbxGui, _ = LoadLibrary "RbxGui"
if not RbxGui then
@ -69,10 +71,10 @@ local currentLoadout = waitForChild(backpack.Parent, "CurrentLoadout")
local grid = waitForChild(backpack.Gear, "GearGrid")
local gearButton = waitForChild(grid, "GearButton")
local swapSlot = waitForChild(script.Parent, "SwapSlot")
local swapSlot = waitForChild(backpack, "SwapSlot")
local backpackManager =
waitForChild(script.Parent, "CoreScripts/BackpackScripts/BackpackManager")
waitForChild(backpack, "CoreScripts/BackpackScripts/BackpackManager")
local backpackOpenEvent = waitForChild(backpackManager, "BackpackOpenEvent")
local backpackCloseEvent = waitForChild(backpackManager, "BackpackCloseEvent")
local tabClickedEvent = waitForChild(backpackManager, "TabClickedEvent")
@ -741,14 +743,14 @@ local function setupCharacterConnections()
if backpackAddCon then
backpackAddCon:disconnect()
end
backpackAddCon = game.Players.LocalPlayer.Backpack.ChildAdded:connect(
backpackAddCon = Players.LocalPlayer.Backpack.ChildAdded:connect(
function(child)
addToGrid(child)
end
)
-- make sure we get all the children
local backpackChildren = game.Players.LocalPlayer.Backpack:GetChildren()
local backpackChildren = Players.LocalPlayer.Backpack:GetChildren()
for i = 1, #backpackChildren do
addToGrid(backpackChildren[i])
end
@ -756,7 +758,7 @@ local function setupCharacterConnections()
if characterChildAddedCon then
characterChildAddedCon:disconnect()
end
characterChildAddedCon = game.Players.LocalPlayer.Character.ChildAdded:connect(
characterChildAddedCon = Players.LocalPlayer.Character.ChildAdded:connect(
function(child)
addToGrid(child)
updateGridActive()
@ -766,7 +768,7 @@ local function setupCharacterConnections()
if characterChildRemovedCon then
characterChildRemovedCon:disconnect()
end
characterChildRemovedCon = game.Players.LocalPlayer.Character.ChildRemoved:connect(
characterChildRemovedCon = Players.LocalPlayer.Character.ChildRemoved:connect(
function(_)
updateGridActive()
end
@ -934,7 +936,7 @@ player.ChildAdded:connect(function(child)
if backpackAddCon then
backpackAddCon:disconnect()
end
backpackAddCon = game.Players.LocalPlayer.Backpack.ChildAdded:connect(
backpackAddCon = Players.LocalPlayer.Backpack.ChildAdded:connect(
function(child2)
addToGrid(child2)
end
@ -967,9 +969,9 @@ end
pcall(function()
coreGuiChanged(
Enum.CoreGuiType.Backpack,
game.StarterGui:GetCoreGuiEnabled(Enum.CoreGuiType.Backpack)
StarterGui:GetCoreGuiEnabled(Enum.CoreGuiType.Backpack)
)
game.StarterGui.CoreGuiChangedSignal:connect(coreGuiChanged)
StarterGui.CoreGuiChangedSignal:connect(coreGuiChanged)
end)
resize()
@ -985,11 +987,11 @@ if not backpack.Visible then
end
-- make sure that inventory is listening to gear reparenting
if characterChildAddedCon == nil and game.Players.LocalPlayer.Character then
if characterChildAddedCon == nil and Players.LocalPlayer.Character then
setupCharacterConnections()
end
if not backpackAddCon then
backpackAddCon = game.Players.LocalPlayer.Backpack.ChildAdded:connect(
backpackAddCon = Players.LocalPlayer.Backpack.ChildAdded:connect(
function(child)
addToGrid(child)
end

View File

@ -1,20 +1,28 @@
--!strict
-- CoreGui.RobloxGui.Backpack.CoreScripts/BackpackScripts/Back (2?)
print "[Mercury]: Loaded corescript 89449093"
local CoreGui = game:GetService "CoreGui"
local GuiService = game:GetService "GuiService"
local Players = game:GetService "Players"
local StarterGui = game:GetService "StarterGui"
local News = require "../Modules/New"
local New = News.New
local Hydrate = News.Hydrate
local GuiService = game:GetService "GuiService"
local BaseUrl = require "../Modules/BaseUrl"
local path = BaseUrl.path
-- basic functions
local function waitForChild(instance, name)
while not instance:FindFirstChild(name) do
local function waitForChild(instance: Instance, name: string)
local child = instance:FindFirstChild(name)
while not child do
instance.ChildAdded:wait()
child = instance:FindFirstChild(name)
end
return instance:FindFirstChild(name)
return child :: Instance
end
local function waitForProperty(instance, property)
local function waitForProperty(instance: Instance, property: string)
while not instance[property] do
instance.Changed:wait()
end
@ -22,12 +30,12 @@ end
-- don't do anything if we are in an empty game
waitForChild(game, "Players")
if #game.Players:GetChildren() < 1 then
game.Players.ChildAdded:wait()
if #Players:GetChildren() < 1 then
Players.ChildAdded:wait()
end
-- make sure everything is loaded in before we do anything
-- get our local player
waitForProperty(game.Players, "LocalPlayer")
waitForProperty(Players, "LocalPlayer")
------------------------ Locals ------------------------------
local backpack = script.Parent :: GuiObject
@ -53,8 +61,8 @@ local searchBox = waitForChild(backpack.SearchFrame.SearchBoxFrame, "SearchBox")
local searchButton = waitForChild(backpack.SearchFrame, "SearchButton")
local resetButton = waitForChild(backpack.SearchFrame, "ResetButton")
local mercuryGui = waitForChild(game.CoreGui, "RobloxGui")
local currentLoadout = waitForChild(mercuryGui, "CurrentLoadout")
local MercuryGui = waitForChild(CoreGui, "RobloxGui")
local currentLoadout = waitForChild(MercuryGui, "CurrentLoadout")
local loadoutBackground = waitForChild(currentLoadout, "Background")
local canToggle = true
@ -111,15 +119,15 @@ local function initHumanoidDiedConnections()
if humanoidDiedCon then
humanoidDiedCon:disconnect()
end
waitForProperty(game.Players.LocalPlayer, "Character")
local localPlayer = game.Players.LocalPlayer
waitForProperty(Players.LocalPlayer, "Character")
local localPlayer = Players.LocalPlayer
waitForChild(localPlayer.Character, "Humanoid")
humanoidDiedCon =
localPlayer.Character.Humanoid.Died:connect(deactivateBackpack)
end
local function showBackpack()
game.GuiService:AddCenterDialog(
GuiService:AddCenterDialog(
backpack,
Enum.CenterDialogType.PlayerInitiatedDialog,
function()
@ -152,7 +160,7 @@ local function showBackpack()
backpackOpenEvent:Fire(currentTab)
canToggle = true
readyForNextEvent = true
backpackButton.Image = "http://banland.xyz/asset?id=97644093"
backpackButton.Image = path "asset?id=97644093"
backpackButton.Position =
UDim2.new(0.5, -60, 1, -backpackSize.Y.Offset - 103)
end)
@ -184,13 +192,13 @@ local function hideBackpack()
guiTweenSpeed,
true,
function()
game.GuiService:RemoveCenterDialog(backpack)
GuiService:RemoveCenterDialog(backpack)
backpack.Visible = false
backpackButton.Selected = false
end
)
delay(guiTweenSpeed, function()
game.GuiService:RemoveCenterDialog(backpack)
GuiService:RemoveCenterDialog(backpack)
backpack.Visible = false
backpackButton.Selected = false
readyForNextEvent = true
@ -201,8 +209,8 @@ end
local function toggleBackpack()
if
not (
game.Players.LocalPlayer
and game.Players.LocalPlayer.Character
Players.LocalPlayer
and Players.LocalPlayer.Character
and canToggle
and readyForNextEvent
)
@ -216,7 +224,7 @@ local function toggleBackpack()
if backpackIsOpen then
Hydrate(loadoutBackground) {
Image = "http://banland.xyz/asset?id=97623721",
Image = path "asset?id=97623721",
Position = UDim2.new(-0.03, 0, -0.17, 0),
Size = UDim2.new(1.05, 0, 1.25, 0),
ZIndex = 2.0,
@ -228,9 +236,9 @@ local 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"
backpackButton.Image = path "asset?id=97617958"
Hydrate(loadoutBackground) {
Image = "http://banland.xyz/asset?id=96536002",
Image = path "asset?id=96536002",
Position = UDim2.new(-0.1, 0, -0.1, 0),
Size = UDim2.new(1.2, 0, 1.2, 0),
}
@ -353,9 +361,9 @@ publicFunction("BackpackReady", backpackReady)
pcall(function()
coreGuiChanged(
Enum.CoreGuiType.Backpack,
game.StarterGui:GetCoreGuiEnabled(Enum.CoreGuiType.Backpack)
StarterGui:GetCoreGuiEnabled(Enum.CoreGuiType.Backpack)
)
game.StarterGui.CoreGuiChangedSignal:connect(coreGuiChanged)
StarterGui.CoreGuiChangedSignal:connect(coreGuiChanged)
end)
inventoryButton.MouseButton1Click:connect(newTabClicked)
@ -399,11 +407,11 @@ backpackButton.MouseButton1Click:connect(function()
toggleBackpack()
end)
if game.Players.LocalPlayer.Character then
if Players.LocalPlayer.Character then
activateBackpack()
end
game.Players.LocalPlayer.CharacterAdded:connect(activateBackpack)
Players.LocalPlayer.CharacterAdded:connect(activateBackpack)
-- search functions
searchBox.FocusLost:connect(function(enterPressed)

View File

@ -2,10 +2,16 @@
-- CoreGui.RobloxGui.CoreScripts/ChatScript
print "[Mercury]: Loaded corescript 97188756"
local CoreGui = game:GetService "CoreGui"
local GuiService = game:GetService "GuiService"
local Players = game:GetService "Players"
local RunService = game:GetService "RunService"
local SafeChat = require "../Modules/Safechat.yml" -- THANK YOU DARKLUA
local New = require("../Modules/New").New
local BaseUrl = require "../Modules/BaseUrl"
local path = BaseUrl.path
local forceChatGUI = false
@ -17,21 +23,16 @@ local function WaitForChild(parent: Instance, childName)
return parent[childName]
end
while not game.Players.LocalPlayer do
while not Players.LocalPlayer do
RunService.Heartbeat:wait()
end
local Player = game.Players.LocalPlayer
local Player = Players.LocalPlayer
while not Player.Character do
RunService.Heartbeat:wait()
end
local Camera = workspace.CurrentCamera
-- Services
local CoreGui = game:GetService "CoreGui"
local Players = game:GetService "Players"
local GuiService = game:GetService "GuiService"
-- Lua Enums
local Enums = {}
local EnumName = {} -- used as unique key for enum name
@ -667,7 +668,7 @@ function Chat:CreateGui()
New "ImageLabel" {
Name = "Background",
Image = "http://banland.xyz/asset?id=97120937", --96551212';
Image = path "asset?id=97120937", -- 96551212
Size = UDim2.new(1.3, 0, 1.64, 0),
Position = UDim2.new(0, 0, 0, 0),
BackgroundTransparency = 1,

View File

@ -5,7 +5,8 @@ local InsertService = game:GetService "InsertService"
local BadgeService = game:GetService "BadgeService"
local ScriptContext = game:GetService "ScriptContext"
local RunService = game:GetService "RunService"
local ScriptInformationProvider = game:GetService "ScriptInformationProvider"
local ScriptInformationProvider =
game:GetService "ScriptInformationProvider" :: ScriptInformationProvider
local ChangeHistoryService = game:GetService "ChangeHistoryService"
local ContentProvider = game:GetService "ContentProvider"
local Players = game:GetService "Players"
@ -14,36 +15,25 @@ local Visit = game:GetService "Visit"
-- establish this peer as the Server
local NetworkServer = game:GetService "NetworkServer"
-- StartGame --
RunService:Run()
-- REQUIRES: StartGanmeSharedArgs.txt
-- REQUIRES: MonitorGameStatus.txt
local url = _BASE_URL
-----------------------------------"CUSTOM" SHARED CODE----------------------------------
pcall(function()
settings().Network.UseInstancePacketCache = true
end)
pcall(function()
settings().Network.UsePhysicsPacketCache = true
end)
--pcall(function() settings()["Task Scheduler"].PriorityMethod = Enum.PriorityMethod.FIFO end)
pcall(function()
settings()["Task Scheduler"].PriorityMethod =
Enum.PriorityMethod.AccumulatedError
end)
settings().Network.UseInstancePacketCache = true
settings().Network.UsePhysicsPacketCache = true
-- pcall(function()
-- settings()["Task Scheduler"].PriorityMethod = Enum.PriorityMethod.FIFO
-- end)
settings()["Task Scheduler"].PriorityMethod =
Enum.PriorityMethod.AccumulatedError
--settings().Network.PhysicsSend = 1 -- 1==RoundRobin
settings().Network.PhysicsSend = Enum.PhysicsSendMethod.ErrorComputation2
settings().Network.ExperimentalPhysicsEnabled = true
settings().Network.WaitingForCharacterLogRate = 100
pcall(function()
settings().Diagnostics:LegacyScriptMode()
end)
settings().Diagnostics:LegacyScriptMode()
-----------------------------------START GAME SHARED SCRIPT------------------------------
@ -68,14 +58,14 @@ if url ~= nil then
BadgeService:SetIsBadgeLegalUrl ""
InsertService:SetBaseSetsUrl(
`{url}/Game/Tools/InsertAsset.ashx?nsets=10&type=base`
url .. "/Game/Tools/InsertAsset.ashx?nsets=10&type=base"
)
InsertService:SetUserSetsUrl(
`{url}/Game/Tools/InsertAsset.ashx?nsets=20&type=user&userid=%d`
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:SetAssetVersionUrl(`{url}/Asset/?assetversionid=%d`)
InsertService:SetCollectionUrl(url .. "/Game/Tools/InsertAsset.ashx?sid=%d")
InsertService:SetAssetUrl(url .. "/asset?id=%d")
InsertService:SetAssetVersionUrl(url .. "/Asset/?assetversionid=%d")
end
pcall(function()
@ -101,23 +91,13 @@ end
-- Now start the connection
NetworkServer:Start(_SERVER_PORT)
Visit:SetPing(_SERVER_PRESENCE_URL, 30)
-- if timeout then
-- ScriptContext:SetTimeout(timeout)
-- end
ScriptContext.ScriptsDisabled = false
-- delay(1, function()
-- loadfile(`{url}/analytics/GamePerfMonitor.ashx`)(game.JobId, placeId)
-- end)
-- yimy stuff
local reset = ";mc"
game.Players.PlayerAdded:connect(function(player)
Players.PlayerAdded:connect(function(player)
player.Chatted:connect(function(msg)
if msg == reset and player.Character then
if msg == ";mc" and player.Character then
player.Character.Humanoid.Health = 0
end
end)

View File

@ -8,7 +8,11 @@ local Players = game:GetService "Players"
local Client = game:GetService "NetworkClient"
local Visit = game:GetService "Visit"
local player, connectionFailed
local BaseUrl = require "../Modules/BaseUrl"
local path = BaseUrl.path
local player: Player
local connectionFailed: RBXScriptConnection
pcall(function()
game:SetPlaceId(_PLACE_ID, false)
@ -41,14 +45,16 @@ 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(path "game/tools/insertasset?nsets=10&type=base")
InsertService:SetUserSetsUrl(
path "game/tools/insertasset?nsets=20&type=user&userid=%d"
)
InsertService:SetCollectionUrl(path "game/tools/insertasset?sid=%d")
InsertService:SetAssetUrl(path "asset?id=%d")
InsertService:SetAssetVersionUrl(path "asset?assetversionid=%d")
pcall(function()
game:SetCreatorID(_CREATOR_ID, Enum.CreatorType.User)
game:SetCreatorId(_CREATOR_ID, Enum.CreatorType.User)
end)
-- Bubble chat. This is all-encapsulated to allow us to turn it off with a config setting
@ -56,12 +62,6 @@ pcall(function()
Players:SetChatStyle(Enum.ChatStyle.ClassicAndBubble)
end)
pcall(function()
if settings().Network.MtuOverride == 0 then
settings().Network.MtuOverride = 1400
end
end)
-- functions ---------------------------------------
local loadingState = 0
local function setLoadingMessage(message: string)
@ -95,16 +95,15 @@ end
-- called when the client connection closes
local function onDisconnection(_, lostConnection)
if lostConnection then
setMessage "You have lost the connection to the game"
else
setMessage "This game has shut down"
end
setMessage(
lostConnection and "You have lost the connection to the game"
or "This game has shut down"
)
end
local function requestCharacter(replicator)
-- prepare code for when the Character appears
local connection
local connection: RBXScriptConnection
connection = player.Changed:connect(function(property)
if property == "Character" then
loadingState += 1
@ -127,11 +126,12 @@ local function requestCharacter(replicator)
end
-- called when the client connection is established
local function onConnectionAccepted(_, replicator)
local function onConnectionAccepted(_, rep: Instance)
local replicator = rep :: NetworkReplicator
local waitingForMarker = true
local ok, err = pcall(function()
Visit:SetPing(_PING_URL, 30)
Visit:SetPing("_PING_URL", 30)
loadingState += 1
game:SetMessageBrickCount()
@ -139,7 +139,7 @@ local function onConnectionAccepted(_, replicator)
replicator.Disconnection:connect(onDisconnection)
-- Wait for a marker to return before creating the Player
local marker = replicator:SendMarker()
local marker = replicator:SendMarker() :: NetworkMarker
marker.Received:connect(function()
waitingForMarker = false
@ -161,8 +161,8 @@ local function onConnectionAccepted(_, replicator)
end
-- called when the client connection fails
local function onConnectionFailed(_, err)
setMessage(`Failed to connect to the place. (ID={err})`)
local function onConnectionFailed(_, code: number, reason: string)
setMessage(`Failed to connect to the place. (ID {code}, {reason})`)
end
-- called when the client connection is rejected
@ -185,9 +185,7 @@ end
-- main ------------------------------------------------------------
pcall(function()
settings().Diagnostics:LegacyScriptMode()
end)
settings().Diagnostics:LegacyScriptMode()
local ok, err = pcall(function()
game:SetRemoteBuildMode(true)
@ -197,28 +195,19 @@ local ok, err = pcall(function()
connectionFailed = Client.ConnectionFailed:connect(onConnectionFailed)
Client.Ticket = ""
local playerConnectSuccess
playerConnectSuccess, player = pcall(function()
return Client:PlayerConnect(
_USER_ID,
"_SERVER_ADDRESS",
_SERVER_PORT,
0,
threadSleepTime
)
end)
if not playerConnectSuccess then
-- Old player connection scheme
player = Players:CreateLocalPlayer(_USER_ID)
Client:Connect("_SERVER_ADDRESS", _SERVER_PORT, 0, threadSleepTime)
end
player = Client:PlayerConnect(
_USER_ID,
"_SERVER_ADDRESS",
_SERVER_PORT,
0,
threadSleepTime
) :: Player
player:SetSuperSafeChat(false)
pcall(function()
player:SetUnder13(false)
end)
pcall(function()
player:SetMembershipType(Enum.MembershipType._MEMBERSHIP_TYPE)
player:SetMembershipType(_MEMBERSHIP_TYPE)
end)
pcall(function()
player:SetAccountAge(1)
@ -228,7 +217,7 @@ local ok, err = pcall(function()
pcall(function()
player.Name = [========[_USER_NAME]========]
end)
player.CharacterAppearance = _CHAR_APPEARANCE
player.CharacterAppearance = "_CHAR_APPEARANCE"
Visit:SetUploadUrl ""
end)
@ -240,6 +229,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://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>'
end)
-- use single quotes here because the video info string may have unescaped double quotes

View File

@ -1,7 +1,8 @@
--!strict
-- Render script for R6 avatars
local ThumbnailGenerator = game:GetService "ThumbnailGenerator"
local ThumbnailGenerator =
game:GetService "ThumbnailGenerator" :: ThumbnailGenerator
local RenderModule = require "../Modules/Render"
local SetupAvatar = require "../Modules/Render/SetupAvatar"
local Render = RenderModule(_BASE_URL, _PING_URL, _THUMBNAIL_KEY) -- avoid ambiguous syntax after compilation
@ -23,7 +24,7 @@ player.Character.Torso["Right Shoulder"].CurrentAngle = 0
-- Headshot Camera
local CameraAngle = player.Character.Head.CFrame
local CameraPosition = CameraAngle
+ CFrame.Angles(0, math.pi, 0).lookVector.unit * 2.75
+ CFrame.Angles(0, math.pi, 0).lookVector.Unit * 2.75
workspace.CurrentCamera = New "Camera" {
Name = "ThumbnailCamera",

View File

@ -2,28 +2,42 @@
print "[Mercury]: Loaded Studio corescript"
local InsertService = game:GetService "InsertService"
local ScriptInformationProvider = game:GetService "ScriptInformationProvider"
local ScriptInformationProvider =
game:GetService "ScriptInformationProvider" :: ScriptInformationProvider
local ScriptContext = game:GetService "ScriptContext"
local BaseUrl = require "../Modules/BaseUrl"
local path = BaseUrl.path
pcall(function()
InsertService:SetFreeModelUrl "http://banland.xyz/game/tools/insertasset?type=fm&q=%s&pg=%d&rs=%d"
InsertService:SetFreeModelUrl(
path "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(
path "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(path "asset/")
InsertService:SetBaseSetsUrl(path "game/tools/insertasset?nsets=10&type=base")
InsertService:SetUserSetsUrl(
path "game/tools/insertasset?nsets=20&type=user&userid=%d"
)
InsertService:SetCollectionUrl(path "game/tools/insertasset?sid=%d")
InsertService:SetAssetUrl(path "asset?id=%d")
InsertService:SetAssetVersionUrl(path "asset/?assetversionid=%d")
InsertService:SetTrustLevel(0)
if not pcall(function()
ScriptContext:AddStarterScript(37801172)
end) then
if
not pcall(function()
print "Adding starter script (1)"
ScriptContext:AddStarterScript(37801172)
end)
then
pcall(function()
print "Adding starter script (2)"
ScriptContext:AddCoreScript(37801172, ScriptContext, "StarterScript")
end)
end

View File

@ -4,12 +4,16 @@ local ChangeHistoryService = game:GetService "ChangeHistoryService"
local InsertService = game:GetService "InsertService"
local Players = game:GetService "Players"
local RunService = game:GetService "RunService"
local ScriptInformationProvider = game:GetService "ScriptInformationProvider"
local SocialService = game:GetService "SocialService"
local ScriptInformationProvider =
game:GetService "ScriptInformationProvider" :: ScriptInformationProvider
local SocialService = game:GetService "SocialService" :: SocialService
local ContentProvider = game:GetService "ContentProvider"
local GamePassService = game:GetService "GamePassService"
local Visit = game:GetService "Visit"
local BaseUrl = require "../Modules/BaseUrl"
local path = BaseUrl.path
local player
-- Prepended to Edit.lua and Visit.lua and Studio.lua and PlaySolo.lua--
@ -23,43 +27,61 @@ local message = Instance.new "Message"
message.Parent = workspace
message.archivable = false
ScriptInformationProvider:SetAssetUrl "http://banland.xyz/Asset/"
ScriptInformationProvider:SetAssetUrl(path "Asset/")
ContentProvider:SetThreadPool(16)
pcall(function()
InsertService:SetFreeModelUrl "http://banland.xyz/game/tools/insertasset?type=fm&q=%s&pg=%d&rs=%d"
InsertService:SetFreeModelUrl(
path "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(
path "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(path "game/tools/insertasset?nsets=10&type=base")
InsertService:SetUserSetsUrl(
path "game/tools/insertasset?nsets=20&type=user&userid=%d"
)
InsertService:SetCollectionUrl(path "game/tools/insertasset?sid=%d")
InsertService:SetAssetUrl(path "asset?id=%d")
InsertService:SetAssetVersionUrl(path "Asset/?assetversionid=%d")
pcall(function()
SocialService:SetFriendUrl "http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsFriendsWith&playerid=%d&userid=%d"
SocialService:SetFriendUrl(
path "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(
path "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(
path "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(
path "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(
path "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(
path "Game/GamePass/GamePassHandler.ashx?Action=HasPass&UserID=%d&PassID=%d"
)
end)
pcall(function()
game:SetCreatorID(0, Enum.CreatorType.User)
game:SetCreatorId(0, Enum.CreatorType.User)
end)
pcall(function()
@ -79,7 +101,9 @@ end)
ChangeHistoryService:SetEnabled(false)
pcall(function()
Players:SetBuildUserPermissionsUrl "http://banland.xyz/Game/BuildActionPermissionCheck.ashx?assetId=0&userId=%d&isSolo=true"
Players:SetBuildUserPermissionsUrl(
path "Game/BuildActionPermissionCheck.ashx?assetId=0&userId=%d&isSolo=true"
)
end)
workspace:SetPhysicsThrottleEnabled(true)
@ -101,7 +125,7 @@ local ok, err = pcall(function()
player.CharacterAppearance = ""
local propExists, canAutoLoadChar = false, false
propExists = pcall(function()
canAutoLoadChar = game.Players.CharacterAutoLoads
canAutoLoadChar = Players.CharacterAutoLoads
end)
if (propExists and canAutoLoadChar) or not propExists then

View File

@ -20,10 +20,13 @@ local on = false
local On, Off
local plugin = PluginManager():CreatePlugin()
local toolbar = plugin:CreateToolbar "Terrain"
local toolbarbutton =
toolbar:CreateButton("Generator", "Terrain Generator", "terrain.png")
local plugin = PluginManager():CreatePlugin() :: Plugin
local toolbar = plugin:CreateToolbar "Terrain" :: Toolbar
local toolbarbutton = toolbar:CreateButton(
"Generator",
"Terrain Generator",
"terrain.png"
) :: Button
toolbarbutton.Click:connect(function()
if on then
Off()
@ -51,8 +54,8 @@ function TerrainOptions.Create()
setmetatable(options, TerrainOptions)
-- Offset to create terrain at.
options.xpos = 0
options.zpos = 0
options.Xpos = 0
options.Zpos = 0
-- X width
options.width = 512
@ -110,7 +113,7 @@ end
--
-- Return:
-- Value is a new terrain options set with the old terrain options data.
function TerrainOptions:Clone(_)
function TerrainOptions:Clone()
return CopyTable(self)
end
@ -236,9 +239,9 @@ function Highlighter.Create(_, ID, color)
highlighter.width = 0
highlighter.length = 0
highlighter.x = 0
highlighter.y = 0
highlighter.z = 0
highlighter.X = 0
highlighter.Y = 0
highlighter.Z = 0
-- Create the part that the highlighter will be attached to.
highlighter.selectionPart = New "Part" {
@ -282,24 +285,24 @@ function Highlighter:UpdatePosition(cellPos: Vector3)
local regionToSelect
self.x = cellPos.x
self.y = cellPos.y
self.z = cellPos.z
self.X = cellPos.X
self.Y = cellPos.Y
self.Z = cellPos.Z
local width, length, height =
self.width :: number, self.length :: number, self.height :: number
local lowVec = CellCenterToWorld(
c,
cellPos.x - width / 2,
cellPos.y - 1,
cellPos.z - length / 2
cellPos.X - width / 2,
cellPos.Y - 1,
cellPos.Z - length / 2
)
local highVec = CellCenterToWorld(
c,
cellPos.x + width / 2,
cellPos.y + height,
cellPos.z + length / 2
cellPos.X + width / 2,
cellPos.Y + height,
cellPos.Z + length / 2
)
regionToSelect = Region3.new(lowVec, highVec)
@ -320,7 +323,7 @@ function Highlighter:UpdateDimensions(
self.length = length
self.width = width
self.height = height
self:UpdatePosition(Vector3.new(self.x, self.y, self.z))
self:UpdatePosition(Vector3.new(self.X, self.Y, self.Z))
end
-- Create a standardized slider.
@ -397,7 +400,7 @@ local function LoadProgressBar(text)
cancelValues.bindForCancel.Event:connect(function(_)
cancelValues.cancelActions = true -- Set the flag that everything should stop.
coroutine.yield()
coroutine.Yield()
end)
end
@ -428,13 +431,13 @@ local _, offsetXSliderPosition = CreateStandardSlider(
UDim2.new(0, 10, 0.5, -2),
128,
function(offsetXSliderPosition2)
terrainOptions.xpos = (offsetXSliderPosition2.Value - 1) * 4 - 252
offsetXLabel.Text = "X-Offset: " .. terrainOptions.xpos
terrainOptions.Xpos = (offsetXSliderPosition2.Value - 1) * 4 - 252
offsetXLabel.Text = "X-Offset: " .. terrainOptions.Xpos
end,
nil,
terrainFrame
)
offsetXSliderPosition.Value = (terrainOptions.xpos + 252) / 4 + 1
offsetXSliderPosition.Value = (terrainOptions.Xpos + 252) / 4 + 1
-- Slider for controlling the z offset to generate terrain at.
local offsetZLabel = CreateStandardLabel(
@ -450,13 +453,13 @@ local _, offsetZSliderPosition = CreateStandardSlider(
UDim2.new(0, 10, 0.5, -2),
128,
function(offsetZSliderPosition2)
terrainOptions.zpos = (offsetZSliderPosition2.Value - 1) * 4 - 252
offsetZLabel.Text = "Z-Offset: " .. terrainOptions.zpos
terrainOptions.Zpos = (offsetZSliderPosition2.Value - 1) * 4 - 252
offsetZLabel.Text = "Z-Offset: " .. terrainOptions.Zpos
end,
nil,
terrainFrame
)
offsetZSliderPosition.Value = (terrainOptions.zpos + 252) / 4 + 1
offsetZSliderPosition.Value = (terrainOptions.Zpos + 252) / 4 + 1
-----------------------
--FUNCTION DEFINITIONS-
@ -479,7 +482,7 @@ end
-- makes a heightmap for a layer of mountains (width x depth)
-- with a width frequency wf and depthfrequency df (width should be divisible by wf, depth should be divisible by df) (for unsquished results, width/wf = depth/df)
-- with a range of amplitudes between 0 and a
local function mountLayer(width, depth, wf, df, a)
local function mountLayer(width: number, depth: number, wf, df, a: number)
local heightmap = {}
for i = 0, width - 1 do
heightmap[i] = {}
@ -570,8 +573,14 @@ end
-- Set the camera to look at the terrain from a distance so that all terrain will be in view.
-- centerX, centerZ - Center coordinate of land. This doesn't take into account clipping.
-- length, width - Land dimensions.
local function SetCamera(centerX, centerZ, length, width, height)
local currCamera = workspace.CurrentCamera
local function SetCamera(
centerX: number,
centerZ: number,
length: number,
width: number,
height: number
)
local currCamera = workspace.CurrentCamera :: Camera
local cameraPos = Vector3.new(0, 400, 1600)
local cameraFocus = Vector3.new(0, height * 4, 0)
@ -625,15 +634,15 @@ local function GenerateTerrain()
--Generate Terrain
-- offset terrain additionally by whatever the smallest cell is
--xpos2 = generateOptions.xpos + workspace.Terrain.MaxExtents.Min.X
--zpos2 = generateOptions.zpos + workspace.Terrain.MaxExtents.Min.Z
local xpos2 = generateOptions.xpos - generateOptions.width / 2
local zpos2 = generateOptions.zpos - generateOptions.length / 2
--xpos2 = generateOptions.Xpos + workspace.Terrain.MaxExtents.Min.X
--zpos2 = generateOptions.Zpos + workspace.Terrain.MaxExtents.Min.Z
local xpos2 = generateOptions.Xpos - generateOptions.width / 2
local zpos2 = generateOptions.Zpos - generateOptions.length / 2
-- Reposition to get a good view.
SetCamera(
generateOptions.xpos,
generateOptions.zpos,
generateOptions.Xpos,
generateOptions.Zpos,
generateOptions.length,
generateOptions.width,
math.max(generateOptions.baseHeight, generateOptions.a / 2)

View File

@ -1,3 +1,4 @@
--!strict
while not game do
wait()
end
@ -17,11 +18,11 @@ local on = false
local On, Off
local plugin = PluginManager():CreatePlugin()
local plugin = PluginManager():CreatePlugin() :: Plugin
local mouse = plugin:GetMouse()
local toolbar = plugin:CreateToolbar "Terrain"
local toolbarbutton = toolbar:CreateButton("Builder", "Builder", "builder.png")
local toolbar = plugin:CreateToolbar "Terrain" :: Toolbar
local toolbarbutton = toolbar:CreateButton("Builder", "Builder", "builder.png") :: Button
toolbarbutton.Click:connect(function()
if on then
Off()
@ -126,7 +127,7 @@ function MouseHighlighter.Create(mouseUse)
-- success - Value is true if there was a plane intersection, false if not.
-- cellPos - Value is the terrain cell intersection point if there is one, vectorPos if there isn't.
function PlaneIntersection(vectorPos)
local currCamera = workspace.CurrentCamera
local currCamera = workspace.CurrentCamera :: Camera
local startPos = Vector3.new(
currCamera.CoordinateFrame.p.X,
currCamera.CoordinateFrame.p.Y,
@ -153,7 +154,7 @@ function MouseHighlighter.Create(mouseUse)
-- Update where the highlighter is displayed.
-- position - Where to display the highlighter, in world space.
function UpdatePosition(position)
function UpdatePosition(position: Vector3)
if not position then
return
end
@ -162,7 +163,7 @@ function MouseHighlighter.Create(mouseUse)
-- Change this gui to be the one you want to use.
highlighter.selectionBox.Parent = CoreGui
local vectorPos = Vector3.new(position.x, position.y, position.z)
local vectorPos = Vector3.new(position.X, position.Y, position.Z)
local cellPos = WorldToCellPreferEmpty(c, vectorPos)
local solidCell = WorldToCellPreferSolid(c, vectorPos)
local success = false
@ -179,9 +180,9 @@ function MouseHighlighter.Create(mouseUse)
local regionToSelect
local lowVec = CellCenterToWorld(c, cellPos.x, cellPos.y - 1, cellPos.z)
local lowVec = CellCenterToWorld(c, cellPos.X, cellPos.Y - 1, cellPos.Z)
local highVec =
CellCenterToWorld(c, cellPos.x, cellPos.y + 1, cellPos.z)
CellCenterToWorld(c, cellPos.X, cellPos.Y + 1, cellPos.Z)
regionToSelect = Region3.new(lowVec, highVec)
highlighter.selectionPart.Size = regionToSelect.Size
@ -192,12 +193,12 @@ function MouseHighlighter.Create(mouseUse)
if nil == highlighter.lastUsedPoint then
highlighter.lastUsedPoint = WorldToCellPreferEmpty(
c,
Vector3.new(mouseH.Hit.x, mouseH.Hit.y, mouseH.Hit.z)
Vector3.new(mouseH.Hit.X, mouseH.Hit.Y, mouseH.Hit.Z)
)
else
cellPos = WorldToCellPreferEmpty(
c,
Vector3.new(mouseH.Hit.x, mouseH.Hit.y, mouseH.Hit.z)
Vector3.new(mouseH.Hit.X, mouseH.Hit.Y, mouseH.Hit.Z)
)
end
end
@ -286,18 +287,18 @@ local function onClicked()
local cellPos = WorldToCellPreferEmpty(
c,
Vector3.new(mouse.Hit.x, mouse.Hit.y, mouse.Hit.z)
Vector3.new(mouse.Hit.X, mouse.Hit.Y, mouse.Hit.Z)
)
local x = cellPos.x
local y = cellPos.y
local z = cellPos.z
local x = cellPos.X
local y = cellPos.Y
local z = cellPos.Z
local solidCellPos = WorldToCellPreferSolid(
c,
Vector3.new(mouse.Hit.x, mouse.Hit.y, mouse.Hit.z)
Vector3.new(mouse.Hit.X, mouse.Hit.Y, mouse.Hit.Z)
)
local celMat = GetCell(c, solidCellPos.x, solidCellPos.y, solidCellPos.z)
local celMat = GetCell(c, solidCellPos.X, solidCellPos.Y, solidCellPos.Z)
local success = false
if celMat.Value > 0 then
@ -312,15 +313,15 @@ local function onClicked()
end
success, cellPos = PlaneIntersection(
Vector3.new(mouse.Hit.x, mouse.Hit.y, mouse.Hit.z)
Vector3.new(mouse.Hit.X, mouse.Hit.Y, mouse.Hit.Z)
)
if not success then
cellPos = solidCellPos
end
x = cellPos.x
y = cellPos.y
z = cellPos.z
x = cellPos.X
y = cellPos.Y
z = cellPos.Z
end
if selectionProps.isWater and 17 == selectionProps.terrainMaterial then

View File

@ -1,3 +1,4 @@
--!strict
while not game do
wait()
end
@ -20,12 +21,12 @@ local On, Off
---------------
--PLUGIN SETUP-
---------------
local plugin = PluginManager():CreatePlugin()
local plugin = PluginManager():CreatePlugin() :: Plugin
local mouse = plugin:GetMouse()
local toolbar = plugin:CreateToolbar "Terrain"
local toolbar = plugin:CreateToolbar "Terrain" :: Toolbar
local toolbarbutton =
toolbar:CreateButton("Remover", "Remover", "destroyer.png")
toolbar:CreateButton("Remover", "Remover", "destroyer.png") :: Button
toolbarbutton.Click:connect(function()
if on then
Off()
@ -102,14 +103,14 @@ function MouseHighlighter.Create(mouseUse)
-- Change this gui to be the one you want to use.
highlighter.selectionBox.Parent = CoreGui
local vectorPos = Vector3.new(position.x, position.y, position.z)
local vectorPos = Vector3.new(position.X, position.Y, position.Z)
local cellPos = WorldToCellPreferSolid(c, vectorPos)
local regionToSelect
local lowVec = CellCenterToWorld(c, cellPos.x, cellPos.y - 1, cellPos.z)
local lowVec = CellCenterToWorld(c, cellPos.X, cellPos.Y - 1, cellPos.Z)
local highVec =
CellCenterToWorld(c, cellPos.x, cellPos.y + 1, cellPos.z)
CellCenterToWorld(c, cellPos.X, cellPos.Y + 1, cellPos.Z)
regionToSelect = Region3.new(lowVec, highVec)
highlighter.selectionPart.Size = regionToSelect.Size
@ -121,12 +122,12 @@ function MouseHighlighter.Create(mouseUse)
elseif not highlighter.lastUsedPoint then
highlighter.lastUsedPoint = WorldToCellPreferSolid(
c,
Vector3.new(mouse2.Hit.x, mouse2.Hit.y, mouse2.Hit.z)
Vector3.new(mouse2.Hit.X, mouse2.Hit.Y, mouse2.Hit.Z)
)
else
cellPos = WorldToCellPreferSolid(
c,
Vector3.new(mouse2.Hit.x, mouse2.Hit.y, mouse2.Hit.z)
Vector3.new(mouse2.Hit.X, mouse2.Hit.Y, mouse2.Hit.Z)
)
-- holdChange = cellPos - highlighter.lastUsedPoint -- ?
@ -240,11 +241,11 @@ local function onClicked()
end
local cellPos = WorldToCellPreferSolid(
c,
Vector3.new(mouse.Hit.x, mouse.Hit.y, mouse.Hit.z)
Vector3.new(mouse.Hit.X, mouse.Hit.Y, mouse.Hit.Z)
)
local x = cellPos.x
local y = cellPos.y
local z = cellPos.z
local x = cellPos.X
local y = cellPos.Y
local z = cellPos.Z
SetCell(c, x, y, z, 0, 0, 0)

View File

@ -17,15 +17,15 @@ local on = false
local On, Off
local plugin = PluginManager():CreatePlugin()
local plugin = PluginManager():CreatePlugin() :: Plugin
local mouse = plugin:GetMouse()
local toolbar = plugin:CreateToolbar "Terrain"
local toolbar = plugin:CreateToolbar "Terrain" :: Toolbar
local toolbarbutton = toolbar:CreateButton(
"Elevation Adjuster",
"Elevation Adjuster",
"elevation.png"
)
) :: Button
toolbarbutton.Click:connect(function()
if on then
Off()
@ -121,7 +121,7 @@ function MouseHighlighter.Create(mouseUse)
-- Update where the highlighter is displayed.
-- position - Where to display the highlighter, in world space.
local function UpdatePosition(position)
local function UpdatePosition(position: Vector3)
if not position then
return
end
@ -130,7 +130,7 @@ function MouseHighlighter.Create(mouseUse)
-- Change this gui to be the one you want to use.
highlighter.selectionBox.Parent = CoreGui
local vectorPos = Vector3.new(position.x, position.y, position.z)
local vectorPos = Vector3.new(position.X, position.Y, position.Z)
local cellPos = WorldToCellPreferEmpty(c, vectorPos)
local solidCell = WorldToCellPreferSolid(c, vectorPos)
local success = false

View File

@ -16,10 +16,11 @@ local on = false
local On, Off
local this = PluginManager():CreatePlugin()
local this = PluginManager():CreatePlugin() :: Plugin
local toolbar = this:CreateToolbar "Terrain"
local toolbarbutton = toolbar:CreateButton("Brush", "Brush", "brush.png")
local toolbar = this:CreateToolbar "Terrain" :: Toolbar
local toolbarbutton =
toolbar:CreateButton("Brush", "Brush", "brush.png") :: Button
toolbarbutton.Click:connect(function()
if on then
Off()
@ -292,9 +293,9 @@ function doFillCells(position, mouseDrag, needsCellPos)
local timeBetweenFills = tick() - lastCellFillTime
local totalDragPixels = math.abs(mouseDrag.x) + math.abs(mouseDrag.y)
local editDistance = (
workspace.CurrentCamera.CoordinateFrame.p
(workspace.CurrentCamera :: Camera).CoordinateFrame.p
- Vector3.new(position.x, position.y, position.z)
).magnitude
).Magnitude
if timeBetweenFills <= 0.05 then
if editDistance * totalDragPixels < 450 then

View File

@ -14,11 +14,11 @@ local on = false
local On, Off
local this = PluginManager():CreatePlugin()
local this = PluginManager():CreatePlugin() :: Plugin
local mouse = this:GetMouse()
local toolbar = this:CreateToolbar "Terrain"
local toolbarbutton = toolbar:CreateButton("Crater", "Crater", "craters.png")
local toolbar = this:CreateToolbar "Terrain" :: Toolbar
local toolbarbutton = toolbar:CreateButton("Crater", "Crater", "craters.png") :: Button
toolbarbutton.Click:connect(function()
if on then
Off()

View File

@ -13,10 +13,10 @@ local on = false
local On, Off
local this = PluginManager():CreatePlugin()
local this = PluginManager():CreatePlugin() :: Plugin
local mouse = this:GetMouse()
local toolbar = this:CreateToolbar "Terrain"
local toolbarbutton = toolbar:CreateButton("Roads", "Roads", "roads.png")
local toolbar = this:CreateToolbar "Terrain" :: Toolbar
local toolbarbutton = toolbar:CreateButton("Roads", "Roads", "roads.png") :: Button
toolbarbutton.Click:connect(function()
if on then
Off()

View File

@ -1,3 +1,4 @@
--!strict
while not game do
wait()
end
@ -18,7 +19,7 @@ local on = false
local On, Off
local mouseDown, mouseUp, mouseMove
local this = PluginManager():CreatePlugin()
local this = PluginManager():CreatePlugin() :: Plugin
local mouse = this:GetMouse()
mouse.Button1Down:connect(function()
mouseDown(mouse)
@ -30,12 +31,12 @@ mouse.Move:connect(function()
mouseMove(mouse)
end)
local toolbar = this:CreateToolbar "Terrain"
local toolbar = this:CreateToolbar "Terrain" :: Toolbar
local toolbarbutton = toolbar:CreateButton(
"Material Brush",
"Material Brush",
"materialBrush.png"
)
) :: Button
toolbarbutton.Click:connect(function()
if on then
Off()
@ -50,13 +51,13 @@ workspace:WaitForChild "Terrain"
-----------------------------
--LOCAL FUNCTION DEFINITIONS-
-----------------------------
local c = workspace.Terrain
local SetCell = c.SetCell
local SetWaterCell = c.SetWaterCell
local Terrain = workspace.Terrain
local SetCell = Terrain.SetCell
local SetWaterCell = Terrain.SetWaterCell
-- local GetWaterCell = c.GetWaterCell
local GetCell = c.GetCell
local WorldToCellPreferSolid = c.WorldToCellPreferSolid
local CellCenterToWorld = c.CellCenterToWorld
local GetCell = Terrain.GetCell
local WorldToCellPreferSolid = Terrain.WorldToCellPreferSolid
local CellCenterToWorld = Terrain.CellCenterToWorld
local waterMaterial = 17
local brushTypes = { "Circular", "Square" }
@ -92,7 +93,7 @@ function paintWaterfall(setCells)
end
for i = 1, #setCells do
SetWaterCell(
c,
Terrain,
setCells[i].xPos,
setCells[i].yPos,
setCells[i].zPos,
@ -106,7 +107,7 @@ end
local function getSquareCell(x: number, y: number, z: number)
-- local tempCellPos = Vector3.new(x, y, z)
local oldMaterial, oldType, oldOrientation = GetCell(c, x, y, z)
local oldMaterial, oldType, oldOrientation = GetCell(Terrain, x, y, z)
if oldMaterial.Value <= 0 then
return nil
end
@ -119,15 +120,15 @@ local function getSquareCell(x: number, y: number, z: number)
}
end
local function getSquare(cellPos)
local function getSquare(cellPos: Vector3)
local setCells = {}
local finalX = cellPos.x + radius - 1
local finalZ = cellPos.z + radius - 1
local finalY = cellPos.y + radius - 1
local finalX = cellPos.X + radius - 1
local finalY = cellPos.Y + radius - 1
local finalZ = cellPos.Z + radius - 1
for x = cellPos.x - radius + 1, finalX do
for z = cellPos.z - radius + 1, finalZ do
for y = cellPos.y - radius + 1, finalY do
for x = cellPos.X - radius + 1, finalX do
for y = cellPos.Y - radius + 1, finalY do
for z = cellPos.Z - radius + 1, finalZ do
table.insert(setCells, getSquareCell(x, y, z))
end
end
@ -149,7 +150,7 @@ local function getCircularCell(
if distSq >= radiusSquared then
return nil
end
local oldMaterial, oldType, oldOrientation = GetCell(c, x, y, z)
local oldMaterial, oldType, oldOrientation = GetCell(Terrain, x, y, z)
if oldMaterial.Value <= 0 then
return nil
end
@ -162,15 +163,16 @@ local function getCircularCell(
}
end
local function getCircular(cellPos)
local function getCircular(cellPos: Vector3)
local setCells = {}
local finalX = cellPos.x + radius
local finalZ = cellPos.z + radius
local finalY = cellPos.y + radius
-- whoever originally wrote these ordered (X, Z, Y) is a psychopath - Heliodex
local finalX = cellPos.X + radius
local finalY = cellPos.Y + radius
local finalZ = cellPos.Z + radius
for x = cellPos.x - radius, finalX do
for z = cellPos.z - radius, finalZ do
for y = cellPos.y - radius, finalY do
for x = cellPos.X - radius, finalX do
for y = cellPos.Y - radius, finalY do
for z = cellPos.Z - radius, finalZ do
table.insert(
setCells,
getCircularCell(x, y, z, cellPos, radius * radius)
@ -182,8 +184,8 @@ local function getCircular(cellPos)
return setCells
end
local function getAffectedCells(startPos)
if startPos and c then
local function getAffectedCells(startPos: Vector3)
if startPos and Terrain then
if brushType == "Circular" then
return getCircular(startPos)
elseif brushType == "Square" then
@ -194,13 +196,13 @@ local function getAffectedCells(startPos)
return {}
end
local function directionIsDown(fromCell, toCell)
local function directionIsDown(fromCell: Vector3, toCell: Vector3)
if not toCell then
return false
end
if toCell and fromCell then
local direction = (toCell - fromCell).unit
local direction = (toCell - fromCell).Unit
local absX, absY, absZ =
math.abs(direction.X), math.abs(direction.Y), math.abs(direction.Z)
if absY > absX and absY > absZ then
@ -294,7 +296,7 @@ local function setWaterDirection(mouseCellPos, setCells)
then
if overallDirection.x > 0 then
SetWaterCell(
c,
Terrain,
setCells[1].xPos,
setCells[1].yPos,
setCells[1].zPos,
@ -303,7 +305,7 @@ local function setWaterDirection(mouseCellPos, setCells)
)
else
SetWaterCell(
c,
Terrain,
setCells[1].xPos,
setCells[1].yPos,
setCells[1].zPos,
@ -317,7 +319,7 @@ local function setWaterDirection(mouseCellPos, setCells)
then
if overallDirection.z > 0 then
SetWaterCell(
c,
Terrain,
setCells[1].xPos,
setCells[1].yPos,
setCells[1].zPos,
@ -326,7 +328,7 @@ local function setWaterDirection(mouseCellPos, setCells)
)
else
SetWaterCell(
c,
Terrain,
setCells[1].xPos,
setCells[1].yPos,
setCells[1].zPos,
@ -340,7 +342,7 @@ local function setWaterDirection(mouseCellPos, setCells)
then
if overallDirection.y > 0 then
SetWaterCell(
c,
Terrain,
setCells[1].xPos,
setCells[1].yPos,
setCells[1].zPos,
@ -349,7 +351,7 @@ local function setWaterDirection(mouseCellPos, setCells)
)
else
SetWaterCell(
c,
Terrain,
setCells[1].xPos,
setCells[1].yPos,
setCells[1].zPos,
@ -364,7 +366,7 @@ local function setWaterDirection(mouseCellPos, setCells)
for i = 1, #setCells do
if setCells[i].xPos == initX then
SetWaterCell(
c,
Terrain,
setCells[i].xPos,
setCells[i].yPos,
setCells[i].zPos,
@ -373,7 +375,7 @@ local function setWaterDirection(mouseCellPos, setCells)
)
elseif setCells[i].xPos == endX then
SetWaterCell(
c,
Terrain,
setCells[i].xPos,
setCells[i].yPos,
setCells[i].zPos,
@ -383,7 +385,7 @@ local function setWaterDirection(mouseCellPos, setCells)
else
if setCells[i].zPos < zMiddle then
SetWaterCell(
c,
Terrain,
setCells[i].xPos,
setCells[i].yPos,
setCells[i].zPos,
@ -392,7 +394,7 @@ local function setWaterDirection(mouseCellPos, setCells)
)
elseif setCells[i].zPos > zMiddle then
SetWaterCell(
c,
Terrain,
setCells[i].xPos,
setCells[i].yPos,
setCells[i].zPos,
@ -402,7 +404,7 @@ local function setWaterDirection(mouseCellPos, setCells)
else
if setCells[i].xPos < xMiddle then
SetWaterCell(
c,
Terrain,
setCells[i].xPos,
setCells[i].yPos,
setCells[i].zPos,
@ -411,7 +413,7 @@ local function setWaterDirection(mouseCellPos, setCells)
)
elseif setCells[i].xPos > xMiddle then
SetWaterCell(
c,
Terrain,
setCells[i].xPos,
setCells[i].yPos,
setCells[i].zPos,
@ -439,7 +441,7 @@ local function paintWith(
end
for i = 1, #setCells do
SetCell(
c,
Terrain,
setCells[i].xPos,
setCells[i].yPos,
setCells[i].zPos,
@ -453,7 +455,7 @@ local function paintWith(
end
local function paint(startPos)
if not (startPos and c) then
if not (startPos and Terrain) then
return
end
@ -474,14 +476,14 @@ local function paint(startPos)
end
local function calculateRegion(mouseR)
local cellPos = WorldToCellPreferSolid(c, mouseR.Hit.p)
local cellPos = WorldToCellPreferSolid(Terrain, mouseR.Hit.p)
local lowVec =
Vector3.new(cellPos.x - radius, cellPos.y - radius, cellPos.z - radius)
local highVec =
Vector3.new(cellPos.x + radius, cellPos.y + radius, cellPos.z + radius)
lowVec = CellCenterToWorld(c, lowVec.x, lowVec.y, lowVec.z)
highVec = CellCenterToWorld(c, highVec.x, highVec.y, highVec.z)
lowVec = CellCenterToWorld(Terrain, lowVec.x, lowVec.y, lowVec.z)
highVec = CellCenterToWorld(Terrain, highVec.x, highVec.y, highVec.z)
return Region3.new(
lowVec + Vector3.new(2, 2, 2),
@ -494,7 +496,7 @@ local function createSelection(mouseS, massSelection)
calculateRegion(mouseS),
BrickColor.new "Lime green",
massSelection,
game.CoreGui
CoreGui
)
end
@ -517,7 +519,7 @@ local function setPositionDirectionality()
else
for i = 1, #cellsToSet do
SetWaterCell(
c,
Terrain,
cellsToSet[i].xPos,
cellsToSet[i].yPos,
cellsToSet[i].zPos,
@ -561,7 +563,7 @@ local function setPositionDirectionality()
for i = 1, #cellsToSet do
SetWaterCell(
c,
Terrain,
cellsToSet[i].xPos,
cellsToSet[i].yPos,
cellsToSet[i].zPos,
@ -581,7 +583,7 @@ function mouseDown(mouseD)
return
end
local newCell = WorldToCellPreferSolid(c, mouseD.Hit.p)
local newCell = WorldToCellPreferSolid(Terrain, mouseD.Hit.p)
if not newCell then
return
elseif
@ -607,7 +609,12 @@ function mouseUp(_)
lastCell = nil
end
local function moveTowardsGoal(direction: string, currPos, goalPos, currCell)
local function moveTowardsGoal(
direction: string,
currPos: number,
goalPos: number,
currCell: Vector3
)
if currPos == goalPos then
return currCell
end
@ -670,18 +677,18 @@ function mouseMove(mouseM)
if not on then
return
elseif mouseM.Target == workspace.Terrain then
if lastCell == WorldToCellPreferSolid(c, mouseM.Hit.p) then
if lastCell == WorldToCellPreferSolid(Terrain, mouseM.Hit.p) then
return
end
updateSelection(mouseM)
local newCell = WorldToCellPreferSolid(c, mouseM.Hit.p)
local newCell = WorldToCellPreferSolid(Terrain, mouseM.Hit.p)
if not dragging then
return
end
-- local painting = true
paint(newCell)
if lastCell and newCell and (lastCell - newCell).magnitude > 1 then
if lastCell and newCell and (lastCell - newCell).Magnitude > 1 then
paintBetweenPoints(lastCell, newCell)
end
lastLastCell = lastCell
@ -693,7 +700,7 @@ function mouseMove(mouseM)
end
function On()
if not c then
if not Terrain then
return
end
this:Activate(true)

View File

@ -1,3 +1,4 @@
--!strict
while not game do
wait()
end
@ -16,17 +17,17 @@ local on = false
local On, Off
local this = PluginManager():CreatePlugin()
local this = PluginManager():CreatePlugin() :: Plugin
this.Deactivation:connect(function()
Off()
end)
local toolbar = this:CreateToolbar "Terrain"
local toolbar = this:CreateToolbar "Terrain" :: Toolbar
local toolbarbutton = toolbar:CreateButton(
"Stamper",
"Part Stamper - Toggle List (Shift + F)",
"stamp.png"
)
) :: Button
toolbarbutton.Click:connect(function()
if on then
Off()

View File

@ -1,3 +1,4 @@
--!strict
while not game do
wait()
end
@ -11,6 +12,8 @@ local CreateStandardLabel = require "../Modules/Terrain/CreateStandardLabel"
local News = require "../Modules/New"
local New = News.New
local Hydrate = News.Hydrate
local BaseUrl = require "../Modules/BaseUrl"
local path = BaseUrl.path
---------------
--PLUGIN SETUP-
@ -21,7 +24,7 @@ local on = false
local On, Off
local mouseDown, mouseUp
local this = PluginManager():CreatePlugin()
local this = PluginManager():CreatePlugin() :: Plugin
local mouse = this:GetMouse()
mouse.Button1Down:connect(function()
mouseDown(mouse)
@ -30,9 +33,9 @@ mouse.Button1Up:connect(function()
mouseUp(mouse)
end)
local toolbar = this:CreateToolbar "Terrain"
local toolbar = this:CreateToolbar "Terrain" :: Toolbar
local toolbarbutton =
toolbar:CreateButton("Flood Fill", "Flood Fill", "floodFill.png")
toolbar:CreateButton("Flood Fill", "Flood Fill", "floodFill.png") :: Button
toolbarbutton.Click:connect(function()
if on then
Off()
@ -47,12 +50,12 @@ workspace:WaitForChild "Terrain"
-----------------------------
--LOCAL FUNCTION DEFINITIONS-
-----------------------------
local c = workspace.Terrain
local Terrain = workspace.Terrain
-- local WorldToCellPreferSolid = c.WorldToCellPreferSolid
local WorldToCellPreferEmpty = c.WorldToCellPreferEmpty
local CellCenterToWorld = c.CellCenterToWorld
local GetCell = c.GetCell
local SetCell = c.SetCell
local WorldToCellPreferEmpty = Terrain.WorldToCellPreferEmpty
local CellCenterToWorld = Terrain.CellCenterToWorld
local GetCell = Terrain.GetCell
local SetCell = Terrain.SetCell
-- local maxYExtents = c.MaxExtents.Max.Y
local emptyMaterial = Enum.CellMaterial.Empty
@ -78,7 +81,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(path "asset?id=82741829")
------------------------- OBJECT DEFINITIONS ---------------------
@ -168,7 +171,7 @@ function MouseHighlighter.Create(mouseUse)
BackgroundTransparency = 1,
Size = UDim2.new(1, 0, 1, 0),
Position = UDim2.new(-0.35, 0, -0.5, 0),
Image = "http://banland.xyz/asset?id=82741829",
Image = path "asset?id=82741829",
Parent = billboardGui,
}
@ -245,47 +248,48 @@ function MouseHighlighter.Create(mouseUse)
end
local vectorPos = Vector3.new(position.x, position.y, position.z)
local cellPos = WorldToCellPreferEmpty(c, vectorPos)
local cellPos = WorldToCellPreferEmpty(Terrain, vectorPos)
local regionToSelect
local cellMaterial = GetCell(c, cellPos.x, cellPos.y, cellPos.z)
local cellMaterial = GetCell(Terrain, cellPos.x, cellPos.y, cellPos.z)
local y = cellPos.y
-- only select empty cells
while cellMaterial ~= emptyMaterial do
y = y + 1
cellMaterial = GetCell(c, cellPos.x, y, cellPos.z)
y += 1
cellMaterial = GetCell(Terrain, cellPos.x, y, cellPos.z)
end
cellPos = Vector3.new(cellPos.x, y, cellPos.z)
local lowVec = CellCenterToWorld(c, cellPos.x, cellPos.y - 1, cellPos.z)
local lowVec =
CellCenterToWorld(Terrain, cellPos.x, cellPos.y - 1, cellPos.z)
local highVec =
CellCenterToWorld(c, cellPos.x, cellPos.y + 1, cellPos.z)
CellCenterToWorld(Terrain, cellPos.x, cellPos.y + 1, cellPos.z)
regionToSelect = Region3.new(lowVec, highVec)
highlighter.selectionPart.CFrame = regionToSelect.CFrame
if nil ~= highlighter.OnClicked and highlighter.mouseDown then
if nil == highlighter.lastUsedPoint then
highlighter.lastUsedPoint = WorldToCellPreferEmpty(
c,
Vector3.new(mouseH.Hit.x, mouseH.Hit.y, mouseH.Hit.z)
)
else
cellPos = WorldToCellPreferEmpty(
c,
Vector3.new(mouseH.Hit.x, mouseH.Hit.y, mouseH.Hit.z)
)
if not (highlighter.OnClicked and highlighter.mouseDown) then
return
end
if nil == highlighter.lastUsedPoint then
highlighter.lastUsedPoint = WorldToCellPreferEmpty(
Terrain,
Vector3.new(mouseH.Hit.x, mouseH.Hit.y, mouseH.Hit.z)
)
else
cellPos = WorldToCellPreferEmpty(
Terrain,
Vector3.new(mouseH.Hit.x, mouseH.Hit.y, mouseH.Hit.z)
)
-- holdChange = cellPos - highlighter.lastUsedPoint
-- holdChange = cellPos - highlighter.lastUsedPoint
-- Require terrain.
if 0 == GetCell(c, cellPos.X, cellPos.Y, cellPos.Z).Value then
return
else
highlighter.lastUsedPoint = cellPos
end
-- Require terrain.
if 0 == GetCell(Terrain, cellPos.X, cellPos.Y, cellPos.Z).Value then
return
end
highlighter.lastUsedPoint = cellPos
end
end
@ -305,8 +309,7 @@ function MouseHighlighter:SetMaterial(newMaterial)
end
function MouseHighlighter:GetPosition()
local position = self.selectionPart.CFrame.p
return WorldToCellPreferEmpty(c, position)
return WorldToCellPreferEmpty(Terrain, self.selectionPart.CFrame.p)
end
-- Hide the highlighter.
@ -421,19 +424,16 @@ end
-- Clear the popup, free up assets.
function ConfirmationPopup:Clear()
if nil ~= self.confirmButton then
if self.confirmButton then
self.confirmButton.Parent = nil
end
if nil ~= self.declineButton then
if self.declineButton then
self.declineButton.Parent = nil
end
if nil ~= self.confirmationFrame then
if self.confirmationFrame then
self.confirmationFrame.Parent = nil
end
if nil ~= self.confirmLabel then
if self.confirmLabel then
self.confirmLabel.Parent = nil
end
@ -499,7 +499,7 @@ local function LoadProgressBar(text)
-8
),
BackgroundTransparency = 1,
Image = "http://banland.xyz/asset?id=45880710",
Image = path "asset?id=45880710",
Parent = spinnerFrame,
}
@ -514,15 +514,13 @@ local function LoadProgressBar(text)
local pos = 0
while pos < 8 do
if pos == spinPos or pos == ((spinPos + 1) % 8) then
spinnerIcons[pos + 1].Image =
"http://banland.xyz/asset?id=45880668"
else
spinnerIcons[pos + 1].Image =
"http://banland.xyz/asset?id=45880710"
end
spinnerIcons[pos + 1].Image = (
pos == spinPos or pos == ((spinPos + 1) % 8)
)
and path "asset?id=45880668"
or path "asset?id=45880710"
pos = pos + 1
pos += 1
end
spinPos = (spinPos + 1) % 8
wait(0.2)
@ -603,8 +601,7 @@ function mouseUp(_)
end
local function getMaterial(x, y, z)
local material = GetCell(c, x, y, z)
return material
return GetCell(Terrain, x, y, z)
end
local function doBreadthFill(x, y, z)
@ -680,15 +677,15 @@ function breadthFill(x, y, z)
end
local function cellInTerrain(x, y, z)
if x < c.MaxExtents.Min.X or x >= c.MaxExtents.Max.X then
if x < Terrain.MaxExtents.Min.X or x >= Terrain.MaxExtents.Max.X then
return false
end
if y < c.MaxExtents.Min.Y or y >= c.MaxExtents.Max.Y then
if y < Terrain.MaxExtents.Min.Y or y >= Terrain.MaxExtents.Max.Y then
return false
end
if z < c.MaxExtents.Min.Z or z >= c.MaxExtents.Max.Z then
if z < Terrain.MaxExtents.Min.Z or z >= Terrain.MaxExtents.Max.Z then
return false
end
@ -698,7 +695,7 @@ end
function breadthFillHelper(x, y, z, yDepthChecks)
-- first, lets try and fill this cell
if cellInTerrain(x, y, z) and getMaterial(x, y, z) == emptyMaterial then
SetCell(c, x, y, z, currentMaterial, 0, 0)
SetCell(Terrain, x, y, z, currentMaterial, 0, 0)
end
local cellsToFill = {}
@ -735,7 +732,7 @@ function breadthFillHelper(x, y, z, yDepthChecks)
for i = 1, #cellsToFill do
SetCell(
c,
Terrain,
cellsToFill[i].xPos,
cellsToFill[i].yPos,
cellsToFill[i].zPos,
@ -753,7 +750,7 @@ function breadthFillHelper(x, y, z, yDepthChecks)
end
On = function()
if not c then
if not Terrain then
return
elseif this then
this:Activate(true)