Advertisement
xFLCN

EBG

Apr 30th, 2025 (edited)
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.27 KB | None | 0 0
  1. -- ANTI AFK
  2.  
  3. local Players = game:GetService("Players")
  4.  
  5. -- Function to keep the player active
  6. local function keepPlayerActive(player)
  7. -- This will keep simulating a small action for the player to avoid being kicked
  8. while player.Parent do
  9. -- Move the player's character slightly
  10. if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
  11. local humanoidRootPart = player.Character.HumanoidRootPart
  12. humanoidRootPart.CFrame = humanoidRootPart.CFrame * CFrame.new(0, 0, 0.1)
  13. end
  14. wait(60) -- Wait 1 minute before doing this again
  15. end
  16. end
  17.  
  18. -- Monitor player joins and add the keep-alive function
  19. Players.PlayerAdded:Connect(function(player)
  20. -- Start the anti-AFK script when the player joins
  21. player.CharacterAdded:Connect(function()
  22. keepPlayerActive(player)
  23. end)
  24. end)
  25.  
  26. game:GetService("StarterGui"):SetCore("SendNotification",{
  27. Title = "ANTI AFK ENABLED", -- Required
  28. Text = "You will no longer disconnect after 20 minutes of inactivity.", -- Required
  29. })
  30.  
  31.  
  32. -- MAIN SCRIPT
  33.  
  34. local TweenService = game:GetService("TweenService")
  35. local player = game.Players.LocalPlayer
  36.  
  37. local gui = Instance.new("ScreenGui")
  38. gui.Name = "TeleportGUI"
  39. gui.ResetOnSpawn = false
  40. gui.Parent = player:WaitForChild("PlayerGui")
  41.  
  42. local frame = Instance.new("Frame")
  43. frame.Name = "MainFrame"
  44. frame.Size = UDim2.new(0, 200, 0, 240) -- Adjusted size to fit the new button
  45. frame.Position = UDim2.new(0, 50, 0, 50)
  46. frame.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
  47. frame.Active = true
  48. frame.Draggable = true
  49. frame.Parent = gui
  50. Instance.new("UICorner", frame).CornerRadius = UDim.new(0, 12)
  51.  
  52. local cframes = {
  53. [1] = CFrame.new(-1562.00183, 52.1, 687.801941, 0.499959469, 0, 0.866048813, 0, 1, 0, -0.866048813, 0, 0.499959469),
  54. [2] = CFrame.new(-665.723938, 54.3, 346.687653, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  55. [3] = CFrame.new(-271.784058, 46, 902.394226, -0.0871315002, 0, 0.996196866, 0, 1, 0, -0.996196866, 0, -0.0871315002),
  56. [4] = CFrame.new(-666.78064, 69, 1476.56531, 0.965929627, 0, 0.258804798, 0, 1, 0, -0.258804798, 0, 0.965929627),
  57. }
  58.  
  59. local spawnButtons = {}
  60. local teleporting = nil
  61. local bodyPosition, bodyGyro = nil, nil
  62. local currentCharacter = nil
  63. local minimized = false
  64.  
  65. -- Title
  66. local title = Instance.new("TextLabel")
  67. title.Size = UDim2.new(1, -40, 0, 30)
  68. title.Position = UDim2.new(0, 0, 0, 0)
  69. title.Text = "CARANZO HUB"
  70. title.TextColor3 = Color3.fromRGB(255, 255, 255)
  71. title.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
  72. title.TextSize = 16
  73. title.Font = Enum.Font.SourceSansBold
  74. title.Parent = frame
  75. Instance.new("UICorner", title).CornerRadius = UDim.new(0, 8)
  76.  
  77. -- Rainbow color change effect
  78. local function setRainbowColor()
  79. local hue = 0
  80. while true do
  81. title.TextColor3 = Color3.fromHSV(hue, 1, 1)
  82. hue = hue + 0.01
  83. if hue > 1 then
  84. hue = 0
  85. end
  86. wait(0.05)
  87. end
  88. end
  89.  
  90. spawn(function() setRainbowColor() end)
  91.  
  92. -- Minimize button
  93. local minimizeButton = Instance.new("TextButton")
  94. minimizeButton.Size = UDim2.new(0, 40, 0, 30)
  95. minimizeButton.Position = UDim2.new(1, -40, 0, 0)
  96. minimizeButton.Text = "-"
  97. minimizeButton.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
  98. minimizeButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  99. minimizeButton.TextSize = 16
  100. minimizeButton.Font = Enum.Font.SourceSansBold
  101. minimizeButton.Parent = frame
  102. Instance.new("UICorner", minimizeButton).CornerRadius = UDim.new(0, 8)
  103.  
  104. -- Tween sizes
  105. local fullSize = UDim2.new(0, 200, 0, 240)
  106. local miniSize = UDim2.new(0, 200, 0, 30)
  107. local tweenInfo = TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
  108.  
  109. local function clearForces()
  110. if bodyPosition then bodyPosition:Destroy() end
  111. if bodyGyro then bodyGyro:Destroy() end
  112. bodyPosition, bodyGyro = nil, nil
  113. end
  114.  
  115. local function lockToCFrame(cf)
  116. if not currentCharacter then return end
  117. local root = currentCharacter:FindFirstChild("HumanoidRootPart")
  118. if not root then return end
  119.  
  120. clearForces()
  121.  
  122. bodyPosition = Instance.new("BodyPosition")
  123. bodyPosition.Position = cf.Position + Vector3.new(0, 35, 0)
  124. bodyPosition.MaxForce = Vector3.new(1e6, 1e6, 1e6)
  125. bodyPosition.D = 1000
  126. bodyPosition.P = 5000
  127. bodyPosition.Parent = root
  128.  
  129. bodyGyro = Instance.new("BodyGyro")
  130. bodyGyro.CFrame = cf
  131. bodyGyro.MaxTorque = Vector3.new(1e6, 1e6, 1e6)
  132. bodyGyro.P = 3000
  133. bodyGyro.Parent = root
  134. end
  135.  
  136. -- Slim button layout
  137. local buttonHeight = 28
  138. local spacing = 6
  139. local baseY = 35
  140.  
  141. for i = 1, 4 do
  142. local button = Instance.new("TextButton")
  143. button.Size = UDim2.new(1, 0, 0, buttonHeight)
  144. button.Position = UDim2.new(0, 0, 0, baseY + (i - 1) * (buttonHeight + spacing))
  145. button.Text = "Spawn " .. i
  146. button.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
  147. button.TextColor3 = Color3.fromRGB(255, 255, 255)
  148. button.TextSize = 14
  149. button.Font = Enum.Font.SourceSansBold
  150. button.Parent = frame
  151. Instance.new("UICorner", button).CornerRadius = UDim.new(0, 8)
  152. table.insert(spawnButtons, button)
  153.  
  154. button.MouseButton1Click:Connect(function()
  155. teleporting = i
  156. lockToCFrame(cframes[i])
  157. end)
  158. end
  159.  
  160. -- Auto Attack Button
  161. local autoAttackButton = Instance.new("TextButton")
  162. autoAttackButton.Size = UDim2.new(1, 0, 0, buttonHeight)
  163. autoAttackButton.Position = UDim2.new(0, 0, 0, baseY + 4 * (buttonHeight + spacing)) -- Positioned between Spawn 4 and Stop Teleport
  164. autoAttackButton.Text = "Auto Attack"
  165. autoAttackButton.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
  166. autoAttackButton.TextColor3 = Color3.fromRGB(50, 205, 50)
  167. autoAttackButton.TextSize = 14
  168. autoAttackButton.Font = Enum.Font.SourceSansBold
  169. autoAttackButton.Parent = frame
  170. Instance.new("UICorner", autoAttackButton).CornerRadius = UDim.new(0, 8)
  171.  
  172. -- Magic moves
  173. local firstMagicMove = "Scorching Basalt"
  174. local secondMagicMove = "Incinerating Burst"
  175.  
  176. local isUsingFirstSkill = true -- Flag to toggle between skills
  177. local autoAttackEnabled = false
  178. local cooldownTime = 1 -- 1 second cooldown between switching abilities
  179. local lastSwitchTime = 0 -- Keeps track of the last time the ability was switched
  180.  
  181. -- Auto Attack button logic
  182. autoAttackButton.MouseButton1Click:Connect(function()
  183. autoAttackEnabled = not autoAttackEnabled -- Toggle the auto-attack state
  184. if autoAttackEnabled then
  185. autoAttackButton.Text = "Auto Attack (On)"
  186.  
  187. -- Start auto-attacking
  188. spawn(function()
  189. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  190. local TrueMagic = ReplicatedStorage.Remotes.DoMagic
  191. local DoClientMagic = ReplicatedStorage.Remotes.DoClientMagic
  192. local magicType = "Lava" -- Magic type can be adjusted if needed
  193. local currentMagicMove = firstMagicMove -- Default to first skill
  194.  
  195. while autoAttackEnabled do
  196. wait(1) -- Attack every 1 second (adjust as needed)
  197.  
  198. -- Check if cooldown has passed and switch abilities
  199. if tick() - lastSwitchTime >= cooldownTime then
  200. if isUsingFirstSkill then
  201. currentMagicMove = firstMagicMove -- Use first skill
  202. else
  203. currentMagicMove = secondMagicMove -- Use second skill
  204. end
  205.  
  206. -- Fire the magic moves
  207. DoClientMagic:FireServer(magicType, currentMagicMove)
  208. TrueMagic:InvokeServer(magicType, currentMagicMove)
  209.  
  210. -- Switch the skill for the next attack
  211. isUsingFirstSkill = not isUsingFirstSkill
  212. lastSwitchTime = tick() -- Update last switch time
  213. end
  214. end
  215. end)
  216. else
  217. autoAttackButton.Text = "Auto Attack (Off)"
  218. end
  219. end)
  220.  
  221.  
  222. -- Stop button
  223. local stopButton = Instance.new("TextButton")
  224. stopButton.Size = UDim2.new(1, 0, 0, buttonHeight)
  225. stopButton.Position = UDim2.new(0, 0, 0, baseY + 5 * (buttonHeight + spacing))
  226. stopButton.Text = "Stop Teleport"
  227. stopButton.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
  228. stopButton.TextColor3 = Color3.fromRGB(255, 50, 50)
  229. stopButton.TextSize = 14
  230. stopButton.Font = Enum.Font.SourceSansBold
  231. stopButton.Parent = frame
  232. Instance.new("UICorner", stopButton).CornerRadius = UDim.new(0, 8)
  233.  
  234. stopButton.MouseButton1Click:Connect(function()
  235. teleporting = nil
  236. clearForces()
  237. end)
  238.  
  239. -- Minimize animation
  240. local function toggleMinimize()
  241. minimized = not minimized
  242.  
  243. local tween = TweenService:Create(frame, tweenInfo, {
  244. Size = minimized and miniSize or fullSize
  245. })
  246. tween:Play()
  247.  
  248. for _, btn in ipairs(spawnButtons) do
  249. btn.Visible = not minimized
  250. end
  251. autoAttackButton.Visible = not minimized
  252. stopButton.Visible = not minimized
  253. title.Visible = not minimized
  254. end
  255.  
  256. minimizeButton.MouseButton1Click:Connect(toggleMinimize)
  257.  
  258. -- Character respawn
  259. local function onCharacterAdded(char)
  260. currentCharacter = char
  261. char:WaitForChild("HumanoidRootPart")
  262. if teleporting then
  263. lockToCFrame(cframes[teleporting])
  264. end
  265. end
  266.  
  267. player.CharacterAdded:Connect(onCharacterAdded)
  268. if player.Character then
  269. onCharacterAdded(player.Character)
  270. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement