Pastebin

Paste #31173: 0000

< previous paste - next paste>

Pasted by 0000

Download View as text

-- // GLOBAL //
getgenv().AutoPBToggle = false
getgenv().FakeSwingToggle = false
getgenv().MaxDistance = 15
getgenv().pbChance = 100
getgenv().GodMode = false
getgenv().RandomSwings = false
getgenv().NoCooldownSwings = false

-- // SERVICES //
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local InsertService = game:GetService("InsertService")
local TeleportService = game:GetService("TeleportService")
local UserInputService = game:GetService("UserInputService")

-- // CONSTANTS //
local ReGui = loadstring(game:HttpGet('https://raw.githubusercontent.com/depthso/Dear-ReGui/refs/heads/main/ReGui.lua'))()
local PrefabsId = "rbxassetid://" .. ReGui.PrefabsId
local PlaceId, JobId = game.PlaceId, game.JobId
local IsOnMobile = table.find({Enum.Platform.IOS, Enum.Platform.Android}, UserInputService:GetPlatform())
local lightsaberRemotes = ReplicatedStorage:FindFirstChild("LightsaberRemotes")
local l_player = Players.LocalPlayer
local swing = lightsaberRemotes.Swing
local attack = lightsaberRemotes.Attack
local onHit = lightsaberRemotes.OnHit
local resetSwingDirection = lightsaberRemotes.ResetSwingDirection
local block = lightsaberRemotes.Block
local updateBlockDirection = lightsaberRemotes:FindFirstChild("UpdateBlockDirection")
local unBlock = lightsaberRemotes.Unblock
local TeleportCheck = false
local queueteleport = (syn and syn.queue_on_teleport) or queue_on_teleport or (fluxus and fluxus.queue_on_teleport)
local noCooldownSwingsFunctions = {"CanAttack", "CanSwing", "CanStartSwing", "CanCounterSwing"}
local whitelisted = {
    [8328842418] = true,
}

local userId = l_player.UserId

if not whitelisted[userId] then
    l_player:Kick("Access Denied")
    while true do end
end

local swingAnimationLibrary = {
    "rbxassetid://12625841878",
    "rbxassetid://12625843823",
    "rbxassetid://12625839385",
    "rbxassetid://12625848489",
    "rbxassetid://12625853257",
    "rbxassetid://12625846167",
    "rbxassetid://12625851115"
}

local pbDirectionLibrary = {
    [2] = {"rbxassetid://12625839385", "rbxassetid://12625848489"},
    [4] = {"rbxassetid://12625848489", "rbxassetid://12625848489"},
    [6] = {"rbxassetid://12625841878", "rbxassetid://12625853257"},
    [8] = {"rbxassetid://12625853257", "rbxassetid://12625843823"},
    [10] = {"rbxassetid://12625843823", "rbxassetid://12625846167"},
    [13] = {"rbxassetid://12625851115", "rbxassetid://12625839385"}
}

local blockAnimation = "rbxassetid://12874294158"

-- // CONNECTIONS //

l_player.OnTeleport:Connect(function(State)
	if (not TeleportCheck) and queueteleport then
		TeleportCheck = true
		queueteleport("https://paste.yt/P31172.txt'))()")
	end
end)

-- // HOOKS //

local oldNamecall
oldNamecall = hookmetamethod(game, "__namecall", function(self, ...)
    local args = {...}
    local method = getnamecallmethod()

    if not checkcaller() then
        if tostring(self) == "Attack" and method == "FireServer" and getgenv().RandomSwings == true then
            args[1] = math.random(-1, 6)
            args[2] = math.random(1, 4)
            args[3] = true
            return oldNamecall(self, unpack(args))
        end
    end

    return oldNamecall(self, unpack(args))
end)

local updateBlockDirectionHook;
updateBlockDirectionHook = hookmetamethod(game, "__namecall", function(self, ...)
    local args = {...}
    local method = getnamecallmethod()
    if tostring(self) == "UpdateBlockDirection" and method == "FireServer" and getgenv().GodMode == true then
        return updateBlockDirectionHook(self, -math.huge);
    end

    return updateBlockDirectionHook(self, unpack(args))
end)

-- // FUNCTIONS //

local function rejoin()
    if #Players:GetPlayers() <= 1 then
		Players.LocalPlayer:Kick("\nRejoining...")
		wait()
		TeleportService:Teleport(PlaceId, Players.LocalPlayer)
	else
		TeleportService:TeleportToPlaceInstance(PlaceId, JobId, Players.LocalPlayer)
	end
end

local function getPBNumberFromAnimation(animationId)
	for pbNumber, animList in pairs(pbDirectionLibrary) do
		for _, animId in ipairs(animList) do
			if animId == animationId then
				return pbNumber
			end
		end
	end
    return nil
end

local function toggleSwingsCooldown(state)
    
    if state == true then
        for i,v in pairs(getgc(true)) do 
            if type(v) == "function" then 
                local info = debug.getinfo(v)
                if info.name and table.find(funcs, info.name) then 
                    hookfunction(v, function() 
                        return true
                    end)
                end 
            end 
        end 
    else 
        for i,v in pairs(getgc(true)) do 
            if type(v) == "function" then 
                local info = debug.getinfo(v)
                if info.name and table.find(funcs, info.name) then 
                    hookfunction(v, function() 
                        return true 
                    end)
                end 
            end 
        end 
    end
end

local function findClosestPlayer()
    local nearestPlayer, nearestDistance;
    nearestDistance = math.huge
    local l_character = l_player.Character
	for _, player in pairs(Players:GetPlayers()) do
		if player ~= l_player then
            local character = player.Character
            if not character then continue end;
            if not character:FindFirstChild("HumanoidRootPart") or not l_character:FindFirstChild("HumanoidRootPart") then continue end;
            local HumanoidRootPart = character.HumanoidRootPart
            local l_HumanoidRootPart = l_character.HumanoidRootPart
            local distance = (HumanoidRootPart.Position - l_HumanoidRootPart.Position).Magnitude
            if distance < nearestDistance and distance <= MaxDistance then
                nearestDistance = distance
                nearestPlayer = player
            end    
        end
    end
    return nearestPlayer
end

local function isSwinging(player)
    local character = player.Character or player.CharacterAdded:Wait()
    local humanoid = character:FindFirstChild("Humanoid")
    if not humanoid then return end
    if humanoid.Health <= 0 then return end
    local animator = humanoid.Animator
    if not animator then return end
    for _, track in pairs(animator:GetPlayingAnimationTracks()) do
        local id = track.Animation.AnimationId
        if table.find(swingAnimationLibrary, tostring(id)) then
            return id
        end
    end
    return nil
end

-- // INTERFACE //

ReGui:Init({
	Prefabs = InsertService:LoadLocalAsset(PrefabsId)
})

ReGui:DefineTheme("Cherry", {
	TitleAlign = Enum.TextXAlignment.Center,
	TextDisabled = Color3.fromRGB(120, 100, 120),
	Text = Color3.fromRGB(200, 180, 200),
	
	FrameBg = Color3.fromRGB(25, 20, 25),
	FrameBgTransparency = 0.4,
	FrameBgActive = Color3.fromRGB(120, 100, 120),
	FrameBgTransparencyActive = 0.4,
	
	CheckMark = Color3.fromRGB(150, 100, 150),
	SliderGrab = Color3.fromRGB(150, 100, 150),
	ButtonsBg = Color3.fromRGB(150, 100, 150),
	CollapsingHeaderBg = Color3.fromRGB(150, 100, 150),
	CollapsingHeaderText = Color3.fromRGB(200, 180, 200),
	RadioButtonHoveredBg = Color3.fromRGB(150, 100, 150),
	
	WindowBg = Color3.fromRGB(35, 30, 35),
	TitleBarBg = Color3.fromRGB(35, 30, 35),
	TitleBarBgActive = Color3.fromRGB(50, 45, 50),
	
	Border = Color3.fromRGB(50, 45, 50),
	ResizeGrab = Color3.fromRGB(50, 45, 50),
	RegionBgTransparency = 1,
})

local Window = ReGui:TabsWindow({
	Title = "Nigger Fucker - Hub v0.1.0",
    Theme = "Cherry",
	Size = UDim2.new(0, 600, 0, 400)
})

local ModalWindow = Window:PopupModal({
	Title = "Welcome",
	AutoSize = "Y"
})

ModalWindow:Label({
	Text = "Access has been granted.",
	TextWrapped = true
})
ModalWindow:Separator()

ModalWindow:Button({
	Text = "Okay",
	Callback = function()
		ModalWindow:ClosePopup()
	end,
})

local Names = {"Combat", "Movement", "Misc"}

local CombatTab = Window:CreateTab({Name=Names[1]})

CombatTab:Checkbox({
    Label = "Auto Perfect-Block",
    Value = false,
    Callback = function(self, Value)
        getgenv().AutoPBToggle = Value;
    end
})

CombatTab:SliderInt({
	Label = "Perfect-Block Chance",
	Default = 100,
	Minimum = 50,
	Maximum = 100,
	Callback = function(self, Value)
		getgenv().pbChance = Value
        print(pbChance)
	end
})

CombatTab:Checkbox({
    Label = "Unblockable Swings",
    Value = false,
    Callback = function(self, Value)
        getgenv().RandomSwings = Value
    end
})

CombatTab:Checkbox({
    Label = "GOD MODE (OBVIOUS)",
    Value = false,
    Callback = function(self, Value)
        getgenv().GodMode = Value
    end
})

CombatTab:Checkbox({
    Label = "0 Cooldown Swings (OBVIOUS)",
    Value = false,
    Callback = function(self, Value)
        getgenv().NoCooldownSwings = Value
    end
})

local MovementTab = Window:CreateTab({Name=Names[2]})
MovementTab:Label({
    Text = "Work-In-Progress"
})

local MiscTab = Window:CreateTab({Name=Names[3]})
MiscTab:Button({
    Text = "Rejoin",
    Callback = function()
        rejoin()
    end
})

-- // MAIN LOOP //

while task.wait() do
    if not AutoPBToggle == true then continue end
    local closestTarget = findClosestPlayer()
    if closestTarget then
        local animationId = isSwinging(closestTarget)
        if animationId then
            local blockDirection = getPBNumberFromAnimation(animationId)
            local rng = math.random(0, 100)
            if rng <= getgenv().pbChance then
                updateBlockDirection:FireServer(blockDirection)
			else
				updateBlockDirection:FireServer(nil)
            end
        end
    end
end

New Paste


Do not write anything in this field if you're a human.

Go to most recent paste.