Universal Script 📌
16.8k Views
37 Executions

studs counter

Universal Script 📌
hiff
hiffPublished 5
3 years ago
Get an executor
Please login to perform these actions:

Does it work?

No reports yet

No reports yet. Tried it? Be the first to say.

Also noticed:

Description

counts your studs, counter resets when you respawn. (doesnt count accurately in r15) NOTE: This is a reupload due to the data rollback, you may have already seen this.

View Raw
local player = game:GetService("Players").LocalPlayer --counts your studs, counter resets when you respawn.

local function createStudsWalkedGUI()
    local character = player.Character or player.CharacterAdded:Wait()
    local humanoidRootPart = character:WaitForChild("HumanoidRootPart")

    local totalStudsWalked = 0
    local isCharacterAlive = true

    
    local gui = Instance.new("ScreenGui")
    gui.Name = "StudsWalkedGUI"
    gui.ResetOnSpawn = false
    gui.Parent = player.PlayerGui

    local frame = Instance.new("Frame")
    frame.Size = UDim2.new(0, 200, 0, 50)
    frame.Position = UDim2.new(0.5, -100, 0.9, -50)
    frame.BackgroundTransparency = 0.5
    frame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
    frame.Active = true -- Enable GUI interaction
    frame.Draggable = true -- Allow the GUI to be dragged
    frame.Parent = gui

    local label = Instance.new("TextLabel")
    label.Size = UDim2.new(1, 0, 1, 0)
    label.BackgroundTransparency = 1
    label.Text = "Studs Walked: 0"
    label.TextColor3 = Color3.fromRGB(255, 255, 255)
    label.TextScaled = true
    label.Parent = frame


    local function formatStuds(studs)
        local formattedStuds = tostring(math.floor(studs))
        local reverseFormatted = string.reverse(formattedStuds)
        local withCommas = string.gsub(reverseFormatted, "(%d%d%d)", "%1,")
        return string.reverse(withCommas:gsub("^,", ""))
    end



Comments

0
Log in to join the conversation. Login
No comments yet. Be the first!

Tags

More universal scripts

See all
Universal Script 📌
56
3
Approved 33 minutes ago
Key System
Universal Script 📌
9.8k
60.7k
Bumped 48 minutes ago
Key System
Universal Script 📌
3.9k
10.4k
Bumped 49 minutes ago
Script hub
272.7k
884.6k
Bumped 1 hour ago
Key System

Script hub

#16 this week

Verified script badgeAxon Hub 60+ Games & 800+ Features