Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- GUI for loadstring usage
- local Players = game:GetService("Players")
- local RunService = game:GetService("RunService")
- local player = Players.LocalPlayer
- local playerGui = player:WaitForChild("PlayerGui")
- -- Create main table
- local main = {}
- -- GUI Elements
- local screenGui
- local mainFrame
- local usernameLabel
- local descriptionLabel
- local descriptionStroke
- -- Initialize GUI
- local function createGUI()
- -- Destroy existing GUI if present
- if screenGui then
- screenGui:Destroy()
- end
- -- Create ScreenGui
- screenGui = Instance.new("ScreenGui")
- screenGui.Name = "LoadstringGUI"
- screenGui.ResetOnSpawn = false
- screenGui.Parent = playerGui
- -- Main Frame
- mainFrame = Instance.new("Frame")
- mainFrame.Size = UDim2.new(0, 800, 0, 400)
- mainFrame.Position = UDim2.new(0.5, -400, 0.5, -200)
- mainFrame.BackgroundColor3 = Color3.fromRGB(35, 35, 45)
- mainFrame.BorderSizePixel = 0
- mainFrame.Parent = screenGui
- local mainCorner = Instance.new("UICorner")
- mainCorner.CornerRadius = UDim.new(0, 12)
- mainCorner.Parent = mainFrame
- local mainGradient = Instance.new("UIGradient")
- mainGradient.Color = ColorSequence.new{
- ColorSequenceKeypoint.new(0, Color3.fromRGB(45, 45, 55)),
- ColorSequenceKeypoint.new(1, Color3.fromRGB(25, 25, 35))
- }
- mainGradient.Rotation = 90
- mainGradient.Parent = mainFrame
- -- Username Frame
- local usernameFrame = Instance.new("Frame")
- usernameFrame.Size = UDim2.new(1, 0, 0.3, 0)
- usernameFrame.Position = UDim2.new(0, 0, 0, 0)
- usernameFrame.BackgroundColor3 = Color3.fromRGB(50, 50, 65)
- usernameFrame.BorderSizePixel = 0
- usernameFrame.Parent = mainFrame
- local usernameCorner = Instance.new("UICorner")
- usernameCorner.CornerRadius = UDim.new(0, 12)
- usernameCorner.Parent = usernameFrame
- local usernameGradient = Instance.new("UIGradient")
- usernameGradient.Color = ColorSequence.new{
- ColorSequenceKeypoint.new(0, Color3.fromRGB(60, 60, 80)),
- ColorSequenceKeypoint.new(1, Color3.fromRGB(40, 40, 60))
- }
- usernameGradient.Rotation = 90
- usernameGradient.Parent = usernameFrame
- -- Username Label
- usernameLabel = Instance.new("TextLabel")
- usernameLabel.Size = UDim2.new(1, -40, 1, -20)
- usernameLabel.Position = UDim2.new(0, 20, 0, 10)
- usernameLabel.BackgroundTransparency = 1
- usernameLabel.Text = player.Name
- usernameLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- usernameLabel.TextScaled = true
- usernameLabel.Font = Enum.Font.GothamBold
- usernameLabel.TextXAlignment = Enum.TextXAlignment.Center
- usernameLabel.Parent = usernameFrame
- local usernameStroke = Instance.new("UIStroke")
- usernameStroke.Color = Color3.fromRGB(100, 150, 255)
- usernameStroke.Thickness = 2
- usernameStroke.Transparency = 0.5
- usernameStroke.Parent = usernameLabel
- -- Description Frame
- local descriptionFrame = Instance.new("Frame")
- descriptionFrame.Size = UDim2.new(1, -40, 0.65, 0)
- descriptionFrame.Position = UDim2.new(0, 20, 0.32, 0)
- descriptionFrame.BackgroundColor3 = Color3.fromRGB(40, 40, 55)
- descriptionFrame.BorderSizePixel = 0
- descriptionFrame.Parent = mainFrame
- local descriptionCorner = Instance.new("UICorner")
- descriptionCorner.CornerRadius = UDim.new(0, 10)
- descriptionCorner.Parent = descriptionFrame
- local descriptionGradient = Instance.new("UIGradient")
- descriptionGradient.Color = ColorSequence.new{
- ColorSequenceKeypoint.new(0, Color3.fromRGB(50, 50, 70)),
- ColorSequenceKeypoint.new(1, Color3.fromRGB(30, 30, 45))
- }
- descriptionGradient.Rotation = 45
- descriptionGradient.Parent = descriptionFrame
- -- Description Label
- descriptionLabel = Instance.new("TextLabel")
- descriptionLabel.Size = UDim2.new(1, -40, 1, -40)
- descriptionLabel.Position = UDim2.new(0, 20, 0, 20)
- descriptionLabel.BackgroundTransparency = 1
- descriptionLabel.Text = "Ready..."
- descriptionLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- descriptionLabel.TextScaled = true
- descriptionLabel.Font = Enum.Font.GothamBold
- descriptionLabel.TextWrapped = true
- descriptionLabel.TextXAlignment = Enum.TextXAlignment.Center
- descriptionLabel.TextYAlignment = Enum.TextYAlignment.Center
- descriptionLabel.Parent = descriptionFrame
- descriptionStroke = Instance.new("UIStroke")
- descriptionStroke.Color = Color3.fromRGB(100, 255, 100)
- descriptionStroke.Thickness = 3
- descriptionStroke.Transparency = 0.3
- descriptionStroke.Parent = descriptionLabel
- end
- -- Refresh function
- function main:refresh(username, description)
- if not screenGui then
- createGUI()
- end
- if username then
- usernameLabel.Text = username
- end
- if description then
- descriptionLabel.Text = description
- local colors = {
- {Color3.fromRGB(100, 255, 100), Color3.fromRGB(100, 255, 100)},
- {Color3.fromRGB(255, 255, 100), Color3.fromRGB(255, 255, 100)},
- {Color3.fromRGB(255, 150, 100), Color3.fromRGB(255, 150, 100)},
- {Color3.fromRGB(150, 100, 255), Color3.fromRGB(150, 100, 255)},
- {Color3.fromRGB(100, 200, 255), Color3.fromRGB(100, 200, 255)}
- }
- local randomColor = colors[math.random(#colors)]
- descriptionLabel.TextColor3 = randomColor[1]
- descriptionStroke.Color = randomColor[2]
- end
- end
- function main:startAutoUpdate(interval)
- interval = interval or 2
- spawn(function()
- while wait(interval) do
- local randomDescriptions = {
- "Health: " .. math.random(0, 100) .. "/100",
- "Mana: " .. math.random(0, 100) .. "/100",
- "Level: " .. math.random(1, 50),
- "Score: " .. math.random(100, 9999),
- "Status: Active",
- "Coins: " .. math.random(50, 500)
- }
- main:refresh(nil, randomDescriptions[math.random(#randomDescriptions)])
- end
- end)
- end
- function main:destroy()
- if screenGui then
- screenGui:Destroy()
- screenGui = nil
- end
- end
- -- Initialize and return main
- createGUI()
- getgenv().main = main -- Use getgenv() for loadstring compatibility
- return main
Advertisement
Add Comment
Please, Sign In to add comment