prepare("SELECT * FROM sessions WHERE sessionkey = :sesskey"); $query->bindParam(":sesskey", $cookie, PDO::PARAM_STR); $query->execute(); $row = $query->fetch(PDO::FETCH_OBJ); if($query->rowCount() && $row->created+(86400*3) > time() && $row->loginIp == getIpAddress()) { $auth = getUserInfoFromUid($row->userId); } } } $placeId = -1; $server = "localhost"; $port = 53640; $baseUrl = "http://sitetest1.roblonium.com/"; $apiUrl = "http://api.roblonium.com/"; $membershipIndex = [0=>"None", 1=>"BuildersClub", 2=>"TurboBuildersClub", 3=>"OutrageousBuildersClub"]; if($auth) { $memberType = "Enum.MembershipType.".$membershipIndex[$auth->MembershipLevel]; $userName = $auth->Name; $userId = $auth->Id; $ssc = "false"; $charApp = $baseUrl."Asset/CharacterFetch.ashx?userId=".$userId; } else { $guestId = rand(1, 9999); $memberType = "Enum.MembershipType.None"; $userName = "Guest $guestId"; $userId = -$guestId; $ssc = "true"; $charApp = $baseUrl."Asset/CharacterFetch.ashx?userId=1"; } ob_start(); ?> -- march 2011 and above joinscript by pizzaboxer -- functions -------------------------- function onPlayerAdded(player) -- override end function reportError(err) print("***ERROR*** " .. err) if not test then visit:SetUploadUrl("") end client:Disconnect() wait(4) game:SetMessage("Error: " .. err) end -- arguments -------------------------- local threadSleepTime = ... if threadSleepTime==nil then threadSleepTime = 15 end local test = false print("! Joining game '' place at ") -- set globals -------------------------- client = game:GetService("NetworkClient") visit = game:GetService("Visit") game:GetService("ScriptInformationProvider"):SetAssetUrl("http://www.roblox.com/Asset/") settings().Diagnostics:LegacyScriptMode() game:GetService("ChangeHistoryService"):SetEnabled(false) game:GetService("ContentProvider"):SetThreadPool(16) game:GetService("InsertService"):SetBaseSetsUrl("Game/Tools/InsertAsset.ashx?nsets=10&type=base") game:GetService("InsertService"):SetUserSetsUrl("Game/Tools/InsertAsset.ashx?nsets=20&type=user&userid=%d") game:GetService("InsertService"):SetCollectionUrl("Game/Tools/InsertAsset.ashx?sid=%d") game:GetService("InsertService"):SetAssetUrl("Asset/?id=%d") game:GetService("InsertService"):SetAssetVersionUrl("Asset/?assetversionid=%d") pcall(function() game:GetService("SocialService"):SetFriendUrl("Game/LuaWebService/HandleSocialRequest.ashx?method=IsFriendsWith&playerid=%d&userid=%d") end) pcall(function() game:GetService("SocialService"):SetBestFriendUrl("Game/LuaWebService/HandleSocialRequest.ashx?method=IsBestFriendsWith&playerid=%d&userid=%d") end) pcall(function() game:GetService("SocialService"):SetGroupUrl("Game/LuaWebService/HandleSocialRequest.ashx?method=IsInGroup&playerid=%d&groupid=%d") end) pcall(function() game:GetService("SocialService"):SetGroupRankUrl("Game/LuaWebService/HandleSocialRequest.ashx?method=GetGroupRank&playerid=%d&groupid=%d") end) pcall(function() game:GetService("SocialService"):SetGroupRoleUrl("Game/LuaWebService/HandleSocialRequest.ashx?method=GetGroupRole&playerid=%d&groupid=%d") end) pcall(function() game:GetService("GamePassService"):SetPlayerHasPassUrl("Game/GamePass/GamePassHandler.ashx?Action=HasPass&UserID=%d&PassID=%d") end) pcall(function() game:GetService("MarketplaceService"):SetProductInfoUrl("marketplace/productinfo?assetId=%d") end) pcall(function() game:GetService("MarketplaceService"):SetPlayerOwnsAssetUrl("ownership/hasasset?userId=%d&assetId=%d") end) pcall(function() game:SetCreatorID(, Enum.CreatorType.User) end) -- Bubble chat. This is all-encapsulated to allow us to turn it off with a config setting --Classic, Bubble, ClassicAndBubble pcall(function() game:GetService("Players"):SetChatStyle(Enum.ChatStyle.ClassicAndBubble) end) local waitingForCharacter = false -- client/server disconnection -------------------------- function onDisconnection(_, lostConnection) if lostConnection then game:SetMessage("You have lost the connection to the game") else game:SetMessage("This game has shut down") end end -- requests character -------------------------- function requestCharacter(replicator) local connection = player.Changed:connect(function(property) if property=="Character" then --game:ClearMessage() game:SetMessage(game:GetService("CookiesService"):GetCookieValue("_ROBLOSECURITY")) connection:disconnect() end end) game:SetMessage("Requesting character") local success, err = pcall(function() replicator:RequestCharacter() game:SetMessage("Waiting for character") waitingForCharacter = true end) if not success then reportError(err) return end end -- when the server accepts the connection -------------------------- function onConnectionAccepted(_, replicator) local waitingForMarker = true local success, err = pcall(function() if not test then visit:SetPing("", 300) --todo - put the ping url in here end game:SetMessageBrickCount() replicator.Disconnection:connect(onDisconnection) local marker = replicator:SendMarker() marker.Received:connect(function() waitingForMarker = false requestCharacter(replicator) end) end) if not success then reportError(err) return end while waitingForMarker do workspace:ZoomToExtents() wait(0.5) end end -- when there's no response from the server on connection - aka when the connection fails -------------------------- function onConnectionFailed(_, errcode) game:SetMessage("Failed to connect to the Game. (ID="..errcode..")") end -- when the connection is rejected by the server [how tf do you even trigger this on the server???] -------------------------- function onConnectionRejected() game:SetMessage("Connection rejected by the server.") end -- disconnect player when idled -------------------------- idled = false function onPlayerIdled(time) if time > 20*60 then game:SetMessage(string.format("You were disconnected for being idle %d minutes", time/60)) client:Disconnect() if not idled then idled = true end end end -- main joinscript code is in this pcall -------------------------- local success, err = pcall(function() game:SetRemoteBuildMode(true) game:SetMessage("Connecting to Server") client.ConnectionAccepted:connect(onConnectionAccepted) client.ConnectionRejected:connect(onConnectionRejected) client.ConnectionFailed:connect(onConnectionFailed) player = client:PlayerConnect(, "", , 0, threadSleepTime) player.Name = [========[]========] player.CharacterAppearance = "" player:SetSuperSafeChat() player:SetMembershipType() player:SetAccountAge(0) player.Idled:connect(onPlayerIdled) if not test then visit:SetUploadUrl("") end -- Overriden -------------------------- onPlayerAdded(player) end) if not success then reportError(err) end --PS Scripts if workspace:FindFirstChild("IsPersonalServer") ~= nil then game:GetService("ScriptContext"):AddCoreScript(27, scriptContext,"CoreScripts/BuildToolsScripts/BuildToolManager") end game:GetService("InsertService"):SetTrustLevel(0) pcall(function() game:SetScreenshotInfo("") end) pcall(function() game:SetVideoInfo('';?>GamesROBLOX, video, free game, online virtual world') end) -- use single quotes here because the video info string may have unescaped double quotes