Advertisement
1DollarH4ck

InstantExploit

Jun 28th, 2024 (edited)
392
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.04 KB | None | 0 0
  1. local LocalPlayer = game.Players.LocalPlayer
  2. local Humanoid = LocalPlayer.Character:FindFirstChild("Humanoid")
  3. local HumanoidRootPart = LocalPlayer.Character:FindFirstChild("HumanoidRootPart")
  4. local KnockbackCont = debug.getupvalue(require(game:GetService("ReplicatedStorage").TS.damage["knockback-util"]).KnockbackUtil.calculateKnockbackVelocity, 1)
  5. local BlockHit = game:GetService("ReplicatedStorage").rbxts_include.node_modules["@easy-games"]["block-engine"].node_modules["@rbxts"].net.out._NetManaged.DamageBlock
  6. local raycastParams = RaycastParams.new()
  7. raycastParams.IgnoreWater = true
  8.  
  9. local function Alive(plr)
  10.     return plr and plr.Character:FindFirstChildOfClass("Humanoid") and plr.Character:FindFirstChildOfClass("Humanoid").Health > 0.11
  11. end
  12.  
  13. local function FindNearestPlayer(teamcheck, distance)
  14.     local TeamCheck = teamcheck
  15.     local NearestPlayer = nil
  16.     local MinDistance = math.huge
  17.  
  18.     for _, player in pairs(game:GetService("Players"):GetPlayers()) do
  19.         if player ~= LocalPlayer and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
  20.             if not TeamCheck or player.Team ~= LocalPlayer.Team then
  21.                 if Alive(player) then
  22.                         local Distances = (LocalPlayer.Character:FindFirstChild("HumanoidRootPart").Position - player.Character:FindFirstChild("HumanoidRootPart").Position).Magnitude
  23.                         if Distances < MinDistance and Distances <= distance then
  24.                         MinDistance = Distances
  25.                         NearestPlayer = player
  26.                     end
  27.                 end
  28.             end
  29.         end
  30.     end
  31.     return NearestPlayer
  32. end
  33.  
  34. local SwordRank = {
  35.     [1] = { Name = "wood_sword", Rank = 1 },
  36.     [2] = { Name = "stone_sword", Rank = 2 },
  37.     [3] = { Name = "iron_sword", Rank = 3 },
  38.     [4] = { Name = "diamond_sword", Rank = 4 },
  39.     [5] = { Name = "void_sword", Rank = 5 },
  40.     [6] = { Name = "emerald_sword", Rank = 6 },
  41.     [7] = { Name = "rageblade", Rank = 7 },
  42. }
  43.  
  44. local function GetSword()
  45.     local bestsword = nil
  46.     local bestrank = 0
  47.  
  48.     for i, v in pairs(LocalPlayer.Character.InventoryFolder.Value:GetChildren()) do
  49.         if v.Name:match("sword") or v.Name:match("blade") then
  50.             for _, data in pairs(SwordRank) do
  51.                 if data["Name"] == v.Name then
  52.                     if bestrank <= data["Rank"] then
  53.                         bestrank = data["Rank"]
  54.                         bestsword = v
  55.                     end
  56.                 end
  57.             end
  58.         end
  59.     end
  60.     return bestsword
  61. end
  62.  
  63. local function GetBed(range)
  64.     local nearestBed
  65.     local nearestDistance = math.huge
  66.     local localPlayer = game.Players.LocalPlayer
  67.  
  68.     for _, v in pairs(game.Workspace:GetChildren()) do
  69.         if v.Name == "bed" and v.Blanket.BrickColor ~= localPlayer.Team.TeamColor then
  70.             local distance = (v.Position - localPlayer.Character.HumanoidRootPart.Position).magnitude
  71.             if distance < nearestDistance and distance <= range then
  72.                 nearestBed = v
  73.                 nearestDistance = distance
  74.             end
  75.         end
  76.     end
  77.     return nearestBed
  78. end
  79.  
  80. local function DestroyBed(bed)
  81.     local raycastResult = workspace:Raycast(bed.Position + Vector3.new(0, 13, 0), Vector3.new(0, -16, 0), raycastParams)
  82.     if raycastResult then
  83.         local nearestBed = raycastResult.Instance
  84.         BlockHit:InvokeServer({
  85.             ["blockRef"] = {
  86.                 ["blockPosition"] = Vector3.new(math.round(nearestBed.Position.X / 3), math.round(nearestBed.Position.Y / 3), math.round(nearestBed.Position.Z / 3))
  87.             },
  88.             ["hitPosition"] = Vector3.new(math.round(nearestBed.Position.X / 3), math.round(nearestBed.Position.Y / 3), math.round(nearestBed.Position.Z / 3)),
  89.             ["hitNormal"] = Vector3.new(math.round(nearestBed.Position.X / 3), math.round(nearestBed.Position.Y / 3), math.round(nearestBed.Position.Z / 3))
  90.         })
  91.     end
  92. end
  93.  
  94. if game.PlaceId == 6872274481 or game.PlaceId == 8560631822 or game.PlaceId == 8444591321 then
  95.     if LocalPlayer and HumanoidRootPart then
  96.         print("Functional..")
  97.         wait(5)
  98.         if KnockbackCont then
  99.             KnockbackCont.kbDirectionStrength = 0
  100.             KnockbackCont.kbUpwardStrength = 0
  101.         end
  102.         print("Velocity Applied")
  103.         wait(2)
  104.         while true do
  105.             wait()
  106.             Humanoid.WalkSpeed = 23
  107.         end
  108.         print("Speed Applied")
  109.         wait(2)
  110.         repeat
  111.             task.wait(0.03)
  112.             local Sword = GetSword()
  113.             local Target = FindNearestPlayer(true, 20)
  114.             if Target then
  115.                 game:GetService("ReplicatedStorage").rbxts_include.node_modules["@rbxts"].net.out._NetManaged.SwordHit:FireServer({
  116.                     ["entityInstance"] = Target.Character,
  117.                     ["chargedAttack"] = {
  118.                         ["chargeRatio"] = 1
  119.                     },
  120.                     ["validate"] = {
  121.                         ["selfPosition"] = (LocalPlayer.Character:WaitForChild("HumanoidRootPart").Position - Target.Character:WaitForChild("HumanoidRootPart").Position).Unit * math.min(2, (LocalPlayer.Character:WaitForChild("HumanoidRootPart").Position - Target.Character:WaitForChild("HumanoidRootPart").Position).Magnitude) + Target.Character:WaitForChild("HumanoidRootPart").Position,
  122.                         ["targetPosition"] = Target.Character:WaitForChild("HumanoidRootPart").Position,
  123.                     },
  124.                     ["weapon"] = Sword
  125.                 })
  126.             end
  127.         until not game
  128.         print("KillAura Applied")
  129.         wait(2)
  130.         repeat
  131.             task.wait()
  132.             local NearestBed = GetBed(28)
  133.             if NearestBed then
  134.                 DestroyBed()
  135.             end
  136.         until not game
  137.         print("Breaker Applied")
  138.         wait(1)
  139.         print("HaveFUN")
  140.     end
  141. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement