ymay civ height predictor
Key Required

ymay civ height predictor

ymay civilizationscriptingandmorescriptingandmore 901 views 584 executesUpdated May 5, 2026
5.0/ 5(2 votes)
20100% Positive
Lua Script•185 lines (3756 chars)
local Players = game:GetService("Players")
local lp = Players.LocalPlayer

if _G._heightUI then return end
_G._heightUI = true

local waitTime = 0.2
local base = 69

local boards = {}

local function grabVal(m, n)
	for _, obj in pairs(m:GetChildren()) do
		if obj:IsA("NumberValue") and obj.Name:lower() == n:lower() then
			return obj.Value
		end
	end
end

local function getVals(char)
	local m = workspace:FindFirstChild(char.Name)
	if not m then return end
	return grabVal(m, "MaxHeight"), grabVal(m, "MinHeight")
end

local function format(v)
	if not v then return "?" end

	local total = v * base
	local ft = math.floor(total / 12)
	local inch = total % 12

	inch = math.floor(inch * 10 + 0.5) / 10

	if inch % 1 == 0 then
		return ft .. "'" .. math.floor(inch)
	end

	return ft .. "'" .. inch
end

local function rainbow(t)
	return Color3.fromRGB(
		math.floor(math.sin(t) * 127 + 128),
		math.floor(math.sin(t + 2) * 127 + 128),
		math.floor(math.sin(t + 4) * 127 + 128)
	)
end

local function sameTeam(p)
	return p.Team == lp.Team
end

local function rankedList()
	local list = {}

	for _, p in pairs(Players:GetPlayers()) do
		if sameTeam(p) and p.Character then
			local max = getVals(p.Character)
			if max then
				table.insert(list, {plr = p, h = max})
			end
		end
	end

	table.sort(list, function(a, b)
		return a.h > b.h
	end)

	return list
end

local function removeBoard(p)
	if boards[p] then
		boards[p].gui:Destroy()
		boards[p] = nil
	end
end

local function makeGui(char)
	local head = char:WaitForChild("Head", waitTime)

	local gui = Instance.new("BillboardGui")
	gui.Adornee = head
	gui.Size = UDim2.new(4.5,0,2.2,0)
	gui.StudsOffset = Vector3.new(0,4,0)
	gui.AlwaysOnTop = true
	gui.Parent = head

	local frame = Instance.new("Frame")
	frame.Size = UDim2.new(1,0,1,0)
	frame.BackgroundColor3 = Color3.fromRGB(18,18,22)
	frame.BorderSizePixel = 0
	frame.Parent = gui

	local corner = Instance.new("UICorner")
	corner.CornerRadius = UDim.new(0,10)
	corner.Parent = frame

	local stroke = Instance.new("UIStroke")
	stroke.Thickness = 2
	stroke.Color = Color3.fromRGB(70,70,70)
	stroke.Parent = frame

	local txt = Instance.new("TextLabel")
	txt.Size = UDim2.new(1,-10,1,-10)
	txt.Position = UDim2.new(0,5,0,5)
	txt.BackgroundTransparency = 1
	txt.TextScaled = true
	txt.Font = Enum.Font.GothamBold
	txt.TextColor3 = Color3.fromRGB(240,240,240)
	txt.TextYAlignment = Enum.TextYAlignment.Top
	txt.Parent = frame

	return {gui = gui, txt = txt, frame = frame, stroke = stroke}
end

local function addBoard(p)
	if not p.Character or not sameTeam(p) or boards[p] then return end
	boards[p] = makeGui(p.Character)
end

local function updateBoards()
	local list = rankedList()
	local t = tick()

	for i, data in ipairs(list) do
		local p = data.plr
		local char = p.Character

		if char then
			addBoard(p)

			local b = boards[p]
			if b then
				local max, min = getVals(char)

				b.txt.Text =
					"#" .. i .. " " .. p.Name ..
					"\nPotential: " .. format(max) ..
					"\nBirth: " .. format(min)

				if i == 1 then
					b.stroke.Color = rainbow(t * 2)
					b.frame.BackgroundColor3 = Color3.fromRGB(25,25,30)
				else
					b.stroke.Color = Color3.fromRGB(70,70,70)
					b.frame.BackgroundColor3 = Color3.fromRGB(18,18,22)
				end
			end
		end
	end
end

local function refresh()
	for _, p in pairs(Players:GetPlayers()) do
		if sameTeam(p) then
			addBoard(p)
		else
			removeBoard(p)
		end
	end
end

lp.CharacterAdded:Connect(function()
	task.wait(waitTime)
	removeBoard(lp)
	addBoard(lp)
	updateBoards()
end)

Players.PlayerAdded:Connect(function(p)
	p.CharacterAdded:Connect(function()
		task.wait(waitTime)
		addBoard(p)
	end)
end)

task.spawn(function()
	while true do
		task.wait(waitTime)
		refresh()
		updateBoards()
	end
end)

Features & Information

idk

Community Comments (0)

No comments yet for this script.

More Scripts for ymay civilization