syntaxwebsite/app/files/Visit.lua

132 lines
5.7 KiB
Lua

function ifSeleniumThenSetCookie(key, value)
if false then
game:GetService("CookiesService"):SetCookieValue(key, value)
end
end
ifSeleniumThenSetCookie("SeleniumTest1", "Inside the visit lua script")
pcall(function() game:SetPlaceID({PlaceId}) end)
pcall(function() game:SetUniverseId({UniverseId}) end)
visit = game:GetService("Visit")
local message = Instance.new("Message")
message.Parent = workspace
message.archivable = false
game:GetService("ScriptInformationProvider"):SetAssetUrl("https://www.syntax.eco/Asset/")
game:GetService("ContentProvider"):SetThreadPool(16)
pcall(function() game:GetService("InsertService"):SetFreeModelUrl("https://www.syntax.eco/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("https://www.syntax.eco/Game/Tools/InsertAsset.ashx?type=fd&q=%s&pg=%d&rs=%d") end) -- Used for free decal search (insert tool)
ifSeleniumThenSetCookie("SeleniumTest2", "Set URL service")
settings().Diagnostics:LegacyScriptMode()
game:GetService("InsertService"):SetBaseSetsUrl("https://www.syntax.eco/Game/Tools/InsertAsset.ashx?nsets=10&type=base")
game:GetService("InsertService"):SetUserSetsUrl("https://www.syntax.eco/Game/Tools/InsertAsset.ashx?nsets=20&type=user&userid=%d")
game:GetService("InsertService"):SetCollectionUrl("https://www.syntax.eco/Game/Tools/InsertAsset.ashx?sid=%d")
game:GetService("InsertService"):SetAssetUrl("https://www.syntax.eco/Asset/?id=%d")
game:GetService("InsertService"):SetAssetVersionUrl("https://www.syntax.eco/Asset/?assetversionid=%d")
pcall(function() game:GetService("SocialService"):SetFriendUrl("https://www.syntax.eco/Game/LuaWebService/HandleSocialRequest.ashx?method=IsFriendsWith&playerid=%d&userid=%d") end)
pcall(function() game:GetService("SocialService"):SetBestFriendUrl("https://www.syntax.eco/Game/LuaWebService/HandleSocialRequest.ashx?method=IsBestFriendsWith&playerid=%d&userid=%d") end)
pcall(function() game:GetService("SocialService"):SetGroupUrl("https://www.syntax.eco/Game/LuaWebService/HandleSocialRequest.ashx?method=IsInGroup&playerid=%d&groupid=%d") end)
pcall(function() game:GetService("SocialService"):SetGroupRankUrl("https://www.syntax.eco/Game/LuaWebService/HandleSocialRequest.ashx?method=GetGroupRank&playerid=%d&groupid=%d") end)
pcall(function() game:GetService("SocialService"):SetGroupRoleUrl("https://www.syntax.eco/Game/LuaWebService/HandleSocialRequest.ashx?method=GetGroupRole&playerid=%d&groupid=%d") end)
pcall(function() game:GetService("GamePassService"):SetPlayerHasPassUrl("https://www.syntax.eco/Game/GamePass/GamePassHandler.ashx?Action=HasPass&UserID=%d&PassID=%d") end)
pcall(function() game:GetService("MarketplaceService"):SetProductInfoUrl("https://www.syntax.eco/marketplace/productinfo?assetId=%d") end)
pcall(function() game:GetService("MarketplaceService"):SetDevProductInfoUrl("https://www.syntax.eco/marketplace/productDetails?productId=%d") end)
pcall(function() game:GetService("MarketplaceService"):SetPlayerOwnsAssetUrl("https://www.syntax.eco/ownership/hasasset?userId=%d&assetId=%d") end)
pcall(function() game:SetCreatorID(0, Enum.CreatorType.User) end)
ifSeleniumThenSetCookie("SeleniumTest3", "Set creator ID")
pcall(function() game:SetScreenshotInfo("") end)
pcall(function() game:SetVideoInfo("") end)
ifSeleniumThenSetCookie("SeleniumTest4", "Exiting SingleplayerSharedScript")-- SingleplayerSharedScript.lua inserted here --
pcall(function() settings().Rendering.EnableFRM = true end)
pcall(function() settings()["Task Scheduler"].PriorityMethod = Enum.PriorityMethod.AccumulatedError end)
game:GetService("ChangeHistoryService"):SetEnabled(false)
pcall(function() game:GetService("Players"):SetBuildUserPermissionsUrl("https://www.syntax.eco/Game/BuildActionPermissionCheck.ashx?assetId=0&userId=%d&isSolo=true") end)
workspace:SetPhysicsThrottleEnabled(true)
local addedBuildTools = false
local screenGui = game:GetService("CoreGui"):FindFirstChild("RobloxGui")
local inStudio = true
function doVisit()
message.Text = "Loading Game"
if false then
if false then
success, err = pcall(function() game:Load("") end)
if not success then
message.Text = "Could not teleport"
return
end
end
else
if false then
game:Load("")
pcall(function() visit:SetUploadUrl("") end)
else
pcall(function() visit:SetUploadUrl("") end)
end
end
message.Text = "Running"
game:GetService("RunService"):Run()
message.Text = "Creating Player"
player = game:GetService("Players"):CreateLocalPlayer(0)
player.CharacterAppearance = "https://www.syntax.eco/Asset/CharacterFetch.ashx?userId={UserId}&placeId={PlaceId}"
local propExists, canAutoLoadChar = false
propExists = pcall(function() canAutoLoadChar = game.Players.CharacterAutoLoads end)
if (propExists and canAutoLoadChar) or (not propExists) then
player:LoadCharacter()
end
message.Text = "Setting GUI"
player:SetSuperSafeChat(false)
pcall(function() player:SetUnder13(false) end)
pcall(function() player:SetMembershipType(None) end)
pcall(function() player:SetAccountAge(0) end)
end
success, err = pcall(doVisit)
if not inStudio and not addedBuildTools then
local playerName = Instance.new("StringValue")
playerName.Name = "PlayerName"
playerName.Value = player.Name
playerName.RobloxLocked = true
playerName.Parent = screenGui
pcall(function() game:GetService("ScriptContext"):AddCoreScript(59431535,screenGui,"BuildToolsScript") end)
addedBuildTools = true
end
if success then
message.Parent = nil
else
print(err)
if not inStudio then
if false then
pcall(function() visit:SetUploadUrl("") end)
end
end
wait(5)
message.Text = "Error on visit: " .. err
if not inStudio then
if false then
game:HttpPost("https://www.syntax.eco/Error/Lua.ashx", "Visit.lua: " .. err)
end
end
end