imaRapguy

Untitled

Sep 13th, 2024
13
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.25 KB | None | 0 0
  1. -- Services
  2. local Players = game:GetService("Players")
  3. local RunService = game:GetService("RunService")
  4. local LocalPlayer = Players.LocalPlayer
  5.  
  6. -- Toggles
  7. local espEnabled = false
  8. local nameEspEnabled = false
  9. local crosshairEnabled = false
  10.  
  11. -- Create the GUI
  12. local screenGui = Instance.new("ScreenGui")
  13. screenGui.Name = "SimpleFeatures_GUI"
  14. screenGui.Parent = LocalPlayer:WaitForChild("PlayerGui")
  15. screenGui.ResetOnSpawn = false -- Ensures the GUI doesn't disappear when the player respawns
  16.  
  17. -- Main frame for the GUI
  18. local mainFrame = Instance.new("Frame")
  19. mainFrame.Size = UDim2.new(0, 200, 0, 300)
  20. mainFrame.Position = UDim2.new(0.1, 0, 0.1, 0)
  21. mainFrame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  22. mainFrame.BorderSizePixel = 0
  23. mainFrame.Parent = screenGui
  24.  
  25. -- Title Label
  26. local title = Instance.new("TextLabel")
  27. title.Size = UDim2.new(1, 0, 0, 40)
  28. title.BackgroundTransparency = 1
  29. title.Text = "Simple Features"
  30. title.TextColor3 = Color3.fromRGB(255, 255, 255)
  31. title.Font = Enum.Font.SourceSansBold
  32. title.TextSize = 22
  33. title.Parent = mainFrame
  34.  
  35. -- Toggle ESP Button
  36. local toggleESPButton = Instance.new("TextButton")
  37. toggleESPButton.Size = UDim2.new(1, 0, 0, 40)
  38. toggleESPButton.Position = UDim2.new(0, 0, 0, 50)
  39. toggleESPButton.Text = "Toggle ESP"
  40. toggleESPButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  41. toggleESPButton.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  42. toggleESPButton.Font = Enum.Font.SourceSans
  43. toggleESPButton.TextSize = 18
  44. toggleESPButton.Parent = mainFrame
  45.  
  46. -- Toggle Name ESP Button
  47. local toggleNameESPButton = Instance.new("TextButton")
  48. toggleNameESPButton.Size = UDim2.new(1, 0, 0, 40)
  49. toggleNameESPButton.Position = UDim2.new(0, 0, 0, 100)
  50. toggleNameESPButton.Text = "Toggle Name ESP"
  51. toggleNameESPButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  52. toggleNameESPButton.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  53. toggleNameESPButton.Font = Enum.Font.SourceSans
  54. toggleNameESPButton.TextSize = 18
  55. toggleNameESPButton.Parent = mainFrame
  56.  
  57. -- Toggle Crosshair Button
  58. local toggleCrosshairButton = Instance.new("TextButton")
  59. toggleCrosshairButton.Size = UDim2.new(1, 0, 0, 40)
  60. toggleCrosshairButton.Position = UDim2.new(0, 0, 0, 150)
  61. toggleCrosshairButton.Text = "Toggle Crosshair"
  62. toggleCrosshairButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  63. toggleCrosshairButton.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  64. toggleCrosshairButton.Font = Enum.Font.SourceSans
  65. toggleCrosshairButton.TextSize = 18
  66. toggleCrosshairButton.Parent = mainFrame
  67.  
  68. -- Close Button
  69. local closeButton = Instance.new("TextButton")
  70. closeButton.Size = UDim2.new(0, 40, 0, 40)
  71. closeButton.Position = UDim2.new(1, -50, 0, 10)
  72. closeButton.Text = "X"
  73. closeButton.TextColor3 = Color3.fromRGB(255, 0, 0)
  74. closeButton.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  75. closeButton.Font = Enum.Font.SourceSans
  76. closeButton.TextSize = 18
  77. closeButton.Parent = mainFrame
  78.  
  79. -- Crosshair elements
  80. local crosshairVertical = Instance.new("Frame")
  81. crosshairVertical.Size = UDim2.new(0, 2, 0, 20) -- Thin vertical line
  82. crosshairVertical.Position = UDim2.new(0.5, -1, 0.5, -10)
  83. crosshairVertical.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  84. crosshairVertical.Visible = false
  85. crosshairVertical.Parent = screenGui
  86.  
  87. local crosshairHorizontal = Instance.new("Frame")
  88. crosshairHorizontal.Size = UDim2.new(0, 20, 0, 2) -- Thin horizontal line
  89. crosshairHorizontal.Position = UDim2.new(0.5, -10, 0.5, -1)
  90. crosshairHorizontal.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  91. crosshairHorizontal.Visible = false
  92. crosshairHorizontal.Parent = screenGui
  93.  
  94. -- Functions for toggling ESP, Name ESP, and Crosshair
  95. local function toggleESP()
  96. espEnabled = not espEnabled
  97. if espEnabled then
  98. toggleESPButton.Text = "ESP: ON"
  99. toggleESPButton.BackgroundColor3 = Color3.fromRGB(0, 255, 0)
  100. print("ESP Enabled")
  101.  
  102. -- ESP Logic
  103. for _, player in pairs(Players:GetPlayers()) do
  104. if player ~= LocalPlayer then
  105. local highlight = Instance.new("Highlight")
  106. highlight.FillColor = Color3.fromRGB(255, 0, 0)
  107. highlight.OutlineColor = Color3.fromRGB(255, 255, 255)
  108. highlight.Parent = player.Character
  109. end
  110. end
  111. else
  112. toggleESPButton.Text = "ESP: OFF"
  113. toggleESPButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
  114. print("ESP Disabled")
  115.  
  116. -- Disable ESP
  117. for _, player in pairs(Players:GetPlayers()) do
  118. if player ~= LocalPlayer and player.Character then
  119. for _, v in pairs(player.Character:GetChildren()) do
  120. if v:IsA("Highlight") then
  121. v:Destroy()
  122. end
  123. end
  124. end
  125. end
  126. end
  127. end
  128.  
  129. local function toggleNameESP()
  130. nameEspEnabled = not nameEspEnabled
  131. if nameEspEnabled then
  132. toggleNameESPButton.Text = "Name ESP: ON"
  133. toggleNameESPButton.BackgroundColor3 = Color3.fromRGB(0, 255, 0)
  134. print("Name ESP Enabled")
  135.  
  136. -- Name ESP Logic
  137. for _, player in pairs(Players:GetPlayers()) do
  138. if player ~= LocalPlayer and player.Character and player.Character:FindFirstChild("Head") then
  139. local nameTag = Instance.new("BillboardGui", player.Character.Head)
  140. nameTag.Name = "NameTag"
  141. nameTag.Size = UDim2.new(0, 100, 0, 40)
  142. nameTag.AlwaysOnTop = true
  143.  
  144. local nameLabel = Instance.new("TextLabel", nameTag)
  145. nameLabel.Size = UDim2.new(1, 0, 1, 0)
  146. nameLabel.Text = player.Name
  147. nameLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  148. nameLabel.BackgroundTransparency = 1
  149. end
  150. end
  151. else
  152. toggleNameESPButton.Text = "Name ESP: OFF"
  153. toggleNameESPButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
  154. print("Name ESP Disabled")
  155.  
  156. -- Disable Name ESP
  157. for _, player in pairs(Players:GetPlayers()) do
  158. if player.Character and player.Character:FindFirstChild("Head") then
  159. local nameTag = player.Character.Head:FindFirstChild("NameTag")
  160. if nameTag then
  161. nameTag:Destroy()
  162. end
  163. end
  164. end
  165. end
  166. end
  167.  
  168. local function toggleCrosshair()
  169. crosshairEnabled = not crosshairEnabled
  170. if crosshairEnabled then
  171. toggleCrosshairButton.Text = "Crosshair: ON"
  172. toggleCrosshairButton.BackgroundColor3 = Color3.fromRGB(0, 255, 0)
  173. crosshairVertical.Visible = true
  174. crosshairHorizontal.Visible = true
  175. print("Crosshair Enabled")
  176. else
  177. toggleCrosshairButton.Text = "Crosshair: OFF"
  178. toggleCrosshairButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
  179. crosshairVertical.Visible = false
  180. crosshairHorizontal.Visible = false
  181. print("Crosshair Disabled")
  182. end
  183. end
  184.  
  185. -- Button Connections
  186. toggleESPButton.MouseButton1Click:Connect(toggleESP)
  187. toggleNameESPButton.MouseButton1Click:Connect(toggleNameESP)
  188. toggleCrosshairButton.MouseButton1Click:Connect(toggleCrosshair)
  189.  
  190. -- Close the GUI when the close button is pressed
  191. closeButton.MouseButton1Click:Connect(function()
  192. mainFrame.Visible = not mainFrame.Visible
  193. end)
  194.  
Advertisement
Add Comment
Please, Sign In to add comment