Port studio corescript to Yuescript

This commit is contained in:
Lewin Kelly 2023-04-26 15:05:29 +01:00
parent 0dae41c621
commit a3e93626ed
4 changed files with 102 additions and 55 deletions

View File

@ -1,3 +1,4 @@
print("[Mercury]: Loaded Join corescript");
-- MultiplayerSharedScript.lua inserted here ------ Prepended to Join.lua --
pcall(function()
return game:SetPlaceID(_PLACE_ID, false)

View File

@ -1,64 +1,59 @@
print "[Mercury]: Loaded Studio corescript"
-- Setup studio cmd bar & load core scripts
print("[Mercury]: Loaded Studio corescript")
do
local _with_0 = game:GetService("InsertService")
pcall(function()
game:GetService("InsertService")
:SetFreeModelUrl "http://banland.xyz/Game/Tools/InsertAsset.ashx?type=fm&q=%s&pg=%d&rs=%d"
end)
return _with_0: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("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"):SetCollectionUrl "http://banland.xyz/Game/Tools/InsertAsset.ashx?sid=%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)
return _with_0: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/")
_with_0:SetBaseSetsUrl("http://banland.xyz/Game/Tools/InsertAsset.ashx?nsets=10&type=base")
_with_0:SetUserSetsUrl("http://banland.xyz/Game/Tools/InsertAsset.ashx?nsets=20&type=user&userid=%d")
_with_0:SetCollectionUrl("http://banland.xyz/Game/Tools/InsertAsset.ashx?sid=%d")
_with_0:SetAssetUrl("http://banland.xyz/Asset/?id=%d")
_with_0:SetAssetVersionUrl("http://www.roblox.com/Asset/?assetversionid=%d")
_with_0:SetTrustLevel(0)
end
do
local _with_0 = game:GetService("SocialService")
pcall(function()
game:GetService("SocialService")
:SetFriendUrl "http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsFriendsWith&playerid=%d&userid=%d"
end)
return _with_0:SetFriendUrl("http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsFriendsWith&playerid=%d&userid=%d")
end)
pcall(function()
game:GetService("SocialService")
:SetBestFriendUrl "http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsBestFriendsWith&playerid=%d&userid=%d"
end)
return _with_0: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)
return _with_0: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)
return _with_0: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, _ = pcall(function()
game:GetService("ScriptContext"):AddStarterScript(37801172)
end)
if not result then
pcall(function()
game:GetService("ScriptContext"):AddCoreScript(37801172, game:GetService "ScriptContext", "StarterScript")
return _with_0:SetGroupRoleUrl("http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=GetGroupRole&playerid=%d&groupid=%d")
end)
end
pcall(function()
return game:GetService("GamePassService"):SetPlayerHasPassUrl("http://banland.xyz/Game/GamePass/GamePassHandler.ashx?Action=HasPass&UserID=%d&PassID=%d")
end)
do
local _with_0 = game:GetService("MarketplaceService")
pcall(function()
return _with_0:SetProductInfoUrl("https://banland.xyz/marketplace/productinfo?assetId=%d")
end)
pcall(function()
return _with_0:SetDevProductInfoUrl("https://banland.xyz/marketplace/productDetails?productId=%d")
end)
pcall(function()
return _with_0:SetPlayerOwnsAssetUrl("https://banland.xyz/ownership/hasasset?userId=%d&assetId=%d")
end)
end
local result, _
result, _ = pcall(function()
return game:GetService("ScriptContext"):AddStarterScript(37801172)
end)
if not result then
return pcall(function()
return game:GetService("ScriptContext"):AddCoreScript(37801172, game:GetService("ScriptContext", "StarterScript"))
end)
end

View File

@ -1,4 +1,5 @@
import "macros" as { $ }
print "[Mercury]: Loaded Join corescript"
-- functions --------------------------
-- onPlayerAdded = (player) ->

50
yue/studio.yue Normal file
View File

@ -0,0 +1,50 @@
print "[Mercury]: Loaded Studio corescript"
-- Setup studio cmd bar & load core scripts
with game\GetService "InsertService"
try
\SetFreeModelUrl "http://banland.xyz/Game/Tools/InsertAsset.ashx?type=fm&q=%s&pg=%d&rs=%d"
try
\SetFreeDecalUrl "http://banland.xyz/Game/Tools/InsertAsset.ashx?type=fd&q=%s&pg=%d&rs=%d"
game\GetService"ScriptInformationProvider"\SetAssetUrl "http://banland.xyz/Asset/"
\SetBaseSetsUrl "http://banland.xyz/Game/Tools/InsertAsset.ashx?nsets=10&type=base"
\SetUserSetsUrl "http://banland.xyz/Game/Tools/InsertAsset.ashx?nsets=20&type=user&userid=%d"
\SetCollectionUrl "http://banland.xyz/Game/Tools/InsertAsset.ashx?sid=%d"
\SetAssetUrl "http://banland.xyz/Asset/?id=%d"
\SetAssetVersionUrl "http://www.roblox.com/Asset/?assetversionid=%d"
\SetTrustLevel 0
with game\GetService "SocialService"
try
\SetFriendUrl "http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsFriendsWith&playerid=%d&userid=%d"
try
\SetBestFriendUrl "http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsBestFriendsWith&playerid=%d&userid=%d"
try
\SetGroupUrl "http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsInGroup&playerid=%d&groupid=%d"
try
\SetGroupRankUrl "http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=GetGroupRank&playerid=%d&groupid=%d"
try
\SetGroupRoleUrl "http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=GetGroupRole&playerid=%d&groupid=%d"
try
game\GetService"GamePassService"\SetPlayerHasPassUrl "http://banland.xyz/Game/GamePass/GamePassHandler.ashx?Action=HasPass&UserID=%d&PassID=%d"
with game\GetService "MarketplaceService"
try
\SetProductInfoUrl "https://banland.xyz/marketplace/productinfo?assetId=%d"
try
\SetDevProductInfoUrl "https://banland.xyz/marketplace/productDetails?productId=%d"
try
\SetPlayerOwnsAssetUrl "https://banland.xyz/ownership/hasasset?userId=%d&assetId=%d"
local result, _ = try
game\GetService"ScriptContext"\AddStarterScript 37801172
if not result
try
game\GetService"ScriptContext"\AddCoreScript 37801172, game\GetService "ScriptContext", "StarterScript"