0% found this document useful (0 votes)
2K views2 pages

OP Script With Kill All and More

d

Uploaded by

Amir Loong
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2K views2 pages

OP Script With Kill All and More

d

Uploaded by

Amir Loong
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

local RunService = game:GetService("RunService")

local Players = game:GetService("Players")


local LocalPlayer = Players.LocalPlayer
local Character = LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()
local EventModule =
require(game:GetService("ReplicatedStorage").Modules.Shared.Event)
local KillAll = false
local MineAll = false
local ChopAll = false
local Range = 500
local Cooldown = 0
local Library =
loadstring(game:HttpGet("https://raw.githubusercontent.com/theneutral0ne/wally-
modified/refs/heads/main/wally-modified.lua"))()
local Window = Library:CreateWindow("Credit: Neutral")

Window:Slider("Range", { min = 10, max = 1000, default = 500 }, function(Value)


Range = Value
end)
Window:Toggle("Kill All", {}, function(Value)
KillAll = Value
end)
Window:Toggle("Mine All", {}, function(Value)
MineAll = Value
end)
Window:Toggle("Chop All", {}, function(Value)
ChopAll = Value
end)

local function GetPartPosition(Object)


if not Object then return nil end
local RootPart = Object.PrimaryPart or
Object:FindFirstChild("HumanoidRootPart") or
Object:FindFirstChildWhichIsA("BasePart")
return RootPart and RootPart.Position or nil
end

RunService.RenderStepped:Connect(function(Delta)
Character = LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()
local HumanoidRootPart = Character and
Character:FindFirstChild("HumanoidRootPart")
local Tool = Character and Character:FindFirstChildWhichIsA("Tool")
local ToolType = Tool and Tool:FindFirstChild("ItemConfig") and
require(Tool.ItemConfig).ToolType
Cooldown += Delta

if not (Character and HumanoidRootPart and Tool) then return end


if Cooldown < 0.05 then return end
Cooldown = 0
if KillAll then
local NearestMob,NearestMobDistance = nil,math.huge
for _, Mob in workspace.Mobs:GetChildren() do
if Mob:FindFirstChild("Enemy") and Mob.Enemy.Health > 0 and
Mob:FindFirstChild("MobConfig") and not string.find(string.lower(Mob.Name),
"dummy") then
local Position = GetPartPosition(Mob)
if Position then
local Distance = (HumanoidRootPart.Position -
Position).Magnitude
if Distance <= Range and Distance < NearestMobDistance then
NearestMob = Mob
NearestMobDistance = Distance
end
end
end
end
if NearestMob then
EventModule:FireServer("DamageEntity", NearestMob, nil, "Melee")
end
end
if (MineAll and ToolType == "Pickaxe") or (ChopAll and ToolType == "Axe") then
local NearestProp, NearestPropDistance, NearestPropHitType = nil,
math.huge, nil
for _, Prop in workspace.Props:GetChildren() do
local PropConfig = Prop:FindFirstChild("PropConfig")
local HeldAttributes = Prop:FindFirstChild("HeldAttributes")
if PropConfig and Prop:FindFirstChild("HeldAttributes") then
local Health = HeldAttributes:GetAttribute("Health")
if Health and Health > 0 then
local Config = require(PropConfig)
local PropType = Config and Config.PropType
local WantsOre = (MineAll and ToolType == "Pickaxe" and
PropType == "Ore")
local WantsWood = (ChopAll and ToolType == "Axe" and PropType
== "Wood")
if WantsOre or WantsWood then
local Position = GetPartPosition(Prop)
if Position then
local Distance = (HumanoidRootPart.Position -
Position).Magnitude
if Distance <= Range and Distance < NearestPropDistance
then
NearestProp = Prop
NearestPropDistance = Distance
NearestPropHitType = WantsOre and "Pickaxe" or
"Axe"
end
end
end
end
end
end
if NearestProp and NearestPropHitType then
EventModule:FireServer("DamageEntity", NearestProp, nil,
NearestPropHitType)
end
end
end)

You might also like