From a3e93626ed03ae3cd6f973095bb0bcf92d918da9 Mon Sep 17 00:00:00 2001 From: Lewin Kelly Date: Wed, 26 Apr 2023 15:05:29 +0100 Subject: [PATCH] Port studio corescript to Yuescript --- processed/join.lua | 1 + processed/studio.lua | 105 +++++++++++++++++++++---------------------- yue/join.yue | 1 + yue/studio.yue | 50 +++++++++++++++++++++ 4 files changed, 102 insertions(+), 55 deletions(-) create mode 100644 yue/studio.yue diff --git a/processed/join.lua b/processed/join.lua index 6306ca8..8f339e6 100644 --- a/processed/join.lua +++ b/processed/join.lua @@ -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) diff --git a/processed/studio.lua b/processed/studio.lua index 8d14663..aa83cda 100644 --- a/processed/studio.lua +++ b/processed/studio.lua @@ -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 diff --git a/yue/join.yue b/yue/join.yue index a672a2e..4ab2f5b 100644 --- a/yue/join.yue +++ b/yue/join.yue @@ -1,4 +1,5 @@ import "macros" as { $ } +print "[Mercury]: Loaded Join corescript" -- functions -------------------------- -- onPlayerAdded = (player) -> diff --git a/yue/studio.yue b/yue/studio.yue new file mode 100644 index 0000000..066983e --- /dev/null +++ b/yue/studio.yue @@ -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" + +