Advertisement
AERQ1111

ROBLOX Statistics Giver Script

Apr 4th, 2025 (edited)
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.60 KB | None | 0 0
  1. -- I made this for fun, it gives you the statistics of how fast you're walking (SPS), your current walkspeed, and blablala etc
  2.  
  3. -- Create GUI
  4. local player = game.Players.LocalPlayer
  5. local playerGui = player:WaitForChild("PlayerGui")
  6.  
  7. local screenGui = Instance.new("ScreenGui")
  8. screenGui.Parent = playerGui
  9.  
  10. local frame = Instance.new("Frame")
  11. frame.Size = UDim2.new(0, 250, 0, 250) -- Adjusted height for JumpPower
  12. frame.Position = UDim2.new(0.05, 0, 0.1, 0)
  13. frame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  14. frame.BackgroundTransparency = 0.2
  15. frame.BorderSizePixel = 2
  16. frame.Parent = screenGui
  17.  
  18. -- Title Section
  19. local titleSection = Instance.new("Frame")
  20. titleSection.Size = UDim2.new(1, 0, 0, 50)
  21. titleSection.BackgroundColor3 = Color3.fromRGB(230, 230, 230)
  22. titleSection.BorderSizePixel = 2
  23. titleSection.Parent = frame
  24.  
  25. local titleLabel = Instance.new("TextLabel")
  26. titleLabel.Size = UDim2.new(1, 0, 0, 30)
  27. titleLabel.Position = UDim2.new(0, 0, 0, 5)
  28. titleLabel.BackgroundTransparency = 1
  29. titleLabel.Text = "Character Statistics"
  30. titleLabel.TextSize = 18
  31. titleLabel.Font = Enum.Font.SourceSansBold
  32. titleLabel.TextColor3 = Color3.fromRGB(0, 0, 0)
  33. titleLabel.Parent = titleSection
  34.  
  35. -- Close Button (There WAS a button to hide the menu, but it's buggy)
  36. local closeButton = Instance.new("TextButton")
  37. closeButton.Size = UDim2.new(0, 25, 0, 25)
  38. closeButton.Position = UDim2.new(1, -30, 0, 10)
  39. closeButton.Text = "X"
  40. closeButton.TextColor3 = Color3.fromRGB(0, 0, 0) -- Changed to black
  41. closeButton.Font = Enum.Font.SourceSansBold
  42. closeButton.Parent = titleSection
  43. closeButton.MouseButton1Click:Connect(function()
  44.     screenGui:Destroy()
  45. end)
  46.  
  47. -- Stats Section
  48. local statsSection = Instance.new("Frame")
  49. statsSection.Size = UDim2.new(1, 0, 1, -50)
  50. statsSection.Position = UDim2.new(0, 0, 0, 50)
  51. statsSection.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  52. statsSection.BackgroundTransparency = 0.2
  53. statsSection.BorderSizePixel = 2
  54. statsSection.Parent = frame
  55.  
  56. -- Create Stat Labels
  57. local statLabels = {}
  58. local statNames = {
  59.     "Max Health", "Current Health", "WalkSpeed", "Speed (SPS)", "Regeneration Speed", "JumpPower"
  60. }
  61.  
  62. for i, stat in ipairs(statNames) do
  63.     local label = Instance.new("TextLabel")
  64.     label.Size = UDim2.new(1, -10, 0, 20)
  65.     label.Position = UDim2.new(0, 5, 0, 10 + (i - 1) * 25)
  66.     label.BackgroundTransparency = 1
  67.     label.Text = stat .. ": --"
  68.     label.TextSize = 14
  69.     label.Font = Enum.Font.SourceSans
  70.     label.TextColor3 = Color3.fromRGB(0, 0, 0)
  71.     label.Parent = statsSection
  72.     statLabels[stat] = label
  73. end
  74.  
  75. -- Make GUI Draggable (The title only)
  76. local userInputService = game:GetService("UserInputService")
  77. local dragging, dragStart, startPos
  78.  
  79. titleSection.InputBegan:Connect(function(input)
  80.     if input.UserInputType == Enum.UserInputType.MouseButton1 then
  81.         dragging = true
  82.         dragStart = input.Position
  83.         startPos = frame.Position
  84.     end
  85. end)
  86.  
  87. titleSection.InputChanged:Connect(function(input)
  88.     if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then
  89.         local delta = input.Position - dragStart
  90.         frame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  91.     end
  92. end)
  93.  
  94. titleSection.InputEnded:Connect(function(input)
  95.     if input.UserInputType == Enum.UserInputType.MouseButton1 then
  96.         dragging = false
  97.     end
  98. end)
  99.  
  100. -- Track Player Stats (Yourself)
  101. local lastPosition = nil
  102. game:GetService("RunService").RenderStepped:Connect(function()
  103.     local character = player.Character
  104.     if character and character:FindFirstChild("Humanoid") then
  105.         local humanoid = character:FindFirstChild("Humanoid")
  106.         statLabels["Max Health"].Text = "Max Health: " .. math.floor(humanoid.MaxHealth)
  107.         statLabels["Current Health"].Text = "Current Health: " .. math.floor(humanoid.Health)
  108.         statLabels["WalkSpeed"].Text = "WalkSpeed: " .. humanoid.WalkSpeed
  109.         statLabels["JumpPower"].Text = "JumpPower: " .. humanoid.JumpPower
  110.         statLabels["Regeneration Speed"].Text = "Regeneration Speed: " .. humanoid.Health / humanoid.MaxHealth
  111.  
  112.         -- Speed calculation
  113.         local root = character:FindFirstChild("HumanoidRootPart")
  114.         if root then
  115.             if lastPosition then
  116.                 local speed = (root.Position - lastPosition).magnitude / (1 / 60) -- Approx 60 FPS update rate
  117.                 statLabels["Speed (SPS)"].Text = "Speed (SPS): " .. math.floor(speed)
  118.             end
  119.             lastPosition = root.Position
  120.         end
  121.     end
  122. end)
  123. -- the minecraft movie isn't that bad btw
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement