pcall(function() if not game.Players.LocalPlayer.Character or game.Players.LocalPlayer.Character:WaitForChild("Humanoid").RigType ~= Enum.HumanoidRigType.R15 then game.StarterGui:SetCore("SendNotification", {Title = "R6", Text = "You're on R6, bro. Change to R15!", Duration = 60}) return end local st = os.clock() local TweenService = game:GetService("TweenService") local HttpService = game:GetService("HttpService") local Players = game:GetService("Players") local camera = workspace.CurrentCamera cloneref = cloneref or function(o) return o end local GazeGoGui = cloneref(game:GetService("CoreGui")) or game:GetService("CoreGui") or game.Players.LocalPlayer:WaitForChild("PlayerGui") local Notifbro = {} function Notify(titletxt, text, time) coroutine.wrap(function() local GUI = Instance.new("ScreenGui") local Main = Instance.new("Frame", GUI) local title = Instance.new("TextLabel", Main) local message = Instance.new("TextLabel", Main) GUI.Name = "BackgroundNotif" GUI.Parent = GazeGoGui local sw = workspace.CurrentCamera.ViewportSize.X local sh = workspace.CurrentCamera.ViewportSize.Y local nh = sh / 7 local nw = sw / 5 Main.Name = "MainFrame" Main.BackgroundColor3 = Color3.new(0.156863, 0.156863, 0.156863) Main.BackgroundTransparency = 0.2 Main.BorderSizePixel = 0 Main.Size = UDim2.new(0, nw, 0, nh) title.BackgroundColor3 = Color3.new(0, 0, 0) title.BackgroundTransparency = 0.9 title.Size = UDim2.new(1, 0, 0, nh / 2) title.Font = Enum.Font.GothamBold title.Text = titletxt title.TextColor3 = Color3.new(1, 1, 1) title.TextScaled = true message.BackgroundColor3 = Color3.new(0, 0, 0) message.BackgroundTransparency = 1 message.Position = UDim2.new(0, 0, 0, nh / 2) message.Size = UDim2.new(1, 0, 1, -nh / 2) message.Font = Enum.Font.Gotham message.Text = text message.TextColor3 = Color3.new(1, 1, 1) message.TextScaled = true local offset = 50 for _, notif in ipairs(Notifbro) do offset = offset + notif.Size.Y.Offset + 10 end Main.Position = UDim2.new(1, 5, 0, offset) table.insert(Notifbro, Main) task.wait(0.1) Main:TweenPosition(UDim2.new(1, -nw, 0, offset), Enum.EasingDirection.Out, Enum.EasingStyle.Bounce, 0.5, true) Main:TweenSize(UDim2.new(0, nw * 1.06, 0, nh * 1.06), Enum.EasingDirection.Out, Enum.EasingStyle.Elastic, 0.5, true) task.wait(0.1) Main:TweenSize(UDim2.new(0, nw, 0, nh), Enum.EasingDirection.Out, Enum.EasingStyle.Elastic, 0.2, true) task.wait(time) Main:TweenSize(UDim2.new(0, nw * 1.06, 0, nh * 1.06), Enum.EasingDirection.In, Enum.EasingStyle.Elastic, 0.2, true) task.wait(0.2) Main:TweenSize(UDim2.new(0, nw, 0, nh), Enum.EasingDirection.In, Enum.EasingStyle.Elastic, 0.2, true) task.wait(0.2) Main:TweenPosition(UDim2.new(1, 5, 0, offset), Enum.EasingDirection.In, Enum.EasingStyle.Bounce, 0.5, true) task.wait(0.1) GUI:Destroy() for i, notif in ipairs(Notifbro) do if notif == Main then table.remove(Notifbro, i) break end end for i, notif in ipairs(Notifbro) do local newOffset = 50 + (nh + 10) * (i - 1) notif:TweenPosition(UDim2.new(1, -nw, 0, newOffset), Enum.EasingDirection.Out, Enum.EasingStyle.Bounce, 0.5, true) end end)() end task.wait(0.1) local guiName = "GazeVerificator" if GazeGoGui:FindFirstChild(guiName) then Notify("Error","Script Already Executed", 1) return end local function getScaledSize(relativeWidth, relativeHeight) local viewportSize = camera.ViewportSize return UDim2.new(0, math.floor(viewportSize.X * relativeWidth), 0, math.floor(viewportSize.Y * relativeHeight)) end local core = cloneref(game.CoreGui) local old = core:FindFirstChild("DraggableGui") if old then old:Destroy() end local screenGui = Instance.new("ScreenGui") screenGui.Name = "DraggableGui" screenGui.Parent = core -- TALLER WINDOW SIZE - Changed from 0.4 to 0.6 height for more buttons local frame = Instance.new("TextButton") frame.Name = "GazeBro" frame.Text = "" frame.Size = getScaledSize(0.3, 0.6) -- TALLER: 60% of screen height instead of 40% frame.Position = UDim2.new(0.5, -getScaledSize(0.3,0.6).X.Offset/2, 0.5, -getScaledSize(0.3,0.6).Y.Offset/2) frame.BackgroundColor3 = Color3.fromRGB(50,50,50) frame.BackgroundTransparency = 0.2 frame.BorderSizePixel = 0 -- Remove border for rounded corners frame.Active = true frame.Draggable = true -- Add rounded corners to main frame local UICorner = Instance.new("UICorner") UICorner.CornerRadius = UDim.new(0, 12) -- Curved edges UICorner.Parent = frame frame.Parent = screenGui local holding = false local startTime = 0 local startPos local function fadeOut() local t = frame.BackgroundTransparency while t < 1 do if t < 0.7 then t = t + 0.05 else t = t + 0.015 end if t > 1 then t = 1 end frame.BackgroundTransparency = t task.wait(0.02) end end local function fadeIn() local t = frame.BackgroundTransparency while t > 0.2 do if t > 0.7 then t = t - 0.015 else t = t - 0.05 end if t < 0.2 then t = 0.2 end frame.BackgroundTransparency = t task.wait(0.02) end end local function movedFar() local currentPos = frame.AbsolutePosition local dx = math.abs(currentPos.X - startPos.X) local dy = math.abs(currentPos.Y - startPos.Y) return dx >= 20 or dy >= 20 end frame.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then holding = true startTime = os.clock() startPos = frame.AbsolutePosition -- Use heartbeat instead of tight loop local connection connection = game:GetService("RunService").Heartbeat:Connect(function() if not holding then connection:Disconnect() return end if movedFar() then holding = false connection:Disconnect() return end if os.clock() - startTime >= 3 then if frame.BackgroundTransparency < 1 then fadeOut() else fadeIn() end holding = false connection:Disconnect() end end) end end) frame.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then holding = false end end) local searchBar = Instance.new("TextBox") searchBar.Name = "SearchBar" searchBar.Text = "" searchBar.PlaceholderText = "Search..." searchBar.Font = Enum.Font.SourceSans searchBar.TextScaled = true searchBar.TextColor3 = Color3.fromRGB(200, 200, 200) searchBar.BackgroundColor3 = Color3.fromRGB(30, 30, 30) searchBar.BorderSizePixel = 0 searchBar.Size = UDim2.new(0.9, 0, 0.1, 0) -- Smaller search bar to make room for more buttons searchBar.Position = UDim2.new(0.05, 0, 0.05, 0) -- Adjusted position searchBar.ClearTextOnFocus = true -- Add rounded corners to search bar local searchBarCorner = Instance.new("UICorner") searchBarCorner.CornerRadius = UDim.new(0, 8) searchBarCorner.Parent = searchBar searchBar.Parent = frame -- LARGER SCROLL FRAME - More space for buttons local scrollFrame = Instance.new("ScrollingFrame") scrollFrame.Name = "ScrollFrame" scrollFrame.Size = UDim2.new(0.9, 0, 0.8, 0) -- TALLER: 80% of frame height instead of 70% scrollFrame.Position = UDim2.new(0.05, 0, 0.15, 0) -- Adjusted position scrollFrame.BackgroundColor3 = Color3.fromRGB(40, 40, 40) scrollFrame.BorderSizePixel = 0 scrollFrame.ScrollBarThickness = 6 -- Added scrollbar for better navigation scrollFrame.ScrollingDirection = Enum.ScrollingDirection.Y scrollFrame.CanvasSize = UDim2.new(0, 0, 0, 0) scrollFrame.ScrollBarImageTransparency = 0.3 -- Visible scrollbar -- Add rounded corners to scroll frame local scrollFrameCorner = Instance.new("UICorner") scrollFrameCorner.CornerRadius = UDim.new(0, 8) scrollFrameCorner.Parent = scrollFrame scrollFrame.Parent = frame -- LAZY LOADING VARIABLES local buttons = {} local createdSet = {} local animationsLoaded = false local Animations = {} local buttonPool = {} local buttonConnections = {} -- FIX: Store connections to manage them properly local visibleButtonCount = 15 -- Only show 15 buttons at once local currentScrollPosition = 0 -- UPDATED ANIMATION DATABASE (UGC entries removed, [VOTE] entries kept) local function loadAnimations() if animationsLoaded then return Animations end local OriginalAnimations = { ["Idle"] = { ["2016 Animation (mm2)"] = {"387947158", "387947464"}, ["Astronaut"] = {"891621366", "891633237"}, ["Adidas Community"] = {"122257458498464", "102357151005774"}, ["Bold"] = {"16738333868", "16738334710"}, ["Borock"] = {"3293641938", "3293642554"}, ["Bubbly"] = {"910004836", "910009958"}, ["Cartoony"] = {"742637544", "742638445"}, ["Confident"] = {"1069977950", "1069987858"}, ["Catwalk Glam"] = {"133806214992291", "94970088341563"}, ["Cowboy"] = {"1014390418", "1014398616"}, ["Elder"] = {"10921101664", "10921102574"}, ["Ghost"] = {"616006778", "616008087"}, ["Knight"] = {"657595757", "657568135"}, ["Levitation"] = {"616006778", "616008087"}, ["Mage"] = {"707742142", "707855907"}, ["MrToilet"] = {"4417977954", "4417978624"}, ["Ninja"] = {"656117400", "656118341"}, ["NFL"] = {"92080889861410", "74451233229259"}, ["OldSchool"] = {"10921230744", "10921232093"}, ["Patrol"] = {"1149612882", "1150842221"}, ["Pirate"] = {"750781874", "750782770"}, ["Default Retarget"] = {"95884606664820", "95884606664820"}, ["Very Long"] = {"18307781743", "18307781743"}, ["Adidas Aura"] = {"138665010911335", "138665010911335"}, ["Sway"] = {"560832030", "560833564"}, ["Popstar"] = {"1212900985", "1150842221"}, ["Princess"] = {"941003647", "941013098"}, ["R15 Reanimated"] = {"4211217646", "4211218409"}, ["Realistic"] = {"17172918855", "17173014241"}, ["Robot"] = {"616088211", "616089559"}, ["Sneaky"] = {"1132473842", "1132477671"}, ["Sports (Adidas)"] = {"18537376492", "18537371272"}, ["Soldier"] = {"3972151362", "3972151362"}, ["Stylish"] = {"616136790", "616138447"}, ["Stylized Female"] = {"4708191566", "4708192150"}, ["Superhero"] = {"10921288909", "10921290167"}, ["Toy"] = {"782841498", "782845736"}, ["Udzal"] = {"3303162274", "3303162549"}, ["Vampire"] = {"1083445855", "1083450166"}, ["Werewolf"] = {"1083195517", "1083214717"}, ["Wicked (Popular)"] = {"118832222982049", "76049494037641"}, ["No Boundaries (Walmart)"] = {"18747067405", "18747063918"}, ["Zombie"] = {"616158929", "616160636"}, ["cesus"] = {"115879733952840", "115879733952840"}, ["Badware"] = {"140131631438778", "140131631438778"}, ["Wicked \"Dancing Through Life\""] = {"92849173543269", "132238900951109"}, ["Unboxed By Amazon"] = {"98281136301627", "138183121662404"} }, ["Walk"] = { ["Patrol"] = "1151231493", ["Drooling Zombie"] = "3489174223", ["Adidas Community"] = "122150855457006", ["Levitation"] = "616013216", ["Catwalk Glam"] = "109168724482748", ["Knight"] = "10921127095", ["Pirate"] = "750785693", ["Bold"] = "16738340646", ["Sports (Adidas)"] = "18537392113", ["Zombie"] = "616168032", ["Adidas Aura"] = "75183215343859", ["Astronaut"] = "891667138", ["Cartoony"] = "742640026", ["Ninja"] = "656121766", ["Confident"] = "1070017263", ["Wicked \"Dancing Through Life\""] = "73718308412641", ["Unboxed By Amazon"] = "90478085024465", ["R15 Reanimated"] = "4211223236", ["Ghost"] = "616013216", ["2016 Animation (mm2)"] = "387947975", ["No Boundaries (Walmart)"] = "18747074203", ["Rthro"] = "10921269718", ["Werewolf"] = "1083178339", ["Wicked (Popular)"] = "92072849924640", ["Vampire"] = "1083473930", ["Popstar"] = "1212980338", ["Mage"] = "707897309", ["NFL"] = "110358958299415", ["Bubbly"] = "910034870", ["OldSchool"] = "10921244891", ["Elder"] = "10921111375", ["Stylish"] = "616146177", ["Stylized Female"] = "4708193840", ["Robot"] = "616095330", ["Sneaky"] = "1132510133", ["Superhero"] = "10921298616", ["Udzal"] = "3303162967", ["Toy"] = "782843345", ["Princess"] = "941028902", ["Cowboy"] = "1014421541" }, ["Run"] = { ["Robot"] = "10921250460", ["Patrol"] = "1150967949", ["Drooling Zombie"] = "3489173414", ["Adidas Community"] = "82598234841035", ["Heavy Run (Udzal / Borock)"] = "3236836670", ["Catwalk Glam"] = "81024476153754", ["Knight"] = "10921121197", ["Pirate"] = "750783738", ["Bold"] = "16738337225", ["Sports (Adidas)"] = "18537384940", ["Zombie"] = "616163682", ["Astronaut"] = "10921039308", ["Cartoony"] = "10921076136", ["Ninja"] = "656118852", ["Adidas Aura"] = "123973978164540", ["Wicked \"Dancing Through Life\""] = "135515454877967", ["Unboxed By Amazon"] = "134824450619865", ["[UGC] Flipping"] = "124427738251511", ["Sneaky"] = "1132494274", ["Popstar"] = "1212980348", ["Wicked (Popular)"] = "72301599441680", ["[UGC] chibi"] = "85887415033585", ["R15 Reanimated"] = "4211220381", ["Mage"] = "10921148209", ["Ghost"] = "616013216", ["Rthro"] = "10921261968", ["Confident"] = "1070001516", ["Stylized Female"] = "4708192705", ["No Boundaries (Walmart)"] = "18747070484", ["Elder"] = "10921104374", ["Werewolf"] = "10921336997", ["[UGC] Girly"] = "128578785610052", ["Stylish"] = "10921276116", ["NFL"] = "117333533048078", ["MrToilet"] = "4417979645", ["Levitation"] = "616010382", ["OldSchool"] = "10921240218", ["Vampire"] = "10921320299", ["furry"] = "102269417125238", ["Bubbly"] = "10921057244", ["fake wicked"] = "138992096476836", ["2016 Animation (mm2)"] = "387947975", ["[UGC] ball"] = "132499588684957", ["Superhero"] = "10921291831", ["Toy"] = "10921306285", ["Princess"] = "941015281", ["Cowboy"] = "1014401683" }, ["Jump"] = { ["Robot"] = "616090535", ["Patrol"] = "1148811837", ["Adidas Community"] = "75290611992385", ["Levitation"] = "616008936", ["Catwalk Glam"] = "116936326516985", ["Knight"] = "910016857", ["Pirate"] = "750782230", ["Bold"] = "16738336650", ["Sports (Adidas)"] = "18537380791", ["Zombie"] = "616161997", ["Astronaut"] = "891627522", ["Cartoony"] = "742637942", ["Adidas Aura"] = "129527230938281", ["Ninja"] = "656117878", ["Confident"] = "1069984524", ["Wicked \"Dancing Through Life\""] = "78508480717326", ["Unboxed By Amazon"] = "121454505477205", ["R15 Reanimated"] = "4211219390", ["Ghost"] = "616008936", ["Rthro"] = "10921263860", ["No Boundaries (Walmart)"] = "18747069148", ["Werewolf"] = "1083218792", ["Cowboy"] = "1014394726", ["Popstar"] = "1212954642", ["Mage"] = "10921149743", ["Sneaky"] = "1132489853", ["Superhero"] = "10921294559", ["Elder"] = "10921107367", ["NFL"] = "119846112151352", ["OldSchool"] = "10921242013", ["Stylized Female"] = "4708188025", ["Stylish"] = "616139451", ["Bubbly"] = "910016857", ["Vampire"] = "1083455352", ["Wicked (Popular)"] = "104325245285198", ["Toy"] = "10921308158", ["Princess"] = "941008832", ["[UGC] happy"] = "72388373557525" }, ["Fall"] = { ["Robot"] = "616087089", ["Patrol"] = "1148863382", ["Adidas Community"] = "98600215928904", ["Levitation"] = "616005863", ["Catwalk Glam"] = "92294537340807", ["Knight"] = "10921122579", ["Pirate"] = "750780242", ["Bold"] = "16738333171", ["Sports (Adidas)"] = "18537367238", ["Zombie"] = "616157476", ["Adidas Aura"] = "99457463463495", ["Astronaut"] = "891617961", ["Cartoony"] = "742637151", ["Ninja"] = "656115606", ["Confident"] = "1069973677", ["Wicked \"Dancing Through Life\""] = "78147885297412", ["Unboxed By Amazon"] = "94788218468396", ["[UGC] skydiving"] = "102674302534126", ["R15 Reanimated"] = "4211216152", ["Rthro"] = "10921262864", ["No Boundaries (Walmart)"] = "18747062535", ["Werewolf"] = "1083189019", ["Mage"] = "707829716", ["Wicked (Popular)"] = "121152442762481", ["Popstar"] = "1212900995", ["NFL"] = "129773241321032", ["OldSchool"] = "10921241244", ["Sneaky"] = "1132469004", ["Elder"] = "10921105765", ["Bubbly"] = "910001910", ["Stylish"] = "616134815", ["Stylized Female"] = "4708186162", ["Vampire"] = "1083443587", ["Superhero"] = "10921293373", ["Toy"] = "782846423", ["Princess"] = "941000007", ["Cowboy"] = "1014384571" }, ["SwimIdle"] = { ["Sneaky"] = "1132506407", ["SuperHero"] = "10921297391", ["Adidas Community"] = "109346520324160", ["Levitation"] = "10921139478", ["Catwalk Glam"] = "98854111361360", ["Knight"] = "10921125935", ["Pirate"] = "750785176", ["Bold"] = "16738339817", ["Sports (Adidas)"] = "18537387180", ["Stylized"] = "4708190607", ["Astronaut"] = "891663592", ["Cartoony"] = "10921079380", ["Wicked (Popular)"] = "113199415118199", ["Mage"] = "707894699", ["Wicked \"Dancing Through Life\""] = "129183123083281", ["Unboxed By Amazon"] = "129126268464847", ["Rthro"] = "10921265698", ["CowBoy"] = "1014411816", ["No Boundaries (Walmart)"] = "18747071682", ["Werewolf"] = "10921341319", ["NFL"] = "79090109939093", ["OldSchool"] = "10921244018", ["Robot"] = "10921253767", ["Elder"] = "10921110146", ["Bubbly"] = "910030921", ["Patrol"] = "1151221899", ["Vampire"] = "10921325443", ["Popstar"] = "1212998578", ["Ninja"] = "656118341", ["Toy"] = "10921310341", ["Confident"] = "1070012133", ["Princess"] = "941025398", ["Stylish"] = "10921281964" }, ["Swim"] = { ["Sneaky"] = "1132500520", ["Patrol"] = "1151204998", ["Adidas Community"] = "133308483266208", ["Levitation"] = "10921138209", ["Catwalk Glam"] = "134591743181628", ["Knight"] = "10921125160", ["Pirate"] = "750784579", ["Adidas Aura"] = "119007025452432", ["Bold"] = "16738339158", ["Sports (Adidas)"] = "18537389531", ["Zombie"] = "616165109", ["Astronaut"] = "891663592", ["Cartoony"] = "10921079380", ["Wicked (Popular)"] = "99384245425157", ["Mage"] = "707876443", ["PopStar"] = "1212998578", ["Unboxed By Amazon"] = "105962919001086", ["Rthro"] = "10921264784", ["CowBoy"] = "1014406523", ["No Boundaries (Walmart)"] = "18747073181", ["Werewolf"] = "10921340419", ["NFL"] = "132697394189921", ["OldSchool"] = "10921243048", ["Wicked \"Dancing Through Life\""] = "110657013921774", ["Elder"] = "10921108971", ["Bubbly"] = "910028158", ["Robot"] = "10921253142", ["Vampire"] = "10921324408", ["Stylish"] = "10921281000", ["Toy"] = "10921309319", ["SuperHero"] = "10921295495", ["Princess"] = "941018893", ["Confident"] = "1070009914" }, ["Climb"] = { ["Robot"] = "616086039", ["Patrol"] = "1148811837", ["Adidas Community"] = "88763136693023", ["Levitation"] = "10921132092", ["Catwalk Glam"] = "119377220967554", ["Adidas Aura"] = "140398319728398", ["Knight"] = "10921125160", ["Bold"] = "16738332169", ["Sports (Adidas)"] = "18537363391", ["Zombie"] = "616156119", ["Astronaut"] = "10921032124", ["Cartoony"] = "742636889", ["Ninja"] = "656114359", ["Confident"] = "1069946257", ["Wicked \"Dancing Through Life\""] = "129447497744818", ["Unboxed By Amazon"] = "121145883950231", ["Ghost"] = "616003713", ["Rthro"] = "10921257536", ["CowBoy"] = "1014380606", ["No Boundaries (Walmart)"] = "18747060903", ["Mage"] = "707826056", ["Reanimated R15"] = "4211214992", ["Popstar"] = "1213044953", ["NFL"] = "134630013742019", ["OldSchool"] = "10921229866", ["Sneaky"] = "1132461372", ["Elder"] = "845392038", ["Stylized Female"] = "4708184253", ["Stylish"] = "10921271391", ["SuperHero"] = "10921286911", ["WereWolf"] = "10921329322", ["Vampire"] = "1083439238", ["Toy"] = "10921300839", ["Wicked (Popular)"] = "131326830509784", ["Princess"] = "940996062", } } -- Try to load from file, otherwise use original if isfile("GreyLikesToSmellUrFeet.json") then local success, data = pcall(function() return readfile("GreyLikesToSmellUrFeet.json") end) if success then Animations = HttpService:JSONDecode(data) else Animations = OriginalAnimations end else pcall(function() writefile("GreyLikesToSmellUrFeet.json", HttpService:JSONEncode(OriginalAnimations)) end) Animations = OriginalAnimations end animationsLoaded = true return Animations end -- BUTTON POOL MANAGEMENT local function createButtonPool() for i = 1, visibleButtonCount do local button = Instance.new("TextButton") button.Name = "PoolButton_" .. i button.Font = Enum.Font.SourceSansBold button.TextScaled = true button.TextColor3 = Color3.fromRGB(255, 255, 255) button.BackgroundColor3 = Color3.fromRGB(60, 60, 60) button.Size = UDim2.new(1, 0, 0, 35) button.Position = UDim2.new(0, 0, 0, (i-1) * 40) button.BackgroundTransparency = 0 button.BorderSizePixel = 0 button.Visible = false local buttonCorner = Instance.new("UICorner") buttonCorner.CornerRadius = UDim.new(0, 6) buttonCorner.Parent = button button.Parent = scrollFrame table.insert(buttonPool, button) end end createButtonPool() -- VIRTUALIZED SCROLLING local allAnimationData = {} local filteredAnimationData = {} local function populateAnimationData() local typeOrder = {"Idle", "Walk", "Run", "Jump", "Fall", "Swim", "SwimIdle", "Climb"} for _, animType in ipairs(typeOrder) do local anims = Animations[animType] if anims then for name, ids in pairs(anims) do table.insert(allAnimationData, { name = name, type = animType, ids = ids, displayText = name .. " - " .. animType }) end end end filteredAnimationData = allAnimationData end -- FIXED: Button callback management local function updateVisibleButtons() local searchText = searchBar.Text:lower() -- Filter data if needed if searchText ~= "" then filteredAnimationData = {} for _, data in ipairs(allAnimationData) do if data.displayText:lower():find(searchText) then table.insert(filteredAnimationData, data) end end else filteredAnimationData = allAnimationData end -- Calculate visible range local scrollPosition = scrollFrame.CanvasPosition.Y local startIndex = math.floor(scrollPosition / 40) + 1 local endIndex = math.min(startIndex + visibleButtonCount - 1, #filteredAnimationData) -- Clear existing connections for i, connection in ipairs(buttonConnections) do if connection then connection:Disconnect() end end buttonConnections = {} -- Update button pool for i, button in ipairs(buttonPool) do local dataIndex = startIndex + i - 1 if dataIndex <= endIndex and dataIndex <= #filteredAnimationData then local data = filteredAnimationData[dataIndex] button.Text = data.displayText button.Position = UDim2.new(0, 0, 0, (dataIndex-1) * 40) button.Visible = true -- Store the new connection buttonConnections[i] = button.MouseButton1Click:Connect(function() pcall(function() setAnimation(data.type, data.ids) end) end) else button.Visible = false end end -- Update canvas size scrollFrame.CanvasSize = UDim2.new(0, 0, 0, #filteredAnimationData * 40) end -- DEBOUNCED SEARCH local searchDebounce searchBar:GetPropertyChangedSignal("Text"):Connect(function() if searchDebounce then searchDebounce:Disconnect() end searchDebounce = task.delay(0.3, function() updateVisibleButtons() searchDebounce = nil end) end) -- LAZY LOAD INITIALIZATION local function initializeGUI() loadAnimations() populateAnimationData() updateVisibleButtons() -- Load in background to prevent lag task.spawn(function() -- Pre-load a few more animations if needed for i = 1, math.min(50, #allAnimationData) do task.wait() end end) end -- Initialize after a short delay to prevent initial lag task.delay(0.5, initializeGUI) local FLabel = Instance.new("TextLabel") FLabel.Name = "FLabel" FLabel.Text = "F" FLabel.Font = Enum.Font.GothamBold FLabel.TextScaled = true FLabel.TextColor3 = Color3.fromRGB(255, 255, 255) FLabel.BackgroundTransparency = 1 FLabel.Size = UDim2.new(1, 0, 1, 0) FLabel.Position = UDim2.new(0, 0, 0, 0) FLabel.Visible = false FLabel.Parent = frame -- UPDATED SIZES FOR TALLER WINDOW local normalSize = getScaledSize(0.3, 0.6) -- TALLER: 60% height local normalPosition = UDim2.new(0.5, -normalSize.X.Offset / 2, 0.5, -normalSize.Y.Offset / 2) local smallerSize = getScaledSize(0.1, 0.1) -- Minimized size stays the same local smallerPosition = UDim2.new(1, -smallerSize.X.Offset - 10, 0, 10) -- Top-right corner local isSmall = false local clickCount = 0 local function handleDoubleClick() if isSmall then -- Return to normal size (TALLER) frame.Size = normalSize frame.Position = normalPosition scrollFrame.Visible = true searchBar.Visible = true FLabel.Visible = false else -- Minimize to square in top-right corner frame.Size = smallerSize frame.Position = smallerPosition scrollFrame.Visible = false searchBar.Visible = false FLabel.Visible = true end isSmall = not isSmall end frame.MouseButton1Click:Connect(function() clickCount += 1 if clickCount == 1 then task.delay(0.45, function() clickCount = 0 end) elseif clickCount == 2 then handleDoubleClick() clickCount = 0 end end) scrollFrame:GetPropertyChangedSignal("CanvasPosition"):Connect(function() updateVisibleButtons() end) local lastAnimations = {} -- Load saved animations immediately and cache them local function loadSavedAnimationsToCache() if isfile("MeWhenUrMom.json") then local success, data = pcall(function() return readfile("MeWhenUrMom.json") end) if success then local loadedData = HttpService:JSONDecode(data) -- Deep copy to cache for animType, animId in pairs(loadedData) do lastAnimations[animType] = animId end return true end end return false end -- Load animations to cache on script start loadSavedAnimationsToCache() -- Improved animation handling local function StopAnim() local speaker = Players.LocalPlayer local Char = speaker.Character if not Char then return end local Hum = Char:FindFirstChildOfClass("Humanoid") or Char:FindFirstChildOfClass("AnimationController") if Hum then for _, track in ipairs(Hum:GetPlayingAnimationTracks()) do if track then track:Stop(0.1) -- Smooth stop end end end end -- Improved reset functions local function ResetIdle() local speaker = Players.LocalPlayer local Char = speaker.Character if not Char then return end local Hum = Char:FindFirstChildOfClass("Humanoid") or Char:FindFirstChildOfClass("AnimationController") if not Hum then return end for _, track in ipairs(Hum:GetPlayingAnimationTracks()) do if track and (track.Name == "idle" or track.Name == "IdleAnimation") then track:Stop(0.1) end end end local function ResetWalk() local speaker = Players.LocalPlayer local Char = speaker.Character if not Char then return end local Hum = Char:FindFirstChildOfClass("Humanoid") or Char:FindFirstChildOfClass("AnimationController") if not Hum then return end for _, track in ipairs(Hum:GetPlayingAnimationTracks()) do if track and track.Name == "walk" then track:Stop(0.1) end end end local function ResetRun() local speaker = Players.LocalPlayer local Char = speaker.Character if not Char then return end local Hum = Char:FindFirstChildOfClass("Humanoid") or Char:FindFirstChildOfClass("AnimationController") if not Hum then return end for _, track in ipairs(Hum:GetPlayingAnimationTracks()) do if track and track.Name == "run" then track:Stop(0.1) end end end local function ResetJump() local speaker = Players.LocalPlayer local Char = speaker.Character if not Char then return end local Hum = Char:FindFirstChildOfClass("Humanoid") or Char:FindFirstChildOfClass("AnimationController") if not Hum then return end for _, track in ipairs(Hum:GetPlayingAnimationTracks()) do if track and track.Name == "jump" then track:Stop(0.1) end end end local function ResetFall() local speaker = Players.LocalPlayer local Char = speaker.Character if not Char then return end local Hum = Char:FindFirstChildOfClass("Humanoid") or Char:FindFirstChildOfClass("AnimationController") if not Hum then return end for _, track in ipairs(Hum:GetPlayingAnimationTracks()) do if track and track.Name == "fall" then track:Stop(0.1) end end end local function ResetSwim() local speaker = Players.LocalPlayer local Char = speaker.Character if not Char then return end local Hum = Char:FindFirstChildOfClass("Humanoid") or Char:FindFirstChildOfClass("AnimationController") if not Hum then return end for _, track in ipairs(Hum:GetPlayingAnimationTracks()) do if track and track.Name == "swim" then track:Stop(0.1) end end end local function ResetSwimIdle() local speaker = Players.LocalPlayer local Char = speaker.Character if not Char then return end local Hum = Char:FindFirstChildOfClass("Humanoid") or Char:FindFirstChildOfClass("AnimationController") if not Hum then return end for _, track in ipairs(Hum:GetPlayingAnimationTracks()) do if track and track.Name == "swimidle" then track:Stop(0.1) end end end local function ResetClimb() local speaker = Players.LocalPlayer local Char = speaker.Character if not Char then return end local Hum = Char:FindFirstChildOfClass("Humanoid") or Char:FindFirstChildOfClass("AnimationController") if not Hum then return end for _, track in ipairs(Hum:GetPlayingAnimationTracks()) do if track and track.Name == "climb" then track:Stop(0.1) end end end local function saveLastAnimations() local data = HttpService:JSONEncode(lastAnimations) pcall(function() writefile("MeWhenUrMom.json", data) end) end -- BATCHED ANIMATION SYSTEM local pendingAnimations = {} local animationApplyDebounce local function applyPendingAnimations() if animationApplyDebounce then return end animationApplyDebounce = true task.delay(0.1, function() local player = Players.LocalPlayer if not player.Character then animationApplyDebounce = false return end local Char = player.Character local Animate = Char:FindFirstChild("Animate") if not Animate then animationApplyDebounce = false return end pcall(function() StopAnim() task.wait(0.05) for animType, animId in pairs(pendingAnimations) do lastAnimations[animType] = animId if animType == "Idle" then ResetIdle() Animate.idle.Animation1.AnimationId = "http://www.roblox.com/asset/?id=" .. animId[1] Animate.idle.Animation2.AnimationId = "http://www.roblox.com/asset/?id=" .. animId[2] elseif animType == "Walk" then ResetWalk() Animate.walk.WalkAnim.AnimationId = "http://www.roblox.com/asset/?id=" .. animId elseif animType == "Run" then ResetRun() Animate.run.RunAnim.AnimationId = "http://www.roblox.com/asset/?id=" .. animId elseif animType == "Jump" then ResetJump() Animate.jump.JumpAnim.AnimationId = "http://www.roblox.com/asset/?id=" .. animId elseif animType == "Fall" then ResetFall() Animate.fall.FallAnim.AnimationId = "http://www.roblox.com/asset/?id=" .. animId elseif animType == "Swim" and Animate:FindFirstChild("swim") then ResetSwim() Animate.swim.Swim.AnimationId = "http://www.roblox.com/asset/?id=" .. animId elseif animType == "SwimIdle" and Animate:FindFirstChild("swimidle") then ResetSwimIdle() Animate.swimidle.SwimIdle.AnimationId = "http://www.roblox.com/asset/?id=" .. animId elseif animType == "Climb" then ResetClimb() Animate.climb.ClimbAnim.AnimationId = "http://www.roblox.com/asset/?id=" .. animId end end pendingAnimations = {} saveLastAnimations() local humanoid = Char:FindFirstChildOfClass("Humanoid") if humanoid then humanoid:Move(Vector3.new(0, 0, 0)) end end) animationApplyDebounce = false end) end -- Improved setAnimation function function setAnimation(animationType, animationId) if type(animationId) ~= "table" and type(animationId) ~= "string" then return end pendingAnimations[animationType] = animationId applyPendingAnimations() end -- Apply animations on character load local function applyCachedAnimations(character) local hum = character:WaitForChild("Humanoid") local animate = character:WaitForChild("Animate", 5) if not animate then return end task.wait(0.5) -- Wait for character to fully initialize -- Apply cached animations with small delays between each local applyOrder = {"Idle", "Walk", "Run", "Jump", "Fall", "Climb", "Swim", "SwimIdle"} for _, animType in ipairs(applyOrder) do if lastAnimations[animType] then task.wait(0.1) -- Small delay to prevent race conditions setAnimation(animType, lastAnimations[animType]) end end end -- OPTIMIZED CHARACTER EVENT HANDLING local characterConnection characterConnection = Players.LocalPlayer.CharacterAdded:Connect(function(character) -- Disconnect old connection to prevent multiple handlers if characterConnection then characterConnection:Disconnect() characterConnection = nil end -- Apply animations with retry logic local retryCount = 0 local maxRetries = 3 local function tryApplyAnimations() retryCount = retryCount + 1 if retryCount > maxRetries then return end local success, err = pcall(function() applyCachedAnimations(character) end) if not success and retryCount <= maxRetries then task.wait(1) -- Wait before retry tryApplyAnimations() end end tryApplyAnimations() -- Reconnect for future character respawns characterConnection = Players.LocalPlayer.CharacterAdded:Connect(function(newChar) task.wait(0.1) -- Small delay local newRetryCount = 0 local function retryNewChar() newRetryCount = newRetryCount + 1 if newRetryCount <= maxRetries then local success = pcall(function() applyCachedAnimations(newChar) end) if not success and newRetryCount < maxRetries then task.wait(1) retryNewChar() end end end retryNewChar() end) end) -- Apply animations to current character if exists if Players.LocalPlayer.Character then task.wait(1) -- Wait for everything to load applyCachedAnimations(Players.LocalPlayer.Character) end local lt = os.clock() - st Notify("Optimized Load", string.format("in %.2f seconds.", lt), 3) end)