Miscellaneous corescript fixes and place load function
This commit is contained in:
parent
ab301bf734
commit
48b73a181c
|
|
@ -0,0 +1,11 @@
|
||||||
|
local Load = {}
|
||||||
|
|
||||||
|
function Load.Help()
|
||||||
|
print "Call Load.Start with a ticket to start a game server!"
|
||||||
|
end
|
||||||
|
|
||||||
|
function Load.Start(ticket: string)
|
||||||
|
dofile("http://banland.xyz/game/host?ticket=" .. ticket)
|
||||||
|
end
|
||||||
|
|
||||||
|
return Load
|
||||||
|
|
@ -17,6 +17,7 @@ local normalCores = {}
|
||||||
local libraryCores = {
|
local libraryCores = {
|
||||||
"Fusion/init.luau",
|
"Fusion/init.luau",
|
||||||
"Red/init.luau",
|
"Red/init.luau",
|
||||||
|
"Load.luau",
|
||||||
}
|
}
|
||||||
local otherCores = {}
|
local otherCores = {}
|
||||||
local plugins = {}
|
local plugins = {}
|
||||||
|
|
|
||||||
|
|
@ -8612,6 +8612,7 @@ declare TeleportService: TeleportService
|
||||||
declare plugin: Plugin
|
declare plugin: Plugin
|
||||||
declare script: LuaSourceContainer
|
declare script: LuaSourceContainer
|
||||||
declare function loadfile(file: string): any
|
declare function loadfile(file: string): any
|
||||||
|
declare function dofile(file: string): any
|
||||||
|
|
||||||
-- fusion
|
-- fusion
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
--!strict
|
||||||
-- RbxGui
|
-- RbxGui
|
||||||
print "[Mercury]: Loaded corescript 45284430"
|
print "[Mercury]: Loaded corescript 45284430"
|
||||||
|
|
||||||
|
|
@ -143,7 +144,7 @@ local function cancelSlide(areaSoak)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
RbxGui.CreateMessageDialog = function(title, message, buttons)
|
function RbxGui.CreateMessageDialog(title, message, buttons)
|
||||||
local frame = New "Frame" {
|
local frame = New "Frame" {
|
||||||
Size = UDim2.new(0.5, 0, 0.5, 0),
|
Size = UDim2.new(0.5, 0, 0.5, 0),
|
||||||
Position = UDim2.new(0.25, 0, 0.25, 0),
|
Position = UDim2.new(0.25, 0, 0.25, 0),
|
||||||
|
|
@ -182,7 +183,7 @@ RbxGui.CreateMessageDialog = function(title, message, buttons)
|
||||||
return frame
|
return frame
|
||||||
end
|
end
|
||||||
|
|
||||||
RbxGui.CreateStyledMessageDialog = function(title, message, style, buttons)
|
function RbxGui.CreateStyledMessageDialog(title, message, style, buttons)
|
||||||
local frame = New "Frame" {
|
local frame = New "Frame" {
|
||||||
Size = UDim2.new(0.5, 0, 0, 165),
|
Size = UDim2.new(0.5, 0, 0, 165),
|
||||||
Position = UDim2.new(0.25, 0, 0.5, -72.5),
|
Position = UDim2.new(0.25, 0, 0.5, -72.5),
|
||||||
|
|
@ -244,7 +245,7 @@ RbxGui.CreateStyledMessageDialog = function(title, message, style, buttons)
|
||||||
end
|
end
|
||||||
|
|
||||||
local scrollMouseCount
|
local scrollMouseCount
|
||||||
RbxGui.CreateDropDownMenu = function(items, onSelect, forRoblox)
|
function RbxGui.CreateDropDownMenu(items, onSelect, forRoblox)
|
||||||
local width = UDim.new(0, 100)
|
local width = UDim.new(0, 100)
|
||||||
local height = UDim.new(0, 32)
|
local height = UDim.new(0, 32)
|
||||||
|
|
||||||
|
|
@ -601,7 +602,7 @@ RbxGui.CreateDropDownMenu = function(items, onSelect, forRoblox)
|
||||||
return frame, updateSelection
|
return frame, updateSelection
|
||||||
end
|
end
|
||||||
|
|
||||||
RbxGui.CreatePropertyDropDownMenu = function(instance, property, enum)
|
function RbxGui.CreatePropertyDropDownMenu(instance, property, enum)
|
||||||
local items = enum:GetEnumItems()
|
local items = enum:GetEnumItems()
|
||||||
local names = {}
|
local names = {}
|
||||||
local nameToItem = {}
|
local nameToItem = {}
|
||||||
|
|
@ -627,7 +628,7 @@ RbxGui.CreatePropertyDropDownMenu = function(instance, property, enum)
|
||||||
return frame
|
return frame
|
||||||
end
|
end
|
||||||
|
|
||||||
RbxGui.GetFontHeight = function(font, fontSize)
|
function RbxGui.GetFontHeight(font, fontSize)
|
||||||
if font == nil or fontSize == nil then
|
if font == nil or fontSize == nil then
|
||||||
error "Font and FontSize must be non-nil"
|
error "Font and FontSize must be non-nil"
|
||||||
end
|
end
|
||||||
|
|
@ -764,7 +765,7 @@ local function layoutGuiObjectsHelper(frame, guiObjects, settingsTable)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
RbxGui.LayoutGuiObjects = function(frame, guiObjects, settingsTable)
|
function RbxGui.LayoutGuiObjects(frame, guiObjects, settingsTable)
|
||||||
if not frame:IsA "GuiObject" then
|
if not frame:IsA "GuiObject" then
|
||||||
error "Frame must be a GuiObject"
|
error "Frame must be a GuiObject"
|
||||||
end
|
end
|
||||||
|
|
@ -818,7 +819,7 @@ RbxGui.LayoutGuiObjects = function(frame, guiObjects, settingsTable)
|
||||||
layoutGuiObjectsHelper(wrapperFrame, guiObjects, settingsTable)
|
layoutGuiObjectsHelper(wrapperFrame, guiObjects, settingsTable)
|
||||||
end
|
end
|
||||||
|
|
||||||
RbxGui.CreateSlider = function(steps, width, position)
|
function RbxGui.CreateSlider(steps, width, position)
|
||||||
local sliderGui = New "Frame" {
|
local sliderGui = New "Frame" {
|
||||||
Size = UDim2.new(1, 0, 1, 0),
|
Size = UDim2.new(1, 0, 1, 0),
|
||||||
BackgroundTransparency = 1,
|
BackgroundTransparency = 1,
|
||||||
|
|
@ -878,7 +879,7 @@ RbxGui.CreateSlider = function(steps, width, position)
|
||||||
bar.Position = position
|
bar.Position = position
|
||||||
end
|
end
|
||||||
|
|
||||||
local slider = New "TextButton" {
|
local slider = New "ImageButton" {
|
||||||
Name = "Slider",
|
Name = "Slider",
|
||||||
BackgroundTransparency = 1,
|
BackgroundTransparency = 1,
|
||||||
Image = "rbxasset://textures/ui/Slider.png",
|
Image = "rbxasset://textures/ui/Slider.png",
|
||||||
|
|
@ -932,7 +933,7 @@ RbxGui.CreateSlider = function(steps, width, position)
|
||||||
return sliderGui, sliderPosition, sliderSteps
|
return sliderGui, sliderPosition, sliderSteps
|
||||||
end
|
end
|
||||||
|
|
||||||
RbxGui.CreateTrueScrollingFrame = function()
|
function RbxGui.CreateTrueScrollingFrame()
|
||||||
local lowY
|
local lowY
|
||||||
local highY
|
local highY
|
||||||
|
|
||||||
|
|
@ -1536,7 +1537,7 @@ RbxGui.CreateTrueScrollingFrame = function()
|
||||||
return scrollingFrame, controlFrame
|
return scrollingFrame, controlFrame
|
||||||
end
|
end
|
||||||
|
|
||||||
RbxGui.CreateScrollingFrame = function(orderList, scrollStyle)
|
function RbxGui.CreateScrollingFrame(orderList, scrollStyle)
|
||||||
local frame = New "Frame" {
|
local frame = New "Frame" {
|
||||||
Name = "ScrollingFrame",
|
Name = "ScrollingFrame",
|
||||||
BackgroundTransparency = 1,
|
BackgroundTransparency = 1,
|
||||||
|
|
@ -2134,6 +2135,7 @@ RbxGui.CreateScrollingFrame = function(orderList, scrollStyle)
|
||||||
|
|
||||||
return frame, scrollUpButton, scrollDownButton, recalculate, scrollbar
|
return frame, scrollUpButton, scrollDownButton, recalculate, scrollbar
|
||||||
end
|
end
|
||||||
|
|
||||||
local function binaryGrow(min, max, fits)
|
local function binaryGrow(min, max, fits)
|
||||||
if min > max then
|
if min > max then
|
||||||
return min
|
return min
|
||||||
|
|
@ -2186,7 +2188,7 @@ local function getGuiOwner(instance)
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
RbxGui.AutoTruncateTextObject = function(textLabel)
|
function RbxGui.AutoTruncateTextObject(textLabel)
|
||||||
local text = textLabel.Text
|
local text = textLabel.Text
|
||||||
|
|
||||||
local fullLabel = Hydrate(textLabel:Clone()) {
|
local fullLabel = Hydrate(textLabel:Clone()) {
|
||||||
|
|
@ -2288,10 +2290,10 @@ RbxGui.AutoTruncateTextObject = function(textLabel)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function TransitionTutorialPages(
|
local function TransitionTutorialPages(
|
||||||
fromPage,
|
fromPage: Instance?,
|
||||||
toPage,
|
toPage: Instance?,
|
||||||
transitionFrame,
|
transitionFrame: Frame,
|
||||||
currentPageValue
|
currentPageValue: ObjectValue
|
||||||
)
|
)
|
||||||
if fromPage then
|
if fromPage then
|
||||||
fromPage.Visible = false
|
fromPage.Visible = false
|
||||||
|
|
@ -2340,7 +2342,7 @@ local function TransitionTutorialPages(
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
RbxGui.CreateTutorial = function(name, tutorialKey, createButtons)
|
function RbxGui.CreateTutorial(name, tutorialKey, createButtons: boolean)
|
||||||
local frame = New "Frame" {
|
local frame = New "Frame" {
|
||||||
Name = "Tutorial-" .. name,
|
Name = "Tutorial-" .. name,
|
||||||
BackgroundTransparency = 1,
|
BackgroundTransparency = 1,
|
||||||
|
|
@ -4385,7 +4387,7 @@ RbxGui.CreatePluginFrame = function(name, size, position, scrollable, parent)
|
||||||
return dragBar, widgetContainer, helpFrame, closeEvent
|
return dragBar, widgetContainer, helpFrame, closeEvent
|
||||||
end
|
end
|
||||||
|
|
||||||
RbxGui.Help = function(funcNameOrFunc)
|
function RbxGui.Help(funcNameOrFunc)
|
||||||
--input argument can be a string or a function. Should return a description (of arguments and expected side effects)
|
--input argument can be a string or a function. Should return a description (of arguments and expected side effects)
|
||||||
if
|
if
|
||||||
funcNameOrFunc == "CreatePropertyDropDownMenu"
|
funcNameOrFunc == "CreatePropertyDropDownMenu"
|
||||||
|
|
|
||||||
|
|
@ -829,13 +829,13 @@ local PrivilegeLevel = {
|
||||||
Banned = 0,
|
Banned = 0,
|
||||||
}
|
}
|
||||||
|
|
||||||
local IsPersonalServer = not not game.Workspace:FindFirstChild "PSVariable"
|
-- local IsPersonalServer = not not game.Workspace:FindFirstChild "PSVariable"
|
||||||
|
|
||||||
game.Workspace.ChildAdded:connect(function(nchild)
|
-- game.Workspace.ChildAdded:connect(function(nchild)
|
||||||
if nchild.Name == "PSVariable" and nchild:IsA "BoolValue" then
|
-- if nchild.Name == "PSVariable" and nchild:IsA "BoolValue" then
|
||||||
IsPersonalServer = true
|
-- IsPersonalServer = true
|
||||||
end
|
-- end
|
||||||
end)
|
-- end)
|
||||||
-------------------------------
|
-------------------------------
|
||||||
-- Static Functions
|
-- Static Functions
|
||||||
-------------------------------
|
-------------------------------
|
||||||
|
|
@ -914,8 +914,8 @@ local function WaitForClick(frameParent, polledFunction, exitFunction)
|
||||||
end
|
end
|
||||||
WaitForClickLock = true
|
WaitForClickLock = true
|
||||||
local connection, connection2
|
local connection, connection2
|
||||||
connection = BigButton.MouseButton1Up:connect(function(nx, ny)
|
connection = BigButton.MouseButton1Up:connect(function()
|
||||||
exitFunction(nx, ny)
|
exitFunction()
|
||||||
BigButton.Visible = false
|
BigButton.Visible = false
|
||||||
connection:disconnect()
|
connection:disconnect()
|
||||||
if connection2 then
|
if connection2 then
|
||||||
|
|
@ -933,7 +933,7 @@ local function WaitForClick(frameParent, polledFunction, exitFunction)
|
||||||
BigButton.Parent = frameParent
|
BigButton.Parent = frameParent
|
||||||
frameParent.AncestryChanged:connect(function(child, nparent)
|
frameParent.AncestryChanged:connect(function(child, nparent)
|
||||||
if child == frameParent and nparent == nil then
|
if child == frameParent and nparent == nil then
|
||||||
exitFunction(nx, ny)
|
exitFunction()
|
||||||
BigButton.Visible = false
|
BigButton.Visible = false
|
||||||
connection:disconnect()
|
connection:disconnect()
|
||||||
connection2:disconnect()
|
connection2:disconnect()
|
||||||
|
|
@ -2287,10 +2287,11 @@ local function InitMovingPanel(entry, player)
|
||||||
local nextIndex = 2
|
local nextIndex = 2
|
||||||
local friendStatus = GetFriendStatus(player)
|
local friendStatus = GetFriendStatus(player)
|
||||||
debugprint(tostring(friendStatus))
|
debugprint(tostring(friendStatus))
|
||||||
local showRankMenu = IsPersonalServer
|
local showRankMenu = false
|
||||||
and LocalPlayer.PersonalServerRank >= PrivilegeLevel.Admin
|
-- IsPersonalServer
|
||||||
and LocalPlayer.PersonalServerRank
|
-- and LocalPlayer.PersonalServerRank >= PrivilegeLevel.Admin
|
||||||
> SelectedPlayer.PersonalServerRank
|
-- and LocalPlayer.PersonalServerRank
|
||||||
|
-- > SelectedPlayer.PersonalServerRank
|
||||||
|
|
||||||
local ReportPlayerButton = MakePopupButton(PopUpPanel, "Report Player", 0)
|
local ReportPlayerButton = MakePopupButton(PopUpPanel, "Report Player", 0)
|
||||||
ReportPlayerButton.MouseButton1Click:connect(function()
|
ReportPlayerButton.MouseButton1Click:connect(function()
|
||||||
|
|
@ -2300,8 +2301,8 @@ local function InitMovingPanel(entry, player)
|
||||||
PopUpPanel,
|
PopUpPanel,
|
||||||
"Friend",
|
"Friend",
|
||||||
1,
|
1,
|
||||||
not showRankMenu
|
-- not showRankMenu and
|
||||||
and friendStatus ~= Enum.FriendStatus.FriendRequestReceived
|
friendStatus ~= Enum.FriendStatus.FriendRequestReceived
|
||||||
)
|
)
|
||||||
FriendPlayerButton.MouseButton1Click:connect(OnFriendButtonSelect)
|
FriendPlayerButton.MouseButton1Click:connect(OnFriendButtonSelect)
|
||||||
|
|
||||||
|
|
@ -2433,7 +2434,6 @@ local function StartDrag(entry, startx, starty)
|
||||||
WaitForChild(entry.Frame, "ClickListener")
|
WaitForChild(entry.Frame, "ClickListener")
|
||||||
local function dragExit()
|
local function dragExit()
|
||||||
-- stopDrag = true
|
-- stopDrag = true
|
||||||
|
|
||||||
if
|
if
|
||||||
entry.Player
|
entry.Player
|
||||||
and SelectedPlayer
|
and SelectedPlayer
|
||||||
|
|
@ -3431,5 +3431,5 @@ AreNamesExpanded.Value = true
|
||||||
BaseUpdate()
|
BaseUpdate()
|
||||||
|
|
||||||
--UGGGLY,find a better way later
|
--UGGGLY,find a better way later
|
||||||
wait(2)
|
-- wait(2)
|
||||||
IsPersonalServer = not not game.Workspace:FindFirstChild "PSVariable"
|
-- IsPersonalServer = not not game.Workspace:FindFirstChild "PSVariable"
|
||||||
|
|
|
||||||
|
|
@ -19,11 +19,12 @@ if ScriptContext then
|
||||||
for name, id in pairs {
|
for name, id in pairs {
|
||||||
Fusion = 10000001,
|
Fusion = 10000001,
|
||||||
Red = 10000002,
|
Red = 10000002,
|
||||||
|
Load = 10000003,
|
||||||
Gui = 45284430,
|
Gui = 45284430,
|
||||||
Utility = 60595411,
|
Utility = 60595411,
|
||||||
Stamper = 73157242,
|
Stamper = 73157242,
|
||||||
} do
|
} do
|
||||||
ScriptContext:RegisterLibrary(`Libraries/Rbx{name}`, tostring(id))
|
ScriptContext:RegisterLibrary("Libraries/Rbx" .. name, tostring(id))
|
||||||
end
|
end
|
||||||
ScriptContext:LibraryRegistrationComplete()
|
ScriptContext:LibraryRegistrationComplete()
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue