Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- getgenv().Multiplier = 1; -- default idk
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local Player = game:GetService'Players'.LocalPlayer
- local PlayerProfile = ReplicatedStorage:WaitForChild'Profiles':WaitForChild(Player.Name)
- local Database = ReplicatedStorage.Database;
- local Event = ReplicatedStorage.Event;
- local Function = ReplicatedStorage.Function;
- local SwordMethod = '';
- local ExploitCallKey = tostring(math.random(-1000,1000)) .. string.char(math.random(0,100))
- local CombatModule;
- local HitInfo = {
- Hitting = {};
- HitCounter = {};
- Waiting = {};
- };
- local function SetCombatModule()
- for i,v in next, getgc(true) do
- if type(v) == 'table' and rawget(v, 'DamageArea') then
- CombatModule = v;
- break
- end
- end
- end
- SetCombatModule()
- if not CombatModule then
- repeat
- wait(1)
- SetCombatModule()
- until CombatModule
- end
- local function SetSwordSkill()
- local Equipped = PlayerProfile.Equip
- local Left,Right = Equipped.Left.Value, Equipped.Right.Value;
- if (Left ~= 0 and Right ~= 0) then
- SwordMethod = 'Whirlwind Spin';
- else
- local InventoryID = Left == 0 and Right or Right == 0 and Left;
- if (InventoryID) then
- local Name,Type;
- for _,Item in next, PlayerProfile.Inventory:GetChildren() do
- if (Item.Value == InventoryID) then
- Name = Item.Name;
- end
- end
- local Item = Database.Items:FindFirstChild(Name)
- if (Item) then
- Type = Item:FindFirstChild('Class') and Item.Class.Value;
- end
- Type = Type == '1HSword' and 'SingleSword' or Type
- if (Type) then
- for _,Skill in next, Database.Skills:GetChildren() do
- if (Skill:FindFirstChild('Class') and Skill.Class.Value == Type) then
- SwordMethod = Skill.Name;
- end
- end
- else
- SwordMethod = 'Leaping Slash';
- end
- end
- end
- Event:FireServer('Skills',{'UseSkill',SwordMethod}) -- imagine working because missing arg
- end
- local Equipped = PlayerProfile.Equip
- Equipped.Left.Changed:Connect(SetSwordSkill)
- Equipped.Right.Changed:Connect(SetSwordSkill)
- SetSwordSkill();
- local ToggleValue = false;
- local SwordSkillsValue = false;
- local UILibrary = loadstring(game:HttpGet"https://pastebin.com/raw/deeWt6sx")()
- local MainWindow = UILibrary:MakeWindow('Main')
- local Toggled = MainWindow:addCheckbox('Multiplier Toggle')
- local MultiplierTextbox = MainWindow:addTextBoxF('Damage Multiplier', function(Text)
- getgenv().Multiplier = tonumber(Text) and math.max(tonumber(Text), 1) or 1;
- end)
- local KillAura = MainWindow:addCheckbox('Kill Aura')
- local InfStamina = MainWindow:addCheckbox('Infinite Stamina')
- local SwordSkills = MainWindow:addCheckbox('Use Sword Skills')
- MainWindow:addLabel("Made by whomever#7779", 'Center');
- if (not getrawmetatable or not setreadonly) then
- print("Exploit isn't supported.");
- repeat wait(5) until nil;
- end
- local Meta = getrawmetatable(game)
- local Namecall = Meta.__namecall
- setreadonly(Meta, false);
- local function GetCooldown()
- return getgenv().SB2_WAIT_TIME or 1.5;
- end
- local function GetSwordMethod()
- local Method = SwordMethod;
- if (SwordSkillsValue == false) then
- Method = nil;
- end
- return Method;
- end
- local function Invalid(Target)
- if (Target == nil) then
- return true
- end
- local PrimaryPartCF = Target:GetPrimaryPartCFrame()
- local Root = Player.Character:WaitForChild('HumanoidRootPart')
- if (PrimaryPartCF.Position - Root.Position).Magnitude > 20 then
- return true
- end
- if (Player.Character.Entity.Health.Value <= Player.Character.Entity.Health.MinValue) then
- return true
- end
- if (Target.Entity.Health.Value <= Target.Entity.Health.MinValue) then
- return true
- end
- return false
- end
- local function HitMob(Target)
- if (not HitInfo.HitCounter[Target]) then
- HitInfo.HitCounter[Target] = 0;
- end;
- local Normal = (SwordSkillsValue == false)
- local HitAmount = 10
- if (HitInfo.HitCounter[Target] % HitAmount == 0 and HitInfo.HitCounter[Target] > 0 and Normal) then
- wait(GetCooldown())
- end
- coroutine.wrap(Event.FireServer)(
- Event,
- 'Combat',
- {'\204','\214','\177','\251'},
- {
- 'Attack',
- GetSwordMethod(),
- 1,
- Target
- },
- ExploitCallKey
- )
- end
- local function AuraHit()
- local Root = Player.Character:WaitForChild('HumanoidRootPart', 2)
- local Hits = ToggleValue and math.clamp(getgenv().Multiplier, 1, 50) or 1;
- for _ = 1, Hits do -- not too laggy
- for _,Mob in next, workspace.Mobs:GetChildren() do
- local PrimaryPart = Mob:IsA'Model' and Mob.PrimaryPart
- local Distance = PrimaryPart and (Root.Position - PrimaryPart.Position).Magnitude
- if (Distance and Distance <= 20 and (not Invalid(Mob))) then
- coroutine.wrap(HitMob)(Mob)
- end
- end
- end
- end
- game:GetService("RunService").Heartbeat:Connect(function()
- ToggleValue = Toggled.Checked.Value
- SwordSkillsValue = SwordSkills.Checked.Value
- if (KillAura.Checked.Value) then
- spawn(AuraHit);
- end
- if (InfStamina.Checked.Value) then
- if Player.Character then
- Player.Character:WaitForChild("Entity").Stamina.Value = 100
- end
- coroutine.wrap(Event.FireServer)(Event, 'Actions', {'Sprint','Disabled'})
- end
- end)
- Meta.__namecall = function(self,...)
- local Args = {...};
- local Service = Args[1];
- local ActionInfo = Args[2];
- local AttackInfo = Args[3];
- local IsExploitCall = Args[4] == ExploitCallKey;
- local IsCombatService = (Service and Service == 'Combat');
- local IsAttack = ((AttackInfo and type(AttackInfo) == 'table') and AttackInfo[1] == 'Attack');
- local IsActionService = (Service and Service == 'Actions');
- local IsSprintStep = ((ActionInfo and type(ActionInfo) == 'table') and ActionInfo[2] == 'Step');
- local Method = getnamecallmethod()
- if (self == Event and IsCombatService and IsAttack) then
- local Mob = Args[3][4]
- if (IsExploitCall == false and (not HitInfo.Waiting[Mob])) then
- local HitsLeft = ToggleValue and getgenv().Multiplier or 1
- if (HitInfo.Hitting[Mob]) then
- HitInfo.Waiting[Mob] = true; -- We still need a queue.
- repeat
- wait()
- until not HitInfo.Hitting[Mob];
- wait(GetCooldown())
- HitInfo.Waiting[Mob] = false;
- end
- coroutine.wrap(function()
- HitInfo.Hitting[Mob] = true;
- for i = 1, HitsLeft do
- if Invalid(Mob) then break end;
- -- Call it on the same thread, if it needs to yield, it won't fuck with HitInfo.Hitting
- HitMob(Mob);
- end
- HitInfo.Hitting[Mob] = false;
- end)()
- return nil;
- end
- elseif (self == Event and IsActionService and IsSprintStep) then
- return;
- elseif (Method == 'GetTouchingParts' and string.lower(self.Name) == 'blade') then
- local Result = Namecall(self,...)
- for _,Mob in next, game.GetChildren(workspace.Mobs) do
- table.insert(Result, Mob.PrimaryPart)
- end
- return Result;
- end
- return Namecall(self,...)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement