Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local rs = game:GetService("RunService")
- local plr = game.Players.LocalPlayer
- local displayed = plr.PlayerGui:WaitForChild("NameUI"..plr.Name)
- displayed = displayed:WaitForChild("Stuff")
- displayed = displayed:WaitForChild("Frame")
- displayed = displayed:WaitForChild("IconBadge").Image
- local menu = plr.PlayerGui.MainUI.LobbyFrame.Achievements
- local resetAchievement
- game.StarterGui:SetCore("SendNotification",
- {
- Title = "Achievement Spam Enabled";
- Text = "Open the achievement menu to disable."
- }
- )
- local achievements = {}
- for _, v in ipairs(menu.List:GetChildren()) do
- if v:IsA("ImageButton") then
- table.insert(achievements, v.Name)
- if v.Image == displayed then
- resetAchievement = v.Name
- end
- end
- end
- local disableSpam, playerLeave, added
- task.wait()
- local n = 1
- rs:BindToRenderStep("spam", 1, function()
- game.ReplicatedStorage.EntityInfo.FlexAchievement:FireServer(achievements[n])
- n = (n+1)%#achievements+1
- end)
- local function stop()
- pcall(function()
- rs:UnbindFromRenderStep("spam")
- end)
- game.ReplicatedStorage.EntityInfo.FlexAchievement:FireServer(resetAchievement)
- disableSpam:Disconnect()
- playerLeave:Disconnect()
- added:Disconnect()
- end
- disableSpam = menu:GetPropertyChangedSignal("Visible"):Connect(function()
- if menu.Visible then
- stop()
- end
- end)
- playerLeave = plr.PlayerGui.MainUI.LobbyFrame.LoadingUI:GetPropertyChangedSignal("Visible"):Connect(function()
- stop()
- end)
- added = menu.List.ChildAdded:Connect(function(c)
- if c:IsA("ImageButton") then
- table.insert(achievements, c.Name)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement