Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[By MaxproGlitcher Discord:maxproglitcher
- _____ ________.__ .__ __ .__
- / \ _____ ___ ________________ ____ / _____/| | |__|/ |_ ____ | |__ ___________
- / \ / \\__ \ \ \/ /\____ \_ __ \/ _ \/ \ ___| | | \ __\/ ___\| | \_/ __ \_ __ \
- / Y \/ __ \_> < | |_> > | \( <_> ) \_\ \ |_| || | \ \___| Y \ ___/| | \/
- \____|__ (____ /__/\_ \| __/|__| \____/ \______ /____/__||__| \___ >___| /\___ >__|
- \/ \/ \/|__| \/ \/ \/ \/
- ]]
- -- chargement du Gui
- local gui = Instance.new("ScreenGui", game.CoreGui)
- gui.IgnoreGuiInset = true
- gui.ResetOnSpawn = false
- local background = Instance.new("Frame", gui)
- background.Size = UDim2.new(1, 0, 1, 0)
- background.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
- background.BackgroundTransparency = 0.2
- local label = Instance.new("TextLabel", background)
- label.Size = UDim2.new(0, 250, 0, 50)
- label.Position = UDim2.new(0.5, -125, 0.5, -80)
- label.BackgroundTransparency = 1
- label.Text = "Loading..."
- label.TextColor3 = Color3.fromRGB(255, 255, 255)
- label.Font = Enum.Font.GothamBold
- label.TextSize = 26
- local barFrame = Instance.new("Frame", background)
- barFrame.Size = UDim2.new(0, 300, 0, 14)
- barFrame.Position = UDim2.new(0.5, -150, 0.5, -20)
- barFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- barFrame.BorderSizePixel = 0
- Instance.new("UICorner", barFrame).CornerRadius = UDim.new(0, 8)
- Instance.new("UIStroke", barFrame).Color = Color3.fromRGB(80, 80, 80)
- local bar = Instance.new("Frame", barFrame)
- bar.Size = UDim2.new(0, 0, 1, 0)
- bar.BackgroundColor3 = Color3.fromRGB(150, 150, 150)
- bar.BorderSizePixel = 0
- Instance.new("UICorner", bar).CornerRadius = UDim.new(0, 8)
- bar:TweenSize(UDim2.new(1, 0, 1, 0), "Out", "Quad", 2, true)
- task.wait(2.2)
- label.Text = "Server Finder Deluxe!!!"
- task.wait(2.2)
- label.Text = "Success!!!"
- label.TextColor3 = Color3.fromRGB(200, 200, 200)
- task.wait(1.2)
- gui:Destroy()
- local IsOnMobile = table.find({Enum.Platform.IOS, Enum.Platform.Android}, game:GetService("UserInputService"):GetPlatform())
- getgenv().NextServer = nil
- getgenv().HasScannedAll = false
- local HttpService = game:GetService("HttpService")
- local TeleportService = game:GetService("TeleportService")
- local Players = game:GetService("Players")
- local LocalPlayer = Players.LocalPlayer
- local UserInputService = game:GetService("UserInputService")
- local screenGui = Instance.new("ScreenGui", game:GetService("CoreGui"))
- local mainFrame = Instance.new("Frame", screenGui)
- mainFrame.Size = UDim2.new(0, 650, 0, 500)
- mainFrame.Position = UDim2.new(0.5, 0, 0.5, 0)
- mainFrame.AnchorPoint = Vector2.new(0.5, 0.5)
- mainFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- mainFrame.BorderSizePixel = 0
- mainFrame.Active = true
- mainFrame.Draggable = true
- local title = Instance.new("TextLabel", mainFrame)
- title.Size = UDim2.new(1, 0, 0, 40)
- title.Position = UDim2.new(0, 0, 0, 0)
- title.BackgroundTransparency = 1
- title.Text = "Server Finder Deluxe"
- title.Font = Enum.Font.Ubuntu
- title.TextSize = 30
- title.TextColor3 = Color3.fromRGB(255, 255, 255)
- local versionLabel = Instance.new("TextLabel", mainFrame)
- versionLabel.Size = UDim2.new(0, 150, 0, 25)
- versionLabel.Position = UDim2.new(0, 10, 0, 10)
- versionLabel.BackgroundTransparency = 1
- versionLabel.Text = "v2.8"
- versionLabel.Font = Enum.Font.Ubuntu
- versionLabel.TextSize = 16
- versionLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
- versionLabel.TextXAlignment = Enum.TextXAlignment.Left
- -- Détection des périodes spéciales
- local isXmas = false
- local isHalloween = false
- local isNewYear = false
- local isEaster = false
- pcall(function()
- local date = os.date("*t")
- isXmas = date.month == 12 and date.day >= 20 and date.day <= 26
- isHalloween = (date.month == 10 and date.day >= 31) or (date.month == 11 and date.day <= 2)
- isNewYear = (date.month == 12 and date.day >= 31) or (date.month == 1 and date.day <= 2)
- isEaster = (date.month == 3 and date.day >= 31) or (date.month == 4 and date.day <= 15)
- end)
- -- Fonction pour appliquer les effets de texte
- local function decorateTitle(startEmoji, endEmoji)
- title.Text = startEmoji .. " Server Finder Deluxe " .. endEmoji
- title.Position = UDim2.new(0, -28, 0, 0)
- end
- -- Effet Noël
- if isXmas then
- decorateTitle("🎄", "🎄")
- local cycleColors = {
- Color3.fromRGB(0, 255, 0),
- Color3.fromRGB(255, 0, 0),
- Color3.fromRGB(255, 255, 255)
- }
- local index = 1
- task.spawn(function()
- while true do
- title.TextColor3 = cycleColors[index]
- versionLabel.TextColor3 = cycleColors[index]
- index = index % #cycleColors + 1
- task.wait(0.5)
- end
- end)
- end
- -- Effet Halloween
- if isHalloween then
- decorateTitle("🎃", "🎃")
- local cycleColors = {
- Color3.fromRGB(0, 0, 0),
- Color3.fromRGB(255, 165, 0)
- }
- local index = 1
- task.spawn(function()
- while true do
- title.TextColor3 = cycleColors[index]
- versionLabel.TextColor3 = cycleColors[index]
- index = index % #cycleColors + 1
- task.wait(0.5)
- end
- end)
- end
- -- Effet Nouvel An
- if isNewYear then
- decorateTitle("🎉", "🎉")
- local cycleColors = {
- Color3.fromRGB(255, 255, 0),
- Color3.fromRGB(0, 0, 0)
- }
- local index = 1
- task.spawn(function()
- while true do
- title.TextColor3 = cycleColors[index]
- versionLabel.TextColor3 = cycleColors[index]
- index = index % #cycleColors + 1
- task.wait(0.5)
- end
- end)
- end
- -- Effet Pâques
- if isEaster then
- decorateTitle("🐰", "🐰")
- local cycleColors = {
- Color3.fromRGB(216, 191, 216),
- Color3.fromRGB(255, 182, 193),
- Color3.fromRGB(193, 225, 193),
- Color3.fromRGB(173, 216, 230)
- }
- local index = 1
- task.spawn(function()
- while true do
- title.TextColor3 = cycleColors[index]
- versionLabel.TextColor3 = cycleColors[index]
- index = index % #cycleColors + 1
- task.wait(0.5)
- end
- end)
- end
- -- Si aucune fête, retour à la normale
- if not isXmas and not isHalloween and not isNewYear and not isEaster then
- title.Text = "Server Finder Deluxe"
- title.Position = UDim2.new(0, 0, 0, 0)
- end
- local scrollFrame = Instance.new("ScrollingFrame", mainFrame)
- scrollFrame.Size = UDim2.new(1, -20, 1, -60)
- scrollFrame.Position = UDim2.new(0, 10, 0, 50)
- scrollFrame.CanvasSize = UDim2.new(0, 0, 0, 0)
- scrollFrame.AutomaticCanvasSize = Enum.AutomaticSize.Y
- scrollFrame.ScrollBarThickness = 6
- scrollFrame.BackgroundTransparency = 1
- local layout = Instance.new("UIListLayout", scrollFrame)
- layout.Padding = UDim.new(0, 10)
- local posChange = 8
- local serverFrames = {}
- -- Le code qui scann tout les servers publics
- local function GetAllServers(PlaceID)
- getgenv().NextServer = nil
- getgenv().HasScannedAll = false
- local T = {}
- local Site = HttpService:JSONDecode(game:HttpGet('https://games.roblox.com/v1/games/' .. PlaceID .. '/servers/Public?sortOrder=Desc&limit=100'))
- if Site.nextPageCursor and Site.nextPageCursor ~= "null" then
- getgenv().NextServer = HttpService:JSONDecode(game:HttpGet('https://games.roblox.com/v1/games/' .. PlaceID .. '/servers/Public?sortOrder=Desc&limit=100&cursor=' .. Site.nextPageCursor))
- table.insert(T, (getgenv().NextServer).data)
- while not getgenv().HasScannedAll do
- task.wait()
- if (getgenv().NextServer).nextPageCursor and (getgenv().NextServer).nextPageCursor ~= "null" then
- getgenv().NextServer = HttpService:JSONDecode(game:HttpGet('https://games.roblox.com/v1/games/' .. PlaceID .. '/servers/Public?sortOrder=Desc&limit=100&cursor=' .. (getgenv().NextServer).nextPageCursor))
- table.insert(T, (getgenv().NextServer).data)
- else
- getgenv().HasScannedAll = true
- end
- end
- else
- table.insert(T, Site.data)
- end
- return T
- end
- local function CreateServerFrame(server)
- local serverFrame = Instance.new("Frame", scrollFrame)
- serverFrame.Size = UDim2.new(1, 0, 0, 120)
- serverFrame.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
- serverFrame.BorderSizePixel = 0
- -- Textlabel Pour le nombre de joueurs, ping du servers , et le nombre Maximal du servers public.
- local infoLabel = Instance.new("TextLabel", serverFrame)
- infoLabel.Size = UDim2.new(0, 300, 0, 60)
- infoLabel.Position = UDim2.new(0, 10, 0, 10)
- infoLabel.BackgroundTransparency = 1
- infoLabel.TextWrapped = true
- infoLabel.TextXAlignment = Enum.TextXAlignment.Left
- infoLabel.TextYAlignment = Enum.TextYAlignment.Top
- infoLabel.Font = Enum.Font.Ubuntu
- infoLabel.TextSize = 16
- infoLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- infoLabel.Text = "Ping : " .. (server.ping or "N/A") .. "\nPlayers : " .. server.playing .. "/" .. server.maxPlayers
- -- ID des Servers Publics
- local idLabel = Instance.new("TextLabel", serverFrame)
- idLabel.Size = UDim2.new(0, 300, 0, 20)
- idLabel.Position = UDim2.new(0, 10, 0, 80)
- idLabel.BackgroundTransparency = 1
- idLabel.TextWrapped = true
- idLabel.TextXAlignment = Enum.TextXAlignment.Left
- idLabel.TextYAlignment = Enum.TextYAlignment.Top
- idLabel.Font = Enum.Font.Ubuntu
- idLabel.TextSize = 14
- idLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
- idLabel.Text = "ID : " .. server.id
- -- Les buttons rejoint pour tout les Servers public obtenu
- local joinButton = Instance.new("TextButton", serverFrame)
- joinButton.Size = UDim2.new(0, 100, 0, 40)
- joinButton.Position = UDim2.new(1, -110, 0.5, -20)
- joinButton.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
- joinButton.Text = "Join"
- joinButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- joinButton.Font = Enum.Font.Ubuntu
- joinButton.TextSize = 18
- joinButton.MouseButton1Click:Connect(function()
- TeleportService:TeleportToPlaceInstance(game.PlaceId, server.id, LocalPlayer)
- end)
- table.insert(serverFrames, serverFrame)
- end
- -- Global
- local allServers = {}
- function updateServerList(servers)
- for _, v in pairs(serverFrames) do
- v:Destroy()
- end
- posChange = 8
- table.clear(serverFrames)
- for _, server in ipairs(servers) do
- CreateServerFrame(server)
- posChange += 154
- end
- end
- function refreshServers()
- local servers = GetAllServers(game.PlaceId)
- if servers then
- allServers = servers[1]
- updateServerList(allServers)
- end
- end
- refreshServers()
- UserInputService.InputBegan:Connect(function(input, gameProcessed)
- if gameProcessed then return end
- if input.KeyCode == Enum.KeyCode.RightControl then
- screenGui:Destroy()
- end
- end)
- -- Fonction de notification d'erreur
- local function showError(message)
- local notif = Instance.new("TextLabel", screenGui)
- notif.Size = UDim2.new(0, 300, 0, 40)
- notif.Position = UDim2.new(1, -310, 1, -50)
- notif.AnchorPoint = Vector2.new(0, 1)
- notif.BackgroundColor3 = Color3.fromRGB(180, 50, 50)
- notif.Text = message
- notif.TextColor3 = Color3.new(1,1,1)
- notif.Font = Enum.Font.Ubuntu
- notif.TextSize = 16
- notif.BackgroundTransparency = 0.2
- notif.TextXAlignment = Enum.TextXAlignment.Left
- notif.TextYAlignment = Enum.TextYAlignment.Center
- Instance.new("UICorner", notif).CornerRadius = UDim.new(0, 8)
- task.delay(4, function()
- if notif then
- notif:Destroy()
- end
- end)
- end
- local LocalizationService = game:GetService("LocalizationService")
- local TweenService = game:GetService("TweenService")
- -- Bouton Refresh avec gestion d'erreur
- local refreshBtn = Instance.new("ImageButton", mainFrame)
- refreshBtn.AnchorPoint = Vector2.new(0.5, 0.5)
- refreshBtn.Size = UDim2.new(0, 50, 0, 50)
- refreshBtn.Position = UDim2.new(0.5, 250, 0.5, -220)
- refreshBtn.Image = "http://www.roblox.com/asset/?id=126446661859683"
- refreshBtn.BackgroundTransparency = 1
- refreshBtn.ZIndex = 2
- -- Traductions du message d'erreur
- local translations = {
- ["fr"] = "Erreur de chargement. Réessaie.",
- ["en"] = "Error loading. Please try again.",
- ["es"] = "Error al cargar. Inténtalo de nuevo.",
- ["pt"] = "Erro ao carregar. Por favor, tente novamente.",
- ["tr"] = "Yükleme hatası. Lütfen tekrar deneyin.",
- ["it"] = "Errore nel caricamento. Riprova.",
- ["de"] = "Fehler beim Laden. Bitte versuche es erneut.",
- ["ar"] = "حدث خطأ أثناء التحميل. الرجاء المحاولة مرة أخرى.",
- ["ja"] = "読み込みエラーが発生しました。もう一度お試しください。",
- ["tr"] = "Sunucuya yeniden bağlanılıyor...",
- ["ru"] = "Ошибка загрузки. Пожалуйста, попробуйте еще раз.",
- ["zh"] = "加载错误。请重试。",
- }
- local function getTranslatedMessage()
- local langCode = LocalizationService.RobloxLocaleId:sub(1, 2)
- return translations[langCode] or translations["en"]
- end
- -- Notification moderne traduite
- local function showError()
- local message = getTranslatedMessage()
- local screenGui = mainFrame:FindFirstAncestorOfClass("ScreenGui")
- if not screenGui then return end
- local notif = Instance.new("Frame")
- notif.Size = UDim2.new(0, 320, 0, 60)
- notif.Position = UDim2.new(1, 340, 1, -20)
- notif.AnchorPoint = Vector2.new(1, 1)
- notif.BackgroundColor3 = Color3.fromRGB(200, 40, 40)
- notif.BorderSizePixel = 0
- notif.ZIndex = 10
- notif.Parent = screenGui
- Instance.new("UICorner", notif).CornerRadius = UDim.new(0, 10)
- local stroke = Instance.new("UIStroke", notif)
- stroke.Color = Color3.fromRGB(0, 0, 0)
- stroke.Thickness = 1
- local label = Instance.new("TextLabel", notif)
- label.Size = UDim2.new(1, -30, 1, 0)
- label.Position = UDim2.new(0, 15, 0, 0)
- label.Text = message
- label.TextColor3 = Color3.fromRGB(0, 0, 0)
- label.BackgroundTransparency = 1
- label.TextSize = 16
- label.Font = Enum.Font.GothamMedium
- label.TextXAlignment = Enum.TextXAlignment.Left
- label.ZIndex = 11
- label.Parent = notif
- TweenService:Create(notif, TweenInfo.new(0.3, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), {
- Position = UDim2.new(1, -20, 1, -20)
- }):Play()
- task.delay(3, function()
- local tween = TweenService:Create(notif, TweenInfo.new(0.3), {
- BackgroundTransparency = 1,
- Position = UDim2.new(1, 340, 1, -20)
- })
- tween:Play()
- tween.Completed:Wait()
- notif:Destroy()
- end)
- end
- refreshBtn.MouseButton1Click:Connect(function()
- for _, v in pairs(serverFrames) do
- v:Destroy()
- end
- posChange = 8
- table.clear(serverFrames)
- local success, err = pcall(refreshServers)
- if not success then
- showError()
- end
- end)
- local function sortServers(servers, currentSort)
- if currentSort == "fastest" then
- table.sort(servers, function(a, b)
- return (a.ping or 9999) < (b.ping or 9999)
- end)
- elseif currentSort == "lowPlayers" then
- table.sort(servers, function(a, b)
- return a.playing < b.playing
- end)
- elseif currentSort == "maxPlayers" then
- table.sort(servers, function(a, b)
- return a.playing > b.playing
- end)
- end
- return servers
- end
- local lowPlayersBtn = Instance.new("ImageButton", mainFrame)
- lowPlayersBtn.AnchorPoint = Vector2.new(0.5, 0.5)
- lowPlayersBtn.Size = UDim2.new(0, 40, 0, 40)
- lowPlayersBtn.Position = UDim2.new(0.5, 250, 0.5, -220)
- lowPlayersBtn.Image = "http://www.roblox.com/asset/?id=138896199949173"
- lowPlayersBtn.BackgroundTransparency = 1
- lowPlayersBtn.ZIndex = 2
- local maxPlayersBtn = Instance.new("ImageButton", mainFrame)
- maxPlayersBtn.AnchorPoint = Vector2.new(0.5, 0.5)
- maxPlayersBtn.Size = UDim2.new(0, 40, 0, 40)
- maxPlayersBtn.Position = UDim2.new(0.5, 346, 0.5, -220)
- maxPlayersBtn.Image = "http://www.roblox.com/asset/?id=138896199949173"
- maxPlayersBtn.BackgroundTransparency = 1
- maxPlayersBtn.ZIndex = 2
- lowPlayersBtn.MouseButton1Click:Connect(function()
- local sorted = sortServers(allServers, "lowPlayers")
- updateServerList(sorted)
- end)
- maxPlayersBtn.MouseButton1Click:Connect(function()
- local sorted = sortServers(allServers, "maxPlayers")
- updateServerList(sorted)
- end)
- -- Le button Close pour fermer le Gui Server Finder Deluxe
- local closeBtn = Instance.new("ImageButton", mainFrame)
- closeBtn.AnchorPoint = Vector2.new(0.5, 0.5)
- closeBtn.Size = UDim2.new(0, 40, 0, 40)
- closeBtn.Position = UDim2.new(0.5, 298, 0.5, -220)
- closeBtn.Image = "http://www.roblox.com/asset/?id=138896199949173"
- closeBtn.BackgroundTransparency = 1
- closeBtn.ZIndex = 2
- closeBtn.MouseButton1Click:Connect(function()
- screenGui:Destroy()
- end)
- -- Le button Close pour fermer le Gui Server Finder Deluxe
- local closeBtn = Instance.new("ImageButton", mainFrame)
- closeBtn.AnchorPoint = Vector2.new(0.5, 0.5)
- closeBtn.Size = UDim2.new(0, 40, 0, 40)
- closeBtn.Position = UDim2.new(0.5, 298, 0.5, -220)
- closeBtn.Image = "http://www.roblox.com/asset/?id=138896199949173"
- closeBtn.BackgroundTransparency = 1
- closeBtn.ZIndex = 2
- closeBtn.MouseButton1Click:Connect(function()
- screenGui:Destroy()
- end)
- -- Le Code du button Rejoin pour relancer le jeux dans le même servers publics
- local TweenService = game:GetService("TweenService")
- local TeleportService = game:GetService("TeleportService")
- local Players = game:GetService("Players")
- local LocalizationService = game:GetService("LocalizationService")
- local LocalPlayer = Players.LocalPlayer
- local langText = {
- ["fr"] = "Reconnexion au serveur...",
- ["en"] = "Reconnecting to server...",
- ["es"] = "Reconectando al servidor...",
- ["de"] = "Wiederverbindung zum Server...",
- ["it"] = "Riconnessione al server...",
- ["pt"] = "Reconectando ao servidor...",
- ["ru"] = "Переподключение к серверу...",
- ["zh"] = "正在重新连接服务器...",
- ["tr"] = "Sunucuya yeniden bağlanılıyor...",
- ["ja"] = "サーバーに再接続中...",
- ["ar"] = "إعادة الاتصال بالخادم...",
- }
- local function getTranslatedMessage()
- local langCode = LocalizationService.RobloxLocaleId:sub(1, 2)
- return langText[langCode] or langText["en"]
- end
- local function Translated(mainFrame)
- if not mainFrame then return end
- local screenGui = mainFrame:FindFirstAncestorOfClass("ScreenGui")
- if not screenGui then return end
- local notifFrame = Instance.new("Frame")
- notifFrame.Size = UDim2.new(0, 320, 0, 60)
- notifFrame.Position = UDim2.new(1, 300, 1, -20)
- notifFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- notifFrame.BackgroundTransparency = 0.2
- notifFrame.BorderSizePixel = 0
- notifFrame.AnchorPoint = Vector2.new(1, 1)
- notifFrame.Visible = false
- notifFrame.ZIndex = 5
- notifFrame.Parent = screenGui
- Instance.new("UICorner", notifFrame).CornerRadius = UDim.new(0, 10)
- local stroke = Instance.new("UIStroke", notifFrame)
- stroke.Color = Color3.fromRGB(0, 0, 0)
- stroke.Thickness = 1
- local notifText = Instance.new("TextLabel", notifFrame)
- notifText.Size = UDim2.new(1, -30, 1, 0)
- notifText.Position = UDim2.new(0, 15, 0, 0)
- notifText.BackgroundTransparency = 1
- notifText.TextColor3 = Color3.fromRGB(255, 255, 255)
- notifText.Font = Enum.Font.GothamMedium
- notifText.TextSize = 16
- notifText.TextXAlignment = Enum.TextXAlignment.Left
- notifText.ZIndex = 6
- notifText.Text = getTranslatedMessage()
- local RejoinButton = Instance.new("ImageButton", mainFrame)
- RejoinButton.AnchorPoint = Vector2.new(0.5, 0.5)
- RejoinButton.Size = UDim2.new(0, 40, 0, 40)
- RejoinButton.Position = UDim2.new(0.5, 204, 0.5, -220)
- RejoinButton.Image = "http://www.roblox.com/asset/?id=103864549538113"
- RejoinButton.BackgroundTransparency = 1
- RejoinButton.ZIndex = 10
- RejoinButton.MouseButton1Click:Connect(function()
- notifText.Text = getTranslatedMessage()
- notifFrame.Visible = true
- TweenService:Create(notifFrame, TweenInfo.new(0.3, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), {
- Position = UDim2.new(1, -20, 1, -20)
- }):Play()
- task.delay(3, function()
- local tween = TweenService:Create(notifFrame, TweenInfo.new(0.3), {
- BackgroundTransparency = 1,
- Position = UDim2.new(1, 300, 1, -20)
- })
- tween:Play()
- tween.Completed:Wait()
- notifFrame.Visible = false
- notifFrame.BackgroundTransparency = 0.2
- notifFrame.Position = UDim2.new(1, 300, 1, -20)
- end)
- TeleportService:Teleport(game.PlaceId, LocalPlayer)
- end)
- end
- Translated(mainFrame)
- -- Button Resize Button
- local resizeButton = Instance.new("ImageButton", mainFrame)
- resizeButton.AnchorPoint = Vector2.new(0.5, 0.5)
- resizeButton.Size = UDim2.new(0, 40, 0, 40)
- resizeButton.Position = UDim2.new(0.5, 157, 0.5, -220)
- resizeButton.Image = "http://www.roblox.com/asset/?id=92176830367195"
- resizeButton.BackgroundTransparency = 1
- resizeButton.ZIndex = 2
- local isSmall = true -- Définir la taille initiale comme petite
- -- Fonction pour basculer entre les tailles
- local function toggleGuiSize()
- if isSmall then
- mainFrame.Size = UDim2.new(0, 650, 0, 500)
- scrollFrame.Size = UDim2.new(1, -20, 1, -60)
- scrollFrame.Position = UDim2.new(0, 10, 0, 50)
- refreshBtn.AnchorPoint = Vector2.new(0.5, 0.5)
- refreshBtn.Size = UDim2.new(0, 50, 0, 50)
- refreshBtn.Position = UDim2.new(0.5, 250, 0.5, -220)
- closeBtn.AnchorPoint = Vector2.new(0.5, 0.5)
- closeBtn.Size = UDim2.new(0, 40, 0, 40)
- closeBtn.Position = UDim2.new(0.5, 298, 0.5, -220)
- resizeButton.AnchorPoint = Vector2.new(0.5, 0.5)
- resizeButton.Size = UDim2.new(0, 40, 0, 40)
- resizeButton.Position = UDim2.new(0.5, 157, 0.5, -220)
- RejointButton.AnchorPoint = Vector2.new(0.5, 0.5)
- RejointButton.Size = UDim2.new(0, 40, 0, 40)
- RejointButton.Position = UDim2.new(0.5, 204, 0.5, -220)
- else
- mainFrame.Size = UDim2.new(0, 470, 0, 390)
- scrollFrame.Size = UDim2.new(1, -10, 1, -40)
- scrollFrame.Position = UDim2.new(0, 5, 0, 40)
- refreshBtn.Position = UDim2.new(0.5, 195, 0.5, -175)
- refreshBtn.AnchorPoint = Vector2.new(0.5, 0.5)
- refreshBtn.Size = UDim2.new(0, 30, 0, 30
- )
- closeBtn.Position = UDim2.new(0.5, 220, 0.5, -175)
- closeBtn.AnchorPoint = Vector2.new(0.5, 0.5)
- closeBtn.Size = UDim2.new(0, 25, 0, 25)
- RejointButton.AnchorPoint = Vector2.new(0.5, 0.5)
- RejointButton.Size = UDim2.new(0, 25, 0, 25)
- RejointButton.Position = UDim2.new(0.5, 169, 0.5, -175)
- resizeButton.AnchorPoint = Vector2.new(0.5, 0.5)
- resizeButton.Size = UDim2.new(0, 25, 0, 25)
- resizeButton.Position = UDim2.new(0.5, 144, 0.5, -175)
- end
- isSmall = not isSmall
- end
- resizeButton.MouseButton1Click:Connect(toggleGuiSize)
Advertisement
Add Comment
Please, Sign In to add comment