Facebook
From 01Kiko, 1 Year ago, written in Lua.
Embed
Download Paste or View Raw
Hits: 245
  1. -- Create a function for the cheat menu
  2. function cheatMenu()
  3.     -- Create a table to store the cheats
  4.     local cheats = {
  5.         {name = "Infinite Health", func = function() game.Players.LocalPlayer.Character.Humanoid.Health = math.huge end},
  6.         {name = "Infinite Ammo", func = function() game.Players.LocalPlayer.Backpack.Ammo.Amount = math.huge end},
  7.         {name = "Fly", func = function() game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 100 end},
  8.         -- Add more cheats here
  9.     }
  10.  
  11.     -- Create a GUI for the cheat menu
  12.     local gui = Instance.new("ScreenGui")
  13.     gui.Parent = game.Players.LocalPlayer.PlayerGui
  14.  
  15.     local frame = Instance.new("Frame")
  16.     frame.Size = UDim2.new(0, 200, 0, 300)
  17.     frame.Position = UDim2.new(0, 10, 0, 10)
  18.     frame.BackgroundColor3 = Color3.new(0, 0, 0)
  19.     frame.Parent = gui
  20.  
  21.     local list = Instance.new("UIListLayout")
  22.     list.Parent = frame
  23.  
  24.     -- Create buttons for each cheat
  25.     for i, cheat in pairs(cheats) do
  26.         local button = Instance.new("TextButton")
  27.         button.Text = cheat.name
  28.         button.Size = UDim2.new(0, 200, 0, 30)
  29.         button.BackgroundColor3 = Color3.new(1, 1, 1)
  30.         button.Parent = frame
  31.  
  32.         -- Add a click event to the button
  33.         button.MouseButton1Click:Connect(function()
  34.             cheat.func()
  35.         end)
  36.     end
  37. end
  38.  
  39. -- Call the cheat menu function
  40. cheatMenu()