From 82f8beb19bdfd2e67dc884206adbf1b1543cba4d Mon Sep 17 00:00:00 2001 From: nolanwhy <69528856+nolanwhy@users.noreply.github.com> Date: Fri, 5 May 2023 23:05:04 +0200 Subject: [PATCH] Update fullbody.php --- assets/renders/user/fullbody.php | 52 +++++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/assets/renders/user/fullbody.php b/assets/renders/user/fullbody.php index dcfd510..f217a9b 100644 --- a/assets/renders/user/fullbody.php +++ b/assets/renders/user/fullbody.php @@ -1 +1,51 @@ - \ No newline at end of file +prepare("SELECT * FROM users WHERE id = :id"); +$stmt->bindParam(':id',$id,PDO::PARAM_INT); +$stmt->execute(); +$ruser = $stmt->fetch(); +if(!$ruser) { + exit; +} +function renderUser($id, $times = 1) { + // times is the like, if you rendered 2 times or shit. + $newtime = (int)$times + 1; // if rendered again, to retry. + $id = (int)$id; + $charapp = $site["url"].'/v1.1/avatar-fetch?userId='.$userId.'&placeId=0'; + global $RCCServiceSoap; + $script = 'game:GetService("ContentProvider"):SetBaseUrl("'.$site["url"].'/") +game:GetService("ScriptContext").ScriptsDisabled = true + +local plr = game.Players:CreateLocalPlayer(0) +plr.CharacterAppearance = "'.$charapp.'" +plr:LoadCharacter(false) +for i,v in pairs(plr.Character:GetChildren()) do + print(v) + if v:IsA("Tool") then + plr.Character.Torso["Right Shoulder"].CurrentAngle = math.pi / 2 + end +end + +local result = game:GetService("ThumbnailGenerator"):Click("PNG", 420, 420, true) +return result'; + $joby = new Roblox\Grid\Rcc\Job("RENDER".rand(1,getrandmax()), 15); + $scripty = new Roblox\Grid\Rcc\ScriptExecution("Script", $script); + $result = $RCCServiceSoap->BatchJob($joby, $scripty); + if(empty($result)) { + if($times <= 1) { + return renderUser($id, $newtime); + } + } +} +if(empty($ruser["thumbnail"])) { + $new = renderUser($ruser["id"]); + $stmt = $con->prepare("UPDATE users SET thumbnail = :new WHERE id = :id"); + $stmt->bindParam(':id',$id,PDO::PARAM_INT); + $stmt->bindParam(':new',$new,PDO::PARAM_STR); + $stmt->execute(); + echo $new; +} else { + echo base64_decode($ruser["thumbnail"]); +}