Improve formatting of corescripts and other files
This commit is contained in:
parent
ae5a05b740
commit
8be2be6594
80
mercury.yml
80
mercury.yml
|
|
@ -3,6 +3,28 @@
|
||||||
base: lua51
|
base: lua51
|
||||||
name: mercury
|
name: mercury
|
||||||
globals:
|
globals:
|
||||||
|
# Substitutions
|
||||||
|
_USER_ID:
|
||||||
|
args: []
|
||||||
|
_CREATOR_ID:
|
||||||
|
args: []
|
||||||
|
_SERVER_PORT:
|
||||||
|
args: []
|
||||||
|
_SERVER_PRESENCE_URL:
|
||||||
|
args: []
|
||||||
|
_SERVER_ADDRESS:
|
||||||
|
args: []
|
||||||
|
_PLACE_ID:
|
||||||
|
args: []
|
||||||
|
_IS_STUDIO_JOIN:
|
||||||
|
args: []
|
||||||
|
_MAP_LOCATION:
|
||||||
|
args: []
|
||||||
|
_MAP_LOCATION_EXISTS:
|
||||||
|
args: []
|
||||||
|
_CHAR_APPEARANCE:
|
||||||
|
args: []
|
||||||
|
|
||||||
ypcall:
|
ypcall:
|
||||||
args:
|
args:
|
||||||
- type: function
|
- type: function
|
||||||
|
|
@ -213,6 +235,11 @@ globals:
|
||||||
type: number
|
type: number
|
||||||
- required: false
|
- required: false
|
||||||
type: number
|
type: number
|
||||||
|
Enum.PriorityMethod.AccumulatedError:
|
||||||
|
struct: EnumItem
|
||||||
|
Enum.PhysicsSendMethod.ErrorComputation2:
|
||||||
|
struct: EnumItem
|
||||||
|
|
||||||
Enum.ABTestLoadingStatus.Error:
|
Enum.ABTestLoadingStatus.Error:
|
||||||
struct: EnumItem
|
struct: EnumItem
|
||||||
Enum.ABTestLoadingStatus.GetEnumItems:
|
Enum.ABTestLoadingStatus.GetEnumItems:
|
||||||
|
|
@ -2995,6 +3022,8 @@ globals:
|
||||||
struct: EnumItem
|
struct: EnumItem
|
||||||
Enum.MembershipType.TurboBuildersClub:
|
Enum.MembershipType.TurboBuildersClub:
|
||||||
struct: EnumItem
|
struct: EnumItem
|
||||||
|
Enum.MembershipType._MEMBERSHIP_TYPE:
|
||||||
|
struct: EnumItem
|
||||||
Enum.MeshPartDetailLevel.DistanceBased:
|
Enum.MeshPartDetailLevel.DistanceBased:
|
||||||
struct: EnumItem
|
struct: EnumItem
|
||||||
Enum.MeshPartDetailLevel.GetEnumItems:
|
Enum.MeshPartDetailLevel.GetEnumItems:
|
||||||
|
|
@ -5534,8 +5563,6 @@ globals:
|
||||||
removed: true
|
removed: true
|
||||||
load:
|
load:
|
||||||
removed: true
|
removed: true
|
||||||
loadfile:
|
|
||||||
removed: true
|
|
||||||
math.clamp:
|
math.clamp:
|
||||||
args:
|
args:
|
||||||
- type: number
|
- type: number
|
||||||
|
|
@ -6897,6 +6924,10 @@ structs:
|
||||||
deprecated:
|
deprecated:
|
||||||
message: this property is deprecated.
|
message: this property is deprecated.
|
||||||
replace: []
|
replace: []
|
||||||
|
SetRemoteBuildMode:
|
||||||
|
args:
|
||||||
|
- type: any
|
||||||
|
method: true
|
||||||
|
|
||||||
SaveToRoblox:
|
SaveToRoblox:
|
||||||
method: true
|
method: true
|
||||||
|
|
@ -7041,6 +7072,7 @@ structs:
|
||||||
- ScriptCloneWatcherHelper
|
- ScriptCloneWatcherHelper
|
||||||
- ScriptContext
|
- ScriptContext
|
||||||
- ScriptEditorService
|
- ScriptEditorService
|
||||||
|
- ScriptInformationProvider
|
||||||
- ScriptRegistrationService
|
- ScriptRegistrationService
|
||||||
- ScriptService
|
- ScriptService
|
||||||
- Selection
|
- Selection
|
||||||
|
|
@ -7096,6 +7128,13 @@ structs:
|
||||||
method: true
|
method: true
|
||||||
GraphicsQualityChangeRequest:
|
GraphicsQualityChangeRequest:
|
||||||
struct: Event
|
struct: Event
|
||||||
|
HttpGet:
|
||||||
|
args:
|
||||||
|
- required: false
|
||||||
|
type: any
|
||||||
|
- required: false
|
||||||
|
type: any
|
||||||
|
method: true
|
||||||
HttpGetAsync:
|
HttpGetAsync:
|
||||||
args:
|
args:
|
||||||
- required: false
|
- required: false
|
||||||
|
|
@ -7103,6 +7142,17 @@ structs:
|
||||||
- required: false
|
- required: false
|
||||||
type: any
|
type: any
|
||||||
method: true
|
method: true
|
||||||
|
HttpPost:
|
||||||
|
args:
|
||||||
|
- required: false
|
||||||
|
type: any
|
||||||
|
- required: false
|
||||||
|
type: any
|
||||||
|
- required: false
|
||||||
|
type: any
|
||||||
|
- required: false
|
||||||
|
type: any
|
||||||
|
method: true
|
||||||
HttpPostAsync:
|
HttpPostAsync:
|
||||||
args:
|
args:
|
||||||
- required: false
|
- required: false
|
||||||
|
|
@ -7248,11 +7298,37 @@ structs:
|
||||||
- required: false
|
- required: false
|
||||||
type: any
|
type: any
|
||||||
method: true
|
method: true
|
||||||
|
SetPlaceID:
|
||||||
|
args:
|
||||||
|
- type: any
|
||||||
|
- required: false
|
||||||
|
type: any
|
||||||
|
method: true
|
||||||
|
SetCreatorID:
|
||||||
|
args:
|
||||||
|
- type: any
|
||||||
|
- type: any
|
||||||
|
method: true
|
||||||
|
SetScreenshotInfo:
|
||||||
|
args:
|
||||||
|
- type: any
|
||||||
|
method: true
|
||||||
|
SetVideoInfo:
|
||||||
|
args:
|
||||||
|
- type: any
|
||||||
|
method: true
|
||||||
SetUniverseId:
|
SetUniverseId:
|
||||||
args:
|
args:
|
||||||
- required: false
|
- required: false
|
||||||
type: any
|
type: any
|
||||||
method: true
|
method: true
|
||||||
|
SetMessage:
|
||||||
|
args:
|
||||||
|
- type: any
|
||||||
|
method: true
|
||||||
|
ClearMessage:
|
||||||
|
args: []
|
||||||
|
method: true
|
||||||
Shutdown:
|
Shutdown:
|
||||||
args: []
|
args: []
|
||||||
method: true
|
method: true
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,12 @@
|
||||||
|
print "[Mercury]: Loaded Host corescript"
|
||||||
-- Start Game Script Arguments
|
-- Start Game Script Arguments
|
||||||
local placeId, port, sleeptime, access, url, killID, deathID, timeout, autosaveInterval, locationID, groupBuild, machineAddress, gsmInterval, gsmUrl, maxPlayers, maxSlotsUpperLimit, maxSlotsLowerLimit, gsmAccess, injectScriptAssetID, servicesUrl, permissionsServiceUrl, apiKey, libraryRegistrationScriptAssetID = ...
|
local placeId, sleeptime, access, url, killID, deathID, timeout, injectScriptAssetID, servicesUrl, libraryRegistrationScriptAssetID =
|
||||||
|
...
|
||||||
|
|
||||||
-- StartGame --
|
-- StartGame --
|
||||||
pcall(function() game:GetService("ScriptContext"):AddStarterScript(injectScriptAssetID) end)
|
pcall(function()
|
||||||
|
game:GetService("ScriptContext"):AddStarterScript(injectScriptAssetID)
|
||||||
|
end)
|
||||||
game:GetService("RunService"):Run()
|
game:GetService("RunService"):Run()
|
||||||
|
|
||||||
-- REQUIRES: StartGanmeSharedArgs.txt
|
-- REQUIRES: StartGanmeSharedArgs.txt
|
||||||
|
|
@ -24,9 +27,8 @@ end
|
||||||
-- returns the player object that killed this humanoid
|
-- returns the player object that killed this humanoid
|
||||||
-- returns nil if the killer is no longer in the game
|
-- returns nil if the killer is no longer in the game
|
||||||
function getKillerOfHumanoidIfStillInGame(humanoid)
|
function getKillerOfHumanoidIfStillInGame(humanoid)
|
||||||
|
|
||||||
-- check for kill tag on humanoid - may be more than one - todo: deal with this
|
-- check for kill tag on humanoid - may be more than one - todo: deal with this
|
||||||
local tag = humanoid:findFirstChild("creator")
|
local tag = humanoid:findFirstChild "creator"
|
||||||
|
|
||||||
-- find player with name on tag
|
-- find player with name on tag
|
||||||
if tag then
|
if tag then
|
||||||
|
|
@ -56,56 +58,79 @@ end
|
||||||
|
|
||||||
-----------------------------------"CUSTOM" SHARED CODE----------------------------------
|
-----------------------------------"CUSTOM" SHARED CODE----------------------------------
|
||||||
|
|
||||||
pcall(function() settings().Network.UseInstancePacketCache = true end)
|
pcall(function()
|
||||||
pcall(function() settings().Network.UsePhysicsPacketCache = true end)
|
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.FIFO end)
|
||||||
pcall(function() settings()["Task Scheduler"].PriorityMethod = Enum.PriorityMethod.AccumulatedError end)
|
pcall(function()
|
||||||
|
settings()["Task Scheduler"].PriorityMethod = Enum.PriorityMethod.AccumulatedError
|
||||||
|
end)
|
||||||
|
|
||||||
--settings().Network.PhysicsSend = 1 -- 1==RoundRobin
|
--settings().Network.PhysicsSend = 1 -- 1==RoundRobin
|
||||||
settings().Network.PhysicsSend = Enum.PhysicsSendMethod.ErrorComputation2
|
settings().Network.PhysicsSend = Enum.PhysicsSendMethod.ErrorComputation2
|
||||||
settings().Network.ExperimentalPhysicsEnabled = true
|
settings().Network.ExperimentalPhysicsEnabled = true
|
||||||
settings().Network.WaitingForCharacterLogRate = 100
|
settings().Network.WaitingForCharacterLogRate = 100
|
||||||
pcall(function() settings().Diagnostics:LegacyScriptMode() end)
|
pcall(function()
|
||||||
|
settings().Diagnostics:LegacyScriptMode()
|
||||||
|
end)
|
||||||
|
|
||||||
-----------------------------------START GAME SHARED SCRIPT------------------------------
|
-----------------------------------START GAME SHARED SCRIPT------------------------------
|
||||||
|
|
||||||
local url = "_BASE_URL"
|
local url = "_BASE_URL"
|
||||||
local assetId = placeId -- might be able to remove this now
|
-- local assetId = placeId -- might be able to remove this now
|
||||||
|
|
||||||
local scriptContext = game:GetService('ScriptContext')
|
local scriptContext = game:GetService "ScriptContext"
|
||||||
pcall(function() scriptContext:AddStarterScript(libraryRegistrationScriptAssetID) end)
|
pcall(function()
|
||||||
|
scriptContext:AddStarterScript(libraryRegistrationScriptAssetID)
|
||||||
|
end)
|
||||||
scriptContext.ScriptsDisabled = true
|
scriptContext.ScriptsDisabled = true
|
||||||
|
|
||||||
-- game:SetPlaceID(nil, false)
|
-- game:SetPlaceID(nil, false)
|
||||||
game:GetService("ChangeHistoryService"):SetEnabled(false)
|
game:GetService("ChangeHistoryService"):SetEnabled(false)
|
||||||
|
|
||||||
-- establish this peer as the Server
|
-- establish this peer as the Server
|
||||||
local ns = game:GetService("NetworkServer")
|
local ns = game:GetService "NetworkServer"
|
||||||
|
|
||||||
if url~=nil then
|
if url ~= nil then
|
||||||
pcall(function() game:GetService("Players"):SetAbuseReportUrl(url .. "/Report/Games.ashx") end)
|
pcall(function()
|
||||||
pcall(function() game:GetService("ScriptInformationProvider"):SetAssetUrl(url .. "/Asset/") end)
|
game:GetService("Players"):SetAbuseReportUrl(url .. "/Report/Games.ashx")
|
||||||
pcall(function() game:GetService("ContentProvider"):SetBaseUrl(url .. "/") end)
|
end)
|
||||||
|
pcall(function()
|
||||||
|
game:GetService("ScriptInformationProvider"):SetAssetUrl(url .. "/Asset/")
|
||||||
|
end)
|
||||||
|
pcall(function()
|
||||||
|
game:GetService("ContentProvider"):SetBaseUrl(url .. "/")
|
||||||
|
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)
|
-- game:GetService("BadgeService"):SetPlaceId(placeId)
|
||||||
if access~=nil then
|
if access ~= nil then
|
||||||
game:GetService("BadgeService"):SetAwardBadgeUrl(url .. "/Game/Badge/AwardBadge.ashx?UserID=%d&BadgeID=%d&PlaceID=%d&" .. access)
|
game:GetService("BadgeService")
|
||||||
game:GetService("BadgeService"):SetHasBadgeUrl(url .. "/Game/Badge/HasBadge.ashx?UserID=%d&BadgeID=%d&" .. access)
|
:SetAwardBadgeUrl(url .. "/Game/Badge/AwardBadge.ashx?UserID=%d&BadgeID=%d&PlaceID=%d&" .. access)
|
||||||
game:GetService("BadgeService"):SetIsBadgeDisabledUrl(url .. "/Game/Badge/IsBadgeDisabled.ashx?BadgeID=%d&PlaceID=%d&" .. access)
|
game:GetService("BadgeService")
|
||||||
|
:SetHasBadgeUrl(url .. "/Game/Badge/HasBadge.ashx?UserID=%d&BadgeID=%d&" .. access)
|
||||||
|
game:GetService("BadgeService")
|
||||||
|
:SetIsBadgeDisabledUrl(url .. "/Game/Badge/IsBadgeDisabled.ashx?BadgeID=%d&PlaceID=%d&" .. access)
|
||||||
|
|
||||||
game:GetService("FriendService"):SetMakeFriendUrl(servicesUrl .. "/Friend/CreateFriend?firstUserId=%d&secondUserId=%d&" .. access)
|
game:GetService("FriendService")
|
||||||
game:GetService("FriendService"):SetBreakFriendUrl(servicesUrl .. "/Friend/BreakFriend?firstUserId=%d&secondUserId=%d&" .. access)
|
:SetMakeFriendUrl(servicesUrl .. "/Friend/CreateFriend?firstUserId=%d&secondUserId=%d&" .. access)
|
||||||
|
game:GetService("FriendService")
|
||||||
|
:SetBreakFriendUrl(servicesUrl .. "/Friend/BreakFriend?firstUserId=%d&secondUserId=%d&" .. access)
|
||||||
game:GetService("FriendService"):SetGetFriendsUrl(servicesUrl .. "/Friend/AreFriends?userId=%d&" .. access)
|
game:GetService("FriendService"):SetGetFriendsUrl(servicesUrl .. "/Friend/AreFriends?userId=%d&" .. access)
|
||||||
end
|
end
|
||||||
game:GetService("BadgeService"):SetIsBadgeLegalUrl("")
|
game:GetService("BadgeService"):SetIsBadgeLegalUrl ""
|
||||||
game:GetService("InsertService"):SetBaseSetsUrl(url .. "/Game/Tools/InsertAsset.ashx?nsets=10&type=base")
|
game:GetService("InsertService"):SetBaseSetsUrl(url .. "/Game/Tools/InsertAsset.ashx?nsets=10&type=base")
|
||||||
game:GetService("InsertService"):SetUserSetsUrl(url .. "/Game/Tools/InsertAsset.ashx?nsets=20&type=user&userid=%d")
|
game:GetService("InsertService"):SetUserSetsUrl(url .. "/Game/Tools/InsertAsset.ashx?nsets=20&type=user&userid=%d")
|
||||||
game:GetService("InsertService"):SetCollectionUrl(url .. "/Game/Tools/InsertAsset.ashx?sid=%d")
|
game:GetService("InsertService"):SetCollectionUrl(url .. "/Game/Tools/InsertAsset.ashx?sid=%d")
|
||||||
game:GetService("InsertService"):SetAssetUrl(url .. "/Asset/?id=%d")
|
game:GetService("InsertService"):SetAssetUrl(url .. "/Asset/?id=%d")
|
||||||
game:GetService("InsertService"):SetAssetVersionUrl(url .. "/Asset/?assetversionid=%d")
|
game:GetService("InsertService"):SetAssetVersionUrl(url .. "/Asset/?assetversionid=%d")
|
||||||
|
|
||||||
pcall(function() loadfile(url .. "/Game/LoadPlaceInfo.ashx?PlaceId=" .. placeId)() end)
|
pcall(function()
|
||||||
|
loadfile(url .. "/Game/LoadPlaceInfo.ashx?PlaceId=" .. placeId)()
|
||||||
|
end)
|
||||||
|
|
||||||
pcall(function()
|
pcall(function()
|
||||||
if access then
|
if access then
|
||||||
|
|
@ -114,7 +139,9 @@ if url~=nil then
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
pcall(function() game:GetService("NetworkServer"):SetIsPlayerAuthenticationRequired(true) end)
|
pcall(function()
|
||||||
|
game:GetService("NetworkServer"):SetIsPlayerAuthenticationRequired(true)
|
||||||
|
end)
|
||||||
settings().Diagnostics.LuaRamLimit = 0
|
settings().Diagnostics.LuaRamLimit = 0
|
||||||
--settings().Network:SetThroughputSensitivity(0.08, 0.01)
|
--settings().Network:SetThroughputSensitivity(0.08, 0.01)
|
||||||
--settings().Network.SendRate = 35
|
--settings().Network.SendRate = 35
|
||||||
|
|
@ -123,57 +150,65 @@ settings().Diagnostics.LuaRamLimit = 0
|
||||||
--shared["__time"] = 0
|
--shared["__time"] = 0
|
||||||
--game:GetService("RunService").Stepped:connect(function (time) shared["__time"] = time end)
|
--game:GetService("RunService").Stepped:connect(function (time) shared["__time"] = time end)
|
||||||
|
|
||||||
|
if placeId ~= nil and killID ~= nil and deathID ~= nil and url ~= nil then
|
||||||
|
|
||||||
|
|
||||||
if placeId~=nil and killID~=nil and deathID~=nil and url~=nil then
|
|
||||||
-- listen for the death of a Player
|
-- listen for the death of a Player
|
||||||
function createDeathMonitor(player)
|
function createDeathMonitor(player)
|
||||||
-- we don't need to clean up old monitors or connections since the Character will be destroyed soon
|
-- we don't need to clean up old monitors or connections since the Character will be destroyed soon
|
||||||
if player.Character then
|
if player.Character then
|
||||||
local humanoid = waitForChild(player.Character, "Humanoid")
|
local humanoid = waitForChild(player.Character, "Humanoid")
|
||||||
humanoid.Died:connect(
|
humanoid.Died:connect(function()
|
||||||
function ()
|
onDied(player, humanoid)
|
||||||
onDied(player, humanoid)
|
end)
|
||||||
end
|
|
||||||
)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- listen to all Players' Characters
|
-- listen to all Players' Characters
|
||||||
game:GetService("Players").ChildAdded:connect(
|
game:GetService("Players").ChildAdded:connect(function(player)
|
||||||
function (player)
|
createDeathMonitor(player)
|
||||||
createDeathMonitor(player)
|
player.Changed:connect(function(property)
|
||||||
player.Changed:connect(
|
if property == "Character" then
|
||||||
function (property)
|
createDeathMonitor(player)
|
||||||
if property=="Character" then
|
end
|
||||||
createDeathMonitor(player)
|
end)
|
||||||
end
|
end)
|
||||||
end
|
|
||||||
)
|
|
||||||
end
|
|
||||||
)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
game:GetService("Players").PlayerAdded:connect(function(player)
|
game:GetService("Players").PlayerAdded:connect(function(player)
|
||||||
print("Player " .. player.userId .. " added")
|
print("Player " .. player.userId .. " added")
|
||||||
|
|
||||||
if url and access and placeId and player and player.userId then
|
if url and access and placeId and player and player.userId then
|
||||||
game:HttpGet(url .. "/Game/ClientPresence.ashx?action=connect&" .. access .. "&PlaceID=" .. placeId .. "&UserID=" .. player.userId)
|
game:HttpGet(
|
||||||
game:HttpGet(url .. "/Game/PlaceVisit.ashx?UserID=" .. player.userId .. "&AssociatedPlaceID=" .. placeId .. "&" .. access)
|
url
|
||||||
|
.. "/Game/ClientPresence.ashx?action=connect&"
|
||||||
|
.. access
|
||||||
|
.. "&PlaceID="
|
||||||
|
.. placeId
|
||||||
|
.. "&UserID="
|
||||||
|
.. player.userId
|
||||||
|
)
|
||||||
|
game:HttpGet(
|
||||||
|
url .. "/Game/PlaceVisit.ashx?UserID=" .. player.userId .. "&AssociatedPlaceID=" .. placeId .. "&" .. access
|
||||||
|
)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
||||||
game:GetService("Players").PlayerRemoving:connect(function(player)
|
game:GetService("Players").PlayerRemoving:connect(function(player)
|
||||||
print("Player " .. player.userId .. " leaving")
|
print("Player " .. player.userId .. " leaving")
|
||||||
|
|
||||||
if url and access and placeId and player and player.userId then
|
if url and access and placeId and player and player.userId then
|
||||||
game:HttpGet(url .. "/Game/ClientPresence.ashx?action=disconnect&" .. access .. "&PlaceID=" .. placeId .. "&UserID=" .. player.userId)
|
game:HttpGet(
|
||||||
|
url
|
||||||
|
.. "/Game/ClientPresence.ashx?action=disconnect&"
|
||||||
|
.. access
|
||||||
|
.. "&PlaceID="
|
||||||
|
.. placeId
|
||||||
|
.. "&UserID="
|
||||||
|
.. player.userId
|
||||||
|
)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
if placeId~=nil and url~=nil then
|
if placeId ~= nil and url ~= nil then
|
||||||
-- yield so that file load happens in the heartbeat thread
|
-- yield so that file load happens in the heartbeat thread
|
||||||
wait()
|
wait()
|
||||||
|
|
||||||
|
|
@ -186,11 +221,11 @@ if _MAP_LOCATION_EXISTS then
|
||||||
wait()
|
wait()
|
||||||
|
|
||||||
-- load the game
|
-- load the game
|
||||||
game:Load("_MAP_LOCATION")
|
game:Load "_MAP_LOCATION"
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Now start the connection
|
-- Now start the connection
|
||||||
ns:Start(_PORT, sleeptime)
|
ns:Start(_SERVER_PORT, sleeptime)
|
||||||
|
|
||||||
game:GetService("Visit"):SetPing("_SERVER_PRESENCE_URL", 30)
|
game:GetService("Visit"):SetPing("_SERVER_PRESENCE_URL", 30)
|
||||||
|
|
||||||
|
|
@ -205,13 +240,13 @@ scriptContext.ScriptsDisabled = false
|
||||||
|
|
||||||
local reset = ";mc"
|
local reset = ";mc"
|
||||||
game.Players.PlayerAdded:connect(function(player)
|
game.Players.PlayerAdded:connect(function(player)
|
||||||
player.Chatted:connect(function(msg)
|
player.Chatted:connect(function(msg)
|
||||||
if msg==reset then
|
if msg == reset then
|
||||||
if player.Character then
|
if player.Character then
|
||||||
player.Character.Humanoid.Health = 0
|
player.Character.Humanoid.Health = 0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
------------------------------END START GAME SHARED SCRIPT--------------------------
|
------------------------------END START GAME SHARED SCRIPT--------------------------
|
||||||
|
|
@ -1,244 +1,300 @@
|
||||||
|
print "[Mercury]: Loaded Join corescript"
|
||||||
-- functions --------------------------
|
-- functions --------------------------
|
||||||
function onPlayerAdded(player)
|
function onPlayerAdded(_)
|
||||||
-- override
|
-- override
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- MultiplayerSharedScript.lua inserted here ------ Prepended to Join.lua --
|
-- MultiplayerSharedScript.lua inserted here ------ Prepended to Join.lua --
|
||||||
|
|
||||||
pcall(function() game:SetPlaceID(_PLACE_ID, false) end)
|
pcall(function()
|
||||||
|
game:SetPlaceID(_PLACE_ID, false)
|
||||||
|
end)
|
||||||
|
|
||||||
-- if we are on a touch device, no blocking http calls allowed! This can cause a crash on iOS
|
-- if we are on a touch device, no blocking http calls allowed! This can cause a crash on iOS
|
||||||
-- In general we need a long term strategy to remove blocking http calls from all platforms
|
-- In general we need a long term strategy to remove blocking http calls from all platforms
|
||||||
local isTouchDevice = Game:GetService("UserInputService").TouchEnabled
|
-- local isTouchDevice = Game:GetService("UserInputService").TouchEnabled
|
||||||
|
|
||||||
settings()["Game Options"].CollisionSoundEnabled = true
|
settings()["Game Options"].CollisionSoundEnabled = true
|
||||||
pcall(function() settings().Rendering.EnableFRM = true end)
|
pcall(function()
|
||||||
pcall(function() settings().Physics.Is30FpsThrottleEnabled = false end)
|
settings().Rendering.EnableFRM = true
|
||||||
pcall(function() settings()["Task Scheduler"].PriorityMethod = Enum.PriorityMethod.AccumulatedError end)
|
end)
|
||||||
pcall(function() settings().Physics.PhysicsEnvironmentalThrottle = Enum.EnviromentalPhysicsThrottle.DefaultAuto end)
|
pcall(function()
|
||||||
|
settings().Physics.Is30FpsThrottleEnabled = false
|
||||||
|
end)
|
||||||
|
pcall(function()
|
||||||
|
settings()["Task Scheduler"].PriorityMethod = Enum.PriorityMethod.AccumulatedError
|
||||||
|
end)
|
||||||
|
pcall(function()
|
||||||
|
settings().Physics.PhysicsEnvironmentalThrottle = Enum.EnviromentalPhysicsThrottle.DefaultAuto
|
||||||
|
end)
|
||||||
|
|
||||||
-- arguments ---------------------------------------
|
-- arguments ---------------------------------------
|
||||||
local threadSleepTime = ...
|
local threadSleepTime = ...
|
||||||
|
|
||||||
if threadSleepTime==nil then
|
if threadSleepTime == nil then
|
||||||
threadSleepTime = 15
|
threadSleepTime = 15
|
||||||
end
|
end
|
||||||
|
|
||||||
local test = _IS_STUDIO_JOIN
|
local test = _IS_STUDIO_JOIN
|
||||||
|
|
||||||
print("! Joining game '_PLACE_ID' place _PLACE_ID at _SERVER_ADDRESS")
|
print "! Joining game '_PLACE_ID' place _PLACE_ID at _SERVER_ADDRESS"
|
||||||
|
|
||||||
game:GetService("ChangeHistoryService"):SetEnabled(false)
|
game:GetService("ChangeHistoryService"):SetEnabled(false)
|
||||||
game:GetService("ContentProvider"):SetThreadPool(16)
|
game:GetService("ContentProvider"):SetThreadPool(16)
|
||||||
game:GetService("InsertService"):SetBaseSetsUrl("http://www.roblox.com/Game/Tools/InsertAsset.ashx?nsets=10&type=base")
|
game:GetService("InsertService"):SetBaseSetsUrl "http://www.roblox.com/Game/Tools/InsertAsset.ashx?nsets=10&type=base"
|
||||||
game:GetService("InsertService"):SetUserSetsUrl("http://www.roblox.com/Game/Tools/InsertAsset.ashx?nsets=20&type=user&userid=%d")
|
game:GetService("InsertService")
|
||||||
game:GetService("InsertService"):SetCollectionUrl("http://www.roblox.com/Game/Tools/InsertAsset.ashx?sid=%d")
|
:SetUserSetsUrl "http://www.roblox.com/Game/Tools/InsertAsset.ashx?nsets=20&type=user&userid=%d"
|
||||||
game:GetService("InsertService"):SetAssetUrl("http://banland.xyz/Asset/?id=%d")
|
game:GetService("InsertService"):SetCollectionUrl "http://www.roblox.com/Game/Tools/InsertAsset.ashx?sid=%d"
|
||||||
game:GetService("InsertService"):SetAssetVersionUrl("http://www.roblox.com/Asset/?assetversionid=%d")
|
game:GetService("InsertService"):SetAssetUrl "http://banland.xyz/Asset/?id=%d"
|
||||||
|
game:GetService("InsertService"):SetAssetVersionUrl "http://www.roblox.com/Asset/?assetversionid=%d"
|
||||||
|
|
||||||
pcall(function() game:GetService("SocialService"):SetFriendUrl("http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsFriendsWith&playerid=%d&userid=%d") end)
|
pcall(function()
|
||||||
pcall(function() game:GetService("SocialService"):SetBestFriendUrl("http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsBestFriendsWith&playerid=%d&userid=%d") end)
|
game:GetService("SocialService")
|
||||||
pcall(function() game:GetService("SocialService"):SetGroupUrl("http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsInGroup&playerid=%d&groupid=%d") end)
|
:SetFriendUrl "http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsFriendsWith&playerid=%d&userid=%d"
|
||||||
pcall(function() game:GetService("SocialService"):SetGroupRankUrl("http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=GetGroupRank&playerid=%d&groupid=%d") end)
|
end)
|
||||||
pcall(function() game:GetService("SocialService"):SetGroupRoleUrl("http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=GetGroupRole&playerid=%d&groupid=%d") end)
|
pcall(function()
|
||||||
pcall(function() game:GetService("GamePassService"):SetPlayerHasPassUrl("http://banland.xyz/Game/GamePass/GamePassHandler.ashx?Action=HasPass&UserID=%d&PassID=%d") end)
|
game:GetService("SocialService")
|
||||||
pcall(function() game:GetService("MarketplaceService"):SetProductInfoUrl("https://banland.xyz/marketplace/productinfo?assetId=%d") end)
|
:SetBestFriendUrl "http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsBestFriendsWith&playerid=%d&userid=%d"
|
||||||
pcall(function() game:GetService("MarketplaceService"):SetPlayerOwnsAssetUrl("https://banland.xyz/ownership/hasasset?userId=%d&assetId=%d") end)
|
end)
|
||||||
pcall(function() game:SetCreatorID(_CREATOR_ID, Enum.CreatorType.User) end)
|
pcall(function()
|
||||||
|
game:GetService("SocialService")
|
||||||
-- Bubble chat. This is all-encapsulated to allow us to turn it off with a config setting
|
:SetGroupUrl "http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsInGroup&playerid=%d&groupid=%d"
|
||||||
pcall(function() game:GetService("Players"):SetChatStyle(Enum.ChatStyle.ClassicAndBubble) end)
|
end)
|
||||||
|
pcall(function()
|
||||||
local waitingForCharacter = false
|
game:GetService("SocialService")
|
||||||
pcall( function()
|
:SetGroupRankUrl "http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=GetGroupRank&playerid=%d&groupid=%d"
|
||||||
if settings().Network.MtuOverride == 0 then
|
end)
|
||||||
settings().Network.MtuOverride = 1400
|
pcall(function()
|
||||||
end
|
game:GetService("SocialService")
|
||||||
|
:SetGroupRoleUrl "http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=GetGroupRole&playerid=%d&groupid=%d"
|
||||||
|
end)
|
||||||
|
pcall(function()
|
||||||
|
game:GetService("GamePassService")
|
||||||
|
:SetPlayerHasPassUrl "http://banland.xyz/Game/GamePass/GamePassHandler.ashx?Action=HasPass&UserID=%d&PassID=%d"
|
||||||
|
end)
|
||||||
|
pcall(function()
|
||||||
|
game:GetService("MarketplaceService"):SetProductInfoUrl "https://banland.xyz/marketplace/productinfo?assetId=%d"
|
||||||
|
end)
|
||||||
|
pcall(function()
|
||||||
|
game:GetService("MarketplaceService")
|
||||||
|
:SetPlayerOwnsAssetUrl "https://banland.xyz/ownership/hasasset?userId=%d&assetId=%d"
|
||||||
|
end)
|
||||||
|
pcall(function()
|
||||||
|
game:SetCreatorID(_CREATOR_ID, Enum.CreatorType.User)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
-- Bubble chat. This is all-encapsulated to allow us to turn it off with a config setting
|
||||||
|
pcall(function()
|
||||||
|
game:GetService("Players"):SetChatStyle(Enum.ChatStyle.ClassicAndBubble)
|
||||||
|
end)
|
||||||
|
|
||||||
|
-- local waitingForCharacter = false
|
||||||
|
pcall(function()
|
||||||
|
if settings().Network.MtuOverride == 0 then
|
||||||
|
settings().Network.MtuOverride = 1400
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
-- globals -----------------------------------------
|
-- globals -----------------------------------------
|
||||||
|
|
||||||
client = game:GetService("NetworkClient")
|
local client = game:GetService "NetworkClient"
|
||||||
visit = game:GetService("Visit")
|
local visit = game:GetService "Visit"
|
||||||
|
|
||||||
-- functions ---------------------------------------
|
-- functions ---------------------------------------
|
||||||
function setMessage(message)
|
function setMessage(message)
|
||||||
-- todo: animated "..."
|
-- todo: animated "..."
|
||||||
if not false then
|
if not false then
|
||||||
game:SetMessage(message)
|
game:SetMessage(message)
|
||||||
else
|
else
|
||||||
-- hack, good enought for now
|
-- hack, good enought for now
|
||||||
game:SetMessage("Teleporting ...")
|
game:SetMessage "Teleporting ..."
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function showErrorWindow(message, errorType, errorCategory)
|
function showErrorWindow(message, _, _)
|
||||||
game:SetMessage(message)
|
game:SetMessage(message)
|
||||||
end
|
end
|
||||||
|
|
||||||
function reportError(err, message)
|
function reportError(err, message)
|
||||||
print("***ERROR*** " .. err)
|
print("***ERROR*** " .. err)
|
||||||
if not test then visit:SetUploadUrl("") end
|
if not test then
|
||||||
client:Disconnect()
|
visit:SetUploadUrl ""
|
||||||
wait(4)
|
end
|
||||||
showErrorWindow("Error: " .. err, message, "Other")
|
client:Disconnect()
|
||||||
|
wait(4)
|
||||||
|
showErrorWindow("Error: " .. err, message, "Other")
|
||||||
end
|
end
|
||||||
|
|
||||||
-- called when the client connection closes
|
-- called when the client connection closes
|
||||||
function onDisconnection(peer, lostConnection)
|
function onDisconnection(_, lostConnection)
|
||||||
if lostConnection then
|
if lostConnection then
|
||||||
showErrorWindow("You have lost the connection to the game", "LostConnection", "LostConnection")
|
showErrorWindow("You have lost the connection to the game", "LostConnection", "LostConnection")
|
||||||
else
|
else
|
||||||
showErrorWindow("This game has shut down", "Kick", "Kick")
|
showErrorWindow("This game has shut down", "Kick", "Kick")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function requestCharacter(replicator)
|
function requestCharacter(replicator)
|
||||||
|
-- prepare code for when the Character appears
|
||||||
|
local connection
|
||||||
|
connection = player.Changed:connect(function(property)
|
||||||
|
if property == "Character" then
|
||||||
|
game:ClearMessage()
|
||||||
|
-- waitingForCharacter = false
|
||||||
|
connection:disconnect()
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
-- prepare code for when the Character appears
|
setMessage "Requesting character"
|
||||||
local connection
|
|
||||||
connection = player.Changed:connect(function (property)
|
|
||||||
if property=="Character" then
|
|
||||||
game:ClearMessage()
|
|
||||||
waitingForCharacter = false
|
|
||||||
connection:disconnect()
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
|
|
||||||
setMessage("Requesting character")
|
local success, err = pcall(function()
|
||||||
|
replicator:RequestCharacter()
|
||||||
|
setMessage "Waiting for character"
|
||||||
|
-- waitingForCharacter = true
|
||||||
|
end)
|
||||||
|
|
||||||
local success, err = pcall(function()
|
if not success then
|
||||||
replicator:RequestCharacter()
|
reportError(err, "W4C")
|
||||||
setMessage("Waiting for character")
|
return
|
||||||
waitingForCharacter = true
|
end
|
||||||
end)
|
|
||||||
|
|
||||||
if not success then
|
|
||||||
reportError(err,"W4C")
|
|
||||||
return
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- called when the client connection is established
|
-- called when the client connection is established
|
||||||
function onConnectionAccepted(url, replicator)
|
function onConnectionAccepted(_, replicator)
|
||||||
connectResolved = true
|
-- connectResolved = true
|
||||||
|
|
||||||
local waitingForMarker = true
|
local waitingForMarker = true
|
||||||
|
|
||||||
local success, err = pcall(function()
|
local success, err = pcall(function()
|
||||||
if not test then
|
if not test then
|
||||||
visit:SetPing("_PING_URL", 30)
|
visit:SetPing("_PING_URL", 30)
|
||||||
end
|
end
|
||||||
|
|
||||||
if not false then
|
if not false then
|
||||||
game:SetMessageBrickCount()
|
game:SetMessageBrickCount()
|
||||||
else
|
else
|
||||||
setMessage("Teleporting ...")
|
setMessage "Teleporting ..."
|
||||||
end
|
end
|
||||||
|
|
||||||
replicator.Disconnection:connect(onDisconnection)
|
replicator.Disconnection:connect(onDisconnection)
|
||||||
|
|
||||||
-- Wait for a marker to return before creating the Player
|
-- Wait for a marker to return before creating the Player
|
||||||
local marker = replicator:SendMarker()
|
local marker = replicator:SendMarker()
|
||||||
|
|
||||||
marker.Received:connect(function()
|
marker.Received:connect(function()
|
||||||
waitingForMarker = false
|
waitingForMarker = false
|
||||||
requestCharacter(replicator)
|
requestCharacter(replicator)
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
if not success then
|
if not success then
|
||||||
reportError(err,"ConnectionAccepted")
|
reportError(err, "ConnectionAccepted")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
-- TODO: report marker progress
|
-- TODO: report marker progress
|
||||||
|
|
||||||
while waitingForMarker do
|
while waitingForMarker do
|
||||||
workspace:ZoomToExtents()
|
workspace:ZoomToExtents()
|
||||||
wait(0.5)
|
wait(0.5)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- called when the client connection fails
|
-- called when the client connection fails
|
||||||
function onConnectionFailed(_, error)
|
function onConnectionFailed(_, error)
|
||||||
showErrorWindow("Failed to connect to the Game. (ID=" .. error .. ")", "ID" .. error, "Other")
|
showErrorWindow("Failed to connect to the Game. (ID=" .. error .. ")", "ID" .. error, "Other")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local connectionFailed
|
||||||
-- called when the client connection is rejected
|
-- called when the client connection is rejected
|
||||||
function onConnectionRejected()
|
function onConnectionRejected()
|
||||||
connectionFailed:disconnect()
|
connectionFailed:disconnect()
|
||||||
showErrorWindow("This game is not available. Please try another", "WrongVersion", "WrongVersion")
|
showErrorWindow("This game is not available. Please try another", "WrongVersion", "WrongVersion")
|
||||||
end
|
end
|
||||||
|
|
||||||
idled = false
|
local idled = false
|
||||||
function onPlayerIdled(time)
|
function onPlayerIdled(time)
|
||||||
if time > 20*60 then
|
if time > 20 * 60 then
|
||||||
showErrorWindow(string.format("You were disconnected for being idle %d minutes", time/60), "Idle", "Idle")
|
showErrorWindow(string.format("You were disconnected for being idle %d minutes", time / 60), "Idle", "Idle")
|
||||||
client:Disconnect()
|
client:Disconnect()
|
||||||
if not idled then
|
if not idled then
|
||||||
idled = true
|
idled = true
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
-- main ------------------------------------------------------------
|
-- main ------------------------------------------------------------
|
||||||
|
|
||||||
pcall(function() settings().Diagnostics:LegacyScriptMode() end)
|
pcall(function()
|
||||||
local success, err = pcall(function()
|
settings().Diagnostics:LegacyScriptMode()
|
||||||
|
|
||||||
game:SetRemoteBuildMode(true)
|
|
||||||
|
|
||||||
setMessage("Connecting to Server")
|
|
||||||
client.ConnectionAccepted:connect(onConnectionAccepted)
|
|
||||||
client.ConnectionRejected:connect(onConnectionRejected)
|
|
||||||
connectionFailed = client.ConnectionFailed:connect(onConnectionFailed)
|
|
||||||
client.Ticket = ""
|
|
||||||
|
|
||||||
playerConnectSucces, player = pcall(function() return client:PlayerConnect(_USER_ID, "_SERVER_ADDRESS", _SERVER_PORT, 0, threadSleepTime) end)
|
|
||||||
if not playerConnectSucces then
|
|
||||||
--Old player connection scheme
|
|
||||||
player = game:GetService("Players"):CreateLocalPlayer(_USER_ID)
|
|
||||||
client:Connect("_SERVER_ADDRESS", _SERVER_PORT, 0, threadSleepTime)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- negotiate an auth token
|
|
||||||
if not test then
|
|
||||||
delay(300, function()
|
|
||||||
while false do
|
|
||||||
pcall(function() game:HttpPost("https://banland.xyz/auth/renew", "renew") end)
|
|
||||||
wait(300)
|
|
||||||
end
|
|
||||||
end)
|
end)
|
||||||
end
|
local success, err = pcall(function()
|
||||||
|
game:SetRemoteBuildMode(true)
|
||||||
|
|
||||||
player:SetSuperSafeChat(false)
|
setMessage "Connecting to Server"
|
||||||
pcall(function() player:SetUnder13(false) end)
|
client.ConnectionAccepted:connect(onConnectionAccepted)
|
||||||
pcall(function() player:SetMembershipType(Enum.MembershipType._MEMBERSHIP_TYPE) end)
|
client.ConnectionRejected:connect(onConnectionRejected)
|
||||||
pcall(function() player:SetAccountAge(1) end)
|
connectionFailed = client.ConnectionFailed:connect(onConnectionFailed)
|
||||||
player.Idled:connect(onPlayerIdled)
|
client.Ticket = ""
|
||||||
|
|
||||||
-- Overriden
|
local playerConnectSucces, player = pcall(function()
|
||||||
onPlayerAdded(player)
|
return client:PlayerConnect(_USER_ID, "_SERVER_ADDRESS", _SERVER_PORT, 0, threadSleepTime)
|
||||||
|
end)
|
||||||
|
if not playerConnectSucces then
|
||||||
|
--Old player connection scheme
|
||||||
|
player = game:GetService("Players"):CreateLocalPlayer(_USER_ID)
|
||||||
|
client:Connect("_SERVER_ADDRESS", _SERVER_PORT, 0, threadSleepTime)
|
||||||
|
end
|
||||||
|
|
||||||
pcall(function() player.Name = [========[_USER_NAME]========] end)
|
-- negotiate an auth token
|
||||||
player.CharacterAppearance = "_CHAR_APPEARANCE"
|
if not test then
|
||||||
if not test then visit:SetUploadUrl("") end
|
delay(300, function()
|
||||||
|
while false do
|
||||||
|
pcall(function()
|
||||||
|
game:HttpPost("https://banland.xyz/auth/renew", "renew")
|
||||||
|
end)
|
||||||
|
wait(300)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
player:SetSuperSafeChat(false)
|
||||||
|
pcall(function()
|
||||||
|
player:SetUnder13(false)
|
||||||
|
end)
|
||||||
|
pcall(function()
|
||||||
|
player:SetMembershipType(Enum.MembershipType._MEMBERSHIP_TYPE)
|
||||||
|
end)
|
||||||
|
pcall(function()
|
||||||
|
player:SetAccountAge(1)
|
||||||
|
end)
|
||||||
|
player.Idled:connect(onPlayerIdled)
|
||||||
|
|
||||||
|
-- Overriden
|
||||||
|
onPlayerAdded(player)
|
||||||
|
|
||||||
|
pcall(function()
|
||||||
|
player.Name = [========[_USER_NAME]========]
|
||||||
|
end)
|
||||||
|
player.CharacterAppearance = "_CHAR_APPEARANCE"
|
||||||
|
if not test then
|
||||||
|
visit:SetUploadUrl ""
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
if not success then
|
if not success then
|
||||||
reportError(err,"CreatePlayer")
|
reportError(err, "CreatePlayer")
|
||||||
end
|
end
|
||||||
|
|
||||||
if not test then
|
if not test then
|
||||||
-- TODO: Async get?
|
-- TODO: Async get?
|
||||||
loadfile("")("", -1, 0)
|
loadfile ""("", -1, 0)
|
||||||
end
|
end
|
||||||
|
|
||||||
pcall(function() game:SetScreenshotInfo("") end)
|
pcall(function()
|
||||||
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[ROBLOX Place]]></media:title><media:description type="plain"><![CDATA[ For more games visit http://www.roblox.com]]></media:description><media:category scheme="http://gdata.youtube.com/schemas/2007/categories.cat">Games</media:category><media:keywords>ROBLOX, video, free game, online virtual world</media:keywords></media:group></entry>') end)
|
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[ROBLOX Place]]></media:title><media:description type="plain"><![CDATA[ For more games visit http://www.roblox.com]]></media:description><media:category scheme="http://gdata.youtube.com/schemas/2007/categories.cat">Games</media:category><media:keywords>ROBLOX, 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
|
-- use single quotes here because the video info string may have unescaped double quotes
|
||||||
|
|
@ -1,26 +1,64 @@
|
||||||
|
print "[Mercury]: Loaded Studio corescript"
|
||||||
-- Setup studio cmd bar & load core scripts
|
-- Setup studio cmd bar & load core scripts
|
||||||
pcall(function() game:GetService("InsertService"):SetFreeModelUrl("http://banland.xyz/Game/Tools/InsertAsset.ashx?type=fm&q=%s&pg=%d&rs=%d") end)
|
pcall(function()
|
||||||
pcall(function() game:GetService("InsertService"):SetFreeDecalUrl("http://banland.xyz/Game/Tools/InsertAsset.ashx?type=fd&q=%s&pg=%d&rs=%d") end)
|
game:GetService("InsertService")
|
||||||
|
:SetFreeModelUrl "http://banland.xyz/Game/Tools/InsertAsset.ashx?type=fm&q=%s&pg=%d&rs=%d"
|
||||||
|
end)
|
||||||
|
pcall(function()
|
||||||
|
game:GetService("InsertService")
|
||||||
|
:SetFreeDecalUrl "http://banland.xyz/Game/Tools/InsertAsset.ashx?type=fd&q=%s&pg=%d&rs=%d"
|
||||||
|
end)
|
||||||
|
|
||||||
game:GetService("ScriptInformationProvider"):SetAssetUrl("http://banland.xyz/Asset/")
|
game:GetService("ScriptInformationProvider"):SetAssetUrl "http://banland.xyz/Asset/"
|
||||||
game:GetService("InsertService"):SetBaseSetsUrl("http://banland.xyz/Game/Tools/InsertAsset.ashx?nsets=10&type=base")
|
game:GetService("InsertService"):SetBaseSetsUrl "http://banland.xyz/Game/Tools/InsertAsset.ashx?nsets=10&type=base"
|
||||||
game:GetService("InsertService"):SetUserSetsUrl("http://banland.xyz/Game/Tools/InsertAsset.ashx?nsets=20&type=user&userid=%d")
|
game:GetService("InsertService")
|
||||||
game:GetService("InsertService"):SetCollectionUrl("http://banland.xyz/Game/Tools/InsertAsset.ashx?sid=%d")
|
:SetUserSetsUrl "http://banland.xyz/Game/Tools/InsertAsset.ashx?nsets=20&type=user&userid=%d"
|
||||||
game:GetService("InsertService"):SetAssetUrl("http://banland.xyz/Asset/?id=%d")
|
game:GetService("InsertService"):SetCollectionUrl "http://banland.xyz/Game/Tools/InsertAsset.ashx?sid=%d"
|
||||||
game:GetService("InsertService"):SetAssetVersionUrl("http://www.roblox.com/Asset/?assetversionid=%d")
|
game:GetService("InsertService"):SetAssetUrl "http://banland.xyz/Asset/?id=%d"
|
||||||
|
game:GetService("InsertService"):SetAssetVersionUrl "http://www.roblox.com/Asset/?assetversionid=%d"
|
||||||
game:GetService("InsertService"):SetTrustLevel(0)
|
game:GetService("InsertService"):SetTrustLevel(0)
|
||||||
|
|
||||||
pcall(function() game:GetService("SocialService"):SetFriendUrl("http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsFriendsWith&playerid=%d&userid=%d") end)
|
pcall(function()
|
||||||
pcall(function() game:GetService("SocialService"):SetBestFriendUrl("http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsBestFriendsWith&playerid=%d&userid=%d") end)
|
game:GetService("SocialService")
|
||||||
pcall(function() game:GetService("SocialService"):SetGroupUrl("http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsInGroup&playerid=%d&groupid=%d") end)
|
:SetFriendUrl "http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsFriendsWith&playerid=%d&userid=%d"
|
||||||
pcall(function() game:GetService("SocialService"):SetGroupRankUrl("http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=GetGroupRank&playerid=%d&groupid=%d") end)
|
end)
|
||||||
pcall(function() game:GetService("SocialService"):SetGroupRoleUrl("http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=GetGroupRole&playerid=%d&groupid=%d") end)
|
pcall(function()
|
||||||
pcall(function() game:GetService("GamePassService"):SetPlayerHasPassUrl("http://banland.xyz/Game/GamePass/GamePassHandler.ashx?Action=HasPass&UserID=%d&PassID=%d") end)
|
game:GetService("SocialService")
|
||||||
pcall(function() game:GetService("MarketplaceService"):SetProductInfoUrl("https://banland.xyz/marketplace/productinfo?assetId=%d") end)
|
:SetBestFriendUrl "http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsBestFriendsWith&playerid=%d&userid=%d"
|
||||||
pcall(function() game:GetService("MarketplaceService"):SetDevProductInfoUrl("https://banland.xyz/marketplace/productDetails?productId=%d") end)
|
end)
|
||||||
pcall(function() game:GetService("MarketplaceService"):SetPlayerOwnsAssetUrl("https://banland.xyz/ownership/hasasset?userId=%d&assetId=%d") end)
|
pcall(function()
|
||||||
|
game:GetService("SocialService")
|
||||||
|
:SetGroupUrl "http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsInGroup&playerid=%d&groupid=%d"
|
||||||
|
end)
|
||||||
|
pcall(function()
|
||||||
|
game:GetService("SocialService")
|
||||||
|
:SetGroupRankUrl "http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=GetGroupRank&playerid=%d&groupid=%d"
|
||||||
|
end)
|
||||||
|
pcall(function()
|
||||||
|
game:GetService("SocialService")
|
||||||
|
:SetGroupRoleUrl "http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=GetGroupRole&playerid=%d&groupid=%d"
|
||||||
|
end)
|
||||||
|
pcall(function()
|
||||||
|
game:GetService("GamePassService")
|
||||||
|
:SetPlayerHasPassUrl "http://banland.xyz/Game/GamePass/GamePassHandler.ashx?Action=HasPass&UserID=%d&PassID=%d"
|
||||||
|
end)
|
||||||
|
pcall(function()
|
||||||
|
game:GetService("MarketplaceService"):SetProductInfoUrl "https://banland.xyz/marketplace/productinfo?assetId=%d"
|
||||||
|
end)
|
||||||
|
pcall(function()
|
||||||
|
game:GetService("MarketplaceService")
|
||||||
|
:SetDevProductInfoUrl "https://banland.xyz/marketplace/productDetails?productId=%d"
|
||||||
|
end)
|
||||||
|
pcall(function()
|
||||||
|
game:GetService("MarketplaceService")
|
||||||
|
:SetPlayerOwnsAssetUrl "https://banland.xyz/ownership/hasasset?userId=%d&assetId=%d"
|
||||||
|
end)
|
||||||
|
|
||||||
local result, err = pcall(function() game:GetService("ScriptContext"):AddStarterScript(37801172) end)
|
local result, _ = pcall(function()
|
||||||
|
game:GetService("ScriptContext"):AddStarterScript(37801172)
|
||||||
|
end)
|
||||||
if not result then
|
if not result then
|
||||||
pcall(function() game:GetService("ScriptContext"):AddCoreScript(37801172,game:GetService("ScriptContext"),"StarterScript") end)
|
pcall(function()
|
||||||
|
game:GetService("ScriptContext"):AddCoreScript(37801172, game:GetService "ScriptContext", "StarterScript")
|
||||||
|
end)
|
||||||
end
|
end
|
||||||
|
|
@ -1,121 +1,176 @@
|
||||||
|
print "[Mercury]: Loaded Visit corescript"
|
||||||
-- Prepended to Edit.lua and Visit.lua and Studio.lua and PlaySolo.lua--
|
-- Prepended to Edit.lua and Visit.lua and Studio.lua and PlaySolo.lua--
|
||||||
|
|
||||||
if true then
|
if true then
|
||||||
pcall(function() game:SetPlaceID(_PLACE_ID) end)
|
pcall(function()
|
||||||
else
|
game:SetPlaceID(_PLACE_ID)
|
||||||
if 0>0 then
|
end)
|
||||||
pcall(function() game:SetPlaceID(_PLACE_ID) end)
|
else
|
||||||
end
|
if 0 > 0 then
|
||||||
end
|
pcall(function()
|
||||||
|
game:SetPlaceID(_PLACE_ID)
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
visit = game:GetService("Visit")
|
local visit = game:GetService "Visit"
|
||||||
|
|
||||||
local message = Instance.new("Message")
|
local message = Instance.new "Message"
|
||||||
message.Parent = workspace
|
message.Parent = workspace
|
||||||
message.archivable = false
|
message.archivable = false
|
||||||
|
|
||||||
game:GetService("ScriptInformationProvider"):SetAssetUrl("http://banland.xyz/Asset/")
|
game:GetService("ScriptInformationProvider"):SetAssetUrl "http://banland.xyz/Asset/"
|
||||||
game:GetService("ContentProvider"):SetThreadPool(16)
|
game:GetService("ContentProvider"):SetThreadPool(16)
|
||||||
pcall(function() game:GetService("InsertService"):SetFreeModelUrl("http://www.roblox.com/Game/Tools/InsertAsset.ashx?type=fm&q=%s&pg=%d&rs=%d") end) -- Used for free model search (insert tool)
|
pcall(function()
|
||||||
pcall(function() game:GetService("InsertService"):SetFreeDecalUrl("http://www.roblox.com/Game/Tools/InsertAsset.ashx?type=fd&q=%s&pg=%d&rs=%d") end) -- Used for free decal search (insert tool)
|
game:GetService("InsertService")
|
||||||
|
:SetFreeModelUrl "http://www.roblox.com/Game/Tools/InsertAsset.ashx?type=fm&q=%s&pg=%d&rs=%d"
|
||||||
|
end) -- Used for free model search (insert tool)
|
||||||
|
pcall(function()
|
||||||
|
game:GetService("InsertService")
|
||||||
|
:SetFreeDecalUrl "http://www.roblox.com/Game/Tools/InsertAsset.ashx?type=fd&q=%s&pg=%d&rs=%d"
|
||||||
|
end) -- Used for free decal search (insert tool)
|
||||||
|
|
||||||
settings().Diagnostics:LegacyScriptMode()
|
settings().Diagnostics:LegacyScriptMode()
|
||||||
|
|
||||||
game:GetService("InsertService"):SetBaseSetsUrl("http://www.roblox.com/Game/Tools/InsertAsset.ashx?nsets=10&type=base")
|
game:GetService("InsertService"):SetBaseSetsUrl "http://www.roblox.com/Game/Tools/InsertAsset.ashx?nsets=10&type=base"
|
||||||
game:GetService("InsertService"):SetUserSetsUrl("http://www.roblox.com/Game/Tools/InsertAsset.ashx?nsets=20&type=user&userid=%d")
|
game:GetService("InsertService")
|
||||||
game:GetService("InsertService"):SetCollectionUrl("http://www.roblox.com/Game/Tools/InsertAsset.ashx?sid=%d")
|
:SetUserSetsUrl "http://www.roblox.com/Game/Tools/InsertAsset.ashx?nsets=20&type=user&userid=%d"
|
||||||
game:GetService("InsertService"):SetAssetUrl("http://banland.xyz/Asset/?id=%d")
|
game:GetService("InsertService"):SetCollectionUrl "http://www.roblox.com/Game/Tools/InsertAsset.ashx?sid=%d"
|
||||||
game:GetService("InsertService"):SetAssetVersionUrl("http://www.roblox.com/Asset/?assetversionid=%d")
|
game:GetService("InsertService"):SetAssetUrl "http://banland.xyz/Asset/?id=%d"
|
||||||
|
game:GetService("InsertService"):SetAssetVersionUrl "http://www.roblox.com/Asset/?assetversionid=%d"
|
||||||
|
|
||||||
pcall(function() game:GetService("SocialService"):SetFriendUrl("http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsFriendsWith&playerid=%d&userid=%d") end)
|
pcall(function()
|
||||||
pcall(function() game:GetService("SocialService"):SetBestFriendUrl("http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsBestFriendsWith&playerid=%d&userid=%d") end)
|
game:GetService("SocialService")
|
||||||
pcall(function() game:GetService("SocialService"):SetGroupUrl("http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsInGroup&playerid=%d&groupid=%d") end)
|
:SetFriendUrl "http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsFriendsWith&playerid=%d&userid=%d"
|
||||||
pcall(function() game:GetService("SocialService"):SetGroupRankUrl("http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=GetGroupRank&playerid=%d&groupid=%d") end)
|
end)
|
||||||
pcall(function() game:GetService("SocialService"):SetGroupRoleUrl("http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=GetGroupRole&playerid=%d&groupid=%d") end)
|
pcall(function()
|
||||||
pcall(function() game:GetService("GamePassService"):SetPlayerHasPassUrl("http://banland.xyz/Game/GamePass/GamePassHandler.ashx?Action=HasPass&UserID=%d&PassID=%d") end)
|
game:GetService("SocialService")
|
||||||
pcall(function() game:SetCreatorID(0, Enum.CreatorType.User) end)
|
:SetBestFriendUrl "http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsBestFriendsWith&playerid=%d&userid=%d"
|
||||||
|
end)
|
||||||
|
pcall(function()
|
||||||
|
game:GetService("SocialService")
|
||||||
|
:SetGroupUrl "http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsInGroup&playerid=%d&groupid=%d"
|
||||||
|
end)
|
||||||
|
pcall(function()
|
||||||
|
game:GetService("SocialService")
|
||||||
|
:SetGroupRankUrl "http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=GetGroupRank&playerid=%d&groupid=%d"
|
||||||
|
end)
|
||||||
|
pcall(function()
|
||||||
|
game:GetService("SocialService")
|
||||||
|
:SetGroupRoleUrl "http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=GetGroupRole&playerid=%d&groupid=%d"
|
||||||
|
end)
|
||||||
|
pcall(function()
|
||||||
|
game:GetService("GamePassService")
|
||||||
|
:SetPlayerHasPassUrl "http://banland.xyz/Game/GamePass/GamePassHandler.ashx?Action=HasPass&UserID=%d&PassID=%d"
|
||||||
|
end)
|
||||||
|
pcall(function()
|
||||||
|
game:SetCreatorID(0, Enum.CreatorType.User)
|
||||||
|
end)
|
||||||
|
|
||||||
pcall(function() game:SetScreenshotInfo("") end)
|
pcall(function()
|
||||||
pcall(function() game:SetVideoInfo("") end)
|
game:SetScreenshotInfo ""
|
||||||
|
end)
|
||||||
|
pcall(function()
|
||||||
|
game:SetVideoInfo ""
|
||||||
|
end)
|
||||||
|
|
||||||
pcall(function() settings().Rendering.EnableFRM = true end)
|
pcall(function()
|
||||||
pcall(function() settings()["Task Scheduler"].PriorityMethod = Enum.PriorityMethod.AccumulatedError end)
|
settings().Rendering.EnableFRM = true
|
||||||
|
end)
|
||||||
|
pcall(function()
|
||||||
|
settings()["Task Scheduler"].PriorityMethod = Enum.PriorityMethod.AccumulatedError
|
||||||
|
end)
|
||||||
|
|
||||||
game:GetService("ChangeHistoryService"):SetEnabled(false)
|
game:GetService("ChangeHistoryService"):SetEnabled(false)
|
||||||
pcall(function() game:GetService("Players"):SetBuildUserPermissionsUrl("http://banland.xyz//Game/BuildActionPermissionCheck.ashx?assetId=0&userId=%d&isSolo=true") end)
|
pcall(function()
|
||||||
|
game:GetService("Players")
|
||||||
|
:SetBuildUserPermissionsUrl "http://banland.xyz//Game/BuildActionPermissionCheck.ashx?assetId=0&userId=%d&isSolo=true"
|
||||||
|
end)
|
||||||
|
|
||||||
workspace:SetPhysicsThrottleEnabled(true)
|
workspace:SetPhysicsThrottleEnabled(true)
|
||||||
|
|
||||||
local addedBuildTools = false
|
local addedBuildTools = false
|
||||||
local screenGui = game:GetService("CoreGui"):FindFirstChild("RobloxGui")
|
local screenGui = game:GetService("CoreGui"):FindFirstChild "RobloxGui"
|
||||||
|
|
||||||
function doVisit()
|
local player
|
||||||
message.Text = "Loading Game"
|
function doVisit()
|
||||||
if false then
|
message.Text = "Loading Game"
|
||||||
game:Load("")
|
if false then
|
||||||
pcall(function() visit:SetUploadUrl("") end)
|
game:Load ""
|
||||||
else
|
pcall(function()
|
||||||
pcall(function() visit:SetUploadUrl("") end)
|
visit:SetUploadUrl ""
|
||||||
end
|
end)
|
||||||
|
else
|
||||||
|
pcall(function()
|
||||||
|
visit:SetUploadUrl ""
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
message.Text = "Running"
|
||||||
|
game:GetService("RunService"):Run()
|
||||||
|
|
||||||
message.Text = "Running"
|
message.Text = "Creating Player"
|
||||||
game:GetService("RunService"):Run()
|
if false then
|
||||||
|
player = game:GetService("Players"):CreateLocalPlayer(1)
|
||||||
|
player.Name = [====[Guest _GUEST_NUMBER]====]
|
||||||
|
else
|
||||||
|
player = game:GetService("Players"):CreateLocalPlayer(0)
|
||||||
|
end
|
||||||
|
player.CharacterAppearance = ""
|
||||||
|
local propExists, canAutoLoadChar = false, false
|
||||||
|
propExists = pcall(function()
|
||||||
|
canAutoLoadChar = game.Players.CharacterAutoLoads
|
||||||
|
end)
|
||||||
|
|
||||||
message.Text = "Creating Player"
|
if (propExists and canAutoLoadChar) or not propExists then
|
||||||
if false then
|
player:LoadCharacter()
|
||||||
player = game:GetService("Players"):CreateLocalPlayer(1)
|
end
|
||||||
player.Name = [====[Guest _GUEST_NUMBER]====]
|
|
||||||
else
|
|
||||||
player = game:GetService("Players"):CreateLocalPlayer(0)
|
|
||||||
end
|
|
||||||
player.CharacterAppearance = ""
|
|
||||||
local propExists, canAutoLoadChar = false
|
|
||||||
propExists = pcall(function() canAutoLoadChar = game.Players.CharacterAutoLoads end)
|
|
||||||
|
|
||||||
if (propExists and canAutoLoadChar) or (not propExists) then
|
message.Text = "Setting GUI"
|
||||||
player:LoadCharacter()
|
player:SetSuperSafeChat(true)
|
||||||
end
|
pcall(function()
|
||||||
|
player:SetMembershipType(Enum.MembershipType.None)
|
||||||
|
end)
|
||||||
|
pcall(function()
|
||||||
|
player:SetAccountAge(0)
|
||||||
|
end)
|
||||||
|
|
||||||
|
if false then
|
||||||
|
message.Text = "Setting Ping"
|
||||||
|
visit:SetPing("http://banland.xyz/Game/ClientPresence.ashx?version=old&PlaceID=_PLACE_ID", 300)
|
||||||
|
|
||||||
message.Text = "Setting GUI"
|
message.Text = "Sending Stats"
|
||||||
player:SetSuperSafeChat(true)
|
game:HttpGet ""
|
||||||
pcall(function() player:SetMembershipType(Enum.MembershipType.None) end)
|
end
|
||||||
pcall(function() player:SetAccountAge(0) end)
|
end
|
||||||
|
|
||||||
if false then
|
local success, err = pcall(doVisit)
|
||||||
message.Text = "Setting Ping"
|
|
||||||
visit:SetPing("http://banland.xyz/Game/ClientPresence.ashx?version=old&PlaceID=_PLACE_ID", 300)
|
|
||||||
|
|
||||||
message.Text = "Sending Stats"
|
if not addedBuildTools then
|
||||||
game:HttpGet("")
|
local playerName = Instance.new "StringValue"
|
||||||
end
|
playerName.Name = "PlayerName"
|
||||||
|
playerName.Value = player.Name
|
||||||
|
playerName.RobloxLocked = true
|
||||||
|
playerName.Parent = screenGui
|
||||||
|
|
||||||
end
|
pcall(function()
|
||||||
|
game:GetService("ScriptContext"):AddCoreScript(59431535, screenGui, "BuildToolsScript")
|
||||||
|
end)
|
||||||
|
addedBuildTools = true
|
||||||
|
end
|
||||||
|
|
||||||
success, err = pcall(doVisit)
|
if success then
|
||||||
|
message.Parent = nil
|
||||||
if not addedBuildTools then
|
else
|
||||||
local playerName = Instance.new("StringValue")
|
print(err)
|
||||||
playerName.Name = "PlayerName"
|
if false then
|
||||||
playerName.Value = player.Name
|
pcall(function()
|
||||||
playerName.RobloxLocked = true
|
visit:SetUploadUrl ""
|
||||||
playerName.Parent = screenGui
|
end)
|
||||||
|
end
|
||||||
pcall(function() game:GetService("ScriptContext"):AddCoreScript(59431535,screenGui,"BuildToolsScript") end)
|
wait(5)
|
||||||
addedBuildTools = true
|
message.Text = "Error on visit: " .. err
|
||||||
end
|
if false then
|
||||||
|
game:HttpPost("http://banland.xyz/Error/Lua.ashx?", "Visit.lua: " .. err)
|
||||||
if success then
|
end
|
||||||
message.Parent = nil
|
end
|
||||||
else
|
|
||||||
print(err)
|
|
||||||
if false then
|
|
||||||
pcall(function() visit:SetUploadUrl("") end)
|
|
||||||
end
|
|
||||||
wait(5)
|
|
||||||
message.Text = "Error on visit: " .. err
|
|
||||||
if false then
|
|
||||||
game:HttpPost("http://banland.xyz/Error/Lua.ashx?", "Visit.lua: " .. err)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue