MaxproGlitcher

Gui TweenService by Max .lua

Jul 1st, 2024 (edited)
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.89 KB | None | 0 0
  1. -- Verion 1,5 du Gui TweenService
  2.  
  3. -- 1 .Ce script est un Gui de TweenService pour se téléporter au joueur dans la map
  4.  
  5. -- 2. Ce script est la propriéter de maxproglitcher et il est Copyright!!!
  6.  
  7. -- 3. Mes oui le code est Open Source pour prouver le script est pas un Script Malware...
  8.  
  9. -- 4. Ce script risque d'être mise a jour vue de la documentation .Lua qui évolue a force des années..
  10.  
  11. -- 5. Je ne suis pas responsable des bannisements que vous prenez en utilisant se script ne pas utiliser sur des jeux qui on des Anti-TP , ou Anti-Cheat
  12.  
  13. -- Notificaton de ouverture du Gui
  14.  
  15. game:GetService("StarterGui"):SetCore("SendNotification",{
  16. Title = "Tp au joueurs",
  17. Text = "Script a été executer",
  18. Icon = "rbxassetid://14682078456",
  19. Duration = 15
  20. })
  21.  
  22. game:GetService("StarterGui"):SetCore("SendNotification",{
  23. Title = "Version 1.5",
  24. Text = "Script a été executer",
  25. Icon = "rbxassetid://14682078456",
  26. Duration = 15
  27. })
  28.  
  29. game:GetService("StarterGui"):SetCore("SendNotification",{
  30. Title = "Ouvrir-Fermer ",
  31. Text = "Clik sur T",
  32. Icon = "rbxassetid://17824144308",
  33. Duration = 15
  34. })
  35.  
  36.  
  37. -- Code pour le Bruit de ouverture du Gui...
  38.  
  39. task.spawn(function()
  40. local beep = Instance.new("Sound");
  41. beep.Volume = 1; -- de 0 à 1, vous pouvez en faire plus mais ce sera bruyant
  42. beep.SoundId = "rbxassetid://232127604";
  43. beep.Parent = game:GetService("CoreGui");
  44. beep:Play();
  45. beep.Ended:Wait();
  46. beep:Destroy();
  47. end)
  48.  
  49. print ("Le menu a été activer , tout les joueurs de la game se mettras a jour tout le long de la game ")
  50.  
  51. print ("Merci de utiliser mon script!!!!")
  52.  
  53. local player = game.Players.LocalPlayer
  54. local TweenService = game:GetService("TweenService")
  55.  
  56. -- Créer un ScreenGui pour contenir la liste des lecteurs personnalisés
  57. local playerListGui = Instance.new("ScreenGui")
  58. playerListGui.Parent = game.CoreGui
  59. playerListGui.Enabled = true -- Initialement, l'interface graphique est activée
  60.  
  61. -- Créer un cadre pour l'arrière-plan
  62. local backgroundFrame = Instance.new("Frame")
  63. backgroundFrame.Parent = playerListGui
  64. backgroundFrame.Size = UDim2.new(0, 200, 0, 400)
  65. backgroundFrame.Position = UDim2.new(1, -200, 0, 0) -- Coin supérieur droit
  66. backgroundFrame.BackgroundColor3 = Color3.new(0, 0, 0)
  67. backgroundFrame.BackgroundTransparency = 0.5 -- 50% la transparence
  68. backgroundFrame.BorderSizePixel = 0
  69.  
  70. -- Créer un TextLabel pour le nombre de joueurs
  71. local playerCountLabel = Instance.new("TextLabel")
  72. playerCountLabel.Parent = backgroundFrame
  73. playerCountLabel.Size = UDim2.new(1, 0, 0, 30)
  74. playerCountLabel.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
  75. playerCountLabel.BorderSizePixel = 0
  76. playerCountLabel.Text = "Players: " .. #game.Players:GetPlayers()
  77. playerCountLabel.TextSize = 18
  78. playerCountLabel.TextColor3 = Color3.new(1, 1, 1)
  79.  
  80. -- Créer un ScrollingFrame pour contenir la liste des joueurs
  81. local playerListFrame = Instance.new("ScrollingFrame")
  82. playerListFrame.Parent = backgroundFrame
  83. playerListFrame.Size = UDim2.new(1, 0, 1, -30)
  84. playerListFrame.Position = UDim2.new(0, 0, 0, 30)
  85. playerListFrame.BackgroundTransparency = 1 -- La rendre totalement transparente
  86. playerListFrame.ScrollBarThickness = 5
  87.  
  88. -- Créer un UIListLayout pour organiser les étiquettes verticalement
  89. local listLayout = Instance.new("UIListLayout")
  90. listLayout.Parent = playerListFrame
  91. listLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center
  92. listLayout.VerticalAlignment = Enum.VerticalAlignment.Top
  93. listLayout.SortOrder = Enum.SortOrder.LayoutOrder
  94.  
  95. -- Fonction permettant de créer un TextButton pour chaque joueur avec des animations de survol et de clic.
  96. local function createPlayerButton(playerName)
  97. local button = Instance.new("TextButton")
  98. button.Parent = playerListFrame
  99. button.Size = UDim2.new(1, 0, 0, 30)
  100. button.BackgroundColor3 = Color3.new(197, 0, 0) -- Couleur de fond bleue
  101. button.BackgroundTransparency = 0.5 -- 50% de transparence
  102. button.BorderSizePixel = 0
  103. button.Text = playerName
  104. button.TextSize = 18
  105. button.TextColor3 = Color3.new(1, 1, 1)
  106.  
  107. -- Effet de survol
  108. local defaultColor = button.BackgroundColor3
  109. local hoverColor = Color3.new(0.15, 0.6, 1) -- Bleu plus clair au survol
  110.  
  111. button.MouseEnter:Connect(function()
  112. button:TweenSize(UDim2.new(1, 0, 0, 40), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.2, true)
  113. button.BackgroundColor3 = hoverColor
  114. end)
  115.  
  116. button.MouseLeave:Connect(function()
  117. button:TweenSize(UDim2.new(1, 0, 0, 30), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.2, true)
  118. button.BackgroundColor3 = defaultColor
  119. end)
  120.  
  121. -- Téléportation du lecteur local vers le lecteur sélectionné à l'aide d'un tweening
  122. button.MouseButton1Click:Connect(function()
  123. local targetPlayer = game.Players:FindFirstChild(playerName)
  124. if targetPlayer then
  125. local targetCharacter = targetPlayer.Character
  126. if targetCharacter then
  127. local targetHumanoidRootPart = targetCharacter:FindFirstChild("HumanoidRootPart")
  128. if targetHumanoidRootPart then
  129. local teleportDestination = targetHumanoidRootPart.Position + Vector3.new(0, 5, 0)
  130. local playerCharacter = player.Character
  131. if playerCharacter then
  132. local playerHumanoidRootPart = playerCharacter:FindFirstChild("HumanoidRootPart")
  133. if playerHumanoidRootPart then
  134. local tweenInfo = TweenInfo.new(
  135. 1, -- Duration
  136. Enum.EasingStyle.Quad, -- Un style apaisé
  137. Enum.EasingDirection.Out -- Assouplir la direction
  138. )
  139. local targetCFrame = CFrame.new(teleportDestination)
  140. local tween = TweenService:Create(playerHumanoidRootPart, tweenInfo, {CFrame = targetCFrame})
  141. tween:Play()
  142. end
  143. end
  144. end
  145. end
  146. end
  147. end)
  148. end
  149.  
  150. -- Fonction permettant de mettre à jour la liste des joueurs et d'ajuster la taille de l'interface graphique
  151. local function updatePlayerList()
  152. local players = game.Players:GetPlayers()
  153. local numPlayers = #players
  154. local guiHeight = math.max(numPlayers * 40, 400) -- Hauteur minimale de 400
  155.  
  156. -- Mise à jour de l'étiquette du nombre de joueurs
  157. playerCountLabel.Text = "Players: " .. numPlayers
  158.  
  159. -- Effacer la liste des joueurs
  160. for _, child in pairs(playerListFrame:GetChildren()) do
  161. if child:IsA("TextButton") then
  162. child:Destroy()
  163. end
  164. end
  165.  
  166. --Créer un TextButton pour chaque joueur du serveur
  167. for _, playerObj in ipairs(players) do
  168. if playerObj ~= player then
  169. createPlayerButton(playerObj.Name)
  170. end
  171. end
  172.  
  173. -- Ajuster la taille de l'arrière-plan à la liste mise à jour
  174. backgroundFrame.Size = UDim2.new(0, 200, 0, guiHeight + 30)
  175. end
  176.  
  177. -- Première mise à jour de la liste des joueurs
  178. updatePlayerList()
  179.  
  180. -- Se connecter aux événements d'ajout et de départ de joueurs pour mettre à jour la liste des joueurs.
  181. game.Players.PlayerAdded:Connect(updatePlayerList)
  182. game.Players.PlayerRemoving:Connect(updatePlayerList)
  183.  
  184. -- Fonction permettant d'activer et de désactiver la visibilité de l'interface graphique à l'aide de la touche "T
  185. local function toggleGUIVisibility()
  186. playerListGui.Enabled = not playerListGui.Enabled
  187. end
  188.  
  189. -- Écouter la pression de la touche "T
  190. game:GetService("UserInputService").InputBegan:Connect(function(input)
  191. if input.KeyCode == Enum.KeyCode.T then
  192. toggleGUIVisibility()
  193. end
  194. end)
  195.  
  196. warn ("Si vous rencontrez des problème avec mon script aller m'écricre en privé sur Discord: maxproglitcher ")
Advertisement
Add Comment
Please, Sign In to add comment