-- [[ Rscripts Risk Notice ]]
-- This script is not verified by rscripts.net. Deal with caution.
--
-- Stay safe:
-- • Never log in on unofficial Roblox sites or lookalike domains.
-- • Real Roblox links use roblox.com (check the .com ending).
-- • Treat fake Roblox login / "claim reward" pages as phishing.
-- [[ End Rscripts Risk Notice ]]
--[[ RT3 Hub — Restaurant Tycoon 3
Menu: RightControl | Inf jump: V | Noclip: N | WalkSpeed: C
]]
if game.PlaceId ~= 119048529960596 and game.PlaceId ~= 99889627739043 then return end -- Restaurant Tycoon 3 only (safe in autoexec)
if getgenv().RT3H and getgenv().RT3H.Unload then pcall(getgenv().RT3H.Unload) end
local Players = game:GetService("Players")
local RS = game:GetService("ReplicatedStorage")
-- player profile data is only sent when players join, so start listening before anything else
local PD = getgenv().RT3H_PD or {} -- PD[player][store][key]; survives reloads of this script
getgenv().RT3H_PD = PD
local earlyConns = {}
do
local Data = RS:WaitForChild("Events"):WaitForChild("Data")
table.insert(earlyConns, Data:WaitForChild("PlayerDataSet").OnClientEvent:Connect(function(p, store, data)
PD[p] = PD[p] or {}; PD[p][store] = type(data) == "table" and data or {}
end))
table.insert(earlyConns, Data:WaitForChild("PlayerDataUpdated").OnClientEvent:Connect(function(p, store, list)
PD[p] = PD[p] or {}; PD[p][store] = PD[p][store] or {}
if type(list) == "table" then for _, kv in pairs(list) do if type(kv) == "table" then PD[p][store][kv[1]] = kv[2] end end end
end))
end
if not game:IsLoaded() then game.Loaded:Wait() end
while not Players.LocalPlayer do task.wait() end
RS:WaitForChild("Source"); RS.Events:WaitForChild("Restaurant")
local CS = game:GetService("CollectionService")
local UIS = game:GetService("UserInputService")
local RunS = game:GetService("RunService")
local HS = game:GetService("HttpService")
local lp = Players.LocalPlayer
local E = RS.Events
local R = E.Restaurant
local H = {Run = true, conns = {}, stats = setmetatable({}, {__index = function() return 0 end})}
local function stat(k) H.stats[k] = H.stats[k] + 1 end
getgenv().RT3H = H
local function conn(c) table.insert(H.conns, c) return c end
local function log(...) print("[RT3H]", ...) end
---------------------------------------------------------------- settings
local DEFAULT = {
AutoCook = true, InstantCook = true, AutoSeat = true, AutoOrder = true, AutoServe = true,
AutoDishes = true, AutoBills = true, AutoTips = true, AutoDrops = true, DriveThru = true,
CalmRude = true, CatchDash = true,
AntiAFK = true, InfJump = false, Noclip = false, WalkSpeedOn = false, WalkSpeed = 40,
NameESP = false,
}
local S = {}
pcall(makefolder, "RT3Hub")
do
local ok, saved = pcall(function() return HS:JSONDecode(readfile("RT3Hub/settings.json")) end)
for k, v in pairs(DEFAULT) do S[k] = v end
if ok and type(saved) == "table" then for k, v in pairs(saved) do if DEFAULT[k] ~= nil then S[k] = v end end end
S.AntiAFK = true -- always on
end
local function save() pcall(writefile, "RT3Hub/settings.json", HS:JSONEncode(S)) end
local function readJSON(path) local ok, t = pcall(function() return HS:JSONDecode(readfile(path)) end) return ok and type(t) == "table" and t or {} end
local function myTy() local v = lp:FindFirstChild("Tycoon") return v and v.Value end
local function myHRP() local c = lp.Character return c and c:FindFirstChild("HumanoidRootPart") end
local function myHum() local c = lp.Character return c and c:FindFirstChildOfClass("Humanoid") end
---------------------------------------------------------------- state tracking (from the same events the game uses)
local G, Cars = {}, {} -- G[groupId] = {State, C = {[custId] = {State, Order}}}
local function grp(g) g = tostring(g); G[g] = G[g] or {C = {}}; return G[g] end
local function cust(g, c) local gr = grp(g); c = tostring(c); gr.C[c] = gr.C[c] or {}; return gr.C[c] end
local function car(id) id = tostring(id); Cars[id] = Cars[id] or {}; return Cars[id] end
local onGroupState, onCustState -- defined below
conn(R.CustomerActionReplicated.OnClientEvent:Connect(function(ty, act, g, a, b)
if ty ~= myTy() then return end
if act == "CreateGroup" then
local gr = grp(g); gr.State = type(a) == "table" and a.State or gr.State
if type(a) == "table" and type(a.Customers) == "table" then
for cid, c in pairs(a.Customers) do local cu = cust(g, cid); cu.State = c.State; cu.Order = c.Order end
end
elseif act == "DeleteGroup" then G[tostring(g)] = nil
elseif act == "DeleteAllGroups" then table.clear(G)
elseif act == "SetGroupState" then grp(g).State = a; onGroupState(tostring(g), a)
elseif act == "SetCustomerState" then cust(g, a).State = b; onCustState(tostring(g), tostring(a), b)
elseif act == "UpdateCustomerData" and type(b) == "table" then local cu = cust(g, a); for k, v in pairs(b) do cu[k] = v end
end
end))
conn(R.DriveThruActionReplicated.OnClientEvent:Connect(function(ty, act, id, a)
if ty ~= myTy() then return end
if act == "CreateCar" then car(id).State = "Entering"
elseif act == "CarStateChanged" then car(id).State = a
elseif act == "SetCarOrders" then car(id).Orders = a
elseif act == "DeleteCar" then Cars[tostring(id)] = nil
elseif act == "DeleteAll" then table.clear(Cars)
end
end))
-- interactions from other tycoons (so we never fire their prompts)
local otherIds = {}
conn(R.Interactions.InteractionCreated.OnClientEvent:Connect(function(ty, data)
if type(data) ~= "table" then return end
if ty ~= myTy() then otherIds[tostring(data.Id)] = true return end
if data.Key == "CollectBill" and S.AutoBills then
R.TaskCompleted:FireServer({Name = "CollectBill", FurnitureModel = data.Model, Tycoon = ty}); stat("bill")
elseif data.Key == "CollectDishes" and S.AutoDishes then
R.TaskCompleted:FireServer({Name = "CollectDishes", FurnitureModel = data.Model, Tycoon = ty}); stat("dishes")
end
end))
---------------------------------------------------------------- teleport helper (one at a time)
local tpBusy = false
local function withTeleport(cf, fn)
while tpBusy do task.wait(0.05) end
tpBusy = true
local hrp = myHRP()
local back = hrp and hrp.CFrame
if hrp then hrp.CFrame = cf; task.wait(0.3) end
local ok, err = pcall(fn)
if not ok then log("action error", err) end
task.wait(0.2)
if hrp and back then hrp.CFrame = back end
tpBusy = false
end
local function dummyOf(g, c)
local ty = myTy()
local gf = ty and ty:FindFirstChild("ClientCustomers") and ty.ClientCustomers:FindFirstChild(g)
return gf and gf:FindFirstChild(c or "1")
end
---------------------------------------------------------------- dine and dash
local dashBusy = {}
local function catchDash(g)
if dashBusy[g] then return end
dashBusy[g] = true
local ty = myTy()
for _ = 1, 30 do
local gr = G[g]
if gr and gr.State and gr.State ~= "DineAndDashing" then break end
local d = dummyOf(g, "1")
local hrp = d and d:FindFirstChild("HumanoidRootPart")
if hrp then
withTeleport(hrp.CFrame * CFrame.new(0, 0, 3), function()
local p = hrp:FindFirstChildOfClass("ProximityPrompt")
if p then fireproximityprompt(p) end
R.Customers.DineAndDashCaught:FireServer(ty, g)
end)
end
task.wait(0.5)
if not d or not d.Parent then break end
end
log("dine-and-dash handled, group", g, "state", G[g] and G[g].State)
dashBusy[g] = nil
end
---------------------------------------------------------------- rude customers (server picks what calms them; we learn from results)
local rudeMemory = readJSON("RT3Hub/rude_answers.json") -- [answer] = score
local rudePending = {}
local GOOD = {"sorry", "apolog", "understand", "calm", "help", "right away", "of course", "my bad", "fix", "free", "discount", "please", "happy", "certainly", "absolutely"}
local BAD = {"leave", "get out", "whatever", "deal with it", "not my problem", "shut", "go away", "rude", "don't care", "dont care", "no way"}
local function pickResponse(list)
local best, bestScore
for _, r in pairs(list) do
local s, low = 0, tostring(r):lower()
for _, w in ipairs(GOOD) do if low:find(w, 1, true) then s = s + 2 end end
for _, w in ipairs(BAD) do if low:find(w, 1, true) then s = s - 3 end end
s = s + (rudeMemory[tostring(r)] or 0)
if not bestScore or s > bestScore then best, bestScore = r, s end
end
return best
end
local function calmRude(g, c)
local key = g .. ":" .. c
if rudePending[key] then return end
rudePending[key] = {}
local ty = myTy()
local d = dummyOf(g, c)
local hrp = d and d:FindFirstChild("HumanoidRootPart")
local function talk()
local _, resp = R.Customers.GetRudeCustomerDialog:InvokeServer(ty, g, c)
for _ = 1, 8 do
if type(resp) ~= "table" or next(resp) == nil then break end
local choice = pickResponse(resp)
table.insert(rudePending[key], tostring(choice))
_, resp = R.Customers.GetRudeCustomerDialog:InvokeServer(ty, g, c, choice)
end
end
if hrp then withTeleport(hrp.CFrame * CFrame.new(0, 0, 3), talk) else pcall(talk) end
log("rude customer answered:", table.concat(rudePending[key], " / "))
task.delay(60, function() rudePending[key] = nil end)
end
local function rudeOutcome(g, c, good)
local picks = rudePending[g .. ":" .. c]
if not picks then return end
for _, a in ipairs(picks) do rudeMemory[a] = (rudeMemory[a] or 0) + (good and 3 or -6) end
pcall(writefile, "RT3Hub/rude_answers.json", HS:JSONEncode(rudeMemory))
log("rude customer result:", good and "CALMED" or "angry ending")
rudePending[g .. ":" .. c] = nil
end
onGroupState = function(g, st)
if st == "DineAndDashing" and S.CatchDash then task.spawn(catchDash, g) end
end
onCustState = function(g, c, st)
if st == "CustomerAngry" and S.CalmRude then task.spawn(calmRude, g, c)
elseif st == "CustomerAngry_CalmEnding" then rudeOutcome(g, c, true)
elseif st == "CustomerAngry_AngryEnding" or st == "CustomerAngry_UpsetEnding" then rudeOutcome(g, c, false)
end
end
---------------------------------------------------------------- cooking
local cooking, cookStart = false, 0
conn(E.Cook.CookUpdated.OnClientEvent:Connect(function(kind, a, b)
if kind == "Start" then cooking, cookStart = true, os.clock()
elseif kind == "Finish" then cooking = false; stat("cookFinished")
elseif kind == "DirectToEquipment" and S.InstantCook then
cooking = true
task.spawn(function()
E.Cook.CookInputRequested:FireServer("Interact", a, b)
task.wait(0.15)
E.Cook.CookInputRequested:FireServer("CompleteTask", a, b)
end)
end
end))
local function startCook()
for _, p in ipairs(CS:GetTagged("Interaction")) do
if p:IsA("ProximityPrompt") and p.Enabled and not otherIds[p.Name]
and (p.ActionText == "Cook" or p.ActionText == "Make Drink") then
fireproximityprompt(p)
cooking, cookStart = true, os.clock()
stat("cookStarted")
return true
end
end
end
---------------------------------------------------------------- serving (customers + drive thru)
local holding, holdStart = false, 0
conn(R.GrabEnded.OnClientEvent:Connect(function() holding = false end))
local function findFood(ty, key)
local f = ty:FindFirstChild("Objects") and ty.Objects:FindFirstChild("Food")
if not f then return end
for _, food in ipairs(f:GetChildren()) do
if food.Name == tostring(key) and not food:GetAttribute("Taken") then return food end
end
end
local function grabAndServe(ty, food, fallback)
local ok, info = R.GrabFood:InvokeServer(food)
if not ok then return false end
holding, holdStart = true, os.clock()
local t = {Name = "Serve", FoodModel = food, Tycoon = ty}
info = type(info) == "table" and info or {}
if info.TargetCarId then t.CarId = info.TargetCarId
elseif info.TargetPlayerName then t.Player = Players:FindFirstChild(info.TargetPlayerName)
else for k, v in pairs(fallback) do t[k] = v end end
R.TaskCompleted:FireServer(t)
while holding and os.clock() - holdStart < 3 do task.wait(0.1) end
if holding then R.CancelGrabRequested:FireServer(); holding = false; stat("serveCancelled") else stat("served") end -- never get stuck holding a plate
return true
end
local function serveOne(ty)
for g, gr in pairs(G) do
for c, cu in pairs(gr.C) do
if cu.State == "WaitingForDish" and cu.Order then
local food = findFood(ty, cu.Order)
if food and grabAndServe(ty, food, {GroupId = g, CustomerId = c}) then return true end
end
end
end
if S.DriveThru then
for id, cr in pairs(Cars) do
if cr.State == "WaitingForFood" and type(cr.Orders) == "table" then
for _, key in pairs(cr.Orders) do
local food = findFood(ty, type(key) == "table" and (key.FoodKey or key[1]) or key)
if food and grabAndServe(ty, food, {CarId = id}) then return true end
end
end
end
end
end
---------------------------------------------------------------- seat + take orders (fire the game's own customer prompts)
local function customerPrompts(ty)
for _, p in ipairs(CS:GetTagged("CustomerInteractPrompt")) do
if p.Enabled and p:IsDescendantOf(ty) and p.Parent and p.Parent.Parent and p.Parent.Parent.Parent then
local c, g = p.Parent.Parent.Name, p.Parent.Parent.Parent.Name
local gr = G[g]
local cu = gr and gr.C[c]
local kind
if gr and gr.State == "Entered" and c == "1" then kind = "seat"
elseif cu and cu.State == "Ordering" then kind = "order" end
if (kind == "seat" and S.AutoSeat) or (kind == "order" and S.AutoOrder) or (not kind and S.AutoSeat and S.AutoOrder) then
fireproximityprompt(p)
stat(kind or "seatOrOrder")
end
end
end
end
---------------------------------------------------------------- bills / dishes / tips / drive-thru bills (sweep for anything missed)
local FU = require(RS.Source.Utility.FurnitureUtility)
local IT = require(RS.Source.Enums.Placement.ItemType)
local function sweep(ty)
for _, m in ipairs(ty.Items:GetDescendants()) do
if m:IsA("Model") then
if FU:IsTable(m.Name) then
local bill = m:FindFirstChild("Bill")
if S.AutoBills and bill and not bill:GetAttribute("Taken") then
R.TaskCompleted:FireServer({Name = "CollectBill", FurnitureModel = m, Tycoon = ty})
end
local trash = m:FindFirstChild("Trash")
if S.AutoDishes and trash and trash:GetAttribute("Collectable") then
R.TaskCompleted:FireServer({Name = "CollectDishes", FurnitureModel = m, Tycoon = ty})
end
elseif S.AutoTips and (m:GetAttribute("Value") or 0) > 0 and FU:Is(m.Name, IT.TipJar) then
R.TipsCollected:FireServer(ty)
end
end
end
if S.DriveThru then
for id, cr in pairs(Cars) do
if cr.State == "Ordering" then R.TaskCompleted:FireServer({Name = "TakeDriveThruOrder", CarId = id, Tycoon = ty})
elseif cr.State == "Paying" then R.TaskCompleted:FireServer({Name = "CollectDriveThruBill", CarId = id, Tycoon = ty}) end
end
end
-- catch any dine-and-dash / rude prompt the tracker missed (e.g. started before the script)
for _, p in ipairs(ty:GetDescendants()) do
if p:IsA("ProximityPrompt") and p.Enabled and p.Parent and p.Parent.Parent and p.Parent.Parent.Parent then
local c, g = p.Parent.Parent.Name, p.Parent.Parent.Parent.Name
if p.ObjectText == "Dine-and-Dash" and S.CatchDash then task.spawn(catchDash, g)
elseif p.ObjectText == "Rude Customer" and S.CalmRude then task.spawn(calmRude, g, c) end
end
end
end
-- cash drops + food critic clipboards
conn(E.Currency.DropSpawned.OnClientEvent:Connect(function(_, id)
if S.AutoDrops then task.delay(0.3, function() E.Currency.PlayerCollectedDrops:FireServer({id}) end) end
end))
---------------------------------------------------------------- main farm loops
local lastErr = 0
local function guard(fn, ...) local ok, err = pcall(fn, ...) if not ok and os.clock() - lastErr > 5 then lastErr = os.clock(); log("error:", err) end end
task.spawn(function()
while H.Run do
local ty = myTy()
if ty then
if S.AutoSeat or S.AutoOrder then guard(customerPrompts, ty) end
if cooking and os.clock() - cookStart > 25 then E.Cook.CookInputRequested:FireServer("CancelCooking"); cooking = false end
local busy = cooking or tpBusy
if not busy and S.AutoServe then local ok, did = pcall(serveOne, ty); busy = ok and did end
if not busy and S.AutoCook then guard(startCook) end
end
task.wait(0.4)
end
end)
task.spawn(function()
while H.Run do
local ty = myTy()
if ty and ty:FindFirstChild("Items") then guard(sweep, ty) end
task.wait(1.5)
end
end)
---------------------------------------------------------------- staff animation fix
-- game bug: workers restart the same animation without stopping the old one, hit Roblox's 64-track cap and freeze.
-- keep only the newest copy of each animation per worker.
local function fixWorkerAnims(ty)
local workers = ty:FindFirstChild("ClientWorkers")
if not workers then return 0 end
local stopped = 0
for _, a in ipairs(workers:GetDescendants()) do
if a:IsA("Animator") then
local newest = {}
for _, t in ipairs(a:GetPlayingAnimationTracks()) do
local id = t.Animation and t.Animation.AnimationId or tostring(t)
local keep = newest[id]
if not keep then newest[id] = t
else
-- the copy with the lowest TimePosition started most recently; stop the other
local old = t.TimePosition < keep.TimePosition and keep or t
newest[id] = old == keep and t or keep
old:Stop(0); stopped = stopped + 1
end
end
end
end
return stopped
end
H.FixWorkerAnims = fixWorkerAnims
task.spawn(function()
while H.Run do
local ty = myTy()
if ty then guard(fixWorkerAnims, ty) end
task.wait(3)
end
end)
---------------------------------------------------------------- local player
conn(lp.Idled:Connect(function()
if S.AntiAFK then local vu = game:GetService("VirtualUser"); vu:CaptureController(); vu:ClickButton2(Vector2.new()) end
end))
conn(UIS.JumpRequest:Connect(function()
if S.InfJump then local h = myHum() if h then h:ChangeState(Enum.HumanoidStateType.Jumping) end end
end))
conn(RunS.Stepped:Connect(function()
if S.Noclip and lp.Character then
for _, p in ipairs(lp.Character:GetDescendants()) do if p:IsA("BasePart") and p.CanCollide then p.CanCollide = false end end
end
end))
local wsWasOn = false
conn(RunS.Heartbeat:Connect(function()
local h = myHum()
if not h then return end
if S.WalkSpeedOn then h.WalkSpeed = tonumber(S.WalkSpeed) or 40; wsWasOn = true
elseif wsWasOn then h.WalkSpeed = 16; wsWasOn = false end
end))
---------------------------------------------------------------- codes
local codeCache = readJSON("RT3Hub/codes_" .. lp.UserId .. ".json") -- [code] = "redeemed"/"invalid"/"claimed"
local lastNotif
conn(E.NotificationSent.OnClientEvent:Connect(function(msg) lastNotif = tostring(msg) end))
local function fetchCodes()
local list, seen = {}, {}
local function add(c)
c = tostring(c):gsub(" ", ""):gsub("&", "&"):gsub("^%s+", ""):gsub("%s+$", "")
if #c > 1 and #c < 40 and not seen[c:lower()] then seen[c:lower()] = true; table.insert(list, c) end
end
local ok, body = pcall(game.HttpGet, game, "https://robloxden.com/game-codes/restaurant-tycoon-3")
if ok then for exp, code in body:gmatch('data%-expired="(%a+)".-data%-copy="([^"]+)"') do if exp == "false" then add(code) end end end
local ok2, b2 = pcall(game.HttpGet, game, "https://beebom.com/restaurant-tycoon-3-codes/")
if ok2 then
local cut = b2:find("[Ee]xpired [^<]-[Cc]odes")
for code in (cut and b2:sub(1, cut) or b2):gmatch("
%s*([^<]+)") do add(code) end
end
return list, ok, ok2
end
local codeStatus -- GUI label, set later
local function setCodeStatus(t) if codeStatus then codeStatus.Text = t end log(t) end
local redeeming = false
local function redeemAll()
if redeeming then return end
redeeming = true
setCodeStatus("Fetching latest codes…")
local list, a, b = fetchCodes()
local todo = {}
for _, c in ipairs(list) do if not codeCache[c] then table.insert(todo, c) end end
setCodeStatus(("Found %d codes (RobloxDen %s, Beebom %s). %d new to try."):format(#list, a and "ok" or "failed", b and "ok" or "failed", #todo))
local got = {}
for i, c in ipairs(todo) do
lastNotif = nil
E.Shop.CodeSubmitted:FireServer(c)
local t = os.clock()
while not lastNotif and os.clock() - t < 4 do task.wait(0.1) end
local m = (lastNotif or ""):lower()
-- server only replies on failure ("Invalid code!" / "Already claimed code!"); silence = redeemed
local res = m:find("invalid") and "invalid" or ((m:find("already") or m:find("claimed")) and "claimed") or "redeemed"
codeCache[c] = res
if res == "redeemed" then table.insert(got, c) end
setCodeStatus(("Trying %d/%d: %s → %s"):format(i, #todo, c, res))
task.wait(1.2)
end
pcall(writefile, "RT3Hub/codes_" .. lp.UserId .. ".json", HS:JSONEncode(codeCache))
setCodeStatus(#got > 0 and ("Redeemed " .. #got .. " new: " .. table.concat(got, ", ")) or ("Done. No new working codes (" .. #todo .. " tried)."))
redeeming = false
end
H.RedeemCodes = redeemAll
---------------------------------------------------------------- player data (for the stats window)
for _, c in ipairs(earlyConns) do conn(c) end
local joinTime = getgenv().RT3H_JOIN or {} -- survives reloads
getgenv().RT3H_JOIN = joinTime
local scriptStart = getgenv().RT3H_START or os.time()
getgenv().RT3H_START = scriptStart
for _, p in ipairs(Players:GetPlayers()) do if joinTime[p] == nil then joinTime[p] = false end end -- joined before script: unknown
conn(Players.PlayerAdded:Connect(function(p) joinTime[p] = os.time() end))
local ratings = getgenv().RT3H_RATINGS or {} -- survives reloads
getgenv().RT3H_RATINGS = ratings -- [tycoon] = {restaurantValue, tipChance, ...}; server pushes these every few minutes
conn(RS.Events.Ratings.RatingsUpdated.OnClientEvent:Connect(function(ty, data) if type(data) == "table" then ratings[ty] = data end end))
local function pdKey(p, key) local d = PD[p] if not d then return nil end for _, st in pairs(d) do if st[key] ~= nil then return st[key] end end end
local function count(t) local n = 0 if type(t) == "table" then for _ in pairs(t) do n = n + 1 end end return n end
local function fmt(n)
n = tonumber(n); if not n then return "n/a" end
local s, sfx = n, ""
for _, u in ipairs({{1e12, "T"}, {1e9, "B"}, {1e6, "M"}, {1e3, "K"}}) do if math.abs(n) >= u[1] then s, sfx = n / u[1], u[2] break end end
return sfx == "" and tostring(math.floor(n)) or string.format("%.2f%s", s, sfx)
end
local function hms(sec) sec = math.floor(sec) return string.format("%dh %02dm", sec // 3600, (sec % 3600) // 60) end
local function tycoonOf(p) for _, t in ipairs(workspace.Tycoons:GetChildren()) do local v = t:FindFirstChild("Player") if v and v.Value == p then return t end end end
local LIMITS = {{"Small Decoration", "SmallItemsBuilt", 500}, {"Wall Furniture", "WallItemsBuilt", 500}, {"Furniture", "FurnitureItemsBuilt", 1500}, {"Walls", "WallsBuilt", 400}, {"Roof Furniture", "RoofItemsBuilt", 500}}
-- your own Manager Desk screen keeps the last numbers the game showed you; used to fill gaps for yourself
local function deskValue(path)
local mdm = lp.PlayerGui:FindFirstChild("ManagerDeskMenu")
local o = mdm and mdm:FindFirstChild("Frame")
for part in ("Content.Stats.Content.ScrollingFrame." .. path .. ".TextLabel"):gmatch("[^%.]+") do o = o and o:FindFirstChild(part) end
local t = o and o.Text
if not t or t == "" or t == "Label" then return nil end
return t
end
local function deskNum(path) local t = deskValue(path) return t and tonumber((t:gsub("[^%d%.]", ""))) end
local DESK = " (Manager Desk)"
local lastCustomers = getgenv().RT3H_LASTCUST or {} -- [tycoon] = {count, time}; survives reloads
getgenv().RT3H_LASTCUST = lastCustomers
local function statsText(p)
local ty = tycoonOf(p)
local isMe = p == lp
local L = {}
local function add(k, v) table.insert(L, ("%s: %s"):format(k, tostring(v))) end
add("Player", p.DisplayName .. " (@" .. p.Name .. ")")
add("Restaurant", ty and (ty:GetAttribute("RestaurantName") or "?") or "no restaurant")
local ls = p:FindFirstChild("leaderstats")
local cash; if ls then for _, v in ipairs(ls:GetChildren()) do if v.Name:find("Cash") then cash = v.Value end end end
add("Money", fmt(cash or pdKey(p, "Cash")))
local jt = joinTime[p]
add("Current playtime", p == lp and hms(workspace.DistributedGameTime) or (jt and hms(os.time() - jt)) or ("≥ " .. hms(os.time() - scriptStart) .. " (joined before script)"))
local cb, kc, bf = pdKey(p, "Cookbook"), pdKey(p, "KidsMenuCookbook"), pdKey(p, "BoostedFoods")
local kidsBoosted = 0
if type(kc) == "table" and type(bf) == "table" then for k in pairs(kc) do if bf[k] == true then kidsBoosted = kidsBoosted + 1 end end end
local unlocked = cb and (count(cb) + count(kc))
local boosted = bf and (count(bf) + kidsBoosted)
if isMe then
-- live data can miss the kids menu until it changes; the desk number includes it
local du, db = deskNum("StatsRow1.DishesUnlocked"), deskNum("StatsRow1.DishesBoosted")
if du and (not unlocked or (kc == nil and du > unlocked)) then unlocked = du .. DESK end
if db and (not boosted or (kc == nil and db > boosted)) then boosted = db .. DESK end
end
add("Dishes unlocked", unlocked or "n/a")
add("Dishes boosted", boosted or "n/a")
local enc = pdKey(p, "CustomerEncounters"); local tot = 0
if type(enc) == "table" then for _, v in pairs(enc) do tot = tot + (tonumber(v) or 0) end end
local deskTc = isMe and deskNum("StatsRow1.TotalCustomers")
add("Total customers", enc and fmt(tot) or (deskTc and (fmt(deskTc) .. DESK)) or "n/a")
local deskObj = isMe and deskNum("StatsRow2.ObjectivesCompleted")
if deskObj then add("Objectives completed", deskObj .. DESK) end
-- the game only loads customers for your own restaurant and the one you're near; remember the last real count
local cur = 0
if ty and ty:FindFirstChild("ClientCustomers") then for _, gf in ipairs(ty.ClientCustomers:GetChildren()) do cur = cur + #gf:GetChildren() end end
if ty and cur > 0 then lastCustomers[ty] = {cur, os.time()} end
local last = ty and lastCustomers[ty]
if cur > 0 then add("Current customers", cur)
elseif last then add("Current customers", ("%d (seen %s ago, go near their restaurant to refresh)"):format(last[1], hms(os.time() - last[2]):gsub("^0h ", "")))
else add("Current customers", "only visible when you're near their restaurant") end
if ty then
local r = ratings[ty]
if not (r and r.restaurantValue) then
local ok, got = pcall(function() return RS.Events.Ratings.GetRatings:InvokeServer(ty) end)
if ok and type(got) == "table" and got.restaurantValue then r = got; ratings[ty] = got end
end
r = r or {}
local tc = tonumber(r.tipChance)
local deskRv, deskTip = isMe and deskNum("RestaurantValue"), isMe and deskValue("StatsRow3.TipChance")
add("Restaurant value", r.restaurantValue and ("$" .. fmt(r.restaurantValue)) or (deskRv and ("$" .. fmt(deskRv) .. DESK)) or "waiting for next ratings update")
add("Tip chance", tc and ((tc <= 1 and math.floor(tc * 100 + 0.5) or tc) .. "%") or (deskTip and (deskTip .. DESK)) or "waiting for next ratings update")
local ok2, b = pcall(function() return RS.Events.Placement.GetBuildStats:InvokeServer(ty) end)
b = ok2 and type(b) == "table" and b or {}
add("Items built", b.ItemsBuilt or "n/a")
table.insert(L, "Item limits (base; 2x with gamepass):")
for _, l in ipairs(LIMITS) do
-- for yourself, the desk shows your real cap (doubled if you own the gamepass)
local cap = isMe and deskValue("Limits." .. l[2]) and deskValue("Limits." .. l[2]):match("/%s*([%d,]+)") or tostring(l[3])
table.insert(L, (" %s: %s / %s"):format(l[1], tostring(b[l[2]] or "?"), cap))
end
end
if not PD[p] then table.insert(L, "Profile data (diamonds, playtime, dishes) arrives when a player joins. Put RT3Hub in autoexec to capture it for everyone.") end
return table.concat(L, "\n")
end
H.StatsText = statsText
---------------------------------------------------------------- name ESP
local espFolder = Instance.new("Folder")
local guiParent = (gethui and gethui()) or game:GetService("CoreGui")
espFolder.Name = "RT3H_ESP"; espFolder.Parent = guiParent
local esp = {}
task.spawn(function()
while H.Run do
for _, p in ipairs(Players:GetPlayers()) do
if p ~= lp then
local head = p.Character and p.Character:FindFirstChild("Head")
local b = esp[p]
if S.NameESP and head then
if not b or not b.Parent then
b = Instance.new("BillboardGui"); b.Size = UDim2.fromOffset(200, 40); b.AlwaysOnTop = true; b.StudsOffset = Vector3.new(0, 2.5, 0)
local t = Instance.new("TextLabel", b); t.Size = UDim2.fromScale(1, 1); t.BackgroundTransparency = 1
t.TextColor3 = Color3.fromRGB(120, 200, 255); t.TextStrokeTransparency = 0.3; t.Font = Enum.Font.GothamBold; t.TextSize = 14
b.Parent = espFolder; esp[p] = b
end
b.Adornee = head
local me = myHRP()
local dist = me and math.floor((head.Position - me.Position).Magnitude) or 0
b.TextLabel.Text = p.DisplayName .. "\n" .. dist .. "m"
b.Enabled = true
elseif b then b.Enabled = false end
end
end
for p, b in pairs(esp) do if not p.Parent then b:Destroy(); esp[p] = nil end end
task.wait(0.25)
end
end)
---------------------------------------------------------------- GUI
local C = {bg = Color3.fromRGB(22, 24, 30), panel = Color3.fromRGB(30, 33, 41), item = Color3.fromRGB(38, 42, 52), acc = Color3.fromRGB(100, 149, 255), txt = Color3.fromRGB(230, 233, 240), dim = Color3.fromRGB(150, 156, 170)}
local function new(cls, props, parent) local i = Instance.new(cls) for k, v in pairs(props) do i[k] = v end if parent then i.Parent = parent end return i end
local function corner(i, r) new("UICorner", {CornerRadius = UDim.new(0, r or 6)}, i) end
local function draggable(frame, handle)
local dragging, start, pos
handle.InputBegan:Connect(function(i) if i.UserInputType == Enum.UserInputType.MouseButton1 or i.UserInputType == Enum.UserInputType.Touch then dragging, start, pos = true, i.Position, frame.Position end end)
conn(UIS.InputChanged:Connect(function(i) if dragging and (i.UserInputType == Enum.UserInputType.MouseMovement or i.UserInputType == Enum.UserInputType.Touch) then local d = i.Position - start; frame.Position = UDim2.new(pos.X.Scale, pos.X.Offset + d.X, pos.Y.Scale, pos.Y.Offset + d.Y) end end))
conn(UIS.InputEnded:Connect(function(i) if i.UserInputType == Enum.UserInputType.MouseButton1 or i.UserInputType == Enum.UserInputType.Touch then dragging = false end end))
end
local sg = new("ScreenGui", {Name = "RT3Hub", ResetOnSpawn = false, ZIndexBehavior = Enum.ZIndexBehavior.Sibling, DisplayOrder = 50}, guiParent)
local main = new("Frame", {Size = UDim2.fromOffset(460, 360), Position = UDim2.new(0.5, -230, 0.5, -180), BackgroundColor3 = C.bg, BorderSizePixel = 0}, sg); corner(main, 8)
local top = new("Frame", {Size = UDim2.new(1, 0, 0, 34), BackgroundColor3 = C.panel, BorderSizePixel = 0}, main); corner(top, 8)
new("TextLabel", {Text = " RT3 Hub · Restaurant Tycoon 3", Size = UDim2.new(1, -40, 1, 0), BackgroundTransparency = 1, TextColor3 = C.txt, Font = Enum.Font.GothamBold, TextSize = 14, TextXAlignment = Enum.TextXAlignment.Left}, top)
local hideBtn = new("TextButton", {Text = "–", Size = UDim2.fromOffset(30, 26), Position = UDim2.new(1, -34, 0, 4), BackgroundColor3 = C.item, TextColor3 = C.txt, Font = Enum.Font.GothamBold, TextSize = 16}, top); corner(hideBtn)
draggable(main, top)
local tabsCol = new("Frame", {Size = UDim2.new(0, 110, 1, -44), Position = UDim2.fromOffset(6, 40), BackgroundTransparency = 1}, main)
new("UIListLayout", {Padding = UDim.new(0, 4)}, tabsCol)
local pages, tabBtns = {}, {}
local function showPage(name) for n, pg in pairs(pages) do pg.Visible = n == name; tabBtns[n].BackgroundColor3 = n == name and C.acc or C.item end end
local function page(name)
local pg = new("ScrollingFrame", {Size = UDim2.new(1, -128, 1, -46), Position = UDim2.fromOffset(122, 40), BackgroundTransparency = 1, BorderSizePixel = 0, ScrollBarThickness = 4, AutomaticCanvasSize = Enum.AutomaticSize.Y, CanvasSize = UDim2.new(), Visible = false}, main)
new("UIListLayout", {Padding = UDim.new(0, 4)}, pg)
local b = new("TextButton", {Text = name, Size = UDim2.new(1, 0, 0, 30), BackgroundColor3 = C.item, TextColor3 = C.txt, Font = Enum.Font.GothamMedium, TextSize = 13}, tabsCol); corner(b)
b.MouseButton1Click:Connect(function() showPage(name) end)
pages[name], tabBtns[name] = pg, b
return pg
end
local toggleRefs = {}
local function toggle(pg, label, key, note)
local row = new("TextButton", {Text = "", Size = UDim2.new(1, -6, 0, note and 42 or 30), BackgroundColor3 = C.item, AutoButtonColor = false}, pg); corner(row)
new("TextLabel", {Text = " " .. label, Size = UDim2.new(1, -60, 0, 30), BackgroundTransparency = 1, TextColor3 = C.txt, Font = Enum.Font.Gotham, TextSize = 13, TextXAlignment = Enum.TextXAlignment.Left}, row)
if note then new("TextLabel", {Text = " " .. note, Size = UDim2.new(1, -60, 0, 14), Position = UDim2.fromOffset(0, 24), BackgroundTransparency = 1, TextColor3 = C.dim, Font = Enum.Font.Gotham, TextSize = 10, TextXAlignment = Enum.TextXAlignment.Left}, row) end
local sw = new("Frame", {Size = UDim2.fromOffset(38, 18), Position = UDim2.new(1, -46, 0, 6), BackgroundColor3 = C.panel}, row); corner(sw, 9)
local dot = new("Frame", {Size = UDim2.fromOffset(14, 14), Position = UDim2.fromOffset(2, 2), BackgroundColor3 = C.dim}, sw); corner(dot, 7)
local function paint() sw.BackgroundColor3 = S[key] and C.acc or C.panel; dot.Position = S[key] and UDim2.fromOffset(22, 2) or UDim2.fromOffset(2, 2); dot.BackgroundColor3 = S[key] and C.txt or C.dim end
row.MouseButton1Click:Connect(function() S[key] = not S[key]; paint(); save() end)
toggleRefs[key] = paint; paint()
end
local function button(pg, label, fn)
local b = new("TextButton", {Text = label, Size = UDim2.new(1, -6, 0, 30), BackgroundColor3 = C.panel, TextColor3 = C.txt, Font = Enum.Font.GothamMedium, TextSize = 13}, pg); corner(b)
b.MouseButton1Click:Connect(function() task.spawn(fn) end)
return b
end
local function text(pg, t, h)
return new("TextLabel", {Text = t, Size = UDim2.new(1, -6, 0, h or 30), BackgroundTransparency = 1, TextColor3 = C.dim, Font = Enum.Font.Gotham, TextSize = 12, TextWrapped = true, TextXAlignment = Enum.TextXAlignment.Left, TextYAlignment = Enum.TextYAlignment.Top}, pg)
end
local function numberBox(pg, label, key)
local row = new("Frame", {Size = UDim2.new(1, -6, 0, 30), BackgroundColor3 = C.item}, pg); corner(row)
new("TextLabel", {Text = " " .. label, Size = UDim2.new(1, -80, 1, 0), BackgroundTransparency = 1, TextColor3 = C.txt, Font = Enum.Font.Gotham, TextSize = 13, TextXAlignment = Enum.TextXAlignment.Left}, row)
local box = new("TextBox", {Text = tostring(S[key]), Size = UDim2.fromOffset(60, 22), Position = UDim2.new(1, -66, 0, 4), BackgroundColor3 = C.panel, TextColor3 = C.txt, Font = Enum.Font.Gotham, TextSize = 13, ClearTextOnFocus = false}, row); corner(box)
box.FocusLost:Connect(function() local n = tonumber(box.Text) if n then S[key] = math.clamp(n, 1, 500); save() end box.Text = tostring(S[key]) end)
end
-- Autofarm
local pf = page("Autofarm")
toggle(pf, "Auto Cook Food", "AutoCook", "starts cooking orders itself")
toggle(pf, "Instant Cook", "InstantCook", "finishes every cooking step instantly")
toggle(pf, "Auto Seat Customers", "AutoSeat")
toggle(pf, "Auto Take Orders", "AutoOrder")
toggle(pf, "Auto Give Food", "AutoServe", "auto-cancels a stuck plate after 3s")
toggle(pf, "Auto Pickup Dirty Dishes", "AutoDishes")
toggle(pf, "Auto Collect Bills", "AutoBills")
toggle(pf, "Auto Collect Tips", "AutoTips")
toggle(pf, "Auto Collect Drop Money / Food Critic", "AutoDrops")
toggle(pf, "Auto Serve Drive Thru", "DriveThru", "take order, serve and collect payment")
toggle(pf, "Auto Calm Rude Customer", "CalmRude", "learns which answers work")
toggle(pf, "Auto Catch Dine-and-Dash", "CatchDash", "teleports to the runner and back")
-- Player
local pp = page("Player")
toggle(pp, "Anti AFK (always on)", "AntiAFK")
toggle(pp, "Infinite Jump [V]", "InfJump")
toggle(pp, "Noclip [N]", "Noclip")
toggle(pp, "WalkSpeed [C]", "WalkSpeedOn")
numberBox(pp, "WalkSpeed value", "WalkSpeed")
-- Codes
local pc = page("Codes")
button(pc, "Redeem All Valid Codes", redeemAll)
codeStatus = text(pc, "Pulls the newest codes from RobloxDen + Beebom each time you click, tries only ones not tried before on this account.", 90)
button(pc, "Forget tried codes (retry all)", function() codeCache = {}; pcall(writefile, "RT3Hub/codes_" .. lp.UserId .. ".json", "{}"); setCodeStatus("Cleared. Next redeem tries every listed code again.") end)
-- ESP & Stats
local pe = page("ESP & Stats")
toggle(pe, "Player Names + Distance", "NameESP")
local statsWin
button(pe, "Open Restaurant Stats Window", function() statsWin.Visible = true end)
text(pe, "Stats window: pick a player with < >, it refreshes every 10s.", 40)
-- Settings
local ps = page("Settings")
text(ps, "Menu: RightControl · Inf jump: V · Noclip: N · WalkSpeed: C\nSettings save automatically.", 44)
button(ps, "Unload RT3 Hub", function() H.Unload() end)
showPage("Autofarm")
-- stats window
statsWin = new("Frame", {Size = UDim2.fromOffset(330, 400), Position = UDim2.new(0.5, 250, 0.5, -200), BackgroundColor3 = C.bg, Visible = false, BorderSizePixel = 0}, sg); corner(statsWin, 8)
local sTop = new("Frame", {Size = UDim2.new(1, 0, 0, 34), BackgroundColor3 = C.panel, BorderSizePixel = 0}, statsWin); corner(sTop, 8)
draggable(statsWin, sTop)
local prevB = new("TextButton", {Text = "<", Size = UDim2.fromOffset(28, 26), Position = UDim2.fromOffset(4, 4), BackgroundColor3 = C.item, TextColor3 = C.txt, Font = Enum.Font.GothamBold, TextSize = 14}, sTop); corner(prevB)
local nameL = new("TextLabel", {Text = "", Size = UDim2.new(1, -110, 1, 0), Position = UDim2.fromOffset(36, 0), BackgroundTransparency = 1, TextColor3 = C.txt, Font = Enum.Font.GothamBold, TextSize = 13}, sTop)
local nextB = new("TextButton", {Text = ">", Size = UDim2.fromOffset(28, 26), Position = UDim2.new(1, -70, 0, 4), BackgroundColor3 = C.item, TextColor3 = C.txt, Font = Enum.Font.GothamBold, TextSize = 14}, sTop); corner(nextB)
local closeS = new("TextButton", {Text = "×", Size = UDim2.fromOffset(28, 26), Position = UDim2.new(1, -36, 0, 4), BackgroundColor3 = C.item, TextColor3 = C.txt, Font = Enum.Font.GothamBold, TextSize = 16}, sTop); corner(closeS)
local body = new("TextLabel", {Text = "", RichText = true, Size = UDim2.new(1, -16, 1, -44), Position = UDim2.fromOffset(8, 40), BackgroundTransparency = 1, TextColor3 = C.txt, Font = Enum.Font.Gotham, TextSize = 13, TextWrapped = true, TextXAlignment = Enum.TextXAlignment.Left, TextYAlignment = Enum.TextYAlignment.Top}, statsWin)
local sel = 1
local function selPlayer() local list = Players:GetPlayers(); sel = ((sel - 1) % #list) + 1; return list[sel] end
local function refreshStats() local p = selPlayer(); nameL.Text = p.DisplayName; local ok, t = pcall(statsText, p); body.Text = ok and t or ("error: " .. tostring(t)) end
prevB.MouseButton1Click:Connect(function() sel = sel - 1; task.spawn(refreshStats) end)
nextB.MouseButton1Click:Connect(function() sel = sel + 1; task.spawn(refreshStats) end)
closeS.MouseButton1Click:Connect(function() statsWin.Visible = false end)
task.spawn(function() while H.Run do if statsWin.Visible then refreshStats() end task.wait(10) end end)
statsWin:GetPropertyChangedSignal("Visible"):Connect(function() if statsWin.Visible then task.spawn(refreshStats) end end)
hideBtn.MouseButton1Click:Connect(function() main.Visible = false end)
conn(UIS.InputBegan:Connect(function(i, gp)
if gp then return end
local k = i.KeyCode
if k == Enum.KeyCode.RightControl then main.Visible = not main.Visible
elseif k == Enum.KeyCode.V then S.InfJump = not S.InfJump; toggleRefs.InfJump(); save()
elseif k == Enum.KeyCode.N then S.Noclip = not S.Noclip; toggleRefs.Noclip(); save()
elseif k == Enum.KeyCode.C then S.WalkSpeedOn = not S.WalkSpeedOn; toggleRefs.WalkSpeedOn(); save() end
end))
function H.Unload()
H.Run = false
for _, c in ipairs(H.conns) do pcall(function() c:Disconnect() end) end
pcall(function() sg:Destroy() end); pcall(function() espFolder:Destroy() end)
local h = myHum() if h and wsWasOn then h.WalkSpeed = 16 end
getgenv().RT3H = nil
log("unloaded")
end
log("loaded — RightControl toggles the menu")