Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local LocalPlayer = game.Players.LocalPlayer
- local Humanoid = LocalPlayer.Character:FindFirstChild("Humanoid")
- local HumanoidRootPart = LocalPlayer.Character:FindFirstChild("HumanoidRootPart")
- local KnockbackCont = debug.getupvalue(require(game:GetService("ReplicatedStorage").TS.damage["knockback-util"]).KnockbackUtil.calculateKnockbackVelocity, 1)
- local BlockHit = game:GetService("ReplicatedStorage").rbxts_include.node_modules["@easy-games"]["block-engine"].node_modules["@rbxts"].net.out._NetManaged.DamageBlock
- local raycastParams = RaycastParams.new()
- raycastParams.IgnoreWater = true
- local function Alive(plr)
- return plr and plr.Character:FindFirstChildOfClass("Humanoid") and plr.Character:FindFirstChildOfClass("Humanoid").Health > 0.11
- end
- local function FindNearestPlayer(teamcheck, distance)
- local TeamCheck = teamcheck
- local NearestPlayer = nil
- local MinDistance = math.huge
- for _, player in pairs(game:GetService("Players"):GetPlayers()) do
- if player ~= LocalPlayer and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
- if not TeamCheck or player.Team ~= LocalPlayer.Team then
- if Alive(player) then
- local Distances = (LocalPlayer.Character:FindFirstChild("HumanoidRootPart").Position - player.Character:FindFirstChild("HumanoidRootPart").Position).Magnitude
- if Distances < MinDistance and Distances <= distance then
- MinDistance = Distances
- NearestPlayer = player
- end
- end
- end
- end
- end
- return NearestPlayer
- end
- local SwordRank = {
- [1] = { Name = "wood_sword", Rank = 1 },
- [2] = { Name = "stone_sword", Rank = 2 },
- [3] = { Name = "iron_sword", Rank = 3 },
- [4] = { Name = "diamond_sword", Rank = 4 },
- [5] = { Name = "void_sword", Rank = 5 },
- [6] = { Name = "emerald_sword", Rank = 6 },
- [7] = { Name = "rageblade", Rank = 7 },
- }
- local function GetSword()
- local bestsword = nil
- local bestrank = 0
- for i, v in pairs(LocalPlayer.Character.InventoryFolder.Value:GetChildren()) do
- if v.Name:match("sword") or v.Name:match("blade") then
- for _, data in pairs(SwordRank) do
- if data["Name"] == v.Name then
- if bestrank <= data["Rank"] then
- bestrank = data["Rank"]
- bestsword = v
- end
- end
- end
- end
- end
- return bestsword
- end
- local function GetBed(range)
- local nearestBed
- local nearestDistance = math.huge
- local localPlayer = game.Players.LocalPlayer
- for _, v in pairs(game.Workspace:GetChildren()) do
- if v.Name == "bed" and v.Blanket.BrickColor ~= localPlayer.Team.TeamColor then
- local distance = (v.Position - localPlayer.Character.HumanoidRootPart.Position).magnitude
- if distance < nearestDistance and distance <= range then
- nearestBed = v
- nearestDistance = distance
- end
- end
- end
- return nearestBed
- end
- local function DestroyBed(bed)
- local raycastResult = workspace:Raycast(bed.Position + Vector3.new(0, 13, 0), Vector3.new(0, -16, 0), raycastParams)
- if raycastResult then
- local nearestBed = raycastResult.Instance
- BlockHit:InvokeServer({
- ["blockRef"] = {
- ["blockPosition"] = Vector3.new(math.round(nearestBed.Position.X / 3), math.round(nearestBed.Position.Y / 3), math.round(nearestBed.Position.Z / 3))
- },
- ["hitPosition"] = Vector3.new(math.round(nearestBed.Position.X / 3), math.round(nearestBed.Position.Y / 3), math.round(nearestBed.Position.Z / 3)),
- ["hitNormal"] = Vector3.new(math.round(nearestBed.Position.X / 3), math.round(nearestBed.Position.Y / 3), math.round(nearestBed.Position.Z / 3))
- })
- end
- end
- if game.PlaceId == 6872274481 or game.PlaceId == 8560631822 or game.PlaceId == 8444591321 then
- if LocalPlayer and HumanoidRootPart then
- print("Functional..")
- wait(5)
- if KnockbackCont then
- KnockbackCont.kbDirectionStrength = 0
- KnockbackCont.kbUpwardStrength = 0
- end
- print("Velocity Applied")
- wait(2)
- while true do
- wait()
- Humanoid.WalkSpeed = 23
- end
- print("Speed Applied")
- wait(2)
- repeat
- task.wait(0.03)
- local Sword = GetSword()
- local Target = FindNearestPlayer(true, 20)
- if Target then
- game:GetService("ReplicatedStorage").rbxts_include.node_modules["@rbxts"].net.out._NetManaged.SwordHit:FireServer({
- ["entityInstance"] = Target.Character,
- ["chargedAttack"] = {
- ["chargeRatio"] = 1
- },
- ["validate"] = {
- ["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,
- ["targetPosition"] = Target.Character:WaitForChild("HumanoidRootPart").Position,
- },
- ["weapon"] = Sword
- })
- end
- until not game
- print("KillAura Applied")
- wait(2)
- repeat
- task.wait()
- local NearestBed = GetBed(28)
- if NearestBed then
- DestroyBed()
- end
- until not game
- print("Breaker Applied")
- wait(1)
- print("HaveFUN")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement