Lucasluz

IA ESTUDIO GL

Oct 5th, 2024
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.12 KB | None | 0 0
  1. -- Script do Bot
  2.  
  3. local player = game.Players.LocalPlayer
  4.  
  5. -- Perguntas e respostas sobre o script
  6. local botResponses = {
  7.     ["Como ativar o teleporte?"] = "Para ativar o teleporte, clique no botão correspondente na interface.",
  8.     ["Como ativar o ESP?"] = "Clique no botão 'Ativar ESP' na interface para visualizar os outros jogadores.",
  9.     ["Como desativar o ESP?"] = "Clique no botão 'Desativar ESP' para ocultar os jogadores.",
  10.     ["Quem desenvolveu este script?"] = "Este script foi desenvolvido por GL.",
  11.     ["Como voltar para a posição original?"] = "Utilize o botão 'Voltar à Posição' na interface.",
  12.     ["Como fechar a interface?"] = "Clique no botão 'X' no canto superior direito para fechar a interface.",
  13. }
  14.  
  15. -- Função para criar a interface do bot
  16. local function createBotUI()
  17.     local botGui = Instance.new("ScreenGui")
  18.     local botFrame = Instance.new("Frame")
  19.     local questionLabel = Instance.new("TextLabel")
  20.     local responseLabel = Instance.new("TextLabel")
  21.     local questionInput = Instance.new("TextBox")
  22.     local askButton = Instance.new("TextButton")
  23.  
  24.     -- Configuração da UI
  25.     botGui.Parent = player:WaitForChild("PlayerGui")
  26.     botFrame.Parent = botGui
  27.     botFrame.Size = UDim2.new(0, 300, 0, 200)
  28.     botFrame.Position = UDim2.new(0.5, -150, 0.5, -100)
  29.     botFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  30.     botFrame.Active = true
  31.     botFrame.Draggable = true
  32.  
  33.     questionLabel.Parent = botFrame
  34.     questionLabel.Size = UDim2.new(1, 0, 0, 30)
  35.     questionLabel.Text = "Pergunte ao bot:"
  36.     questionLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  37.     questionLabel.BackgroundTransparency = 1
  38.     questionLabel.TextScaled = true
  39.  
  40.     questionInput.Parent = botFrame
  41.     questionInput.Size = UDim2.new(1, 0, 0, 40)
  42.     questionInput.Position = UDim2.new(0, 0, 0, 30)
  43.     questionInput.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  44.     questionInput.PlaceholderText = "Digite sua pergunta..."
  45.  
  46.     askButton.Parent = botFrame
  47.     askButton.Size = UDim2.new(1, 0, 0, 40)
  48.     askButton.Position = UDim2.new(0, 0, 0, 70)
  49.     askButton.Text = "Perguntar"
  50.     askButton.BackgroundColor3 = Color3.fromRGB(0, 170, 0)
  51.  
  52.     responseLabel.Parent = botFrame
  53.     responseLabel.Size = UDim2.new(1, 0, 0, 80)
  54.     responseLabel.Position = UDim2.new(0, 0, 0, 120)
  55.     responseLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  56.     responseLabel.BackgroundTransparency = 1
  57.     responseLabel.TextScaled = true
  58.     responseLabel.TextWrapped = true
  59.  
  60.     -- Função para responder perguntas
  61.     local function respondToQuestion()
  62.         local question = questionInput.Text
  63.         local response = botResponses[question] or "Desculpe, não entendi a pergunta."
  64.         responseLabel.Text = response
  65.     end
  66.  
  67.     -- Conectar o botão de perguntar à função de resposta
  68.     askButton.MouseButton1Click:Connect(respondToQuestion)
  69.  
  70.     -- Limpar o campo de entrada após perguntar
  71.     questionInput.FocusLost:Connect(function(enterPressed)
  72.         if enterPressed then
  73.             questionInput.Text = ""
  74.         end
  75.     end)
  76. end
  77.  
  78. -- Criar a interface do bot
  79. createBotUI()
Tags: IA GL
Advertisement
Add Comment
Please, Sign In to add comment