Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local WindUI = loadstring(game:HttpGet("https://raw.githubusercontent.com/Footagesus/WindUI/main/dist/main.lua"))()
- WindUI:Localization({
- Enabled = true,
- Prefix = "loc:",
- DefaultLanguage = "en",
- Translations = {
- ["en"] = {
- ["KILL_AURA"] = "Kill Aura",
- ["ATTACK_SPEED"] = "Attack Speed",
- ["ATTACK_RANGE"] = "Attack Range",
- ["MULTI_ATTACK"] = "Allow Multiple Enemies"
- }
- }
- })
- WindUI.TransparencyValue = 0.2
- WindUI:SetTheme("Dark")
- local Window = WindUI:CreateWindow({
- Title = "99 Nights in the Forest",
- Icon = "sword",
- Author = "",
- Folder = "Combat_Tools",
- Size = UDim2.fromOffset(400, 300),
- Theme = "Dark",
- SideBarWidth = 200,
- ScrollBarEnabled = true
- })
- local CombatSection = Window:Section({ Title = "Combat", Opened = true })
- local CombatTab = CombatSection:Tab({ Title = "Main", Icon = "crosshair" })
- local killAura = false
- local attackSpeed = 0.1
- local attackRange = 500
- local multiAttack = false
- CombatTab:Toggle({
- Title = "loc:KILL_AURA",
- Desc = "Automatically attack nearby enemies",
- Value = false,
- Callback = function(v)
- killAura = v
- end
- })
- CombatTab:Slider({
- Title = "loc:ATTACK_SPEED",
- Desc = "Time delay between attacks",
- Value = { Min = 0.1, Max = 1, Default = 0.1 },
- Step = 0.1,
- Callback = function(v)
- attackSpeed = tonumber(v)
- end
- })
- CombatTab:Slider({
- Title = "loc:ATTACK_RANGE",
- Desc = "Maximum attack distance",
- Value = { Min = 0, Max = 500, Default = 500 },
- Step = 10,
- Callback = function(v)
- attackRange = tonumber(v)
- end
- })
- CombatTab:Toggle({
- Title = "loc:MULTI_ATTACK",
- Desc = "Attack all enemies in range if enabled",
- Value = false,
- Callback = function(v)
- multiAttack = v
- end
- })
- local Players = game:GetService("Players")
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local Remote = ReplicatedStorage.RemoteEvents.ToolDamageObject
- local LocalPlayer = Players.LocalPlayer
- task.spawn(function()
- while task.wait(attackSpeed) do
- if not killAura then
- continue
- end
- local character = LocalPlayer.Character
- if not character then
- continue
- end
- local hrp = character:FindFirstChild("HumanoidRootPart")
- if not hrp then
- continue
- end
- local weapon
- pcall(function()
- for _, v in ipairs(LocalPlayer.PlayerGui.Interface.Hotbar:GetChildren()) do
- if v:IsA("ImageButton") then
- local stroke = v:FindFirstChild("EquippedStroke")
- if stroke and stroke.Enabled then
- local label = v:FindFirstChildOfClass("TextLabel")
- if label then
- weapon = LocalPlayer.Inventory:FindFirstChild(label.Text)
- break
- end
- end
- end
- end
- end)
- if not weapon then
- continue
- end
- for _, target in ipairs(workspace.Characters:GetChildren()) do
- if target ~= character then
- local targetHRP = target:FindFirstChild("HumanoidRootPart")
- if targetHRP then
- local distance = (hrp.Position - targetHRP.Position).Magnitude
- if distance <= attackRange then
- local ohInstance1 = target
- local ohInstance2 = weapon
- local ohString3 = "999_" .. LocalPlayer.UserId
- local ohCFrame4 = target:GetPivot()
- task.defer(function()
- pcall(function()
- Remote:InvokeServer(ohInstance1, ohInstance2, ohString3, ohCFrame4)
- end)
- end)
- if not multiAttack then
- break
- end
- end
- end
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment