Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- I made this for fun, it gives you the statistics of how fast you're walking (SPS), your current walkspeed, and blablala etc
- -- Create GUI
- local player = game.Players.LocalPlayer
- local playerGui = player:WaitForChild("PlayerGui")
- local screenGui = Instance.new("ScreenGui")
- screenGui.Parent = playerGui
- local frame = Instance.new("Frame")
- frame.Size = UDim2.new(0, 250, 0, 250) -- Adjusted height for JumpPower
- frame.Position = UDim2.new(0.05, 0, 0.1, 0)
- frame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- frame.BackgroundTransparency = 0.2
- frame.BorderSizePixel = 2
- frame.Parent = screenGui
- -- Title Section
- local titleSection = Instance.new("Frame")
- titleSection.Size = UDim2.new(1, 0, 0, 50)
- titleSection.BackgroundColor3 = Color3.fromRGB(230, 230, 230)
- titleSection.BorderSizePixel = 2
- titleSection.Parent = frame
- local titleLabel = Instance.new("TextLabel")
- titleLabel.Size = UDim2.new(1, 0, 0, 30)
- titleLabel.Position = UDim2.new(0, 0, 0, 5)
- titleLabel.BackgroundTransparency = 1
- titleLabel.Text = "Character Statistics"
- titleLabel.TextSize = 18
- titleLabel.Font = Enum.Font.SourceSansBold
- titleLabel.TextColor3 = Color3.fromRGB(0, 0, 0)
- titleLabel.Parent = titleSection
- -- Close Button (There WAS a button to hide the menu, but it's buggy)
- local closeButton = Instance.new("TextButton")
- closeButton.Size = UDim2.new(0, 25, 0, 25)
- closeButton.Position = UDim2.new(1, -30, 0, 10)
- closeButton.Text = "X"
- closeButton.TextColor3 = Color3.fromRGB(0, 0, 0) -- Changed to black
- closeButton.Font = Enum.Font.SourceSansBold
- closeButton.Parent = titleSection
- closeButton.MouseButton1Click:Connect(function()
- screenGui:Destroy()
- end)
- -- Stats Section
- local statsSection = Instance.new("Frame")
- statsSection.Size = UDim2.new(1, 0, 1, -50)
- statsSection.Position = UDim2.new(0, 0, 0, 50)
- statsSection.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- statsSection.BackgroundTransparency = 0.2
- statsSection.BorderSizePixel = 2
- statsSection.Parent = frame
- -- Create Stat Labels
- local statLabels = {}
- local statNames = {
- "Max Health", "Current Health", "WalkSpeed", "Speed (SPS)", "Regeneration Speed", "JumpPower"
- }
- for i, stat in ipairs(statNames) do
- local label = Instance.new("TextLabel")
- label.Size = UDim2.new(1, -10, 0, 20)
- label.Position = UDim2.new(0, 5, 0, 10 + (i - 1) * 25)
- label.BackgroundTransparency = 1
- label.Text = stat .. ": --"
- label.TextSize = 14
- label.Font = Enum.Font.SourceSans
- label.TextColor3 = Color3.fromRGB(0, 0, 0)
- label.Parent = statsSection
- statLabels[stat] = label
- end
- -- Make GUI Draggable (The title only)
- local userInputService = game:GetService("UserInputService")
- local dragging, dragStart, startPos
- titleSection.InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 then
- dragging = true
- dragStart = input.Position
- startPos = frame.Position
- end
- end)
- titleSection.InputChanged:Connect(function(input)
- if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then
- local delta = input.Position - dragStart
- frame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
- end
- end)
- titleSection.InputEnded:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 then
- dragging = false
- end
- end)
- -- Track Player Stats (Yourself)
- local lastPosition = nil
- game:GetService("RunService").RenderStepped:Connect(function()
- local character = player.Character
- if character and character:FindFirstChild("Humanoid") then
- local humanoid = character:FindFirstChild("Humanoid")
- statLabels["Max Health"].Text = "Max Health: " .. math.floor(humanoid.MaxHealth)
- statLabels["Current Health"].Text = "Current Health: " .. math.floor(humanoid.Health)
- statLabels["WalkSpeed"].Text = "WalkSpeed: " .. humanoid.WalkSpeed
- statLabels["JumpPower"].Text = "JumpPower: " .. humanoid.JumpPower
- statLabels["Regeneration Speed"].Text = "Regeneration Speed: " .. humanoid.Health / humanoid.MaxHealth
- -- Speed calculation
- local root = character:FindFirstChild("HumanoidRootPart")
- if root then
- if lastPosition then
- local speed = (root.Position - lastPosition).magnitude / (1 / 60) -- Approx 60 FPS update rate
- statLabels["Speed (SPS)"].Text = "Speed (SPS): " .. math.floor(speed)
- end
- lastPosition = root.Position
- end
- end
- end)
- -- the minecraft movie isn't that bad btw
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement