Add type definitions and fix type errors in corescripts

This commit is contained in:
Lewin Kelly 2023-08-14 23:46:25 +01:00
parent 3c7499eb2e
commit de20338362
16 changed files with 11254 additions and 86 deletions

11146
defs.d.lua Normal file

File diff suppressed because one or more lines are too long

View File

@ -1,12 +1,15 @@
print "[Mercury]: Loaded corescript 107893730" print "[Mercury]: Loaded corescript 107893730"
-- this script creates the gui and sends the web requests for in game purchase prompts -- this script creates the gui and sends the web requests for in game purchase prompts
local MarketplaceService = game:GetService "MarketplaceService"
-- wait for important items to appear -- wait for important items to appear
while not Game do while not Game do
wait(0.1) wait(0.1)
end end
while not game:GetService "MarketplaceService" do while not MarketplaceService do
wait(0.1) wait(0.1)
MarketplaceService = game:GetService "MarketplaceService"
end end
while not game:FindFirstChild "CoreGui" do while not game:FindFirstChild "CoreGui" do
wait(0.1) wait(0.1)
@ -138,7 +141,7 @@ function closePurchasePrompt()
) )
end end
function userPurchaseActionsEnded(isSuccess) function userPurchaseActionsEnded(isSuccess: boolean)
checkingPlayerFunds = false checkingPlayerFunds = false
if isSuccess then -- show the user we bought the item successfully, when they close this dialog we will call signalPromptEnded if isSuccess then -- show the user we bought the item successfully, when they close this dialog we will call signalPromptEnded
@ -527,7 +530,7 @@ end
---------------------------------------------- Currency Functions --------------------------------------------- ---------------------------------------------- Currency Functions ---------------------------------------------
-- enums have no implicit conversion to numbers in lua, has to have a function to do this -- enums have no implicit conversion to numbers in lua, has to have a function to do this
function currencyEnumToInt(currencyEnum) function currencyEnumToInt(currencyEnum: Enum.CurrencyType)
if if
currencyEnum == Enum.CurrencyType.Robux currencyEnum == Enum.CurrencyType.Robux
or currencyEnum == Enum.CurrencyType.Default or currencyEnum == Enum.CurrencyType.Default

View File

@ -1,6 +1,7 @@
print "[Mercury]: Loaded corescript 157877000" print "[Mercury]: Loaded corescript 157877000"
--Include --Include
local Create = assert(LoadLibrary "RbxUtility").Create local Create: (instance: string) -> ({ [string]: any }) -> Instance =
assert(LoadLibrary "RbxUtility").Create
-- A Few Script Globals -- A Few Script Globals
local gui local gui

View File

@ -787,7 +787,7 @@ t.LayoutGuiObjects = function(frame, guiObjects, settingsTable)
frame.Changed:connect(function(prop) frame.Changed:connect(function(prop)
if prop == "AbsoluteSize" then if prop == "AbsoluteSize" then
--Wait a heartbeat for it to sync in --Wait a heartbeat for it to sync in
recalculate(nil) recalculate()
end end
end) end)
frame.AncestryChanged:connect(recalculate) frame.AncestryChanged:connect(recalculate)
@ -1914,12 +1914,12 @@ t.CreateScrollingFrame = function(orderList, scrollStyle)
if scrollPosition < 1 then if scrollPosition < 1 then
scrollPosition = 1 scrollPosition = 1
end end
recalculate(nil) recalculate()
end end
local doScrollDown = function() local doScrollDown = function()
scrollPosition += rowSize scrollPosition += rowSize
recalculate(nil) recalculate()
end end
local scrollUp = function(mouseYPos) local scrollUp = function(mouseYPos)
@ -2036,7 +2036,7 @@ t.CreateScrollingFrame = function(orderList, scrollStyle)
end end
scrollPosition = newScrollPosition scrollPosition = newScrollPosition
recalculate(nil) recalculate()
end) end)
upCon = mouseDrag.MouseButton1Up:connect(function() upCon = mouseDrag.MouseButton1Up:connect(function()
scrollStamp = tick() scrollStamp = tick()
@ -2078,21 +2078,21 @@ t.CreateScrollingFrame = function(orderList, scrollStyle)
end) end)
frame.ChildAdded:connect(function() frame.ChildAdded:connect(function()
recalculate(nil) recalculate()
end) end)
frame.ChildRemoved:connect(function() frame.ChildRemoved:connect(function()
recalculate(nil) recalculate()
end) end)
frame.Changed:connect(function(prop) frame.Changed:connect(function(prop)
if prop == "AbsoluteSize" then if prop == "AbsoluteSize" then
--Wait a heartbeat for it to sync in --Wait a heartbeat for it to sync in
recalculate(nil) recalculate()
end end
end) end)
frame.AncestryChanged:connect(function() frame.AncestryChanged:connect(function()
recalculate(nil) recalculate()
end) end)
return frame, scrollUpButton, scrollDownButton, recalculate, scrollbar return frame, scrollUpButton, scrollDownButton, recalculate, scrollbar
@ -4017,12 +4017,12 @@ t.CreateLoadingFrame = function(name, size, position)
cancelButtonClicked:Fire() cancelButtonClicked:Fire()
end) end)
local updateLoadingGuiPercent = function(percent, tweenAction, tweenLength) local updateLoadingGuiPercent = function(percent: number, tweenAction, tweenLength)
if percent and type(percent) ~= "number" then if percent and type(percent) ~= "number" then
error( error(
"updateLoadingGuiPercent expects number as argument, got", "updateLoadingGuiPercent expects number as argument, got "
type(percent), .. type(percent)
"instead" .. " instead"
) )
end end

View File

@ -1639,7 +1639,7 @@ if LoadLibrary then
end end
) )
function localPlayerChange() local function localPlayerChange()
gameMainMenu.ResetButton.Visible = game.Players.LocalPlayer gameMainMenu.ResetButton.Visible = game.Players.LocalPlayer
if game.Players.LocalPlayer then if game.Players.LocalPlayer then
settings().Rendering.EnableFRM = true settings().Rendering.EnableFRM = true

View File

@ -1,4 +1,7 @@
print "[Mercury]: Loaded corescript 48488398" print "[Mercury]: Loaded corescript 48488398"
local TeleportService = TeleportService
function waitForProperty(instance, property) function waitForProperty(instance, property)
while not instance[property] do while not instance[property] do
instance.Changed:wait() instance.Changed:wait()
@ -183,7 +186,7 @@ function showTeleportUI(message, timer)
end end
function onTeleport(teleportState, _, _) function onTeleport(teleportState, _, _)
if game:GetService("TeleportService").CustomizedTeleportUI == false then if TeleportService.CustomizedTeleportUI == false then
if teleportState == Enum.TeleportState.Started then if teleportState == Enum.TeleportState.Started then
showTeleportUI("Teleport started...", 0) showTeleportUI("Teleport started...", 0)
elseif teleportState == Enum.TeleportState.WaitingForServer then elseif teleportState == Enum.TeleportState.WaitingForServer then
@ -202,13 +205,13 @@ end
if teleportEnabled then if teleportEnabled then
localPlayer.OnTeleport:connect(onTeleport) localPlayer.OnTeleport:connect(onTeleport)
game:GetService("TeleportService").ErrorCallback = function(message) TeleportService.ErrorCallback = function(message)
local popup = script.Parent:FindFirstChild "Popup" local popup = script.Parent:FindFirstChild "Popup"
showOneButton() showOneButton()
popup.PopupText.Text = message popup.PopupText.Text = message
local clickCon local clickCon
clickCon = popup.OKButton.MouseButton1Click:connect(function() clickCon = popup.OKButton.MouseButton1Click:connect(function()
game:GetService("TeleportService"):TeleportCancel() TeleportService:TeleportCancel()
if clickCon then if clickCon then
clickCon:disconnect() clickCon:disconnect()
end end
@ -252,11 +255,7 @@ if teleportEnabled then
end end
) )
end end
game:GetService("TeleportService").ConfirmationCallback = function( TeleportService.ConfirmationCallback = function(message, placeId, spawnName)
message,
placeId,
spawnName
)
local popup = script.Parent:FindFirstChild "Popup" local popup = script.Parent:FindFirstChild "Popup"
popup.PopupText.Text = message popup.PopupText.Text = message
popup.PopupImage.Image = "" popup.PopupImage.Image = ""
@ -286,8 +285,7 @@ if teleportEnabled then
yesCon = popup.AcceptButton.MouseButton1Click:connect(function() yesCon = popup.AcceptButton.MouseButton1Click:connect(function()
killCons() killCons()
local success, err = pcall(function() local success, err = pcall(function()
game:GetService("TeleportService") TeleportService:TeleportImpl(placeId, spawnName)
:TeleportImpl(placeId, spawnName)
end) end)
if not success then if not success then
showOneButton() showOneButton()
@ -342,7 +340,7 @@ if teleportEnabled then
noCon = popup.DeclineButton.MouseButton1Click:connect(function() noCon = popup.DeclineButton.MouseButton1Click:connect(function()
killCons() killCons()
pcall(function() pcall(function()
game:GetService("TeleportService"):TeleportCancel() TeleportService:TeleportCancel()
end) end)
end) end)

View File

@ -6,6 +6,9 @@ if game.CoreGui.Version < 3 then
return return
end -- peace out if we aren't using the right client end -- peace out if we aren't using the right client
local ContentProvider = game:GetService "ContentProvider"
local UserInputService = game:GetService "UserInputService"
local gui = script.Parent local gui = script.Parent
-- A couple of necessary functions -- A couple of necessary functions
@ -23,7 +26,7 @@ end
local function IsTouchDevice() local function IsTouchDevice()
local touchEnabled = false local touchEnabled = false
pcall(function() pcall(function()
touchEnabled = Game:GetService("UserInputService").TouchEnabled touchEnabled = UserInputService.TouchEnabled
end) end)
return touchEnabled return touchEnabled
end end
@ -334,8 +337,7 @@ closeButton.Modal = true
local XImage = Instance.new "ImageLabel" local XImage = Instance.new "ImageLabel"
XImage.RobloxLocked = true XImage.RobloxLocked = true
XImage.Name = "XImage" XImage.Name = "XImage"
game:GetService("ContentProvider") ContentProvider:Preload "http://banland.xyz/asset/?id=75547445"
:Preload "http://banland.xyz/asset/?id=75547445"
XImage.Image = "http://banland.xyz/asset/?id=75547445" --TODO: move to rbxasset XImage.Image = "http://banland.xyz/asset/?id=75547445" --TODO: move to rbxasset
XImage.BackgroundTransparency = 1 XImage.BackgroundTransparency = 1
XImage.Position = UDim2.new(-0.25, -1, -0.25, -1) XImage.Position = UDim2.new(-0.25, -1, -0.25, -1)
@ -767,8 +769,7 @@ CharacterPane.Parent = Wardrobe
--CharacterPane Children --CharacterPane Children
local FaceFrame = makeCharFrame("FacesFrame", CharacterPane) local FaceFrame = makeCharFrame("FacesFrame", CharacterPane)
game:GetService("ContentProvider") ContentProvider:Preload "http://banland.xyz/asset/?id=75460621"
:Preload "http://banland.xyz/asset/?id=75460621"
makeZone( makeZone(
"FaceZone", "FaceZone",
"http://banland.xyz/asset/?id=75460621", "http://banland.xyz/asset/?id=75460621",
@ -799,8 +800,7 @@ makeStyledButton(
) )
local HatsFrame = makeCharFrame("HatsFrame", CharacterPane) local HatsFrame = makeCharFrame("HatsFrame", CharacterPane)
game:GetService("ContentProvider") ContentProvider:Preload "http://banland.xyz/asset/?id=75457888"
:Preload "http://banland.xyz/asset/?id=75457888"
local HatsZone = makeZone( local HatsZone = makeZone(
"HatsZone", "HatsZone",
"http://banland.xyz/asset/?id=75457888", "http://banland.xyz/asset/?id=75457888",
@ -831,8 +831,7 @@ makeStyledButton(
) )
local PantsFrame = makeCharFrame("PantsFrame", CharacterPane) local PantsFrame = makeCharFrame("PantsFrame", CharacterPane)
game:GetService("ContentProvider") ContentProvider:Preload "http://banland.xyz/asset/?id=75457920"
:Preload "http://banland.xyz/asset/?id=75457920"
makeZone( makeZone(
"PantsZone", "PantsZone",
"http://banland.xyz/asset/?id=75457920", "http://banland.xyz/asset/?id=75457920",
@ -927,8 +926,7 @@ makeTextLabel(
) )
local TShirtFrame = makeCharFrame("T-ShirtsFrame", CharacterPane) local TShirtFrame = makeCharFrame("T-ShirtsFrame", CharacterPane)
game:GetService("ContentProvider") ContentProvider:Preload "http://banland.xyz/asset/?id=75460642"
:Preload "http://banland.xyz/asset/?id=75460642"
makeZone( makeZone(
"TShirtZone", "TShirtZone",
"http://banland.xyz/asset/?id=75460642", "http://banland.xyz/asset/?id=75460642",
@ -959,8 +957,7 @@ makeStyledButton(
) )
local ColorFrame = makeCharFrame("ColorFrame", CharacterPane) local ColorFrame = makeCharFrame("ColorFrame", CharacterPane)
game:GetService("ContentProvider") ContentProvider:Preload "http://banland.xyz/asset/?id=76049888"
:Preload "http://banland.xyz/asset/?id=76049888"
local ColorZone = makeZone( local ColorZone = makeZone(
"ColorZone", "ColorZone",
"http://banland.xyz/asset/?id=76049888", "http://banland.xyz/asset/?id=76049888",

View File

@ -22,6 +22,8 @@ local backpackEnabled = true
local robloxGui = game:GetService("CoreGui"):FindFirstChild "RobloxGui" local robloxGui = game:GetService("CoreGui"):FindFirstChild "RobloxGui"
assert(robloxGui) assert(robloxGui)
local GuiService = game:GetService "GuiService"
local controlFrame = waitForChild(robloxGui, "ControlFrame") local controlFrame = waitForChild(robloxGui, "ControlFrame")
local backpackButton = waitForChild(controlFrame, "BackpackButton") local backpackButton = waitForChild(controlFrame, "BackpackButton")
local backpack = waitForChild(robloxGui, "Backpack") local backpack = waitForChild(robloxGui, "Backpack")
@ -133,14 +135,14 @@ end
function registerNumberKeys() function registerNumberKeys()
for i = 0, 9 do for i = 0, 9 do
game:GetService("GuiService"):AddKey(tostring(i)) GuiService:AddKey(tostring(i))
end end
end end
function unregisterNumberKeys() function unregisterNumberKeys()
pcall(function() pcall(function()
for i = 0, 9 do for i = 0, 9 do
game:GetService("GuiService"):RemoveKey(tostring(i)) GuiService:RemoveKey(tostring(i))
end end
end) end)
end end
@ -1227,6 +1229,7 @@ characterChildAddedCon = player.Character.ChildAdded:connect(function(child)
end) end)
waitForChild(player.Character, "Humanoid") waitForChild(player.Character, "Humanoid")
local humanoidDiedCon
humanoidDiedCon = player.Character.Humanoid.Died:connect(function() humanoidDiedCon = player.Character.Humanoid.Died:connect(function()
if humanoidDiedCon then if humanoidDiedCon then
humanoidDiedCon:disconnect() humanoidDiedCon:disconnect()
@ -1348,7 +1351,7 @@ guiBackpack.SwapSlot.Changed:connect(function()
end end
end) end)
game:GetService("GuiService").KeyPressed:connect(function(key) GuiService.KeyPressed:connect(function(key)
if characterInWorkspace() then if characterInWorkspace() then
activateGear(key) activateGear(key)
end end

View File

@ -520,16 +520,16 @@ t.SelectTerrainRegion = function(
assert(regionToSelect) assert(regionToSelect)
assert(color) assert(color)
if not type(regionToSelect) == "Region3" then if type(regionToSelect) ~= "Region3" then
error( error(
"regionToSelect (first arg), should be of type Region3, but is type", "regionToSelect (first arg), should be of type Region3, but is type "
type(regionToSelect) .. type(regionToSelect)
) )
end end
if not type(color) == "BrickColor" then if type(color) ~= "BrickColor" then
error( error(
"color (second arg), should be of type BrickColor, but is type", "color (second arg), should be of type BrickColor, but is type "
type(color) .. type(color)
) )
end end
@ -581,7 +581,7 @@ t.SelectTerrainRegion = function(
-- end -- end
-- helper function that creates the basis for a selection box -- helper function that creates the basis for a selection box
function createAdornment(theColor) local function createAdornment(theColor)
local selectionPartClone local selectionPartClone
local selectionBoxClone local selectionBoxClone

View File

@ -1,4 +1,7 @@
print "[Mercury]: Loaded corescript 73157242" print "[Mercury]: Loaded corescript 73157242"
local ChangeHistoryService = game:GetService "ChangeHistoryService"
local t = {} local t = {}
-- function waitForChild(instance, name) -- function waitForChild(instance, name)
@ -1106,7 +1109,7 @@ t.SetupStamperDragger = function(
local function DoHighScalabilityRegionSelect() local function DoHighScalabilityRegionSelect()
local megaCube = stampData.CurrentParts:FindFirstChild "MegaClusterCube" local megaCube = stampData.CurrentParts:FindFirstChild "MegaClusterCube"
if not megaCube then if not megaCube then
if not stampData.CurrentParts.Name == "MegaClusterCube" then if stampData.CurrentParts.Name ~= "MegaClusterCube" then
return return
else else
megaCube = stampData.CurrentParts megaCube = stampData.CurrentParts
@ -1253,9 +1256,9 @@ t.SetupStamperDragger = function(
end end
if not Mouse:IsA "Mouse" then if not Mouse:IsA "Mouse" then
error( error(
"Error: RbxStamper.DoStamperMouseMove: Mouse is of type", "Error: RbxStamper.DoStamperMouseMove: Mouse is of type "
Mouse.className, .. Mouse.className
"should be of type Mouse" .. " should be of type Mouse"
) )
return return
end end
@ -2229,8 +2232,7 @@ t.SetupStamperDragger = function(
if cellSet then if cellSet then
stampData.CurrentParts.Parent = nil stampData.CurrentParts.Parent = nil
pcall(function() pcall(function()
game:GetService("ChangeHistoryService") ChangeHistoryService:SetWaypoint "StamperMulti"
:SetWaypoint "StamperMulti"
end) end)
end end
@ -2529,8 +2531,7 @@ t.SetupStamperDragger = function(
-- Mark for undo. It has to happen here or the selection display will come back also. -- Mark for undo. It has to happen here or the selection display will come back also.
pcall(function() pcall(function()
game:GetService("ChangeHistoryService") ChangeHistoryService:SetWaypoint "StamperSingle"
:SetWaypoint "StamperSingle"
end) end)
return true return true
end end
@ -2688,7 +2689,7 @@ t.SetupStamperDragger = function(
stampData.CurrentParts = nil stampData.CurrentParts = nil
pcall(function() pcall(function()
game:GetService("ChangeHistoryService"):SetWaypoint "StampedObject" ChangeHistoryService:SetWaypoint "StampedObject"
end) end)
return true return true
end end

View File

@ -4,6 +4,8 @@ if game.CoreGui.Version < 7 then
return return
end -- peace out if we aren't using the right client end -- peace out if we aren't using the right client
local GuiService = game:GetService "GuiService"
-- basic functions -- basic functions
local function waitForChild(instance, name) local function waitForChild(instance, name)
while not instance:FindFirstChild(name) do while not instance:FindFirstChild(name) do
@ -395,12 +397,12 @@ function coreGuiChanged(coreGuiType, enabled)
if disabledByDeveloper then if disabledByDeveloper then
pcall(function() pcall(function()
game:GetService("GuiService"):RemoveKey(tilde) GuiService:RemoveKey(tilde)
game:GetService("GuiService"):RemoveKey(backquote) GuiService:RemoveKey(backquote)
end) end)
else else
game:GetService("GuiService"):AddKey(tilde) GuiService:AddKey(tilde)
game:GetService("GuiService"):AddKey(backquote) GuiService:AddKey(backquote)
end end
resetSearch() resetSearch()
@ -460,9 +462,9 @@ screen.Changed:connect(function(prop)
end) end)
-- GuiService key setup -- GuiService key setup
game:GetService("GuiService"):AddKey(tilde) GuiService:AddKey(tilde)
game:GetService("GuiService"):AddKey(backquote) GuiService:AddKey(backquote)
game:GetService("GuiService").KeyPressed:connect(function(key) GuiService.KeyPressed:connect(function(key)
if not active or disabledByDeveloper then if not active or disabledByDeveloper then
return return
end end

View File

@ -1690,7 +1690,7 @@ function Input:OnMouseScroll()
if Chat:CheckIfInBounds(Input.Speed) then if Chat:CheckIfInBounds(Input.Speed) then
return return
end end
Chat:ScrollQueue() -- Chat:ScrollQueue()
end end
function Input:ApplySpeed(value) function Input:ApplySpeed(value)

View File

@ -2,6 +2,10 @@ print "[Mercury]: Loaded Host corescript"
-- Start Game Script Arguments -- Start Game Script Arguments
local placeId, sleeptime, access, url, killID, deathID, timeout, injectScriptAssetID, servicesUrl, libraryRegistrationScriptAssetID local placeId, sleeptime, access, url, killID, deathID, timeout, injectScriptAssetID, servicesUrl, libraryRegistrationScriptAssetID
local InsertService = game:GetService "InsertService"
local BadgeService = game:GetService "BadgeService"
local FriendService = game:GetService "FriendService"
-- StartGame -- -- StartGame --
pcall(function() pcall(function()
game:GetService("ScriptContext"):AddStarterScript(injectScriptAssetID) game:GetService("ScriptContext"):AddStarterScript(injectScriptAssetID)
@ -112,48 +116,48 @@ if url ~= nil then
end) end)
-- pcall(function() game:GetService("Players"):SetChatFilterUrl(url .. "/Game/ChatFilter.ashx") end) -- pcall(function() game:GetService("Players"):SetChatFilterUrl(url .. "/Game/ChatFilter.ashx") end)
-- game:GetService("BadgeService"):SetPlaceId(placeId) -- BadgeService:SetPlaceId(placeId)
if access ~= nil then if access ~= nil then
game:GetService("BadgeService"):SetAwardBadgeUrl( BadgeService:SetAwardBadgeUrl(
url url
.. "/Game/Badge/AwardBadge.ashx?UserID=%d&BadgeID=%d&PlaceID=%d&" .. "/Game/Badge/AwardBadge.ashx?UserID=%d&BadgeID=%d&PlaceID=%d&"
.. access .. access
) )
game:GetService("BadgeService"):SetHasBadgeUrl( BadgeService:SetHasBadgeUrl(
url .. "/Game/Badge/HasBadge.ashx?UserID=%d&BadgeID=%d&" .. access url .. "/Game/Badge/HasBadge.ashx?UserID=%d&BadgeID=%d&" .. access
) )
game:GetService("BadgeService"):SetIsBadgeDisabledUrl( BadgeService:SetIsBadgeDisabledUrl(
url url
.. "/Game/Badge/IsBadgeDisabled.ashx?BadgeID=%d&PlaceID=%d&" .. "/Game/Badge/IsBadgeDisabled.ashx?BadgeID=%d&PlaceID=%d&"
.. access .. access
) )
game:GetService("FriendService"):SetMakeFriendUrl( FriendService:SetMakeFriendUrl(
servicesUrl servicesUrl
.. "/Friend/CreateFriend?firstUserId=%d&secondUserId=%d&" .. "/Friend/CreateFriend?firstUserId=%d&secondUserId=%d&"
.. access .. access
) )
game:GetService("FriendService"):SetBreakFriendUrl( FriendService:SetBreakFriendUrl(
servicesUrl servicesUrl
.. "/Friend/BreakFriend?firstUserId=%d&secondUserId=%d&" .. "/Friend/BreakFriend?firstUserId=%d&secondUserId=%d&"
.. access .. access
) )
game:GetService("FriendService"):SetGetFriendsUrl( FriendService:SetGetFriendsUrl(
servicesUrl .. "/Friend/AreFriends?userId=%d&" .. access servicesUrl .. "/Friend/AreFriends?userId=%d&" .. access
) )
end end
game:GetService("BadgeService"):SetIsBadgeLegalUrl "" BadgeService:SetIsBadgeLegalUrl ""
game:GetService("InsertService") InsertService
:SetBaseSetsUrl( :SetBaseSetsUrl(
url .. "/Game/Tools/InsertAsset.ashx?nsets=10&type=base" url .. "/Game/Tools/InsertAsset.ashx?nsets=10&type=base"
) )
game:GetService("InsertService"):SetUserSetsUrl( InsertService:SetUserSetsUrl(
url .. "/Game/Tools/InsertAsset.ashx?nsets=20&type=user&userid=%d" url .. "/Game/Tools/InsertAsset.ashx?nsets=20&type=user&userid=%d"
) )
game:GetService("InsertService") InsertService
:SetCollectionUrl(url .. "/Game/Tools/InsertAsset.ashx?sid=%d") :SetCollectionUrl(url .. "/Game/Tools/InsertAsset.ashx?sid=%d")
game:GetService("InsertService"):SetAssetUrl(url .. "/Asset/?id=%d") InsertService:SetAssetUrl(url .. "/Asset/?id=%d")
game:GetService("InsertService") InsertService
:SetAssetVersionUrl(url .. "/Asset/?assetversionid=%d") :SetAssetVersionUrl(url .. "/Asset/?assetversionid=%d")
pcall(function() pcall(function()

View File

@ -88,7 +88,7 @@ pcall(function()
Players:SetChatStyle(Enum.ChatStyle.ClassicAndBubble) Players:SetChatStyle(Enum.ChatStyle.ClassicAndBubble)
end) end)
local waitingForCharacter = false waitingForCharacter = false
pcall(function() pcall(function()
if settings().Network.MtuOverride == 0 then if settings().Network.MtuOverride == 0 then
settings().Network.MtuOverride = 1400 settings().Network.MtuOverride = 1400
@ -96,7 +96,7 @@ pcall(function()
end) end)
-- functions --------------------------------------- -- functions ---------------------------------------
function setMessage(message) function setMessage(message: string)
-- todo: animated "..." -- todo: animated "..."
game:SetMessage(message) game:SetMessage(message)
end end
@ -241,7 +241,7 @@ local success, err = pcall(function()
connectionFailed = Client.ConnectionFailed:connect(onConnectionFailed) connectionFailed = Client.ConnectionFailed:connect(onConnectionFailed)
Client.Ticket = "" Client.Ticket = ""
playerConnectSucces, player = pcall(function() local playerConnectSuccess, player = pcall(function()
return Client:PlayerConnect( return Client:PlayerConnect(
_USER_ID, _USER_ID,
"_SERVER_ADDRESS", "_SERVER_ADDRESS",
@ -250,7 +250,7 @@ local success, err = pcall(function()
threadSleepTime threadSleepTime
) )
end) end)
if not playerConnectSucces then if not playerConnectSuccess then
--Old player connection scheme --Old player connection scheme
player = Players:CreateLocalPlayer(_USER_ID) player = Players:CreateLocalPlayer(_USER_ID)
Client:Connect("_SERVER_ADDRESS", _SERVER_PORT, 0, threadSleepTime) Client:Connect("_SERVER_ADDRESS", _SERVER_PORT, 0, threadSleepTime)

View File

@ -122,7 +122,7 @@ function doVisit()
end) end)
end end
success, err = pcall(doVisit) local success, err = pcall(doVisit)
if not addedBuildTools then if not addedBuildTools then
local playerName = Instance.new "StringValue" local playerName = Instance.new "StringValue"

View File

@ -235,6 +235,12 @@ globals:
type: number type: number
- required: false - required: false
type: number type: number
Enum.UploadSetting.Never:
struct: EnumItem
Enum.PriorityMethod.Ask me first:
struct: EnumItem
Enum.PriorityMethod.AccumulatedError: Enum.PriorityMethod.AccumulatedError:
struct: EnumItem struct: EnumItem
Enum.PhysicsSendMethod.ErrorComputation2: Enum.PhysicsSendMethod.ErrorComputation2:
@ -5586,6 +5592,10 @@ globals:
math.sign: math.sign:
args: args:
- type: number - type: number
math.nan:
property: read-only
math.inf:
property: read-only
module: module:
removed: true removed: true
os.execute: os.execute:
@ -6939,6 +6949,9 @@ structs:
args: args:
- required: false - required: false
type: any type: any
SetMessageBrickCount:
method: true
args: []
GetService: GetService:
args: args:
- type: - type: