Advertisement
Freshbloodb

Untitled

Dec 1st, 2024 (edited)
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.49 KB | None | 0 0
  1. local Players = game:GetService("Players")
  2. local RunService = game:GetService("RunService")
  3.  
  4. local screenGui = Instance.new("ScreenGui")
  5. screenGui.Name = "UserInterface"
  6. screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  7. screenGui.ResetOnSpawn = false
  8.  
  9. local button = Instance.new("ImageButton")
  10. button.Name = "TriangleButton"
  11. button.Size = UDim2.new(0, 60, 0, 60)
  12. button.Position = UDim2.new(0, 10, 0.5, -30)
  13. button.BackgroundTransparency = 1
  14. button.Image = "rbxassetid://6035047377"
  15. button.ImageColor3 = Color3.fromRGB(100, 150, 255)
  16. button.Rotation = 0
  17. button.Parent = screenGui
  18.  
  19. local frame = Instance.new("Frame")
  20. frame.Name = "MainInterface"
  21. frame.Size = UDim2.new(0.3, 0, 0.5, 0)
  22. frame.Position = UDim2.new(0.05, -300, 0.25, 0)
  23. frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  24. frame.BorderSizePixel = 0
  25. frame.Parent = screenGui
  26.  
  27. local frameCorner = Instance.new("UICorner")
  28. frameCorner.CornerRadius = UDim.new(0, 10)
  29. frameCorner.Parent = frame
  30.  
  31. local usernameLabel = Instance.new("TextLabel")
  32. usernameLabel.Name = "UsernameLabel"
  33. usernameLabel.Size = UDim2.new(1, 0, 0.1, 0)
  34. usernameLabel.Position = UDim2.new(0, 0, 0, 0)
  35. usernameLabel.BackgroundTransparency = 1
  36. usernameLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
  37. usernameLabel.Text = "Usuario: " .. game.Players.LocalPlayer.Name
  38. usernameLabel.TextScaled = true
  39. usernameLabel.Font = Enum.Font.GothamBold
  40. usernameLabel.Parent = frame
  41.  
  42. local textLabel = Instance.new("TextLabel")
  43. textLabel.Name = "MainText"
  44. textLabel.Size = UDim2.new(1, 0, 0.1, 0)
  45. textLabel.Position = UDim2.new(0, 0, 0.1, 0)
  46. textLabel.BackgroundTransparency = 1
  47. textLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  48. textLabel.Text = "t6kla"
  49. textLabel.TextScaled = true
  50. textLabel.Font = Enum.Font.Gotham
  51. textLabel.Parent = frame
  52.  
  53. local scrollingFrame = Instance.new("ScrollingFrame")
  54. scrollingFrame.Name = "OptionsScroll"
  55. scrollingFrame.Size = UDim2.new(1, 0, 0.8, 0)
  56. scrollingFrame.Position = UDim2.new(0, 0, 0.2, 0)
  57. scrollingFrame.CanvasSize = UDim2.new(0, 0, 3, 0)
  58. scrollingFrame.ScrollBarThickness = 8
  59. scrollingFrame.BackgroundTransparency = 1
  60. scrollingFrame.Parent = frame
  61.  
  62. local function createCheckbox(parent, text, position, variable)
  63. local checkbox = Instance.new("TextButton")
  64. checkbox.Size = UDim2.new(1, -20, 0, 30)
  65. checkbox.Position = position
  66. checkbox.Text = text
  67. checkbox.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  68. checkbox.TextColor3 = Color3.fromRGB(255, 255, 255)
  69. checkbox.Font = Enum.Font.Gotham
  70. checkbox.TextScaled = true
  71. checkbox.Parent = parent
  72.  
  73. local isChecked = false
  74. checkbox.MouseButton1Click:Connect(function()
  75. isChecked = not isChecked
  76. checkbox.Text = (isChecked and "✔ " or "") .. text
  77. _G[variable] = isChecked
  78. end)
  79. end
  80.  
  81. local function createTextBox(parent, text, position, variable, defaultValue)
  82. local label = Instance.new("TextLabel")
  83. label.Size = UDim2.new(1, -20, 0, 20)
  84. label.Position = position
  85. label.Text = text
  86. label.BackgroundTransparency = 1
  87. label.TextColor3 = Color3.fromRGB(255, 255, 255)
  88. label.Font = Enum.Font.Gotham
  89. label.TextScaled = true
  90. label.Parent = parent
  91.  
  92. local textBox = Instance.new("TextBox")
  93. textBox.Size = UDim2.new(1, -20, 0, 30)
  94. textBox.Position = UDim2.new(0, 10, 0, position.Y.Offset + 25)
  95. textBox.Text = tostring(defaultValue)
  96. textBox.PlaceholderText = "Ingrese un valor..."
  97. textBox.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
  98. textBox.TextColor3 = Color3.fromRGB(255, 255, 255)
  99. textBox.Font = Enum.Font.Gotham
  100. textBox.TextScaled = true
  101. textBox.Parent = parent
  102.  
  103. textBox.FocusLost:Connect(function(enterPressed)
  104. if enterPressed then
  105. local value = tonumber(textBox.Text)
  106. if value then
  107. _G[variable] = value
  108. else
  109. textBox.Text = tostring(_G[variable])
  110. end
  111. end
  112. end)
  113. end
  114.  
  115. createCheckbox(scrollingFrame, "Cuadro Hit", UDim2.new(0, 10, 0, 0), "enablecuadrohit")
  116. createTextBox(scrollingFrame, "Ancho del Cuadro Hit", UDim2.new(0, 10, 0, 40), "Ancho", 6)
  117. createTextBox(scrollingFrame, "Altura del Cuadro Hit", UDim2.new(0, 10, 0, 100), "Altura", 10)
  118.  
  119. createCheckbox(scrollingFrame, "Perseguir Usuarios", UDim2.new(0, 10, 0, 160), "EnablePerseguirUsuario")
  120.  
  121. createCheckbox(scrollingFrame, "Teleport Users", UDim2.new(0, 10, 0, 200), "EnableTeleportUser")
  122. createTextBox(scrollingFrame, "Distancia de Teleport", UDim2.new(0, 10, 0, 240), "CHARACTER_TELEPORT_DISTANCE", 20)
  123. createTextBox(scrollingFrame, "Tiempo de Espera", UDim2.new(0, 10, 0, 300), "BOMB_TRANSFER_TIMEOUT", 0.5)
  124. createTextBox(scrollingFrame, "Tiempo entre Teleports", UDim2.new(0, 10, 0, 360), "RE_TELEPORT_DELAY", 10)
  125.  
  126. createCheckbox(scrollingFrame, "Escapar de Usuarios", UDim2.new(0, 10, 0, 420), "EnableEscaparDeUsuarios")
  127.  
  128. local isOpen = false
  129. button.MouseButton1Click:Connect(function()
  130. isOpen = not isOpen
  131. local targetPosition = isOpen and UDim2.new(0.05, 70, 0.25, 0) or UDim2.new(0.05, -300, 0.25, 0)
  132. local targetRotation = isOpen and 90 or 0
  133.  
  134. frame:TweenPosition(targetPosition, Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.5, true)
  135. button:TweenRotation(targetRotation, Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.5, true)
  136. end)
  137.  
  138. function button:TweenRotation(target, direction, style, time, override)
  139. local info = TweenInfo.new(time, style, direction)
  140. local goal = {Rotation = target}
  141. game:GetService("TweenService"):Create(self, info, goal):Play()
  142. end
  143.  
  144. game.Players.LocalPlayer.CharacterAdded:Connect(function()
  145. screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  146. end)
  147.  
  148. _G.enablecuadrohit = false
  149. _G.Ancho = 6
  150. _G.Altura = 10
  151. _G.EnablePerseguirUsuario = false
  152. _G.EnableTeleportUser = false
  153. _G.CHARACTER_TELEPORT_DISTANCE = 20
  154. _G.BOMB_TRANSFER_TIMEOUT = 0.5
  155. _G.RE_TELEPORT_DELAY = 10
  156. _G.EnableEscaparDeUsuarios = false
  157.  
  158. -- Cuadro Hit
  159. local boxes = {}
  160.  
  161. local function playerHasItems(player)
  162. local character = player.Character
  163. if not character then return false end
  164.  
  165. if character:FindFirstChildOfClass("Tool") then
  166. return true
  167. end
  168.  
  169. local backpack = player:FindFirstChildOfClass("Backpack")
  170. if backpack and #backpack:GetChildren() > 0 then
  171. return true
  172. end
  173.  
  174. return false
  175. end
  176.  
  177. local function updateBox(player)
  178. if not _G.enablecuadrohit then return end
  179. if player == Players.LocalPlayer then return end
  180.  
  181. local character = player.Character
  182. if not character then return end
  183.  
  184. if playerHasItems(player) then
  185. if not boxes[player] then
  186. local box = Instance.new("Part")
  187. box.Anchored = true
  188. box.CanCollide = false
  189. box.Transparency = 0.5
  190. box.Color = Color3.new(1, 0, 0)
  191. box.Size = Vector3.new(_G.Ancho, _G.Altura, 1)
  192. box.Parent = workspace
  193. boxes[player] = box
  194. end
  195.  
  196. local box = boxes[player]
  197. box.CFrame = character:WaitForChild("HumanoidRootPart").CFrame
  198. else
  199. if boxes[player] then
  200. boxes[player]:Destroy()
  201. boxes[player] = nil
  202. end
  203. end
  204. end
  205.  
  206. local function onPlayerAdded(player)
  207. if player ~= Players.LocalPlayer then
  208. player.CharacterAdded:Connect(function(character)
  209. character:WaitForChild("HumanoidRootPart")
  210. updateBox(player)
  211. end)
  212.  
  213. player.Backpack.ChildAdded:Connect(function()
  214. updateBox(player)
  215. end)
  216. player.Backpack.ChildRemoved:Connect(function()
  217. updateBox(player)
  218. end)
  219.  
  220. player.CharacterAdded:Connect(function(character)
  221. updateBox(player)
  222. character.ChildAdded:Connect(function(child)
  223. if child:IsA("Tool") then
  224. updateBox(player)
  225. end
  226. end)
  227. character.ChildRemoved:Connect(function(child)
  228. if child:IsA("Tool") then
  229. updateBox(player)
  230. end
  231. end)
  232. end)
  233. end
  234. end
  235.  
  236. for _, player in ipairs(Players:GetPlayers()) do
  237. onPlayerAdded(player)
  238. end
  239.  
  240. Players.PlayerAdded:Connect(onPlayerAdded)
  241.  
  242. Players.PlayerRemoving:Connect(function(player)
  243. if boxes[player] then
  244. boxes[player]:Destroy()
  245. boxes[player] = nil
  246. end
  247. end)
  248.  
  249. -- Perseguir Usuarios
  250. local localPlayer = Players.LocalPlayer
  251. local character = localPlayer.Character or localPlayer.CharacterAdded:Wait()
  252. local humanoid = character:WaitForChild("Humanoid")
  253. local rootPart = character:WaitForChild("HumanoidRootPart")
  254.  
  255. local function hasItem()
  256. if character:FindFirstChildOfClass("Tool") then
  257. return true
  258. end
  259.  
  260. local backpack = localPlayer:FindFirstChild("Backpack")
  261. if backpack and #backpack:GetChildren() > 0 then
  262. return true
  263. end
  264.  
  265. return false
  266. end
  267.  
  268. local function getClosestPlayer()
  269. local closestPlayer = nil
  270. local shortestDistance = math.huge
  271.  
  272. for _, player in ipairs(Players:GetPlayers()) do
  273. if player ~= localPlayer and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
  274. local playerHumanoid = player.Character:FindFirstChild("Humanoid")
  275.  
  276. if playerHumanoid and playerHumanoid.Health > 0 then
  277. local distance = (rootPart.Position - player.Character.HumanoidRootPart.Position).Magnitude
  278. if distance < shortestDistance then
  279. shortestDistance = distance
  280. closestPlayer = player
  281. end
  282. end
  283. end
  284. end
  285.  
  286. return closestPlayer
  287. end
  288.  
  289. local function moveToPlayer(targetPlayer)
  290. if not targetPlayer or not targetPlayer.Character then
  291. return
  292. end
  293.  
  294. local targetPosition = targetPlayer.Character.HumanoidRootPart.Position
  295. humanoid:MoveTo(targetPosition)
  296. end
  297.  
  298. -- Teleport Users
  299. local lastBombTransferTime = {}
  300. local lastTeleportTime = {}
  301.  
  302. local function CanTeleportToPlayer(player)
  303. local currentTime = tick()
  304. if lastTeleportTime[player.UserId] and currentTime - lastTeleportTime[player.UserId] < _G.RE_TELEPORT_DELAY then
  305. return false
  306. end
  307. return true
  308. end
  309.  
  310. local function TeleportToPlayer(targetPlayer)
  311. local Character = localPlayer.Character
  312. if not Character then return end
  313.  
  314. local HumanoidRootPart = Character:FindFirstChild("HumanoidRootPart")
  315. if not HumanoidRootPart then return end
  316.  
  317. local targetCharacter = targetPlayer.Character
  318. if not targetCharacter then return end
  319.  
  320. local targetRootPart = targetCharacter:FindFirstChild("HumanoidRootPart")
  321. if not targetRootPart then return end
  322.  
  323. local forwardPosition = targetRootPart.CFrame:PointToWorldSpace(Vector3.new(0, 0, -3))
  324. HumanoidRootPart.CFrame = CFrame.new(forwardPosition, targetRootPart.Position)
  325.  
  326. local RightHand = Character:FindFirstChild("RightHand") or Character:FindFirstChild("Right Arm")
  327. if RightHand then
  328. RightHand.CFrame = targetRootPart.CFrame * CFrame.new(-1, 0, 0)
  329. end
  330.  
  331. lastTeleportTime[targetPlayer.UserId] = tick()
  332. end
  333.  
  334. local function TeleportCharacterToClosestPlayer()
  335. local Character = localPlayer.Character
  336. if not Character then return end
  337.  
  338. local Bomb = Character:FindFirstChildOfClass("Tool")
  339. if not Bomb or Bomb.Name ~= "Bomb" then return end
  340.  
  341. local closestPlayer, closestDistance = getClosestPlayer()
  342. if not closestPlayer or closestDistance > _G.CHARACTER_TELEPORT_DISTANCE then return end
  343.  
  344. if not CanTeleportToPlayer(closestPlayer) then return end
  345.  
  346. local currentTime = tick()
  347.  
  348. if lastBombTransferTime[closestPlayer.UserId] and currentTime - lastBombTransferTime[closestPlayer.UserId] > _G.BOMB_TRANSFER_TIMEOUT then
  349. print("Teletransportación cancelada: No se pasó la bomba a", closestPlayer.Name)
  350. lastTeleportTime[closestPlayer.UserId] = currentTime
  351. return
  352. end
  353.  
  354. TeleportToPlayer(closestPlayer)
  355.  
  356. if Bomb:FindFirstChild("Handle") then
  357. Bomb.Handle.CFrame = closestPlayer.Character.HumanoidRootPart.CFrame
  358. lastBombTransferTime[closestPlayer.UserId] = currentTime
  359. print("Bomba pasada a:", closestPlayer.Name)
  360. end
  361. end
  362.  
  363. -- Escapar de Usuarios
  364. local function EscaparDeUsuarios()
  365. if not _G.EnableEscaparDeUsuarios then return end
  366.  
  367. local character = localPlayer.Character
  368. if not character then return end
  369.  
  370. local humanoid = character:FindFirstChild("Humanoid")
  371. if not humanoid then return end
  372.  
  373. local rootPart = character:FindFirstChild("HumanoidRootPart")
  374. if not rootPart then return end
  375.  
  376. local closestPlayer = getClosestPlayer()
  377. if not closestPlayer then return end
  378.  
  379. local closestCharacter = closestPlayer.Character
  380. if not closestCharacter then return end
  381.  
  382. local closestRootPart = closestCharacter:FindFirstChild("HumanoidRootPart")
  383. if not closestRootPart then return end
  384.  
  385. local direction = (rootPart.Position - closestRootPart.Position).Unit
  386. local targetPosition = rootPart.Position + direction * 10
  387.  
  388. local raycastParams = RaycastParams.new()
  389. raycastParams.FilterDescendantsInstances = {character}
  390. raycastParams.FilterType = Enum.RaycastFilterType.Blacklist
  391.  
  392. local raycastResult = workspace:Raycast(rootPart.Position, direction * 10, raycastParams)
  393. if raycastResult then
  394. targetPosition = raycastResult.Position - direction * 2
  395. end
  396.  
  397. humanoid:MoveTo(targetPosition)
  398. end
  399.  
  400. RunService.Heartbeat:Connect(function()
  401. for player, box in pairs(boxes) do
  402. if player.Character then
  403. local humanoidRootPart = player.Character:FindFirstChild("HumanoidRootPart")
  404. if humanoidRootPart then
  405. box.CFrame = humanoidRootPart.CFrame
  406. box.Size = Vector3.new(_G.Ancho, _G.Altura, 1)
  407. end
  408. end
  409. end
  410.  
  411. if _G.EnablePerseguirUsuario and hasItem() then
  412. local closestPlayer = getClosestPlayer()
  413. if closestPlayer then
  414. moveToPlayer(closestPlayer)
  415. end
  416. end
  417.  
  418. if _G.EnableTeleportUser then
  419. TeleportCharacterToClosestPlayer()
  420. end
  421.  
  422. EscaparDeUsuarios()
  423. end)
  424.  
  425. localPlayer.CharacterAdded:Connect(function(newCharacter)
  426. character = newCharacter
  427. humanoid = newCharacter:WaitForChild("Humanoid")
  428. rootPart = newCharacter:WaitForChild("HumanoidRootPart")
  429. end)
  430.  
  431.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement