Skip to content

Instantly share code, notes, and snippets.

@DuyNgao2306
Created May 2, 2026 05:43
Show Gist options
  • Select an option

  • Save DuyNgao2306/b1d54aae486782c30a951a96358d9e6c to your computer and use it in GitHub Desktop.

Select an option

Save DuyNgao2306/b1d54aae486782c30a951a96358d9e6c to your computer and use it in GitHub Desktop.
--// SERVICES
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local Stats = game:GetService("Stats")
local TweenService = game:GetService("TweenService")
local UIS = game:GetService("UserInputService")
local Lighting = game:GetService("Lighting")
local player = Players.LocalPlayer
local gui = Instance.new("ScreenGui", player:WaitForChild("PlayerGui"))
gui.ResetOnSpawn = false
--// CONFIG
local AuthorName = "Crow๐Ÿฆโ€โฌ›"
--// RAINBOW
local function rainbow(t)
return Color3.fromHSV(t % 5 / 5, 1, 1)
end
---------------------------------------------------
-- ๐ŸŒซ๏ธ BLUR
---------------------------------------------------
local blur = Instance.new("BlurEffect")
blur.Size = 0
blur.Parent = Lighting
---------------------------------------------------
-- โณ LOADING SCREEN
---------------------------------------------------
local loading = Instance.new("Frame", gui)
loading.Size = UDim2.new(1,0,1,0)
loading.BackgroundColor3 = Color3.new(0,0,0)
local loadingText = Instance.new("TextLabel", loading)
loadingText.Size = UDim2.new(1,0,0.1,0)
loadingText.Position = UDim2.new(0,0,0.4,0)
loadingText.Text = "โ€” by: " .. AuthorName .. " โ€”"
loadingText.BackgroundTransparency = 1
loadingText.TextScaled = true
local percent = Instance.new("TextLabel", loading)
percent.Size = UDim2.new(1,0,0.1,0)
percent.Position = UDim2.new(0,0,0.5,0)
percent.TextScaled = true
percent.BackgroundTransparency = 1
local bar = Instance.new("Frame", loading)
bar.Size = UDim2.new(0.6,0,0.02,0)
bar.Position = UDim2.new(0.2,0,0.6,0)
local fill = Instance.new("Frame", bar)
fill.Size = UDim2.new(0,0,1,0)
for i = 0,100 do
percent.Text = i.."%"
fill.Size = UDim2.new(i/100,0,1,0)
loadingText.TextColor3 = rainbow(tick())
percent.TextColor3 = rainbow(tick())
wait(0.01)
end
loading:Destroy()
---------------------------------------------------
-- ๐Ÿ“ฆ MAIN FRAME
---------------------------------------------------
local frame = Instance.new("Frame", gui)
frame.Size = UDim2.new(0,260,0,170)
frame.Position = UDim2.new(0,20,0.3,0)
frame.BackgroundTransparency = 0.2
Instance.new("UICorner", frame)
local stroke = Instance.new("UIStroke", frame)
---------------------------------------------------
-- ๐Ÿ“Š UI ELEMENTS
---------------------------------------------------
local fpsLabel = Instance.new("TextLabel", frame)
fpsLabel.Size = UDim2.new(1,0,0,25)
fpsLabel.BackgroundTransparency = 1
local pingLabel = Instance.new("TextLabel", frame)
pingLabel.Size = UDim2.new(1,0,0,25)
pingLabel.Position = UDim2.new(0,0,0,25)
pingLabel.BackgroundTransparency = 1
local toggle = Instance.new("TextButton", frame)
toggle.Size = UDim2.new(1,0,0,25)
toggle.Position = UDim2.new(0,0,0,50)
toggle.Text = "Reduce Graphics: OFF"
local author = Instance.new("TextLabel", frame)
author.Size = UDim2.new(1,0,0,25)
author.Position = UDim2.new(0,0,0,75)
author.Text = "by: " .. AuthorName
author.BackgroundTransparency = 1
---------------------------------------------------
-- ๐Ÿ“Š FPS GRAPH
---------------------------------------------------
local graphFrame = Instance.new("Frame", frame)
graphFrame.Size = UDim2.new(1,0,0,40)
graphFrame.Position = UDim2.new(0,0,1,-40)
graphFrame.BackgroundTransparency = 0.4
local fpsHistory = {}
local maxPoints = 25
---------------------------------------------------
-- ๐Ÿ–ฑ๏ธ DRAG UI
---------------------------------------------------
local dragging, dragStart, startPos
frame.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
dragging = true
dragStart = input.Position
startPos = frame.Position
end
end)
frame.InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
dragging = false
end
end)
UIS.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)
---------------------------------------------------
-- ๐Ÿ’ค ANTI AFK
---------------------------------------------------
local vu = game:GetService("VirtualUser")
player.Idled:Connect(function()
vu:CaptureController()
vu:ClickButton2(Vector2.new())
end)
---------------------------------------------------
-- ๐Ÿ“‚ MENU + TWEEN + BLUR
---------------------------------------------------
local menu = Instance.new("TextButton", gui)
menu.Size = UDim2.new(0,100,0,30)
menu.Position = UDim2.new(0,20,0,20)
menu.Text = "MENU"
local openPos = frame.Position
local closedPos = UDim2.new(openPos.X.Scale, openPos.X.Offset, openPos.Y.Scale + 0.3, openPos.Y.Offset)
local uiOpen = true
local function toggleUI()
uiOpen = not uiOpen
local goal = {}
if uiOpen then
goal.Position = openPos
blur.Size = 0
else
goal.Position = closedPos
blur.Size = 20
end
TweenService:Create(frame, TweenInfo.new(0.35, Enum.EasingStyle.Quint), goal):Play()
end
menu.MouseButton1Click:Connect(toggleUI)
---------------------------------------------------
-- ๐ŸŽฎ GRAPHICS TOGGLE
---------------------------------------------------
local enabled = false
toggle.MouseButton1Click:Connect(function()
enabled = not enabled
if enabled then
toggle.Text = "Reduce Graphics: ON"
settings().Rendering.QualityLevel = Enum.QualityLevel.Level01
game.Lighting.GlobalShadows = false
game.Lighting.FogEnd = 9e9
else
toggle.Text = "Reduce Graphics: OFF"
settings().Rendering.QualityLevel = Enum.QualityLevel.Automatic
game.Lighting.GlobalShadows = true
game.Lighting.FogEnd = 1000
end
end)
---------------------------------------------------
-- โšก AUTO DEVICE OPTIMIZE
---------------------------------------------------
if UIS.TouchEnabled and not UIS.KeyboardEnabled then
settings().Rendering.QualityLevel = Enum.QualityLevel.Level01
end
---------------------------------------------------
-- ๐Ÿ” MAIN LOOP
---------------------------------------------------
local frames = 0
local last = tick()
RunService.RenderStepped:Connect(function()
frames += 1
if tick() - last >= 1 then
fpsLabel.Text = "โšก๏ธFPS: " .. frames
table.insert(fpsHistory, frames)
frames = 0
last = tick()
if #fpsHistory > maxPoints then
table.remove(fpsHistory, 1)
end
end
fpsLabel.TextColor3 = rainbow(tick())
pingLabel.TextColor3 = rainbow(tick())
author.TextColor3 = rainbow(tick())
stroke.Color = rainbow(tick())
graphFrame:ClearAllChildren()
for i,v in ipairs(fpsHistory) do
local bar = Instance.new("Frame", graphFrame)
bar.Size = UDim2.new(1/#fpsHistory,0,v/120,0)
bar.Position = UDim2.new((i-1)/#fpsHistory,0,1-(v/120),0)
bar.BackgroundColor3 = rainbow(tick()+i)
bar.BorderSizePixel = 0
end
end)
---------------------------------------------------
-- ๐Ÿ“ก PING
---------------------------------------------------
spawn(function()
while true do
local ping = Stats.Network.ServerStatsItem["Data Ping"]:GetValueString()
pingLabel.Text = "๐Ÿ“กPing: " .. ping
wait(1)
end
end)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment