Advertisement
nick_exe_

AutoChat v1

Mar 19th, 2022
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.93 KB | None | 0 0
  1. -- Gui to Lua
  2. -- Version: 3.2
  3.  
  4. -- Instances:
  5.  
  6. local AutoChatV1 = Instance.new("ScreenGui")
  7. local MainFrame = Instance.new("Frame")
  8. local Round = Instance.new("UICorner")
  9. local Title = Instance.new("TextLabel")
  10. local MessageTitle = Instance.new("TextLabel")
  11. local MessageInput = Instance.new("TextBox")
  12. local Round_2 = Instance.new("UICorner")
  13. local KeybindTitle = Instance.new("TextLabel")
  14. local KeybindButton = Instance.new("TextButton")
  15. local Round_3 = Instance.new("UICorner")
  16. local KeybindValue = Instance.new("StringValue")
  17.  
  18. --Properties:
  19.  
  20. AutoChatV1.Name = "AutoChatV1"
  21. AutoChatV1.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  22. AutoChatV1.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  23.  
  24. MainFrame.Name = "MainFrame"
  25. MainFrame.Parent = AutoChatV1
  26. MainFrame.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  27. MainFrame.Position = UDim2.new(0.142185658, 0, 0.190305203, 0)
  28. MainFrame.Size = UDim2.new(0.714453578, 0, 0.617594242, 0)
  29.  
  30. Round.CornerRadius = UDim.new(0, 10)
  31. Round.Name = "Round"
  32. Round.Parent = MainFrame
  33.  
  34. Title.Name = "Title"
  35. Title.Parent = MainFrame
  36. Title.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  37. Title.BackgroundTransparency = 1.000
  38. Title.Size = UDim2.new(1, 0, 0.0901162773, 0)
  39. Title.Font = Enum.Font.GothamBold
  40. Title.Text = "AutoChat v1"
  41. Title.TextColor3 = Color3.fromRGB(255, 255, 255)
  42. Title.TextSize = 30.000
  43.  
  44. MessageTitle.Name = "MessageTitle"
  45. MessageTitle.Parent = MainFrame
  46. MessageTitle.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  47. MessageTitle.BackgroundTransparency = 1.000
  48. MessageTitle.Position = UDim2.new(0.0296052638, 0, 0.0901162773, 0)
  49. MessageTitle.Size = UDim2.new(0.328947365, 0, 0.0988372117, 0)
  50. MessageTitle.Font = Enum.Font.GothamSemibold
  51. MessageTitle.Text = "Message"
  52. MessageTitle.TextColor3 = Color3.fromRGB(255, 255, 255)
  53. MessageTitle.TextSize = 20.000
  54.  
  55. MessageInput.Name = "MessageInput"
  56. MessageInput.Parent = MessageTitle
  57. MessageInput.BackgroundColor3 = Color3.fromRGB(75, 75, 75)
  58. MessageInput.Position = UDim2.new(1.65499997, 0, 0, 0)
  59. MessageInput.Size = UDim2.new(1, 0, 1, 0)
  60. MessageInput.ClearTextOnFocus = false
  61. MessageInput.Font = Enum.Font.GothamSemibold
  62. MessageInput.PlaceholderText = "Enter your message here..."
  63. MessageInput.Text = ""
  64. MessageInput.TextColor3 = Color3.fromRGB(255, 255, 255)
  65. MessageInput.TextScaled = true
  66. MessageInput.TextSize = 20.000
  67. MessageInput.TextWrapped = true
  68.  
  69. Round_2.CornerRadius = UDim.new(0, 10)
  70. Round_2.Name = "Round"
  71. Round_2.Parent = MessageInput
  72.  
  73. KeybindTitle.Name = "KeybindTitle"
  74. KeybindTitle.Parent = MainFrame
  75. KeybindTitle.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  76. KeybindTitle.BackgroundTransparency = 1.000
  77. KeybindTitle.Position = UDim2.new(0.0296052638, 0, 0.209302321, 0)
  78. KeybindTitle.Size = UDim2.new(0.328947365, 0, 0.0988372117, 0)
  79. KeybindTitle.Font = Enum.Font.GothamSemibold
  80. KeybindTitle.Text = "Keybind"
  81. KeybindTitle.TextColor3 = Color3.fromRGB(255, 255, 255)
  82. KeybindTitle.TextSize = 20.000
  83.  
  84. KeybindButton.Name = "KeybindButton"
  85. KeybindButton.Parent = KeybindTitle
  86. KeybindButton.BackgroundColor3 = Color3.fromRGB(75, 75, 75)
  87. KeybindButton.Position = UDim2.new(1.65499997, 0, 0, 0)
  88. KeybindButton.Size = UDim2.new(1, 0, 1, 0)
  89. KeybindButton.AutoButtonColor = false
  90. KeybindButton.Font = Enum.Font.GothamSemibold
  91. KeybindButton.Text = "E"
  92. KeybindButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  93. KeybindButton.TextSize = 20.000
  94.  
  95. KeybindValue.Parent = MainFrame
  96. KeybindValue.Value = "E"
  97. KeybindValue.Name = "Keybind"
  98.  
  99. Round_3.CornerRadius = UDim.new(0, 10)
  100. Round_3.Name = "Round"
  101. Round_3.Parent = KeybindButton
  102.  
  103. -- Scripts:
  104.  
  105. local function PYVMTC_fake_script() -- KeybindButton.SetKeybind
  106.     local script = Instance.new('LocalScript', KeybindButton)
  107.  
  108.     local button = script.Parent
  109.    
  110.     local UIS = game:GetService("UserInputService")
  111.    
  112.     local waiting = false
  113.    
  114.     local keybind = script.Parent.Parent.Parent:WaitForChild("Keybind")
  115.    
  116.     button.MouseButton1Click:Connect(function()
  117.         if button.Text ~= "Press key to bind" and waiting == false then
  118.             button.Text = "Press key to bind"
  119.             waiting = true
  120.         end
  121.     end)
  122.    
  123.     UIS.InputBegan:Connect(function(key)
  124.         if waiting == false then
  125.             return
  126.         end
  127.        
  128.         local keycodeString = tostring(key.KeyCode)
  129.        
  130.         keybind.Value = string.sub(keycodeString, 14)
  131.        
  132.         waiting = false
  133.         button.Text = keybind.Value
  134.     end)
  135.    
  136. end
  137. coroutine.wrap(PYVMTC_fake_script)()
  138. local function VQMGFQ_fake_script() -- MainFrame.OnPress
  139.     local script = Instance.new('LocalScript', MainFrame)
  140.  
  141.     local keybind = script.Parent:WaitForChild("Keybind")
  142.     local message = script.Parent:WaitForChild("MessageTitle"):WaitForChild("MessageInput")
  143.    
  144.     local UIS = game:GetService("UserInputService")
  145.    
  146.     UIS.InputBegan:Connect(function(key)
  147.         if key.KeyCode == Enum.KeyCode[keybind.Value] then
  148.             game.ReplicatedStorage:WaitForChild("DefaultChatSystemChatEvents"):WaitForChild("SayMessageRequest"):FireServer(message.Text, 'All')
  149.         end
  150.     end)
  151.    
  152. end
  153. coroutine.wrap(VQMGFQ_fake_script)()
  154.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement