Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- ANTI AFK
- local Players = game:GetService("Players")
- -- Function to keep the player active
- local function keepPlayerActive(player)
- -- This will keep simulating a small action for the player to avoid being kicked
- while player.Parent do
- -- Move the player's character slightly
- if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
- local humanoidRootPart = player.Character.HumanoidRootPart
- humanoidRootPart.CFrame = humanoidRootPart.CFrame * CFrame.new(0, 0, 0.1)
- end
- wait(60) -- Wait 1 minute before doing this again
- end
- end
- -- Monitor player joins and add the keep-alive function
- Players.PlayerAdded:Connect(function(player)
- -- Start the anti-AFK script when the player joins
- player.CharacterAdded:Connect(function()
- keepPlayerActive(player)
- end)
- end)
- game:GetService("StarterGui"):SetCore("SendNotification",{
- Title = "ANTI AFK ENABLED", -- Required
- Text = "You will no longer disconnect after 20 minutes of inactivity.", -- Required
- })
- -- MAIN SCRIPT
- local TweenService = game:GetService("TweenService")
- local player = game.Players.LocalPlayer
- local gui = Instance.new("ScreenGui")
- gui.Name = "TeleportGUI"
- gui.ResetOnSpawn = false
- gui.Parent = player:WaitForChild("PlayerGui")
- local frame = Instance.new("Frame")
- frame.Name = "MainFrame"
- frame.Size = UDim2.new(0, 200, 0, 240) -- Adjusted size to fit the new button
- frame.Position = UDim2.new(0, 50, 0, 50)
- frame.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
- frame.Active = true
- frame.Draggable = true
- frame.Parent = gui
- Instance.new("UICorner", frame).CornerRadius = UDim.new(0, 12)
- local cframes = {
- [1] = CFrame.new(-1562.00183, 52.1, 687.801941, 0.499959469, 0, 0.866048813, 0, 1, 0, -0.866048813, 0, 0.499959469),
- [2] = CFrame.new(-665.723938, 54.3, 346.687653, 1, 0, 0, 0, 1, 0, 0, 0, 1),
- [3] = CFrame.new(-271.784058, 46, 902.394226, -0.0871315002, 0, 0.996196866, 0, 1, 0, -0.996196866, 0, -0.0871315002),
- [4] = CFrame.new(-666.78064, 69, 1476.56531, 0.965929627, 0, 0.258804798, 0, 1, 0, -0.258804798, 0, 0.965929627),
- }
- local spawnButtons = {}
- local teleporting = nil
- local bodyPosition, bodyGyro = nil, nil
- local currentCharacter = nil
- local minimized = false
- -- Title
- local title = Instance.new("TextLabel")
- title.Size = UDim2.new(1, -40, 0, 30)
- title.Position = UDim2.new(0, 0, 0, 0)
- title.Text = "CARANZO HUB"
- title.TextColor3 = Color3.fromRGB(255, 255, 255)
- title.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
- title.TextSize = 16
- title.Font = Enum.Font.SourceSansBold
- title.Parent = frame
- Instance.new("UICorner", title).CornerRadius = UDim.new(0, 8)
- -- Rainbow color change effect
- local function setRainbowColor()
- local hue = 0
- while true do
- title.TextColor3 = Color3.fromHSV(hue, 1, 1)
- hue = hue + 0.01
- if hue > 1 then
- hue = 0
- end
- wait(0.05)
- end
- end
- spawn(function() setRainbowColor() end)
- -- Minimize button
- local minimizeButton = Instance.new("TextButton")
- minimizeButton.Size = UDim2.new(0, 40, 0, 30)
- minimizeButton.Position = UDim2.new(1, -40, 0, 0)
- minimizeButton.Text = "-"
- minimizeButton.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
- minimizeButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- minimizeButton.TextSize = 16
- minimizeButton.Font = Enum.Font.SourceSansBold
- minimizeButton.Parent = frame
- Instance.new("UICorner", minimizeButton).CornerRadius = UDim.new(0, 8)
- -- Tween sizes
- local fullSize = UDim2.new(0, 200, 0, 240)
- local miniSize = UDim2.new(0, 200, 0, 30)
- local tweenInfo = TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
- local function clearForces()
- if bodyPosition then bodyPosition:Destroy() end
- if bodyGyro then bodyGyro:Destroy() end
- bodyPosition, bodyGyro = nil, nil
- end
- local function lockToCFrame(cf)
- if not currentCharacter then return end
- local root = currentCharacter:FindFirstChild("HumanoidRootPart")
- if not root then return end
- clearForces()
- bodyPosition = Instance.new("BodyPosition")
- bodyPosition.Position = cf.Position + Vector3.new(0, 35, 0)
- bodyPosition.MaxForce = Vector3.new(1e6, 1e6, 1e6)
- bodyPosition.D = 1000
- bodyPosition.P = 5000
- bodyPosition.Parent = root
- bodyGyro = Instance.new("BodyGyro")
- bodyGyro.CFrame = cf
- bodyGyro.MaxTorque = Vector3.new(1e6, 1e6, 1e6)
- bodyGyro.P = 3000
- bodyGyro.Parent = root
- end
- -- Slim button layout
- local buttonHeight = 28
- local spacing = 6
- local baseY = 35
- for i = 1, 4 do
- local button = Instance.new("TextButton")
- button.Size = UDim2.new(1, 0, 0, buttonHeight)
- button.Position = UDim2.new(0, 0, 0, baseY + (i - 1) * (buttonHeight + spacing))
- button.Text = "Spawn " .. i
- button.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
- button.TextColor3 = Color3.fromRGB(255, 255, 255)
- button.TextSize = 14
- button.Font = Enum.Font.SourceSansBold
- button.Parent = frame
- Instance.new("UICorner", button).CornerRadius = UDim.new(0, 8)
- table.insert(spawnButtons, button)
- button.MouseButton1Click:Connect(function()
- teleporting = i
- lockToCFrame(cframes[i])
- end)
- end
- -- Auto Attack Button
- local autoAttackButton = Instance.new("TextButton")
- autoAttackButton.Size = UDim2.new(1, 0, 0, buttonHeight)
- autoAttackButton.Position = UDim2.new(0, 0, 0, baseY + 4 * (buttonHeight + spacing)) -- Positioned between Spawn 4 and Stop Teleport
- autoAttackButton.Text = "Auto Attack"
- autoAttackButton.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
- autoAttackButton.TextColor3 = Color3.fromRGB(50, 205, 50)
- autoAttackButton.TextSize = 14
- autoAttackButton.Font = Enum.Font.SourceSansBold
- autoAttackButton.Parent = frame
- Instance.new("UICorner", autoAttackButton).CornerRadius = UDim.new(0, 8)
- -- Magic moves
- local firstMagicMove = "Scorching Basalt"
- local secondMagicMove = "Incinerating Burst"
- local isUsingFirstSkill = true -- Flag to toggle between skills
- local autoAttackEnabled = false
- local cooldownTime = 1 -- 1 second cooldown between switching abilities
- local lastSwitchTime = 0 -- Keeps track of the last time the ability was switched
- -- Auto Attack button logic
- autoAttackButton.MouseButton1Click:Connect(function()
- autoAttackEnabled = not autoAttackEnabled -- Toggle the auto-attack state
- if autoAttackEnabled then
- autoAttackButton.Text = "Auto Attack (On)"
- -- Start auto-attacking
- spawn(function()
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local TrueMagic = ReplicatedStorage.Remotes.DoMagic
- local DoClientMagic = ReplicatedStorage.Remotes.DoClientMagic
- local magicType = "Lava" -- Magic type can be adjusted if needed
- local currentMagicMove = firstMagicMove -- Default to first skill
- while autoAttackEnabled do
- wait(1) -- Attack every 1 second (adjust as needed)
- -- Check if cooldown has passed and switch abilities
- if tick() - lastSwitchTime >= cooldownTime then
- if isUsingFirstSkill then
- currentMagicMove = firstMagicMove -- Use first skill
- else
- currentMagicMove = secondMagicMove -- Use second skill
- end
- -- Fire the magic moves
- DoClientMagic:FireServer(magicType, currentMagicMove)
- TrueMagic:InvokeServer(magicType, currentMagicMove)
- -- Switch the skill for the next attack
- isUsingFirstSkill = not isUsingFirstSkill
- lastSwitchTime = tick() -- Update last switch time
- end
- end
- end)
- else
- autoAttackButton.Text = "Auto Attack (Off)"
- end
- end)
- -- Stop button
- local stopButton = Instance.new("TextButton")
- stopButton.Size = UDim2.new(1, 0, 0, buttonHeight)
- stopButton.Position = UDim2.new(0, 0, 0, baseY + 5 * (buttonHeight + spacing))
- stopButton.Text = "Stop Teleport"
- stopButton.BackgroundColor3 = Color3.fromRGB(10, 10, 10)
- stopButton.TextColor3 = Color3.fromRGB(255, 50, 50)
- stopButton.TextSize = 14
- stopButton.Font = Enum.Font.SourceSansBold
- stopButton.Parent = frame
- Instance.new("UICorner", stopButton).CornerRadius = UDim.new(0, 8)
- stopButton.MouseButton1Click:Connect(function()
- teleporting = nil
- clearForces()
- end)
- -- Minimize animation
- local function toggleMinimize()
- minimized = not minimized
- local tween = TweenService:Create(frame, tweenInfo, {
- Size = minimized and miniSize or fullSize
- })
- tween:Play()
- for _, btn in ipairs(spawnButtons) do
- btn.Visible = not minimized
- end
- autoAttackButton.Visible = not minimized
- stopButton.Visible = not minimized
- title.Visible = not minimized
- end
- minimizeButton.MouseButton1Click:Connect(toggleMinimize)
- -- Character respawn
- local function onCharacterAdded(char)
- currentCharacter = char
- char:WaitForChild("HumanoidRootPart")
- if teleporting then
- lockToCFrame(cframes[teleporting])
- end
- end
- player.CharacterAdded:Connect(onCharacterAdded)
- if player.Character then
- onCharacterAdded(player.Character)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement