Dust Sans Simulator Silent aim dupe method update
Key Required

Dust Sans Simulator Silent aim dupe method update

(RESET 3 PART 1) Dust Sans Simulator - The Remake alfountain18alfountain18 5.4K views 85 executesUpdated Aug 17, 2025
Unrated
00
Lua Script•1295 lines (43795 chars)
--// Enemy Aim / Attack Assist GUI + Dupe GUI (Page 3)
--// Same look & structure, with an extra page for manual dupe controls

--==============================================================
--  SERVICES & ROOTS
--==============================================================
local Players       = game:GetService("Players")
local RunService    = game:GetService("RunService")
local UserInput     = game:GetService("UserInputService")
local TweenService  = game:GetService("TweenService")

local player        = Players.LocalPlayer
local playerGui     = player:WaitForChild("PlayerGui")

-- Enemy container path (as per your project)
local enemiesFolder = workspace:WaitForChild("Enemys") -- keep exact spelling per your place

-- Active attacks root (Zones live under here)
local activeAttacks = workspace:FindFirstChild("ActiveAttacks")

-- Ability / Remote paths (for Dupe page)
local Abilitys          = player:WaitForChild("Abilitys")
local AbilityHandler    = playerGui:WaitForChild("AbilityHandler")
local ChequeRemote      = AbilityHandler:WaitForChild("Cheque")

-- Constants
local MAX_ZONE_INDEX        = 25           -- scan Zone1..Zone25
local NEARBY_DISTANCE_LIMIT = 150          -- studs
local GUI_WIDTH             = 520
local GUI_HEIGHT            = 480
local LEFT_WIDTH            = 210
local RIGHT_WIDTH           = 290

--==============================================================
--  GLOBAL STATE / PERSISTENT FLAGS
--==============================================================
_G.SilentAim          = _G.SilentAim          or false
_G.SlashAssist        = _G.SlashAssist        or true
_G.MeleeAssist        = _G.MeleeAssist        or false
_G.UniversalAutoAim   = _G.UniversalAutoAim   or false

_G.BoneThrowAssist    = _G.BoneThrowAssist    or false
_G.BoneSpinAssist     = _G.BoneSpinAssist     or false
_G.FireCircleAssist   = _G.FireCircleAssist   or false
_G.ClassyAssist       = _G.ClassyAssist       or false

_G.ClassyOffsetX      = _G.ClassyOffsetX      or 0
_G.ClassyOffsetY      = _G.ClassyOffsetY      or 2
_G.ClassyOffsetZ      = _G.ClassyOffsetZ      or -3
_G.ClassyFaceMode     = _G.ClassyFaceMode     or "Enemy" -- "Enemy" | "Player" | "EnemyMovement"
_G.ClassyNoClip       = _G.ClassyNoClip       or false

_G.AutoRefreshEnemies = _G.AutoRefreshEnemies ~= false  -- default true unless explicitly set false previously
_G.SelectedEnemy      = _G.SelectedEnemy or nil

-- prediction default for silent aim
_G.PredictionValue    = _G.PredictionValue or 0.10

-- housekeeping registries
local enemyButtons = {}            -- [enemy instance] = TextButton
local enemyConnections = {}        -- [enemy instance] = { RBXScriptConnection, ... }
local universalTarget = nil        -- nearest enemy when universal aim is on

--==============================================================
--  UI ROOT (SAME LOOK)
--==============================================================
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "EnemyAimGUI"
screenGui.ResetOnSpawn = false
screenGui.Parent = playerGui

local mainFrame = Instance.new("Frame")
mainFrame.Name = "Container"
mainFrame.Size = UDim2.new(0, GUI_WIDTH, 0, GUI_HEIGHT)
mainFrame.Position = UDim2.new(0.30, 0, 0.24, 0)
mainFrame.BackgroundColor3 = Color3.fromRGB(40,40,40)
mainFrame.Active = true
mainFrame.Draggable = true
mainFrame.Parent = screenGui

local corner = Instance.new("UICorner")
corner.CornerRadius = UDim.new(0,12)
corner.Parent = mainFrame

-- Header
local header = Instance.new("TextLabel")
header.Name = "Header"
header.Size = UDim2.new(1, -20, 0, 28)
header.Position = UDim2.new(0, 10, 0, 8)
header.BackgroundTransparency = 1
header.Text = "Enemy Aim / Attack Assist"
header.TextColor3 = Color3.fromRGB(255,255,255)
header.TextXAlignment = Enum.TextXAlignment.Left
header.Font = Enum.Font.SourceSansBold
header.TextScaled = true
header.Parent = mainFrame

-- Divider
local divider = Instance.new("Frame")
divider.Size = UDim2.new(1, -20, 0, 1)
divider.Position = UDim2.new(0, 10, 0, 40)
divider.BackgroundColor3 = Color3.fromRGB(72,72,72)
divider.BorderSizePixel = 0
divider.Parent = mainFrame

--==============================================================
--  UNIVERSAL AUTO AIM BUTTON (TOP)
--==============================================================
local universalButton = Instance.new("TextButton")
universalButton.Name = "UniversalBtn"
universalButton.Size = UDim2.new(1, -20, 0, 36)
universalButton.Position = UDim2.new(0, 10, 0, 46)
universalButton.BackgroundColor3 = Color3.fromRGB(100,100,100)
universalButton.TextColor3 = Color3.fromRGB(255,255,255)
universalButton.Font = Enum.Font.SourceSansBold
universalButton.TextScaled = true
universalButton.Text = _G.UniversalAutoAim and "Universal Auto Aim: On" or "Universal Auto Aim: Off"
universalButton.Parent = mainFrame

local universalCorner = Instance.new("UICorner")
universalCorner.CornerRadius = UDim.new(0,8)
universalCorner.Parent = universalButton

universalButton.MouseButton1Click:Connect(function()
	_G.UniversalAutoAim = not _G.UniversalAutoAim
	universalButton.Text = _G.UniversalAutoAim and "Universal Auto Aim: On" or "Universal Auto Aim: Off"
end)

--==============================================================
--  LEFT: ENEMY LIST (SAME LOOK)
--==============================================================
local leftPanel = Instance.new("Frame")
leftPanel.Name = "LeftPanel"
leftPanel.Size = UDim2.new(0, LEFT_WIDTH, 1, -100)
leftPanel.Position = UDim2.new(0, 10, 0, 90)
leftPanel.BackgroundTransparency = 1
leftPanel.Parent = mainFrame

local leftScroll = Instance.new("ScrollingFrame")
leftScroll.Name = "EnemyScroll"
leftScroll.Size = UDim2.new(1, 0, 1, -42) -- leave room for refresh/reset row
leftScroll.CanvasSize = UDim2.new(0,0,0,0)
leftScroll.ScrollBarThickness = 6
leftScroll.BackgroundColor3 = Color3.fromRGB(45,45,45)
leftScroll.BorderSizePixel = 0
leftScroll.Parent = leftPanel

local leftLayout = Instance.new("UIListLayout")
leftLayout.Padding = UDim.new(0,6)
leftLayout.SortOrder = Enum.SortOrder.LayoutOrder
leftLayout.Parent = leftScroll

-- Refresh / Reset row
local leftBottomRow = Instance.new("Frame")
leftBottomRow.Size = UDim2.new(1, 0, 0, 36)
leftBottomRow.Position = UDim2.new(0, 0, 1, -36)
leftBottomRow.BackgroundTransparency = 1
leftBottomRow.Parent = leftPanel

local refreshBtn = Instance.new("TextButton")
refreshBtn.Size = UDim2.new(0.5, -4, 1, 0)
refreshBtn.Position = UDim2.new(0, 0, 0, 0)
refreshBtn.BackgroundColor3 = Color3.fromRGB(90,90,90)
refreshBtn.TextColor3 = Color3.fromRGB(255,255,255)
refreshBtn.Font = Enum.Font.SourceSansBold
refreshBtn.TextScaled = true
refreshBtn.Text = "Refresh"
refreshBtn.Parent = leftBottomRow
local rbc = Instance.new("UICorner"); rbc.CornerRadius = UDim.new(0,6); rbc.Parent = refreshBtn

local resetBtn = Instance.new("TextButton")
resetBtn.Size = UDim2.new(0.5, -4, 1, 0)
resetBtn.Position = UDim2.new(0.5, 8, 0, 0)
resetBtn.BackgroundColor3 = Color3.fromRGB(110,65,65)
resetBtn.TextColor3 = Color3.fromRGB(255,255,255)
resetBtn.Font = Enum.Font.SourceSansBold
resetBtn.TextScaled = true
resetBtn.Text = "Reset"
resetBtn.Parent = leftBottomRow
local rsb = Instance.new("UICorner"); rsb.CornerRadius = UDim.new(0,6); rsb.Parent = resetBtn

--==============================================================
--  RIGHT: PAGES CONTAINER (SAME LOOK)
--==============================================================
local rightPanel = Instance.new("Frame")
rightPanel.Name = "RightPanel"
rightPanel.Size = UDim2.new(0, RIGHT_WIDTH, 1, -100)
rightPanel.Position = UDim2.new(0, 220, 0, 90)
rightPanel.BackgroundColor3 = Color3.fromRGB(60,60,60)
rightPanel.Parent = mainFrame

local rightCorner = Instance.new("UICorner")
rightCorner.CornerRadius = UDim.new(0,12)
rightCorner.Parent = rightPanel

local pages = Instance.new("Folder")
pages.Name = "Pages"
pages.Parent = rightPanel

--==============================================================
--  PAGE 1: MAIN CONTROLS (SAME LOOK)
--==============================================================
local mainPage = Instance.new("Frame")
mainPage.Name = "MainPage"
mainPage.Size = UDim2.new(1, 0, 1, 0)
mainPage.BackgroundTransparency = 1
mainPage.Visible = true
mainPage.Parent = pages

-- Title
local silentTitle = Instance.new("TextLabel")
silentTitle.Size = UDim2.new(1, -20, 0, 34)
silentTitle.Position = UDim2.new(0, 10, 0, 10)
silentTitle.BackgroundTransparency = 1
silentTitle.TextColor3 = Color3.fromRGB(255,255,255)
silentTitle.Font = Enum.Font.SourceSansBold
silentTitle.TextScaled = true
silentTitle.Text = "Silent Aim"
silentTitle.Parent = mainPage

-- Silent toggle
local fireButton = Instance.new("TextButton")
fireButton.Size = UDim2.new(0, 270, 0, 44)
fireButton.Position = UDim2.new(0, 10, 0, 52)
fireButton.BackgroundColor3 = Color3.fromRGB(90,90,90)
fireButton.TextColor3 = Color3.fromRGB(255,255,255)
fireButton.Font = Enum.Font.SourceSansBold
fireButton.TextScaled = true
fireButton.Text = _G.SilentAim and "Silent Aim: On" or "Silent Aim: Off"
fireButton.Parent = mainPage

-- Prediction label
local predictionLabel = Instance.new("TextLabel")
predictionLabel.Size = UDim2.new(0, 270, 0, 26)
predictionLabel.Position = UDim2.new(0, 10, 0, 100)
predictionLabel.BackgroundTransparency = 1
predictionLabel.TextColor3 = Color3.fromRGB(255,255,255)
predictionLabel.Font = Enum.Font.SourceSans
predictionLabel.TextScaled = true
predictionLabel.Text = ("Prediction: %.2f"):format(_G.PredictionValue)
predictionLabel.Parent = mainPage

-- Prediction box
local predictionBox = Instance.new("TextBox")
predictionBox.Size = UDim2.new(0, 270, 0, 30)
predictionBox.Position = UDim2.new(0, 10, 0, 130)
predictionBox.BackgroundColor3 = Color3.fromRGB(80,80,80)
predictionBox.TextColor3 = Color3.fromRGB(255,255,255)
predictionBox.Font = Enum.Font.SourceSans
predictionBox.TextScaled = true
predictionBox.ClearTextOnFocus = false
predictionBox.Text = tostring(_G.PredictionValue)
predictionBox.Parent = mainPage
local predCorner = Instance.new("UICorner"); predCorner.CornerRadius = UDim.new(0,6); predCorner.Parent = predictionBox

-- Slash assist
local slashButton = Instance.new("TextButton")
slashButton.Size = UDim2.new(0, 270, 0, 34)
slashButton.Position = UDim2.new(0, 10, 0, 170)
slashButton.BackgroundColor3 = Color3.fromRGB(90,90,90)
slashButton.TextColor3 = Color3.fromRGB(255,255,255)
slashButton.Text = _G.SlashAssist and "Slash Assist: On" or "Slash Assist: Off"
slashButton.Parent = mainPage

-- Melee assist
local meleeButton = Instance.new("TextButton")
meleeButton.Size = UDim2.new(0, 270, 0, 34)
meleeButton.Position = UDim2.new(0, 10, 0, 210)
meleeButton.BackgroundColor3 = Color3.fromRGB(90,90,90)
meleeButton.TextColor3 = Color3.fromRGB(255,255,255)
meleeButton.Text = _G.MeleeAssist and "Melee Assist: On" or "Melee Assist: Off"
meleeButton.Parent = mainPage

-- Assist toggles (global)
local function makeAssistButton(parent, label, y, key)
	local b = Instance.new("TextButton")
	b.Size = UDim2.new(0, 270, 0, 32)
	b.Position = UDim2.new(0, 10, 0, y)
	b.BackgroundColor3 = Color3.fromRGB(90,90,90)
	b.TextColor3 = Color3.fromRGB(255,255,255)
	b.Font = Enum.Font.SourceSans
	b.TextScaled = true
	b.Text = string.format("%s: %s", label, (_G[key] and "On" or "Off"))
	b.Parent = parent
	b.MouseButton1Click:Connect(function()
		_G[key] = not _G[key]
		b.Text = string.format("%s: %s", label, (_G[key] and "On" or "Off"))
	end)
	return b
end

makeAssistButton(mainPage, "BoneThrow Assist", 250, "BoneThrowAssist")
makeAssistButton(mainPage, "BoneSpin Assist",  286, "BoneSpinAssist")
makeAssistButton(mainPage, "FireCircle Assist",322, "FireCircleAssist")
makeAssistButton(mainPage, "Classy Assist",   358, "ClassyAssist")

-- Page switch row (Classy + Dupe side-by-side)
local switchRow = Instance.new("Frame")
switchRow.Size = UDim2.new(0, 270, 0, 32)
switchRow.Position = UDim2.new(0, 10, 0, 394)
switchRow.BackgroundTransparency = 1
switchRow.Parent = mainPage

local openClassyBtn = Instance.new("TextButton")
openClassyBtn.Size = UDim2.new(0.5, -4, 1, 0)
openClassyBtn.Position = UDim2.new(0, 0, 0, 0)
openClassyBtn.BackgroundColor3 = Color3.fromRGB(110,110,110)
openClassyBtn.TextColor3 = Color3.fromRGB(255,255,255)
openClassyBtn.Font = Enum.Font.SourceSansBold
openClassyBtn.TextScaled = true
openClassyBtn.Text = "Classy Settings ▶"
openClassyBtn.Parent = switchRow
local ocbC = Instance.new("UICorner"); ocbC.CornerRadius = UDim.new(0,6); ocbC.Parent = openClassyBtn

local openDupeBtn = Instance.new("TextButton")
openDupeBtn.Size = UDim2.new(0.5, -4, 1, 0)
openDupeBtn.Position = UDim2.new(0.5, 8, 0, 0)
openDupeBtn.BackgroundColor3 = Color3.fromRGB(110,110,110)
openDupeBtn.TextColor3 = Color3.fromRGB(255,255,255)
openDupeBtn.Font = Enum.Font.SourceSansBold
openDupeBtn.TextScaled = true
openDupeBtn.Text = "Dupe ▶"
openDupeBtn.Parent = switchRow
local odbC = Instance.new("UICorner"); odbC.CornerRadius = UDim.new(0,6); odbC.Parent = openDupeBtn

-- Selected enemy title (live)
local selectedTitle = Instance.new("TextLabel")
selectedTitle.Size = UDim2.new(1, -20, 0, 20)
selectedTitle.Position = UDim2.new(0, 10, 0, 434)
selectedTitle.BackgroundTransparency = 1
selectedTitle.TextColor3 = Color3.fromRGB(220,220,220)
selectedTitle.Font = Enum.Font.SourceSansItalic
selectedTitle.TextScaled = true
selectedTitle.Text = "Silent Aim: None"
selectedTitle.Parent = mainPage

--==============================================================
--  PAGE 2: CLASSY SETTINGS (SAME LOOK)
--==============================================================
local classyPage = Instance.new("Frame")
classyPage.Name = "ClassyPage"
classyPage.Size = UDim2.new(1, 0, 1, 0)
classyPage.BackgroundTransparency = 1
classyPage.Visible = false
classyPage.Parent = pages

local cpTitle = Instance.new("TextLabel")
cpTitle.Size = UDim2.new(1, -20, 0, 34)
cpTitle.Position = UDim2.new(0, 10, 0, 10)
cpTitle.BackgroundTransparency = 1
cpTitle.TextColor3 = Color3.fromRGB(255,255,255)
cpTitle.Font = Enum.Font.SourceSansBold
cpTitle.TextScaled = true
cpTitle.Text = "Classy Settings"
cpTitle.Parent = classyPage

local backBtn = Instance.new("TextButton")
backBtn.Size = UDim2.new(0, 120, 0, 28)
backBtn.Position = UDim2.new(0, 10, 0, 48)
backBtn.BackgroundColor3 = Color3.fromRGB(90,90,90)
backBtn.TextColor3 = Color3.fromRGB(255,255,255)
backBtn.Text = "◀ Back"
backBtn.Parent = classyPage
local backCorner = Instance.new("UICorner"); backCorner.CornerRadius = UDim.new(0,6); backCorner.Parent = backBtn

-- Helper to make labeled box
local function labeledBox(parent, labelText, x, y, val)
	local label = Instance.new("TextLabel")
	label.Size = UDim2.new(0, 54, 0, 24)
	label.Position = UDim2.new(0, x, 0, y)
	label.BackgroundTransparency = 1
	label.TextColor3 = Color3.fromRGB(230,230,230)
	label.Font = Enum.Font.SourceSans
	label.TextScaled = true
	label.Text = labelText
	label.Parent = parent

	local box = Instance.new("TextBox")
	box.Size = UDim2.new(0, 64, 0, 24)
	box.Position = UDim2.new(0, x + 58, 0, y)
	box.BackgroundColor3 = Color3.fromRGB(90,90,90)
	box.TextColor3 = Color3.fromRGB(255,255,255)
	box.Text = tostring(val)
	box.ClearTextOnFocus = false
	box.Parent = parent
	local bc = Instance.new("UICorner"); bc.CornerRadius = UDim.new(0,6); bc.Parent = box
	return box
end

local xBox = labeledBox(classyPage, "OffX", 10, 88, _G.ClassyOffsetX)
local yBox = labeledBox(classyPage, "OffY", 10, 118, _G.ClassyOffsetY)
local zBox = labeledBox(classyPage, "OffZ", 10, 148, _G.ClassyOffsetZ)

-- Face mode selector
local faceLabel = Instance.new("TextLabel")
faceLabel.Size = UDim2.new(0, 70, 0, 24)
faceLabel.Position = UDim2.new(0, 150, 0, 88)
faceLabel.BackgroundTransparency = 1
faceLabel.TextColor3 = Color3.fromRGB(230,230,230)
faceLabel.Font = Enum.Font.SourceSans
faceLabel.TextScaled = true
faceLabel.Text = "Face:"
faceLabel.Parent = classyPage

local faceBtn = Instance.new("TextButton")
faceBtn.Size = UDim2.new(0, 120, 0, 24)
faceBtn.Position = UDim2.new(0, 196, 0, 88)
faceBtn.BackgroundColor3 = Color3.fromRGB(90,90,90)
faceBtn.TextColor3 = Color3.fromRGB(255,255,255)
faceBtn.Text = tostring(_G.ClassyFaceMode or "Enemy")
faceBtn.Parent = classyPage
local faceCorner = Instance.new("UICorner"); faceCorner.CornerRadius = UDim.new(0,6); faceCorner.Parent = faceBtn

local faceModes = {"Enemy","Player","EnemyMovement"}
faceBtn.MouseButton1Click:Connect(function()
	local current = tostring(_G.ClassyFaceMode or "Enemy")
	local idx = 1
	for i,m in ipairs(faceModes) do if m == current then idx = i break end end
	idx = (idx % #faceModes) + 1
	_G.ClassyFaceMode = faceModes[idx]
	faceBtn.Text = _G.ClassyFaceMode
end)

-- NoClip toggle
local noclipBtn = Instance.new("TextButton")
noclipBtn.Size = UDim2.new(0, 120, 0, 24)
noclipBtn.Position = UDim2.new(0, 196, 0, 118)
noclipBtn.BackgroundColor3 = Color3.fromRGB(90,90,90)
noclipBtn.TextColor3 = Color3.fromRGB(255,255,255)
noclipBtn.Text = _G.ClassyNoClip and "NoClip: On" or "NoClip: Off"
noclipBtn.Parent = classyPage
local ncCorner = Instance.new("UICorner"); ncCorner.CornerRadius = UDim.new(0,6); ncCorner.Parent = noclipBtn
noclipBtn.MouseButton1Click:Connect(function()
	_G.ClassyNoClip = not _G.ClassyNoClip
	noclipBtn.Text = _G.ClassyNoClip and "NoClip: On" or "NoClip: Off"
end)

-- Apply Offset
local applyBtn = Instance.new("TextButton")
applyBtn.Size = UDim2.new(0, 120, 0, 24)
applyBtn.Position = UDim2.new(0, 196, 0, 148)
applyBtn.BackgroundColor3 = Color3.fromRGB(110,110,110)
applyBtn.TextColor3 = Color3.fromRGB(255,255,255)
applyBtn.Text = "Apply Offset"
applyBtn.Parent = classyPage
local apCorner = Instance.new("UICorner"); apCorner.CornerRadius = UDim.new(0,6); apCorner.Parent = applyBtn
applyBtn.MouseButton1Click:Connect(function()
	_G.ClassyOffsetX = tonumber(xBox.Text) or 0
	_G.ClassyOffsetY = tonumber(yBox.Text) or 0
	_G.ClassyOffsetZ = tonumber(zBox.Text) or 0
end)

-- Page switches
openClassyBtn.MouseButton1Click:Connect(function()
	mainPage.Visible   = false
	classyPage.Visible = true
end)
backBtn.MouseButton1Click:Connect(function()
	classyPage.Visible = false
	mainPage.Visible   = true
end)

--==============================================================
--  PAGE 3: DUPE GUI (Simple manual controls)
--==============================================================
local dupePage = Instance.new("Frame")
dupePage.Name = "DupePage"
dupePage.Size = UDim2.new(1, 0, 1, 0)
dupePage.BackgroundTransparency = 1
dupePage.Visible = false
dupePage.Parent = pages

local dTitle = Instance.new("TextLabel")
dTitle.Size = UDim2.new(1, -20, 0, 34)
dTitle.Position = UDim2.new(0, 10, 0, 10)
dTitle.BackgroundTransparency = 1
dTitle.TextColor3 = Color3.fromRGB(255,255,255)
dTitle.Font = Enum.Font.SourceSansBold
dTitle.TextScaled = true
dTitle.Text = "Dupe GUI"
dTitle.Parent = dupePage

local dBack = Instance.new("TextButton")
dBack.Size = UDim2.new(0, 120, 0, 28)
dBack.Position = UDim2.new(0, 10, 0, 48)
dBack.BackgroundColor3 = Color3.fromRGB(90,90,90)
dBack.TextColor3 = Color3.fromRGB(255,255,255)
dBack.Text = "◀ Back"
dBack.Parent = dupePage
local dBackC = Instance.new("UICorner"); dBackC.CornerRadius = UDim.new(0,6); dBackC.Parent = dBack
dBack.MouseButton1Click:Connect(function()
	dupePage.Visible = false
	mainPage.Visible = true
end)

-- Scrollable instructions
local InstructionsFrame = Instance.new("ScrollingFrame")
InstructionsFrame.Size = UDim2.new(1, -20, 0, 110)
InstructionsFrame.Position = UDim2.new(0, 10, 0, 84)
InstructionsFrame.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
InstructionsFrame.ScrollBarThickness = 6
InstructionsFrame.Parent = dupePage
local instCorner = Instance.new("UICorner"); instCorner.CornerRadius = UDim.new(0,6); instCorner.Parent = InstructionsFrame

local Instructions = Instance.new("TextLabel")
Instructions.Size = UDim2.new(1, -10, 0, 220)
Instructions.TextWrapped = true
Instructions.TextXAlignment = Enum.TextXAlignment.Left
Instructions.TextYAlignment = Enum.TextYAlignment.Top
Instructions.BackgroundTransparency = 1
Instructions.TextColor3 = Color3.fromRGB(255,255,255)
Instructions.Font = Enum.Font.SourceSans
Instructions.TextSize = 16
Instructions.Text = "Use the tool and make sure it on cooldown.\n\nSecond you have to first press Subtract then Add to dupe a tool and if you want to dupe more you have to use those duped tools again and make sure 2 or more is on cooldown.\n\nType the name of your weapon (inventory) in the box below."
Instructions.Parent = InstructionsFrame

-- Weapon name box
local weaponBox = Instance.new("TextBox")
weaponBox.Size = UDim2.new(1, -20, 0, 30)
weaponBox.Position = UDim2.new(0, 10, 0, 204)
weaponBox.BackgroundColor3 = Color3.fromRGB(80,80,80)
weaponBox.TextColor3 = Color3.fromRGB(255,255,255)
weaponBox.ClearTextOnFocus = false
weaponBox.PlaceholderText = "Type weapon (inventory) here"
weaponBox.Parent = dupePage
local wbC = Instance.new("UICorner"); wbC.CornerRadius = UDim.new(0,6); wbC.Parent = weaponBox

-- Buttons row (Subtract / Add)
local row = Instance.new("Frame")
row.Size = UDim2.new(1, -20, 0, 34)
row.Position = UDim2.new(0, 10, 0, 244)
row.BackgroundTransparency = 1
row.Parent = dupePage

local subBtn = Instance.new("TextButton")
subBtn.Size = UDim2.new(0.5, -4, 1, 0)
subBtn.Position = UDim2.new(0, 0, 0, 0)
subBtn.BackgroundColor3 = Color3.fromRGB(120,40,40)
subBtn.TextColor3 = Color3.fromRGB(255,255,255)
subBtn.Text = "Subtract"
subBtn.Parent = row
local subC = Instance.new("UICorner"); subC.CornerRadius = UDim.new(0,6); subC.Parent = subBtn

local addBtn = Instance.new("TextButton")
addBtn.Size = UDim2.new(0.5, -4, 1, 0)
addBtn.Position = UDim2.new(0.5, 8, 0, 0)
addBtn.BackgroundColor3 = Color3.fromRGB(40,120,60)
addBtn.TextColor3 = Color3.fromRGB(255,255,255)
addBtn.Text = "Add"
addBtn.Parent = row
local addC = Instance.new("UICorner"); addC.CornerRadius = UDim.new(0,6); addC.Parent = addBtn

-- Inventory finder list
local invTitle = Instance.new("TextLabel")
invTitle.Size = UDim2.new(1, -20, 0, 20)
invTitle.Position = UDim2.new(0, 10, 0, 286)
invTitle.BackgroundTransparency = 1
invTitle.Text = "Inventory:"
invTitle.TextColor3 = Color3.fromRGB(230,230,230)
invTitle.TextXAlignment = Enum.TextXAlignment.Left
invTitle.Parent = dupePage

local invScroll = Instance.new("ScrollingFrame")
invScroll.Size = UDim2.new(1, -20, 0, 140)
invScroll.Position = UDim2.new(0, 10, 0, 308)
invScroll.BackgroundColor3 = Color3.fromRGB(45,45,45)
invScroll.ScrollBarThickness = 6
invScroll.Parent = dupePage
local invCorner = Instance.new("UICorner"); invCorner.CornerRadius = UDim.new(0,6); invCorner.Parent = invScroll

local invLayout = Instance.new("UIListLayout")
invLayout.Padding = UDim.new(0,6)
invLayout.SortOrder = Enum.SortOrder.LayoutOrder
invLayout.Parent = invScroll

local function refreshInventoryList()
	for _, child in ipairs(invScroll:GetChildren()) do
		if child:IsA("TextButton") then child:Destroy() end
	end
	local backpack = player:FindFirstChild("Backpack")
	if not backpack then return end
	for _, tool in ipairs(backpack:GetChildren()) do
		if tool:IsA("Tool") then
			local b = Instance.new("TextButton")
			b.Size = UDim2.new(1, -8, 0, 26)
			b.BackgroundColor3 = Color3.fromRGB(70,70,70)
			b.TextColor3 = Color3.fromRGB(255,255,255)
			b.Text = tool.Name
			b.Parent = invScroll
			local bc = Instance.new("UICorner"); bc.CornerRadius = UDim.new(0,6); bc.Parent = b
			b.MouseButton1Click:Connect(function()
				weaponBox.Text = tool.Name
			end)
		end
	end
	invScroll.CanvasSize = UDim2.new(0,0,0,invLayout.AbsoluteContentSize.Y + 8)
end
refreshInventoryList()
player.ChildAdded:Connect(function(c) if c.Name=="Backpack" then task.wait(0.1) refreshInventoryList() end end)
local bp = player:FindFirstChild("Backpack")
if bp then
	bp.ChildAdded:Connect(function() task.delay(0.1, refreshInventoryList) end)
	bp.ChildRemoved:Connect(function() task.delay(0.1, refreshInventoryList) end)
end

-- Open Dupe from main page
openDupeBtn.MouseButton1Click:Connect(function()
	mainPage.Visible = false
	dupePage.Visible = true
	refreshInventoryList()
end)

-- Dupe button handlers
local function fireCheque(abilityName, action)
	local ability = abilityName and Abilitys:FindFirstChild(abilityName)
	if not ability then
		warn("Ability not found: "..tostring(abilityName))
		return
	end
	local args = {ability, action}
	ChequeRemote:FireServer(unpack(args))
end

subBtn.MouseButton1Click:Connect(function()
	if weaponBox.Text ~= "" then
		fireCheque(weaponBox.Text, "Subtract")
	end
end)

addBtn.MouseButton1Click:Connect(function()
	if weaponBox.Text ~= "" then
		fireCheque(weaponBox.Text, "Add")
	end
end)

--==============================================================
--  UI INTERACTIONS (Main page toggles)
--==============================================================
fireButton.MouseButton1Click:Connect(function()
	_G.SilentAim = not _G.SilentAim
	fireButton.Text = _G.SilentAim and "Silent Aim: On" or "Silent Aim: Off"
end)

slashButton.MouseButton1Click:Connect(function()
	_G.SlashAssist = not _G.SlashAssist
	slashButton.Text = _G.SlashAssist and "Slash Assist: On" or "Slash Assist: Off"
end)

meleeButton.MouseButton1Click:Connect(function()
	_G.MeleeAssist = not _G.MeleeAssist
	meleeButton.Text = _G.MeleeAssist and "Melee Assist: On" or "Melee Assist: Off"
end)

predictionBox:GetPropertyChangedSignal("Text"):Connect(function()
	local v = tonumber(predictionBox.Text)
	if v then
		_G.PredictionValue = v
		predictionLabel.Text = ("Prediction: %.2f"):format(v)
	end
end)

--==============================================================
--  UTILS: ENEMY MANAGEMENT / LISTING
--==============================================================
local function isEnemyAlive(enemy)
	if not enemy or not enemy:IsDescendantOf(enemiesFolder) then return false end
	local hum = enemy:FindFirstChildOfClass("Humanoid")
	local root = enemy:FindFirstChild("HumanoidRootPart") or enemy:FindFirstChild("Torso")
	if not hum or not root then return false end
	if hum.Health <= 0 then return false end
	return true
end

local function getEnemyTorso(enemy)
	if not enemy then return nil end
	return enemy:FindFirstChild("HumanoidRootPart") or enemy:FindFirstChild("Torso")
end

local function playerRoot()
	local char = player.Character
	return char and char:FindFirstChild("HumanoidRootPart") or nil
end

local function distToPlayer(enemy)
	local root = playerRoot()
	local torso = getEnemyTorso(enemy)
	if not root or not torso then return math.huge end
	return (torso.Position - root.Position).Magnitude
end

local function getNearestEnemy()
	local root = playerRoot()
	if not root then return nil end
	local nearest, minDist = nil, math.huge
	for _, enemy in ipairs(enemiesFolder:GetChildren()) do
		if isEnemyAlive(enemy) then
			local d = distToPlayer(enemy)
			if d <= NEARBY_DISTANCE_LIMIT and d < minDist then
				nearest, minDist = enemy, d
			end
		end
	end
	return nearest
end

--==============================================================
--  UI: ENEMY BUTTONS (DE-DUPE + CLEANUP)
--==============================================================
local function createEnemyButton(enemy)
	-- prevent duplicates
	if enemyButtons[enemy] then
		return enemyButtons[enemy]
	end

	local d = distToPlayer(enemy)
	local btn = Instance.new("TextButton")
	btn.Size = UDim2.new(1, -8, 0, 30)
	btn.BackgroundColor3 = Color3.fromRGB(70,70,70)
	btn.TextColor3 = Color3.fromRGB(255,255,255)
	btn.Font = Enum.Font.SourceSans
	btn.TextScaled = true
	btn.Text = string.format("%s (%d studs)", enemy.Name, math.floor(d))
	btn.Parent = leftScroll

	local c = Instance.new("UICorner")
	c.CornerRadius = UDim.new(0,6)
	c.Parent = btn

	btn.MouseButton1Click:Connect(function()
		if isEnemyAlive(enemy) then
			_G.SelectedEnemy = enemy
			selectedTitle.Text = "Silent Aim: "..enemy.Name
			silentTitle.Text   = "Silent Aim: "..enemy.Name
		end
	end)

	-- connections to auto-remove when enemy dies/leaves
	local conns = {}
	conns[#conns+1] = enemy.AncestryChanged:Connect(function(_, parent)
		if not parent or not enemy:IsDescendantOf(enemiesFolder) then
			-- remove if it leaves
			if enemyButtons[enemy] then
				enemyButtons[enemy]:Destroy()
				enemyButtons[enemy] = nil
			end
			if enemyConnections[enemy] then
				for _, cn in ipairs(enemyConnections[enemy]) do pcall(function() cn:Disconnect() end) end
				enemyConnections[enemy] = nil
			end
			-- reset selection if this was selected
			if _G.SelectedEnemy == enemy then
				_G.SelectedEnemy = nil
				selectedTitle.Text = "Silent Aim: None"
			end
		end
	end)

	-- track health to auto-remove
	local hum = enemy:FindFirstChildOfClass("Humanoid")
	if hum then
		conns[#conns+1] = hum.Died:Connect(function()
			if enemyButtons[enemy] then
				enemyButtons[enemy]:Destroy()
				enemyButtons[enemy] = nil
			end
			if enemyConnections[enemy] then
				for _, cn in ipairs(enemyConnections[enemy]) do pcall(function() cn:Disconnect() end) end
				enemyConnections[enemy] = nil
			end
			if _G.SelectedEnemy == enemy then
				_G.SelectedEnemy = nil
				selectedTitle.Text = "Silent Aim: None"
			end
		end)
	end

	enemyButtons[enemy] = btn
	enemyConnections[enemy] = conns
	return btn
end

function clearEnemyButtons()
	for enemy, btn in pairs(enemyButtons) do
		if btn then pcall(function() btn:Destroy() end) end
	end
	enemyButtons = {}
	for enemy, list in pairs(enemyConnections) do
		for _, cn in ipairs(list) do pcall(function() cn:Disconnect() end) end
	end
	enemyConnections = {}
	leftScroll.CanvasSize = UDim2.new(0,0,0,0)
end

function refreshEnemiesNow()
	-- Remove stale buttons for enemies that no longer exist or out of range
	for enemy, btn in pairs(enemyButtons) do
		if (not isEnemyAlive(enemy)) or (distToPlayer(enemy) > NEARBY_DISTANCE_LIMIT) then
			btn:Destroy()
			enemyButtons[enemy] = nil
			-- disconnect connections
			if enemyConnections[enemy] then
				for _, cn in ipairs(enemyConnections[enemy]) do pcall(function() cn:Disconnect() end) end
				enemyConnections[enemy] = nil
			end
			-- if selected, clear selection
			if _G.SelectedEnemy == enemy then
				_G.SelectedEnemy = nil
				selectedTitle.Text = "Silent Aim: None"
			end
		end
	end

	-- Add/Update nearby enemies
	for _, enemy in ipairs(enemiesFolder:GetChildren()) do
		if isEnemyAlive(enemy) then
			local d = distToPlayer(enemy)
			if d <= NEARBY_DISTANCE_LIMIT then
				local btn = enemyButtons[enemy]
				if not btn then
					btn = createEnemyButton(enemy)
				end
				if btn then
					btn.Text = string.format("%s (%d studs)", enemy.Name, math.floor(d))
				end
			else
				-- out of range -> ensure no lingering button
				if enemyButtons[enemy] then
					enemyButtons[enemy]:Destroy()
					enemyButtons[enemy] = nil
				end
			end
		else
			-- ensure cleanup
			if enemyButtons[enemy] then
				enemyButtons[enemy]:Destroy()
				enemyButtons[enemy] = nil
			end
		end
	end

	-- Recompute canvas size
	leftScroll.CanvasSize = UDim2.new(0,0,0,leftLayout.AbsoluteContentSize.Y + 8)

	-- Remove any orphaned UI children not tracked (safety)
	for _, child in ipairs(leftScroll:GetChildren()) do
		if child:IsA("TextButton") then
			local tracked = false
			for e, b in pairs(enemyButtons) do
				if b == child then tracked = true break end
			end
			if not tracked then
				child:Destroy()
			end
		end
	end
end

-- Hook enemy folder changes to update list (avoid dupes)
enemiesFolder.ChildAdded:Connect(function(child)
	task.defer(function()
		if isEnemyAlive(child) and distToPlayer(child) <= NEARBY_DISTANCE_LIMIT then
			createEnemyButton(child)
			leftScroll.CanvasSize = UDim2.new(0,0,0,leftLayout.AbsoluteContentSize.Y + 8)
		end
	end)
end)

enemiesFolder.ChildRemoved:Connect(function(child)
	if enemyButtons[child] then
		enemyButtons[child]:Destroy()
		enemyButtons[child] = nil
	end
	if enemyConnections[child] then
		for _, cn in ipairs(enemyConnections[child]) do pcall(function() cn:Disconnect() end) end
		enemyConnections[child] = nil
	end
	if _G.SelectedEnemy == child then
		_G.SelectedEnemy = nil
		selectedTitle.Text = "Silent Aim: None"
		silentTitle.Text   = "Silent Aim"
	end
	leftScroll.CanvasSize = UDim2.new(0,0,0,leftLayout.AbsoluteContentSize.Y + 8)
end)

--==============================================================
--  UTILS: CF / ORIENTATION / NOCLIP
--==============================================================
local function setInstanceCFrame(inst, cf)
	if not inst then return end
	if inst:IsA("BasePart") then
		inst.CFrame = cf
	elseif inst:IsA("Model") then
		if inst.PrimaryPart then
			pcall(function() inst:SetPrimaryPartCFrame(cf) end)
		else
			for _, d in ipairs(inst:GetDescendants()) do
				if d:IsA("BasePart") then
					d.CFrame = cf
				end
			end
		end
	elseif inst:IsA("Folder") then
		for _, d in ipairs(inst:GetChildren()) do
			setInstanceCFrame(d, cf)
		end
	end
end

local function setContainerNoCollide(inst, enabled)
	if not inst then return end
	local function apply(p)
		if p:IsA("BasePart") then
			p.CanCollide = not enabled
			p.CanTouch   = not enabled
			p.CanQuery   = true
		end
	end
	if inst:IsA("BasePart") then
		apply(inst)
	else
		for _, d in ipairs(inst:GetDescendants()) do
			apply(d)
		end
	end
end

local function enemyAheadPoint(enemy)
	local torso = getEnemyTorso(enemy)
	if not torso then return nil end
	local vel = Vector3.new()
	local ok, v = pcall(function() return torso.AssemblyLinearVelocity end)
	if ok and typeof(v)=="Vector3" then
		vel = v
	elseif torso:FindFirstChild("Velocity") then
		vel = torso.Velocity
	end
	if vel.Magnitude < 0.01 then
		return torso.Position + torso.CFrame.LookVector * 3
	else
		return torso.Position + vel.Unit * 3
	end
end

local function classyLookPoint(enemy, playerChar)
	local mode = tostring(_G.ClassyFaceMode or "Enemy")
	if mode == "Player" then
		local hrp = playerChar and playerChar:FindFirstChild("HumanoidRootPart")
		if hrp then return hrp.Position end
	elseif mode == "EnemyMovement" then
		local p = enemyAheadPoint(enemy)
		if p then return p end
	end
	local head = enemy and enemy:FindFirstChild("Head")
	if head then return head.Position end
	local torso = getEnemyTorso(enemy)
	return torso and torso.Position or nil
end

--==============================================================
--  TOOL / ACTION HOOKS (Silent / Melee / Bone)
--==============================================================
local function meleeHit(tool)
	if not _G.MeleeAssist then return end
	local remote = tool:FindFirstChild("lo")
	if not remote then return end
	local target = getNearestEnemy()
	if target then
		remote:FireServer(player)
	end
end

local function fireBone(tool)
	if not _G.SelectedEnemy then return end
	local head = _G.SelectedEnemy:FindFirstChild("Head")
	if not head then return end
	local remote = tool:FindFirstChild("RemoteEvent")
	if not remote then return end
	local pos = head.Position
	local cf = CFrame.new(pos)
	local args = { pos.X, pos.Y, pos.Z, Vector3.new(pos.X,pos.Y,pos.Z), cf }
	remote:FireServer(unpack(args))
end

local function onToolActivated(tool)
	-- melee
	if tool:FindFirstChild("lo") then
		meleeHit(tool)
		return
	end
	-- bone
	if tool:FindFirstChild("RemoteEvent") and tool.Name:lower():find("bone") then
		fireBone(tool)
		return
	end

	-- silent aim
	if not _G.SilentAim or not _G.SelectedEnemy then return end
	local head = _G.SelectedEnemy:FindFirstChild("Head")
	if not head then return end
	local prediction = tonumber(_G.PredictionValue) or 0.1
	local vel = head:FindFirstChild("Velocity") and head.Velocity or Vector3.new()
	local predPos = head.Position + vel * prediction

	local remote = tool:FindFirstChildWhichIsA("RemoteEvent")
	if remote then
		local ok = pcall(function()
			remote:FireServer(CFrame.new(predPos), predPos.Y, predPos.Z)
		end)
		if not ok then
			pcall(function()
				remote:FireServer(predPos)
			end)
		end
	end
	local scriptFolder = tool:FindFirstChild("Script")
	if scriptFolder then
		local frameEvent = scriptFolder:FindFirstChild("FrameEvent")
		if frameEvent and frameEvent:IsA("RemoteEvent") then
			pcall(function()
				frameEvent:FireServer(predPos.X, predPos.Y, predPos.Z)
			end)
		end
	end
end

local function connectTool(tool)
	if tool:IsA("Tool") then
		tool.Activated:Connect(function()
			onToolActivated(tool)
		end)
	end
end

player.CharacterAdded:Connect(function(char)
	char.ChildAdded:Connect(connectTool)
	for _, t in ipairs(char:GetChildren()) do
		connectTool(t)
	end
end)
if player.Character then
	player.Character.ChildAdded:Connect(connectTool)
	for _, t in ipairs(player.Character:GetChildren()) do
		connectTool(t)
	end
end

--==============================================================
--  ASSISTS CORE: Slash / BoneThrow / BoneSpin / FireCircle / Classy
--==============================================================
local function handleSlashTouch()
	if not _G.SlashAssist then return end
	if not activeAttacks then activeAttacks = workspace:FindFirstChild("ActiveAttacks") end
	if not activeAttacks then return end

	local target = _G.SelectedEnemy or getNearestEnemy()
	if not target then return end
	local torso = getEnemyTorso(target)
	if not torso then return end

	-- Global slashes under ActiveAttacks (not zone-specific)
	for _, child in ipairs(activeAttacks:GetChildren()) do
		if child:IsA("Folder") and child.Name == "Slash" then
			for _, slash in ipairs(child:GetChildren()) do
				if slash:IsA("BasePart") and slash:FindFirstChildWhichIsA("TouchTransmitter") then
					slash.CFrame = torso.CFrame
				end
			end
		elseif child:IsA("BasePart") and (child.Name == "Slash" or child.Name:lower():find("slash")) then
			if child:FindFirstChildWhichIsA("TouchTransmitter") then
				child.CFrame = torso.CFrame
			end
		end
	end

	-- Also scan the zones
	for i = 1, MAX_ZONE_INDEX do
		local zone = activeAttacks:FindFirstChild("Zone"..i)
		if zone then
			for _, obj in ipairs(zone:GetDescendants()) do
				if obj:IsA("BasePart") then
					local lname = obj.Name:lower()
					if lname:find("slash") and obj:FindFirstChildWhichIsA("TouchTransmitter") then
						obj.CFrame = torso.CFrame
					end
				end
			end
		end
	end
end

local function handleBoneAndFireAssists(target, torsoCF)
	if not activeAttacks then activeAttacks = workspace:FindFirstChild("ActiveAttacks") end
	if not activeAttacks then return end

	-- BoneThrow
	if _G.BoneThrowAssist then
		for _, atk in ipairs(activeAttacks:GetChildren()) do
			if atk.Name == "BoneThrow" or atk.Name:lower() == "bonethrow" then
				setInstanceCFrame(atk, torsoCF)
			end
		end
		for i = 1, MAX_ZONE_INDEX do
			local zone = activeAttacks:FindFirstChild("Zone"..i)
			if zone then
				for _, obj in ipairs(zone:GetChildren()) do
					local n = obj.Name:lower()
					if n == "bonethrow" then
						setInstanceCFrame(obj, torsoCF)
					end
				end
			end
		end
	end

	-- BoneSpin
	if _G.BoneSpinAssist then
		for _, atk in ipairs(activeAttacks:GetChildren()) do
			local n = atk.Name:lower()
			if n:find("^bonespin%d*$") then
				setInstanceCFrame(atk, torsoCF)
			end
		end
		for i = 1, MAX_ZONE_INDEX do
			local zone = activeAttacks:FindFirstChild("Zone"..i)
			if zone then
				for _, obj in ipairs(zone:GetChildren()) do
					local n = obj.Name:lower()
					if n:find("^bonespin%d*$") then
						setInstanceCFrame(obj, torsoCF)
					end
				end
			end
		end
	end

	-- FireCircle
	if _G.FireCircleAssist then
		for _, atk in ipairs(activeAttacks:GetChildren()) do
			local n = atk.Name:lower()
			if n:find("^firecircle%d*$") then
				setInstanceCFrame(atk, torsoCF)
			end
		end
		for i = 1, MAX_ZONE_INDEX do
			local zone = activeAttacks:FindFirstChild("Zone"..i)
			if zone then
				for _, obj in ipairs(zone:GetChildren()) do
					local n = obj.Name:lower()
					if n:find("^firecircle%d*$") then
						setInstanceCFrame(obj, torsoCF)
					end
				end
			end
		end
	end
end

local function handleClassyAssists(target)
	if not _G.ClassyAssist then return end
	if not activeAttacks then activeAttacks = workspace:FindFirstChild("ActiveAttacks") end
	if not activeAttacks then return end

	local torso = getEnemyTorso(target)
	if not torso then return end

	-- compute desired world cf based on offset and face mode
	local ox = tonumber(_G.ClassyOffsetX) or 0
	local oy = tonumber(_G.ClassyOffsetY) or 0
	local oz = tonumber(_G.ClassyOffsetZ) or 0

	local offsetCF  = CFrame.new(ox, oy, oz)
	local desiredPos = (torso.CFrame * offsetCF).Position
	local lookPoint  = classyLookPoint(target, player.Character) or torso.Position
	local finalCF    = CFrame.new(desiredPos, lookPoint)

	-- Optional noclip
	local function maybeNoClip(inst)
		if _G.ClassyNoClip then
			setContainerNoCollide(inst, true)
		end
	end

	-- Top-level "classy" items (non-zone)
	for _, obj in ipairs(activeAttacks:GetChildren()) do
		local lname = obj.Name:lower()
		if lname == "classy" or lname:find("classy") then
			maybeNoClip(obj)
			setInstanceCFrame(obj, finalCF)
		end
	end

	-- Zoned classy items (scan all zones 1..25)
	for i = 1, MAX_ZONE_INDEX do
		local zone = activeAttacks:FindFirstChild("Zone"..i)
		if zone then
			for _, obj in ipairs(zone:GetDescendants()) do
				local lname = obj.Name:lower()
				if lname == "classy" or lname:find("classy") then
					maybeNoClip(obj)
					setInstanceCFrame(obj, finalCF)
				end
			end
		end
	end
end

--==============================================================
--  VISUAL: ENEMY LIST HIGHLIGHT
--==============================================================
local function updateEnemyHighlight()
	for enemy, btn in pairs(enemyButtons) do
		if enemy == _G.SelectedEnemy or enemy == universalTarget then
			btn.BackgroundColor3 = Color3.fromRGB(255,0,0)
		else
			btn.BackgroundColor3 = Color3.fromRGB(70,70,70)
		end
	end
end

--==============================================================
--  HEARTBEAT LOOP
--==============================================================
RunService.RenderStepped:Connect(function()
	-- keep activeAttacks reference fresh (handles re-parenting)
	if not activeAttacks or not activeAttacks.Parent then
		activeAttacks = workspace:FindFirstChild("ActiveAttacks")
	end

	-- enemy list upkeep
	if _G.AutoRefreshEnemies then
		refreshEnemiesNow()
	end

	-- universal auto-aim: pick nearest
	if _G.UniversalAutoAim then
		universalTarget = getNearestEnemy()
		_G.SelectedEnemy = universalTarget
		if _G.SelectedEnemy then
			selectedTitle.Text = "Silent Aim: ".._G.SelectedEnemy.Name
			silentTitle.Text   = "Silent Aim: ".._G.SelectedEnemy.Name
		else
			selectedTitle.Text = "Silent Aim: None"
		end
	end

	-- highlight selected target in list
	updateEnemyHighlight()

	-- Slash / others follow target
	local target = _G.SelectedEnemy or getNearestEnemy()
	if target and isEnemyAlive(target) then
		local torso = getEnemyTorso(target)
		if torso then
			handleSlashTouch()
			handleBoneAndFireAssists(target, torso.CFrame)
			handleClassyAssists(target)
		end
	end

	-- Adjust canvas size if needed
	leftScroll.CanvasSize = UDim2.new(0,0,0,leftLayout.AbsoluteContentSize.Y + 8)
end)

--==============================================================
--  INITIAL POPULATE + REFRESH/RESET HOOKS
--==============================================================
refreshEnemiesNow()

refreshBtn.MouseButton1Click:Connect(function()
	_G.AutoRefreshEnemies = true
	refreshBtn.Text = "Refreshing..."
	task.delay(0.1, function()
		refreshEnemiesNow()
		refreshBtn.Text = "Refresh"
	end)
end)

resetBtn.MouseButton1Click:Connect(function()
	clearEnemyButtons()
	_G.SelectedEnemy = nil
	selectedTitle.Text = "Silent Aim: None"
end)

--==============================================================
--  CLEANUP GUARD (OPTIONAL)
--==============================================================
screenGui.AncestryChanged:Connect(function(_, parent)
	if not parent then
		-- restore any changes if necessary (currently none persistent)
	end
end)

--==============================================================
--  DONE
--==============================================================

Features & Information

so yea basically go to my account and check the others and the common ones is slient aim, universal slient aim(yet again auto targets) auto attack teleportion (idk why would you need auto bone zones or somethin) and fianlly the best one the dupe method (how this work is that you use a tool and as soon as it says cooldown you quiclky click subtract then add on how much cooldown the tool you want to dupe is) Dieing might break it(dupe) (remember to check accout for update)
#Dust#Sans#Simulator#Dust sans simulator#Dust sans

Community Comments (3)

alfountain18alfountain18Aug 17, 2025

hm weird let me check something about the dupe

alfountain18alfountain18Aug 17, 2025

ok so just don't die

alfountain18alfountain18Aug 17, 2025

i think dieing breaks it

More Scripts for (RESET 3 PART 1) Dust Sans Simulator - The Remake