Achitsak

xuigag

Jul 27th, 2025
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.33 KB | None | 0 0
  1. -- GUI for loadstring usage
  2. local Players = game:GetService("Players")
  3. local RunService = game:GetService("RunService")
  4.  
  5. local player = Players.LocalPlayer
  6. local playerGui = player:WaitForChild("PlayerGui")
  7.  
  8. -- Create main table
  9. local main = {}
  10.  
  11. -- GUI Elements
  12. local screenGui
  13. local mainFrame
  14. local usernameLabel
  15. local descriptionLabel
  16. local descriptionStroke
  17.  
  18. -- Initialize GUI
  19. local function createGUI()
  20.     -- Destroy existing GUI if present
  21.     if screenGui then
  22.         screenGui:Destroy()
  23.     end
  24.    
  25.     -- Create ScreenGui
  26.     screenGui = Instance.new("ScreenGui")
  27.     screenGui.Name = "LoadstringGUI"
  28.     screenGui.ResetOnSpawn = false
  29.     screenGui.Parent = playerGui
  30.  
  31.     -- Main Frame
  32.     mainFrame = Instance.new("Frame")
  33.     mainFrame.Size = UDim2.new(0, 800, 0, 400)
  34.     mainFrame.Position = UDim2.new(0.5, -400, 0.5, -200)
  35.     mainFrame.BackgroundColor3 = Color3.fromRGB(35, 35, 45)
  36.     mainFrame.BorderSizePixel = 0
  37.     mainFrame.Parent = screenGui
  38.  
  39.     local mainCorner = Instance.new("UICorner")
  40.     mainCorner.CornerRadius = UDim.new(0, 12)
  41.     mainCorner.Parent = mainFrame
  42.  
  43.     local mainGradient = Instance.new("UIGradient")
  44.     mainGradient.Color = ColorSequence.new{
  45.         ColorSequenceKeypoint.new(0, Color3.fromRGB(45, 45, 55)),
  46.         ColorSequenceKeypoint.new(1, Color3.fromRGB(25, 25, 35))
  47.     }
  48.     mainGradient.Rotation = 90
  49.     mainGradient.Parent = mainFrame
  50.  
  51.     -- Username Frame
  52.     local usernameFrame = Instance.new("Frame")
  53.     usernameFrame.Size = UDim2.new(1, 0, 0.3, 0)
  54.     usernameFrame.Position = UDim2.new(0, 0, 0, 0)
  55.     usernameFrame.BackgroundColor3 = Color3.fromRGB(50, 50, 65)
  56.     usernameFrame.BorderSizePixel = 0
  57.     usernameFrame.Parent = mainFrame
  58.  
  59.     local usernameCorner = Instance.new("UICorner")
  60.     usernameCorner.CornerRadius = UDim.new(0, 12)
  61.     usernameCorner.Parent = usernameFrame
  62.  
  63.     local usernameGradient = Instance.new("UIGradient")
  64.     usernameGradient.Color = ColorSequence.new{
  65.         ColorSequenceKeypoint.new(0, Color3.fromRGB(60, 60, 80)),
  66.         ColorSequenceKeypoint.new(1, Color3.fromRGB(40, 40, 60))
  67.     }
  68.     usernameGradient.Rotation = 90
  69.     usernameGradient.Parent = usernameFrame
  70.  
  71.     -- Username Label
  72.     usernameLabel = Instance.new("TextLabel")
  73.     usernameLabel.Size = UDim2.new(1, -40, 1, -20)
  74.     usernameLabel.Position = UDim2.new(0, 20, 0, 10)
  75.     usernameLabel.BackgroundTransparency = 1
  76.     usernameLabel.Text = player.Name
  77.     usernameLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  78.     usernameLabel.TextScaled = true
  79.     usernameLabel.Font = Enum.Font.GothamBold
  80.     usernameLabel.TextXAlignment = Enum.TextXAlignment.Center
  81.     usernameLabel.Parent = usernameFrame
  82.  
  83.     local usernameStroke = Instance.new("UIStroke")
  84.     usernameStroke.Color = Color3.fromRGB(100, 150, 255)
  85.     usernameStroke.Thickness = 2
  86.     usernameStroke.Transparency = 0.5
  87.     usernameStroke.Parent = usernameLabel
  88.  
  89.     -- Description Frame
  90.     local descriptionFrame = Instance.new("Frame")
  91.     descriptionFrame.Size = UDim2.new(1, -40, 0.65, 0)
  92.     descriptionFrame.Position = UDim2.new(0, 20, 0.32, 0)
  93.     descriptionFrame.BackgroundColor3 = Color3.fromRGB(40, 40, 55)
  94.     descriptionFrame.BorderSizePixel = 0
  95.     descriptionFrame.Parent = mainFrame
  96.  
  97.     local descriptionCorner = Instance.new("UICorner")
  98.     descriptionCorner.CornerRadius = UDim.new(0, 10)
  99.     descriptionCorner.Parent = descriptionFrame
  100.  
  101.     local descriptionGradient = Instance.new("UIGradient")
  102.     descriptionGradient.Color = ColorSequence.new{
  103.         ColorSequenceKeypoint.new(0, Color3.fromRGB(50, 50, 70)),
  104.         ColorSequenceKeypoint.new(1, Color3.fromRGB(30, 30, 45))
  105.     }
  106.     descriptionGradient.Rotation = 45
  107.     descriptionGradient.Parent = descriptionFrame
  108.  
  109.     -- Description Label
  110.     descriptionLabel = Instance.new("TextLabel")
  111.     descriptionLabel.Size = UDim2.new(1, -40, 1, -40)
  112.     descriptionLabel.Position = UDim2.new(0, 20, 0, 20)
  113.     descriptionLabel.BackgroundTransparency = 1
  114.     descriptionLabel.Text = "Ready..."
  115.     descriptionLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  116.     descriptionLabel.TextScaled = true
  117.     descriptionLabel.Font = Enum.Font.GothamBold
  118.     descriptionLabel.TextWrapped = true
  119.     descriptionLabel.TextXAlignment = Enum.TextXAlignment.Center
  120.     descriptionLabel.TextYAlignment = Enum.TextYAlignment.Center
  121.     descriptionLabel.Parent = descriptionFrame
  122.  
  123.     descriptionStroke = Instance.new("UIStroke")
  124.     descriptionStroke.Color = Color3.fromRGB(100, 255, 100)
  125.     descriptionStroke.Thickness = 3
  126.     descriptionStroke.Transparency = 0.3
  127.     descriptionStroke.Parent = descriptionLabel
  128. end
  129.  
  130. -- Refresh function
  131. function main:refresh(username, description)
  132.     if not screenGui then
  133.         createGUI()
  134.     end
  135.    
  136.     if username then
  137.         usernameLabel.Text = username
  138.     end
  139.    
  140.     if description then
  141.         descriptionLabel.Text = description
  142.        
  143.         local colors = {
  144.             {Color3.fromRGB(100, 255, 100), Color3.fromRGB(100, 255, 100)},
  145.             {Color3.fromRGB(255, 255, 100), Color3.fromRGB(255, 255, 100)},
  146.             {Color3.fromRGB(255, 150, 100), Color3.fromRGB(255, 150, 100)},
  147.             {Color3.fromRGB(150, 100, 255), Color3.fromRGB(150, 100, 255)},
  148.             {Color3.fromRGB(100, 200, 255), Color3.fromRGB(100, 200, 255)}
  149.         }
  150.        
  151.         local randomColor = colors[math.random(#colors)]
  152.         descriptionLabel.TextColor3 = randomColor[1]
  153.         descriptionStroke.Color = randomColor[2]
  154.     end
  155. end
  156.  
  157. function main:startAutoUpdate(interval)
  158.     interval = interval or 2
  159.     spawn(function()
  160.         while wait(interval) do
  161.             local randomDescriptions = {
  162.                 "Health: " .. math.random(0, 100) .. "/100",
  163.                 "Mana: " .. math.random(0, 100) .. "/100",
  164.                 "Level: " .. math.random(1, 50),
  165.                 "Score: " .. math.random(100, 9999),
  166.                 "Status: Active",
  167.                 "Coins: " .. math.random(50, 500)
  168.             }
  169.             main:refresh(nil, randomDescriptions[math.random(#randomDescriptions)])
  170.         end
  171.     end)
  172. end
  173.  
  174. function main:destroy()
  175.     if screenGui then
  176.         screenGui:Destroy()
  177.         screenGui = nil
  178.     end
  179. end
  180.  
  181. -- Initialize and return main
  182. createGUI()
  183. getgenv().main = main -- Use getgenv() for loadstring compatibility
  184. return main
Advertisement
Add Comment
Please, Sign In to add comment