Advertisement
Cashyxxjj

Tsb autoblock/lock on

Sep 9th, 2024
399
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.75 KB | None | 0 0
  1. --[[
  2. WARNING: Heads up! This script has not been verified by ScriptBlox. Use at your own risk!
  3. ]]
  4. -- Create the GUI
  5. local screenGui = Instance.new("ScreenGui")
  6. screenGui.Name = "AutoBlockGui"
  7. screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  8. screenGui.ResetOnSpawn = false -- Ensure the GUI doesn't reset on player respawn
  9.  
  10. -- Create the main frame
  11. local mainFrame = Instance.new("Frame")
  12. mainFrame.Size = UDim2.new(0, 250, 0, 180)
  13. mainFrame.Position = UDim2.new(0, -260, 0.5, -90) -- Start off-screen on the left
  14. mainFrame.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
  15. mainFrame.BorderSizePixel = 0
  16. mainFrame.BackgroundTransparency = 1 -- Start invisible
  17. mainFrame.Parent = screenGui
  18.  
  19. -- Add UI Corner for rounded edges
  20. local uiCorner = Instance.new("UICorner")
  21. uiCorner.CornerRadius = UDim.new(0, 15)
  22. uiCorner.Parent = mainFrame
  23.  
  24. -- Add UI Gradient for a fancy look
  25. local uiGradient = Instance.new("UIGradient")
  26. uiGradient.Color = ColorSequence.new{
  27. ColorSequenceKeypoint.new(0, Color3.fromRGB(70, 130, 180)),
  28. ColorSequenceKeypoint.new(1, Color3.fromRGB(0, 0, 128))
  29. }
  30. uiGradient.Rotation = 45
  31. uiGradient.Parent = mainFrame
  32.  
  33. -- Create the rainbow outline
  34. local uiStroke = Instance.new("UIStroke")
  35. uiStroke.Color = Color3.fromRGB(255, 0, 0) -- Initial color for the rainbow effect
  36. uiStroke.Thickness = 4
  37. uiStroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
  38. uiStroke.Parent = mainFrame
  39.  
  40. -- Create a table of rainbow colors
  41. local rainbowColors = {
  42. Color3.fromRGB(255, 0, 0),
  43. Color3.fromRGB(255, 127, 0),
  44. Color3.fromRGB(255, 255, 0),
  45. Color3.fromRGB(0, 255, 0),
  46. Color3.fromRGB(0, 0, 255),
  47. Color3.fromRGB(75, 0, 130),
  48. Color3.fromRGB(148, 0, 211)
  49. }
  50.  
  51. -- Function to animate the rainbow outline
  52. local function animateOutline()
  53. local index = 1
  54. while true do
  55. uiStroke.Color = rainbowColors[index]
  56. index = index % #rainbowColors + 1
  57. wait(0.1) -- Adjust as needed for animation speed
  58. end
  59. end
  60.  
  61. -- Start the rainbow outline animation
  62. spawn(animateOutline)
  63.  
  64. -- Add a title to the frame
  65. local titleLabel = Instance.new("TextLabel")
  66. titleLabel.Size = UDim2.new(1, -20, 0, 30)
  67. titleLabel.Position = UDim2.new(0, 10, 0, 10)
  68. titleLabel.Text = "Auto Block"
  69. titleLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  70. titleLabel.TextScaled = true
  71. titleLabel.BackgroundTransparency = 1
  72. titleLabel.Font = Enum.Font.GothamBold
  73. titleLabel.Parent = mainFrame
  74.  
  75. -- Create the Enable/Disable button
  76. local toggleButton = Instance.new("TextButton")
  77. toggleButton.Size = UDim2.new(0.8, -10, 0.2, -10)
  78. toggleButton.Position = UDim2.new(0.1, 5, 0.35, 5)
  79. toggleButton.Text = "Enable"
  80. toggleButton.BackgroundColor3 = Color3.fromRGB(0, 200, 0)
  81. toggleButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  82. toggleButton.BorderSizePixel = 0
  83. toggleButton.Font = Enum.Font.GothamBold
  84. toggleButton.TextScaled = true
  85. toggleButton.Parent = mainFrame
  86.  
  87. -- Add UI Corner to toggle button
  88. local toggleButtonUICorner = Instance.new("UICorner")
  89. toggleButtonUICorner.CornerRadius = UDim.new(0, 10)
  90. toggleButtonUICorner.Parent = toggleButton
  91.  
  92. -- Create the AIMBOT button
  93. local aimbotButton = Instance.new("TextButton")
  94. aimbotButton.Size = UDim2.new(0.8, -10, 0.2, -10)
  95. aimbotButton.Position = UDim2.new(0.1, 5, 0.6, 5)
  96. aimbotButton.Text = "AIMBOT"
  97. aimbotButton.BackgroundColor3 = Color3.fromRGB(0, 0, 200)
  98. aimbotButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  99. aimbotButton.BorderSizePixel = 0
  100. aimbotButton.Font = Enum.Font.GothamBold
  101. aimbotButton.TextScaled = true
  102. aimbotButton.Parent = mainFrame
  103.  
  104. -- Add UI Corner to AIMBOT button
  105. local aimbotButtonUICorner = Instance.new("UICorner")
  106. aimbotButtonUICorner.CornerRadius = UDim.new(0, 10)
  107. aimbotButtonUICorner.Parent = aimbotButton
  108.  
  109. -- Create a footer label
  110. local footerLabel = Instance.new("TextLabel")
  111. footerLabel.Size = UDim2.new(1, -20, 0, 30)
  112. footerLabel.Position = UDim2.new(0, 10, 1, -40)
  113. footerLabel.Text = "Made by PlayerExploits"
  114. footerLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  115. footerLabel.TextScaled = true
  116. footerLabel.BackgroundTransparency = 1
  117. footerLabel.Font = Enum.Font.GothamBold
  118. footerLabel.Parent = mainFrame
  119.  
  120. -- Boolean to track if auto-block is enabled
  121. local autoBlockEnabled = false
  122.  
  123. -- Function to toggle auto-block
  124. local function toggleAutoBlock()
  125. autoBlockEnabled = not autoBlockEnabled
  126. if autoBlockEnabled then
  127. toggleButton.Text = "Disable"
  128. toggleButton.BackgroundColor3 = Color3.fromRGB(200, 0, 0)
  129.  
  130. -- Start the auto-block logic
  131. while autoBlockEnabled do
  132. wait(0.1) -- Adjust as needed
  133. local player = game.Players.LocalPlayer
  134. if player and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
  135. local closestPlayer = nil
  136. local shortestDistance = 20 -- Increased distance for dashing players
  137.  
  138. for _, otherPlayer in pairs(game.Players:GetPlayers()) do
  139. if otherPlayer ~= player and otherPlayer.Character and otherPlayer.Character:FindFirstChild("HumanoidRootPart") then
  140. local otherPlayerRootPart = otherPlayer.Character.HumanoidRootPart
  141. local distance = (player.Character.HumanoidRootPart.Position - otherPlayerRootPart.Position).magnitude
  142. if distance < shortestDistance then
  143. closestPlayer = otherPlayer
  144. shortestDistance = distance
  145. end
  146. end
  147. end
  148.  
  149. if closestPlayer then
  150. -- Key Press
  151. local args = {
  152. [1] = {
  153. ["Goal"] = "KeyPress",
  154. ["Key"] = Enum.KeyCode.F
  155. }
  156. }
  157. pcall(function()
  158. game:GetService("Players").LocalPlayer.Character.Communicate:FireServer(unpack(args))
  159. end)
  160. else
  161. -- Key Release
  162. local args = {
  163. [1] = {
  164. ["Goal"] = "KeyRelease",
  165. ["Key"] = Enum.KeyCode.F
  166. }
  167. }
  168. pcall(function()
  169. game:GetService("Players").LocalPlayer.Character.Communicate:FireServer(unpack(args))
  170. end)
  171. end
  172. end
  173. end
  174. else
  175. toggleButton.Text = "Enable"
  176. toggleButton.BackgroundColor3 = Color3.fromRGB(0, 200, 0)
  177. -- Stop the auto-block logic
  178. local args = {
  179. [1] = {
  180. ["Goal"] = "KeyRelease",
  181. ["Key"] = Enum.KeyCode.F
  182. }
  183. }
  184. pcall(function()
  185. game:GetService("Players").LocalPlayer.Character.Communicate:FireServer(unpack(args))
  186. end)
  187. end
  188. end
  189.  
  190. -- Function to run the AIMBOT script
  191. local function runAimbot()
  192. loadstring(game:HttpGet("https://rawscripts.net/raw/Universal-Script-Best-aimbot-script-17026"))()
  193. end
  194.  
  195. -- Function to animate the GUI
  196. local function animateGui()
  197. -- Scale the GUI from 0 to 1
  198. mainFrame.Size = UDim2.new(0, 0, 0, 0) -- Start with zero size
  199. mainFrame.BackgroundTransparency = 1 -- Start fully transparent
  200.  
  201. -- Tween to grow the GUI to full size
  202. mainFrame:TweenSize(
  203. UDim2.new(0, 250, 0, 180), -- Final size
  204. Enum.EasingDirection.Out,
  205. Enum.EasingStyle.Quad,
  206. 0.5, -- Duration
  207. true
  208. )
  209.  
  210. -- Tween to fade in the GUI
  211. mainFrame:TweenPosition(
  212. UDim2.new(0, 10, 0.5, -90), -- Final position on the left side
  213. Enum.EasingDirection.Out,
  214. Enum.EasingStyle.Quad,
  215. 0.5, -- Duration
  216. true
  217. )
  218.  
  219. wait(0.1) -- Slight delay to allow the size to adjust before transparency
  220.  
  221. -- Tween to make the GUI fully visible
  222. mainFrame:TweenSizeAndPosition(
  223. UDim2.new(0, 250, 0, 180), -- Final size
  224. UDim2.new(0.5, -125, 0.5, -90), -- Centered position
  225. Enum.EasingDirection.Out,
  226. Enum.EasingStyle.Quad,
  227. 0.5, -- Duration
  228. true
  229. )
  230. end
  231.  
  232. -- Function to handle the small button toggle
  233. local function toggleMainFrameVisibility()
  234. if mainFrame.Visible then
  235. mainFrame.Visible = false
  236. smallButton.Text = "Show"
  237. else
  238. mainFrame.Visible = true
  239. smallButton.Text = "Hide"
  240. end
  241. end
  242.  
  243. -- Call the animation function to show the GUI initially
  244. animateGui()
  245.  
  246. -- Connect the buttons to their functions
  247. toggleButton.MouseButton1Click:Connect(toggleAutoBlock)
  248. aimbotButton.MouseButton1Click:Connect(runAimbot)
  249.  
  250. -- Create the toggle button
  251. local toggleButton = Instance.new("TextButton")
  252. toggleButton.Size = UDim2.new(0, 50, 0, 50) -- Size of the button
  253. toggleButton.Position = UDim2.new(0, 10, 0, 10) -- Top-left corner position
  254. toggleButton.Text = "Hide" -- Initial text
  255. toggleButton.BackgroundColor3 = Color3.fromRGB(0, 0, 0) -- Black color
  256. toggleButton.TextColor3 = Color3.fromRGB(255, 255, 255) -- White text color
  257. toggleButton.BorderSizePixel = 0
  258. toggleButton.Font = Enum.Font.GothamBold
  259. toggleButton.TextScaled = true
  260. toggleButton.Parent = screenGui
  261.  
  262. -- Add UI Corner to the toggle button
  263. local toggleButtonUICorner = Instance.new("UICorner")
  264. toggleButtonUICorner.CornerRadius = UDim.new(0, 10)
  265. toggleButtonUICorner.Parent = toggleButton
  266.  
  267. -- Create a rainbow outline
  268. local uiStroke = Instance.new("UIStroke")
  269. uiStroke.Color = Color3.fromRGB(255, 0, 0) -- Initial color for the rainbow effect
  270. uiStroke.Thickness = 4
  271. uiStroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
  272. uiStroke.Parent = toggleButton
  273.  
  274. -- Create a table of rainbow colors
  275. local rainbowColors = {
  276. Color3.fromRGB(255, 0, 0),
  277. Color3.fromRGB(255, 127, 0),
  278. Color3.fromRGB(255, 255, 0),
  279. Color3.fromRGB(0, 255, 0),
  280. Color3.fromRGB(0, 0, 255),
  281. Color3.fromRGB(75, 0, 130),
  282. Color3.fromRGB(148, 0, 211)
  283. }
  284.  
  285. -- Function to animate the rainbow outline
  286. local function animateOutline()
  287. local index = 1
  288. while true do
  289. uiStroke.Color = rainbowColors[index]
  290. index = index % #rainbowColors + 1
  291. wait(0.1) -- Adjust as needed for animation speed
  292. end
  293. end
  294.  
  295. -- Start the rainbow outline animation
  296. spawn(animateOutline)
  297.  
  298. -- Function to toggle the visibility of the main frame and button text
  299. local function toggleMainFrame()
  300. if mainFrame.Visible then
  301. mainFrame.Visible = false
  302. toggleButton.Text = "Show"
  303. else
  304. mainFrame.Visible = true
  305. toggleButton.Text = "Hide"
  306. end
  307. end
  308.  
  309. -- Connect the toggle button to the function
  310. toggleButton.MouseButton1Click:Connect(toggleMainFrame)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement