--[[ TOOLFORGE - Universal Tool Spawner Swords, knives and general Roblox gear, in any game. Client-side: every tool is built locally in your own Backpack, so it works regardless of what the game does or doesn't give you. Pick a preset or paste any gear/mesh asset ID. Executor: any (Synapse, Delta, Codex, Solara, Wave, Xeno, Potassium...) ]] --// one table instead of dozens of locals - Luau caps a function at 200 local TF = { Name = "ToolForge", Version = "1.0", Accent = Color3.fromRGB(139, 92, 246), Panel = Color3.fromRGB(24, 24, 31), Header = Color3.fromRGB(31, 31, 40), Side = Color3.fromRGB(19, 19, 25), Text = Color3.fromRGB(238, 240, 246), Dim = Color3.fromRGB(140, 144, 158), Gui = nil, Tabs = {}, Active = nil, } local Players = game:GetService("Players") local Tween = game:GetService("TweenService") local LP = Players.LocalPlayer --// ─────────────────────────────────────────── presets -- Handle mesh + texture pairs. A bad id just renders as a plain block, -- it will not error. TF.Presets = { Swords = { { name = "Classic Sword", mesh = 12221720, tex = 12221724, size = Vector3.new(1, 5, 1), dmg = 25 }, { name = "Darkheart", mesh = 78322905, tex = 78322938, size = Vector3.new(1, 5, 1), dmg = 40 }, { name = "Venomshank", mesh = 79040420, tex = 79040435, size = Vector3.new(1, 5, 1), dmg = 35 }, { name = "Windforce", mesh = 79040395, tex = 79040406, size = Vector3.new(1, 5, 1), dmg = 30 }, { name = "Illumina", mesh = 79040247, tex = 79040259, size = Vector3.new(1, 5, 1), dmg = 45 }, { name = "Ice Dagger", mesh = 62536051, tex = 62536101, size = Vector3.new(1, 4, 1), dmg = 20 }, }, Knives = { { name = "Combat Knife", mesh = 121944778, tex = 121944805, size = Vector3.new(1, 3, 1), dmg = 15 }, { name = "Butcher", mesh = 120843796, tex = 120843812, size = Vector3.new(1, 3, 1), dmg = 22 }, { name = "Shard", mesh = 122160005, tex = 122160026, size = Vector3.new(1, 3, 1), dmg = 18 }, { name = "Bone Blade", mesh = 121944778, tex = 121944805, size = Vector3.new(1, 3, 1), dmg = 20 }, }, Gear = { { name = "Rocket Launcher", asset = 168143115 }, { name = "Trowel", asset = 18474459 }, { name = "Speed Coil", asset = 16688659 }, { name = "Gravity Coil", asset = 16688968 }, { name = "Grappling Hook", asset = 130113146 }, { name = "Paintball Gun", asset = 30758852 }, }, } --// ─────────────────────────────────────────── helpers function TF.notify(msg, good) local g = TF.Gui if not g then return end local n = Instance.new("TextLabel") n.Size = UDim2.new(0, 260, 0, 38) n.Position = UDim2.new(1, -276, 1, -54) n.BackgroundColor3 = good and Color3.fromRGB(34, 197, 94) or Color3.fromRGB(220, 82, 94) n.TextColor3 = Color3.new(1, 1, 1) n.Font = Enum.Font.GothamBold n.TextSize = 14 n.Text = msg n.BackgroundTransparency = 0 n.Parent = g Instance.new("UICorner", n).CornerRadius = UDim.new(0, 8) task.delay(2.2, function() Tween:Create(n, TweenInfo.new(0.35), { BackgroundTransparency = 1, TextTransparency = 1 }):Play() task.wait(0.4); n:Destroy() end) end function TF.makeTool(cfg) local tool = Instance.new("Tool") tool.Name = cfg.name tool.RequiresHandle = true tool.CanBeDropped = true tool.ToolTip = string.format("%s | %s", TF.Name, cfg.name) local h = Instance.new("Part") h.Name = "Handle" h.Size = cfg.size or Vector3.new(1, 4, 1) h.TopSurface, h.BottomSurface = Enum.SurfaceType.Smooth, Enum.SurfaceType.Smooth h.Parent = tool if cfg.mesh then local m = Instance.new("SpecialMesh") m.MeshType = Enum.MeshType.FileMesh m.MeshId = "rbxassetid://" .. tostring(cfg.mesh) if cfg.tex then m.TextureId = "rbxassetid://" .. tostring(cfg.tex) end m.Scale = cfg.scale or Vector3.new(1, 1, 1) m.Parent = h end -- local swing so it feels like a real weapon even with no server hookup local anim = Instance.new("StringValue") anim.Name = "toolanim" anim.Value = "Slash" local dmg = cfg.dmg or 0 tool.Activated:Connect(function() anim.Parent = tool task.delay(0.35, function() anim.Parent = nil end) if dmg > 0 then local c = LP.Character local hrp = c and c:FindFirstChild("HumanoidRootPart") if not hrp then return end for _, p in ipairs(Players:GetPlayers()) do if p ~= LP and p.Character then local t = p.Character:FindFirstChild("HumanoidRootPart") local hum = p.Character:FindFirstChildOfClass("Humanoid") if t and hum and (t.Position - hrp.Position).Magnitude < 8 then pcall(function() hum:TakeDamage(dmg) end) end end end end end) return tool end function TF.give(cfg) local ok, err = pcall(function() if cfg.asset then local gear = game:GetService("InsertService"):LoadAsset(cfg.asset) local tool = gear:FindFirstChildOfClass("Tool") if tool then tool.Parent = LP.Backpack gear:Destroy() else gear:Destroy() error("asset " .. cfg.asset .. " is not a Tool") end else TF.makeTool(cfg).Parent = LP.Backpack end end) if ok then TF.notify("Spawned " .. cfg.name, true) else TF.notify("Failed: " .. tostring(err):sub(1, 40), false) end end --// ─────────────────────────────────────────── ui function TF.corner(o, r) local c = Instance.new("UICorner"); c.CornerRadius = UDim.new(0, r or 8); c.Parent = o; return c end function TF.build() if TF.Gui then TF.Gui:Destroy() end local sg = Instance.new("ScreenGui") sg.Name = TF.Name .. "_" .. tostring(math.random(1e5, 1e6)) sg.ResetOnSpawn = false sg.ZIndexBehavior = Enum.ZIndexBehavior.Sibling sg.Parent = (gethui and gethui()) or LP:WaitForChild("PlayerGui") TF.Gui = sg local main = Instance.new("Frame") main.Size = UDim2.new(0, 560, 0, 360) main.Position = UDim2.new(0.5, -280, 0.5, -180) main.BackgroundColor3 = TF.Panel main.BorderSizePixel = 0 main.Active, main.Draggable = true, true main.Parent = sg TF.corner(main, 12) local head = Instance.new("Frame") head.Size = UDim2.new(1, 0, 0, 44) head.BackgroundColor3 = TF.Header head.BorderSizePixel = 0 head.Parent = main TF.corner(head, 12) local dot = Instance.new("Frame") dot.Size = UDim2.new(0, 16, 0, 16) dot.Position = UDim2.new(0, 14, 0, 14) dot.BackgroundColor3 = TF.Accent dot.BorderSizePixel = 0 dot.Parent = head TF.corner(dot, 8) local title = Instance.new("TextLabel") title.Size = UDim2.new(1, -120, 1, 0) title.Position = UDim2.new(0, 40, 0, 0) title.BackgroundTransparency = 1 title.Font = Enum.Font.GothamBold title.TextSize = 16 title.TextXAlignment = Enum.TextXAlignment.Left title.TextColor3 = TF.Text title.Text = TF.Name .. " v" .. TF.Version title.Parent = head local close = Instance.new("TextButton") close.Size = UDim2.new(0, 28, 0, 28) close.Position = UDim2.new(1, -36, 0, 8) close.BackgroundColor3 = Color3.fromRGB(220, 82, 94) close.Text = "X" close.Font = Enum.Font.GothamBold close.TextSize = 14 close.TextColor3 = Color3.new(1, 1, 1) close.BorderSizePixel = 0 close.Parent = head TF.corner(close, 6) close.MouseButton1Click:Connect(function() sg:Destroy() end) local side = Instance.new("Frame") side.Size = UDim2.new(0, 132, 1, -44) side.Position = UDim2.new(0, 0, 0, 44) side.BackgroundColor3 = TF.Side side.BorderSizePixel = 0 side.Parent = main local body = Instance.new("ScrollingFrame") body.Size = UDim2.new(1, -148, 1, -60) body.Position = UDim2.new(0, 144, 0, 52) body.BackgroundTransparency = 1 body.BorderSizePixel = 0 body.ScrollBarThickness = 4 body.ScrollBarImageColor3 = TF.Accent body.CanvasSize = UDim2.new() body.AutomaticCanvasSize = Enum.AutomaticSize.Y body.Parent = main local list = Instance.new("UIListLayout") list.Padding = UDim.new(0, 8) list.SortOrder = Enum.SortOrder.LayoutOrder list.Parent = body local function render(section) TF.Active = section for _, c in ipairs(body:GetChildren()) do if not c:IsA("UIListLayout") then c:Destroy() end end for i, cfg in ipairs(TF.Presets[section]) do local b = Instance.new("TextButton") b.Size = UDim2.new(1, -6, 0, 38) b.LayoutOrder = i b.BackgroundColor3 = Color3.fromRGB(38, 40, 49) b.Font = Enum.Font.Gotham b.TextSize = 14 b.TextColor3 = TF.Text b.Text = " " .. cfg.name b.TextXAlignment = Enum.TextXAlignment.Left b.BorderSizePixel = 0 b.AutoButtonColor = false b.Parent = body TF.corner(b, 7) local tag = Instance.new("TextLabel") tag.Size = UDim2.new(0, 56, 1, 0) tag.Position = UDim2.new(1, -62, 0, 0) tag.BackgroundTransparency = 1 tag.Font = Enum.Font.GothamBold tag.TextSize = 12 tag.TextColor3 = TF.Accent tag.Text = cfg.dmg and (cfg.dmg .. " DMG") or "GEAR" tag.Parent = b b.MouseEnter:Connect(function() Tween:Create(b, TweenInfo.new(0.15), { BackgroundColor3 = Color3.fromRGB(52, 54, 66) }):Play() end) b.MouseLeave:Connect(function() Tween:Create(b, TweenInfo.new(0.15), { BackgroundColor3 = Color3.fromRGB(38, 40, 49) }):Play() end) b.MouseButton1Click:Connect(function() TF.give(cfg) end) end end local y = 12 for _, section in ipairs({ "Swords", "Knives", "Gear" }) do local t = Instance.new("TextButton") t.Size = UDim2.new(1, -20, 0, 34) t.Position = UDim2.new(0, 10, 0, y) t.BackgroundColor3 = TF.Side t.Font = Enum.Font.GothamBold t.TextSize = 14 t.TextColor3 = TF.Dim t.Text = section t.BorderSizePixel = 0 t.AutoButtonColor = false t.Parent = side TF.corner(t, 7) TF.Tabs[section] = t t.MouseButton1Click:Connect(function() for name, btn in pairs(TF.Tabs) do btn.BackgroundColor3 = TF.Side btn.TextColor3 = TF.Dim if name == section then btn.BackgroundColor3 = TF.Accent:Lerp(TF.Side, 0.72) btn.TextColor3 = TF.Text end end render(section) end) y = y + 42 end -- custom asset id local box = Instance.new("TextBox") box.Size = UDim2.new(1, -20, 0, 32) box.Position = UDim2.new(0, 10, 1, -80) box.BackgroundColor3 = Color3.fromRGB(38, 40, 49) box.Font = Enum.Font.Gotham box.TextSize = 13 box.TextColor3 = TF.Text box.PlaceholderText = "Gear ID..." box.Text = "" box.ClearTextOnFocus = false box.BorderSizePixel = 0 box.Parent = side TF.corner(box, 7) local spawn = Instance.new("TextButton") spawn.Size = UDim2.new(1, -20, 0, 32) spawn.Position = UDim2.new(0, 10, 1, -42) spawn.BackgroundColor3 = TF.Accent spawn.Font = Enum.Font.GothamBold spawn.TextSize = 14 spawn.TextColor3 = Color3.new(1, 1, 1) spawn.Text = "Spawn ID" spawn.BorderSizePixel = 0 spawn.Parent = side TF.corner(spawn, 7) spawn.MouseButton1Click:Connect(function() local id = tonumber(box.Text) if not id then return TF.notify("Enter a numeric gear ID", false) end TF.give({ name = "Gear " .. id, asset = id }) end) TF.Tabs.Swords.BackgroundColor3 = TF.Accent:Lerp(TF.Side, 0.72) TF.Tabs.Swords.TextColor3 = TF.Text render("Swords") TF.notify(TF.Name .. " loaded", true) end TF.build()