Port visit corescript to yuescript

This commit is contained in:
Lewin Kelly 2023-04-26 15:24:59 +01:00
parent a3e93626ed
commit 05ab4b836c
2 changed files with 217 additions and 99 deletions

View File

@ -1,112 +1,88 @@
-- Prepended to Edit.lua and Visit.lua and Studio.lua and PlaySolo.lua-- print("[Mercury]: Loaded Visit corescript")
if true then if true then
pcall(function() pcall(function()
game:SetPlaceID(_PLACE_ID) return game:SetPlaceID(_PLACE_ID)
end) end)
else
if 0 > 0 then
pcall(function()
game:SetPlaceID(_PLACE_ID)
end)
end
end end
local visit = game:GetService("Visit")
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() pcall(function()
game:GetService("InsertService") return game:GetService("InsertService"):SetFreeModelUrl("http://www.roblox.com/Game/Tools/InsertAsset.ashx?type=fm&q=%s&pg=%d&rs=%d")
:SetFreeModelUrl "http://www.roblox.com/Game/Tools/InsertAsset.ashx?type=fm&q=%s&pg=%d&rs=%d" end)
end) -- Used for free model search (insert tool)
pcall(function() pcall(function()
game:GetService("InsertService") return game:GetService("InsertService"):SetFreeDecalUrl("http://www.roblox.com/Game/Tools/InsertAsset.ashx?type=fd&q=%s&pg=%d&rs=%d")
:SetFreeDecalUrl "http://www.roblox.com/Game/Tools/InsertAsset.ashx?type=fd&q=%s&pg=%d&rs=%d" end)
end) -- Used for free decal search (insert tool)
settings().Diagnostics:LegacyScriptMode() settings().Diagnostics:LegacyScriptMode()
do
game:GetService("InsertService"):SetBaseSetsUrl "http://www.roblox.com/Game/Tools/InsertAsset.ashx?nsets=10&type=base" local _with_0 = game:GetService("InsertService")
game:GetService("InsertService") _with_0:SetBaseSetsUrl("http://www.roblox.com/Game/Tools/InsertAsset.ashx?nsets=10&type=base")
:SetUserSetsUrl "http://www.roblox.com/Game/Tools/InsertAsset.ashx?nsets=20&type=user&userid=%d" _with_0:SetUserSetsUrl("http://www.roblox.com/Game/Tools/InsertAsset.ashx?nsets=20&type=user&userid=%d")
game:GetService("InsertService"):SetCollectionUrl "http://www.roblox.com/Game/Tools/InsertAsset.ashx?sid=%d" _with_0:SetCollectionUrl("http://www.roblox.com/Game/Tools/InsertAsset.ashx?sid=%d")
game:GetService("InsertService"):SetAssetUrl "http://banland.xyz/Asset/?id=%d" _with_0:SetAssetUrl("http://banland.xyz/Asset/?id=%d")
game:GetService("InsertService"):SetAssetVersionUrl "http://www.roblox.com/Asset/?assetversionid=%d" _with_0:SetAssetVersionUrl("http://www.roblox.com/Asset/?assetversionid=%d")
end
do
local _with_0 = game:GetService("SocialService")
pcall(function() pcall(function()
game:GetService("SocialService") return _with_0:SetFriendUrl("http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsFriendsWith&playerid=%d&userid=%d")
:SetFriendUrl "http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsFriendsWith&playerid=%d&userid=%d" end)
pcall(function()
return _with_0:SetBestFriendUrl("http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsBestFriendsWith&playerid=%d&userid=%d")
end)
pcall(function()
return _with_0:SetGroupUrl("http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsInGroup&playerid=%d&groupid=%d")
end)
pcall(function()
return _with_0:SetGroupRankUrl("http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=GetGroupRank&playerid=%d&groupid=%d")
end)
pcall(function()
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) end)
pcall(function() pcall(function()
game:GetService("SocialService") return game:SetCreatorID(0, Enum.CreatorType.User)
:SetBestFriendUrl "http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsBestFriendsWith&playerid=%d&userid=%d"
end) end)
pcall(function() pcall(function()
game:GetService("SocialService") return game:SetScreenshotInfo("")
:SetGroupUrl "http://banland.xyz/Game/LuaWebService/HandleSocialRequest.ashx?method=IsInGroup&playerid=%d&groupid=%d"
end) end)
pcall(function() pcall(function()
game:GetService("SocialService") return game:SetVideoInfo("")
: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()
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()
game:SetVideoInfo ""
end)
pcall(function() pcall(function()
settings().Rendering.EnableFRM = true settings().Rendering.EnableFRM = true
end) end)
pcall(function() pcall(function()
settings()["Task Scheduler"].PriorityMethod = Enum.PriorityMethod.AccumulatedError settings()["Task Scheduler"].PriorityMethod = Enum.PriorityMethod.AccumulatedError
end) end)
game:GetService("ChangeHistoryService"):SetEnabled(false) game:GetService("ChangeHistoryService"):SetEnabled(false)
pcall(function() pcall(function()
game:GetService("Players") return game:GetService("Players"):SetBuildUserPermissionsUrl("http://banland.xyz//Game/BuildActionPermissionCheck.ashx?assetId=0&userId=%d&isSolo=true")
:SetBuildUserPermissionsUrl "http://banland.xyz//Game/BuildActionPermissionCheck.ashx?assetId=0&userId=%d&isSolo=true"
end) 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")
local doVisit
function doVisit() doVisit = function()
message.Text = "Loading Game" message.Text = "Loading Game"
if false then if false then
game:Load "" game:Load("")
pcall(function() pcall(function()
visit:SetUploadUrl "" return visit:SetUploadUrl("")
end) end)
else else
pcall(function() pcall(function()
visit:SetUploadUrl "" return visit:SetUploadUrl("")
end) end)
end end
message.Text = "Running" message.Text = "Running"
game:GetService("RunService"):Run() game:GetService("RunService"):Run()
message.Text = "Creating Player" message.Text = "Creating Player"
if false then if false then
player = game:GetService("Players"):CreateLocalPlayer(1) player = game:GetService("Players"):CreateLocalPlayer(1)
@ -115,60 +91,55 @@ function doVisit()
player = game:GetService("Players"):CreateLocalPlayer(0) player = game:GetService("Players"):CreateLocalPlayer(0)
end end
player.CharacterAppearance = "" player.CharacterAppearance = ""
local propExists, canAutoLoadChar = false local propExists = false
local canAutoLoadChar = false
propExists = pcall(function() propExists = pcall(function()
canAutoLoadChar = game.Players.CharacterAutoLoads canAutoLoadChar = game.Players.CharacterAutoLoads
end) end)
if (propExists and canAutoLoadChar) or not propExists then if (propExists and canAutoLoadChar) or not propExists then
player:LoadCharacter() player:LoadCharacter()
end end
message.Text = "Setting GUI" message.Text = "Setting GUI"
player:SetSuperSafeChat(true) player:SetSuperSafeChat(true)
pcall(function() pcall(function()
player:SetMembershipType(Enum.MembershipType.None) return player:SetMembershipType(Enum.MembershipType.None)
end) end)
pcall(function() pcall(function()
player:SetAccountAge(0) return player:SetAccountAge(0)
end) end)
if false then if false then
message.Text = "Setting Ping" message.Text = "Setting Ping"
visit:SetPing("http://banland.xyz/Game/ClientPresence.ashx?version=old&PlaceID=_PLACE_ID", 300) visit:SetPing("http://banland.xyz/Game/ClientPresence.ashx?version=old&PlaceID=_PLACE_ID", 300)
message.Text = "Sending Stats" message.Text = "Sending Stats"
game:HttpGet "" return game:HttpGet("")
end end
end end
local success, err = pcall(doVisit)
success, err = pcall(doVisit)
if not addedBuildTools then if not addedBuildTools then
local playerName = Instance.new "StringValue" do
playerName.Name = "PlayerName" local _with_0 = Instance.new("StringValue")
playerName.Value = player.Name _with_0.Name = "PlayerName"
playerName.RobloxLocked = true _with_0.Value = player.Name
playerName.Parent = screenGui _with_0.RobloxLocked = true
_with_0.Parent = screenGui
pcall(function() end
game:GetService("ScriptContext"):AddCoreScript(59431535, screenGui, "BuildToolsScript") pcall(function()
return game:GetService("ScriptContext"):AddCoreScript(59431535, screenGui, "BuildToolsScript")
end) end)
addedBuildTools = true addedBuildTools = true
end end
if success then if success then
message.Parent = nil message.Parent = nil
else else
print(err) print(err)
if false then if false then
pcall(function() pcall(function()
visit:SetUploadUrl "" return visit:SetUploadUrl("")
end) end)
end end
wait(5) wait(5)
message.Text = "Error on visit: " .. err message.Text = "Error on visit: " .. tostring(err)
if false then if false then
game:HttpPost("http://banland.xyz/Error/Lua.ashx?", "Visit.lua: " .. err) return game:HttpPost("http://banland.xyz/Error/Lua.ashx?", "Visit.lua: " .. tostring(err))
end end
end end

147
yue/visit.yue Normal file
View File

@ -0,0 +1,147 @@
-- Prepended to Edit.lua and Visit.lua and Studio.lua and PlaySolo.lua--
print "[Mercury]: Loaded Visit corescript"
if true
try
game\SetPlaceID _PLACE_ID
-- else
-- if false
-- try
-- game\SetPlaceID _PLACE_ID
visit = game\GetService "Visit"
message = Instance.new "Message"
message.Parent = workspace
message.archivable = false
game\GetService"ScriptInformationProvider"\SetAssetUrl "http://banland.xyz/Asset/"
game\GetService"ContentProvider"\SetThreadPool 16
try
game\GetService"InsertService"\SetFreeModelUrl "http://www.roblox.com/Game/Tools/InsertAsset.ashx?type=fm&q=%s&pg=%d&rs=%d"
-- Used for free model search (insert tool)
try
game\GetService"InsertService"\SetFreeDecalUrl "http://www.roblox.com/Game/Tools/InsertAsset.ashx?type=fd&q=%s&pg=%d&rs=%d"
-- Used for free decal search (insert tool)
settings!.Diagnostics\LegacyScriptMode!
with game\GetService "InsertService"
\SetBaseSetsUrl "http://www.roblox.com/Game/Tools/InsertAsset.ashx?nsets=10&type=base"
\SetUserSetsUrl "http://www.roblox.com/Game/Tools/InsertAsset.ashx?nsets=20&type=user&userid=%d"
\SetCollectionUrl "http://www.roblox.com/Game/Tools/InsertAsset.ashx?sid=%d"
\SetAssetUrl "http://banland.xyz/Asset/?id=%d"
\SetAssetVersionUrl "http://www.roblox.com/Asset/?assetversionid=%d"
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"
try
game\SetCreatorID 0, Enum.CreatorType.User
try
game\SetScreenshotInfo ""
try
game\SetVideoInfo ""
try
settings!.Rendering.EnableFRM = true
try
settings!["Task Scheduler"].PriorityMethod = Enum.PriorityMethod.AccumulatedError
game\GetService"ChangeHistoryService"\SetEnabled false
try
game\GetService"Players"\SetBuildUserPermissionsUrl "http://banland.xyz//Game/BuildActionPermissionCheck.ashx?assetId=0&userId=%d&isSolo=true"
workspace\SetPhysicsThrottleEnabled true
addedBuildTools = false
screenGui = game\GetService"CoreGui"\FindFirstChild "RobloxGui"
doVisit = ->
message.Text = "Loading Game"
if false
game\Load ""
try
visit\SetUploadUrl ""
else
try
visit\SetUploadUrl ""
message.Text = "Running"
game\GetService"RunService"\Run!
message.Text = "Creating Player"
if false
global player = game\GetService"Players"\CreateLocalPlayer 1
player.Name = [====[Guest _GUEST_NUMBER]====]
else
global player = game\GetService"Players"\CreateLocalPlayer 0
player.CharacterAppearance = ""
propExists = canAutoLoadChar = false
propExists = try
canAutoLoadChar = game.Players.CharacterAutoLoads
if (propExists and canAutoLoadChar) or not propExists
player\LoadCharacter!
message.Text = "Setting GUI"
player\SetSuperSafeChat true
try
player\SetMembershipType Enum.MembershipType.None
try
player\SetAccountAge 0
if false
message.Text = "Setting Ping"
visit\SetPing "http://banland.xyz/Game/ClientPresence.ashx?version=old&PlaceID=_PLACE_ID", 300
message.Text = "Sending Stats"
game\HttpGet ""
success, err = pcall doVisit
if not addedBuildTools
with Instance.new "StringValue"
.Name = "PlayerName"
.Value = player.Name
.RobloxLocked = true
.Parent = screenGui
try
game\GetService"ScriptContext"\AddCoreScript 59431535, screenGui, "BuildToolsScript"
addedBuildTools = true
if success
message.Parent = nil
else
print err
if false
try
visit\SetUploadUrl ""
wait 5
message.Text = "Error on visit: #{err}"
if false
game\HttpPost "http://banland.xyz/Error/Lua.ashx?", "Visit.lua: #{err}"