local repo = "https://raw.githubusercontent.com/deividcomsono/Obsidian/main/" local Library = loadstring(game:HttpGet(repo .. "Library.lua"))() local ThemeManager = loadstring(game:HttpGet(repo .. "addons/ThemeManager.lua"))() local SaveManager = loadstring(game:HttpGet(repo .. "addons/SaveManager.lua"))() local Options = Library.Options local Toggles = Library.Toggles local Window = Library:CreateWindow({ Title = "The Fields", Footer = "Weapon System + Visuals", Icon = 95816097006870, NotifySide = "Right", ShowCustomCursor = true, Center = true, }) --// Obfuscated services (kept from weapon script to avoid plaintext detection) \\-- local stringChar = string.char local stringByte = string.byte local stringSub = string.sub local bitwiseOp = bit32 or bit local bitwiseXor = bitwiseOp.bxor local tableConcat = table.concat local tableInsert = table.insert local function decodeString(encodedStr, keyStr) local decodedChars = {} for i = 1, #encodedStr do tableInsert(decodedChars, stringChar( bitwiseXor( stringByte(stringSub(encodedStr, i, i + 1)), stringByte(stringSub(keyStr, 1 + (i % #keyStr), 1 + (i % #keyStr) + 1)) ) % 256 )) end return tableConcat(decodedChars) end local Players = game:GetService(decodeString("\225\207\218\60\227\169\212", "\126\177\163\187\69\134\219\167")) local CollectionService = game:GetService(decodeString("\136\43\28\58\118\166\239\162\43\30\5\118\183\237\162\39\21", "\155\203\68\112\86\19\197")) local LocalPlayer = Players.LocalPlayer local RunService = game:GetService("RunService") local Workspace = game:GetService("Workspace") local Lighting = game:GetService("Lighting") --// Weapon System \\-- local weaponCache = {} local function notify(title, text, time) Library:Notify({ Title = title, Description = text, Time = time or 4, }) end local function spawnNearestWeapon() if not LocalPlayer.Character or not LocalPlayer.Character:FindFirstChild("HumanoidRootPart") then return end local playerRootPart = LocalPlayer.Character.HumanoidRootPart local closestWeapon = nil local closestDistance = math.huge for _, weapon in ipairs(CollectionService:GetTagged("Weapon")) do if weapon.Parent == Workspace then local weaponPart = weapon:FindFirstChild("Handle") or weapon.PrimaryPart if weaponPart then local distance = (playerRootPart.Position - weaponPart.Position).Magnitude if distance < closestDistance then closestDistance = distance closestWeapon = weapon end end end end if closestWeapon then closestWeapon.Parent = LocalPlayer.Backpack CollectionService:RemoveTag(closestWeapon, "Weapon") local weaponName = weaponCache[closestWeapon] or "Unknown" notify("Success", "Equipped: " .. weaponName, 2) local humanoid = LocalPlayer.Character.Humanoid humanoid:ChangeState(Enum.HumanoidStateType.Running) else notify("Error", "No weapons found nearby", 2) end end local function spawnWeapon(weaponName) weaponName = weaponName:match("^%s*(.-)%s*$") if weaponName == "" then return end local weaponModel = game:GetService("ServerStorage"):FindFirstChild(weaponName, true) or Workspace:FindFirstChild(weaponName, true) if not weaponModel then notify("Error", weaponName .. " not found", 5) return end local clonedWeapon = weaponModel:Clone() if LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("HumanoidRootPart") then local rootPart = LocalPlayer.Character.HumanoidRootPart local spawnPosition = rootPart.Position + (rootPart.CFrame.LookVector * 6) + Vector3.new(0, 12, 0) local rayDirection = Vector3.new(0, -40, 0) local raycastParams = RaycastParams.new() raycastParams.FilterDescendantsInstances = {LocalPlayer.Character} raycastParams.FilterType = Enum.RaycastFilterType.Exclude local rayResult = Workspace:Raycast(spawnPosition, rayDirection, raycastParams) local finalPosition = (rayResult and (rayResult.Position + (rayResult.Normal * 2))) or (rootPart.Position + (rootPart.CFrame.LookVector * 6) + Vector3.new(0, 0, 0)) local weaponPart = clonedWeapon:FindFirstChild("Handle") or clonedWeapon.PrimaryPart or clonedWeapon:FindFirstChildWhichIsA("BasePart") if weaponPart then weaponPart.CanCollide = true weaponPart.Anchored = false weaponPart.CanQuery = true weaponPart.CFrame = CFrame.new(finalPosition) weaponPart.Velocity = Vector3.new(0, -2, 0) CollectionService:AddTag(clonedWeapon, "Weapon") clonedWeapon.Parent = Workspace weaponCache[clonedWeapon] = weaponName notify("Success", "Spawned: " .. weaponName, 4) end end end --// Visuals \\-- _G.HeadSize = 10 _G.FullbrightEnabled = false _G.NPCResizeEnabled = false _G.FogDisabled = false local function enableFullbright() Lighting.Brightness = 2 Lighting.Ambient = Color3.new(1, 1, 1) Lighting.OutdoorAmbient = Color3.new(1, 1, 1) Lighting.ClockTime = 12 end local function disableFullbright() Lighting.Brightness = 1 Lighting.Ambient = Color3.new(0, 0, 0) Lighting.OutdoorAmbient = Color3.new(0, 0, 0) Lighting.ClockTime = 14 end local function removeFog() for _, obj in pairs(Lighting:GetChildren()) do if obj:IsA("Atmosphere") then obj:Destroy() end end end local function restoreFog() local atmosphere = Instance.new("Atmosphere", Lighting) atmosphere.Density = 0.3 atmosphere.Offset = 0 atmosphere.Color = Color3.fromRGB(199, 199, 199) atmosphere.Decay = Color3.fromRGB(106, 106, 106) end local function updateNPC(npc) if npc:FindFirstChildOfClass('Humanoid') and not Players:GetPlayerFromCharacter(npc) then pcall(function() local rootPart = npc:FindFirstChild('HumanoidRootPart') if rootPart then rootPart.Size = Vector3.new(_G.HeadSize, _G.HeadSize, _G.HeadSize) rootPart.Transparency = 0.7 rootPart.BrickColor = BrickColor.new("Really blue") rootPart.Material = "Neon" rootPart.CanCollide = false end end) end end local function updateAllNPCs() for _, npc in ipairs(Workspace:GetDescendants()) do if _G.NPCResizeEnabled then updateNPC(npc) end end end Workspace.ChildAdded:Connect(function(child) if _G.NPCResizeEnabled then updateNPC(child) end end) local timer = 0 RunService.Heartbeat:Connect(function(deltaTime) timer = timer + deltaTime if timer >= 5 then if _G.NPCResizeEnabled then updateAllNPCs() end timer = 0 end end) --// UI Tabs \\-- local Tabs = { Weapons = Window:AddTab("Weapons", "sword"), Visuals = Window:AddTab("Visuals", "eye"), ["UI Settings"] = Window:AddTab("UI Settings", "settings"), } --// Weapons Tab \\-- local WeaponsGroup = Tabs.Weapons:AddLeftGroupbox("Weapon Spawner", "sword") WeaponsGroup:AddInput("WeaponName", { Text = "Weapon Name", Placeholder = "Enter weapon name or search...", Default = "", Finished = true, ClearTextOnFocus = false, Callback = function(Value) if Value ~= "" and Value ~= "---" then spawnWeapon(Value) Options.WeaponName:SetValue("") end end, }) WeaponsGroup:AddButton({ Text = "Spawn Weapon", Func = function() local weaponName = Options.WeaponName.Value if weaponName ~= "" and weaponName ~= "---" then spawnWeapon(weaponName) Options.WeaponName:SetValue("") end end, Tooltip = "Spawns the entered weapon in front of you", }) WeaponsGroup:AddDivider() WeaponsGroup:AddLabel("Grab nearest weapon") :AddKeyPicker("GrabWeaponKey", { Default = "E", Mode = "Press", Text = "Grab nearest weapon", Callback = function() spawnNearestWeapon() end, }) WeaponsGroup:AddLabel("Spawned weapons are tagged so the grab key can pick them up.", true) --// Visuals Tab \\-- local VisualsGroup = Tabs.Visuals:AddLeftGroupbox("Visuals", "eye") VisualsGroup:AddToggle("Fullbright", { Text = "Fullbright", Default = false, Callback = function(Value) _G.FullbrightEnabled = Value if Value then enableFullbright() else disableFullbright() end end, }) VisualsGroup:AddToggle("NPCResize", { Text = "NPC Hitbox Resize", Default = false, Callback = function(Value) _G.NPCResizeEnabled = Value if Value then updateAllNPCs() end end, }) VisualsGroup:AddSlider("HeadSize", { Text = "Hitbox Size", Default = 10, Min = 1, Max = 100, Rounding = 0, Suffix = " studs", Callback = function(Value) _G.HeadSize = Value if _G.NPCResizeEnabled then updateAllNPCs() end end, }) VisualsGroup:AddToggle("NoFog", { Text = "Disable Fog", Default = false, Callback = function(Value) _G.FogDisabled = Value if Value then removeFog() else restoreFog() end end, }) --// UI Settings \\-- local MenuGroup = Tabs["UI Settings"]:AddLeftGroupbox("Menu", "wrench") MenuGroup:AddToggle("KeybindMenuOpen", { Default = Library.KeybindFrame.Visible, Text = "Open Keybind Menu", Callback = function(Value) Library.KeybindFrame.Visible = Value end, }) MenuGroup:AddToggle("ShowCustomCursor", { Text = "Custom Cursor", Default = Library.ShowCustomCursor, Callback = function(Value) Library.ShowCustomCursor = Value end, }) MenuGroup:AddDropdown("NotificationSide", { Values = { "Left", "Right" }, Default = "Right", Text = "Notification Side", Callback = function(Value) Library:SetNotifySide(Value) end, }) MenuGroup:AddDropdown("DPIDropdown", { Values = { "50%", "75%", "100%", "125%", "150%", "175%", "200%" }, Default = "100%", Text = "DPI Scale", Callback = function(Value) Value = Value:gsub("%%", "") local DPI = tonumber(Value) Library:SetDPIScale(DPI) end, }) MenuGroup:AddSlider("UICornerSlider", { Text = "Corner Radius", Default = Library.CornerRadius, Min = 0, Max = 20, Rounding = 0, Callback = function(Value) Window:SetCornerRadius(Value) end, }) MenuGroup:AddDivider() MenuGroup:AddLabel("Menu bind") :AddKeyPicker("MenuKeybind", { Default = "RightShift", NoUI = true, Text = "Menu keybind" }) MenuGroup:AddButton("Unload", function() Library:Unload() end) Library.ToggleKeybind = Options.MenuKeybind --// Addons \\-- ThemeManager:SetLibrary(Library) SaveManager:SetLibrary(Library) SaveManager:IgnoreThemeSettings() SaveManager:SetIgnoreIndexes({ "MenuKeybind" }) ThemeManager:SetFolder("TheFields") SaveManager:SetFolder("TheFields/general") SaveManager:BuildConfigSection(Tabs["UI Settings"]) ThemeManager:ApplyToTab(Tabs["UI Settings"]) SaveManager:LoadAutoloadConfig() notify("The Fields", "Loaded. Weapons + Visuals ready.", 4)