dats-scythe

dead rails from lucky28

Jan 10th, 2026 (edited)
564
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 84.18 KB | None | 0 0
  1. -- script made by me universal
  2. if _G.UniversalHubRunning then return end
  3. _G.UniversalHubRunning = true
  4. local Rayfield = loadstring(game:HttpGet('https://sirius.menu/rayfield'))()
  5. local Window = Rayfield:CreateWindow({
  6. Name = "Dead Rails Hub",
  7. LoadingTitle = "Loading Dead Rails...",
  8. LoadingSubtitle = "[Lucky 28]",
  9. ConfigurationSaving = {
  10. Enabled = false,
  11. FolderName = nil,
  12. FileName = "DeadRails"
  13. }
  14. })
  15. local TweenService = game:GetService("TweenService")
  16. local RunService = game:GetService("RunService")
  17. -- Tabs
  18. local MainTab = Window:CreateTab("Main")
  19. local NPCTab = Window:CreateTab("NPC Tools", 4483362458)
  20. local ItemTab = Window:CreateTab("Item Tools", 4483362458)
  21. local WorldTab = Window:CreateTab("World Tools", 4483362458)
  22. -- ==================== GLOBAL BRING POSITION ====================
  23. local BringDirection = "Front"
  24. local BringDirectionDropdown = NPCTab:CreateDropdown({
  25. Name = "Bring Position (NPCs & Players)",
  26. Options = {"Front", "Back", "Left", "Right", "Above"},
  27. CurrentOption = {"Front"},
  28. MultipleOptions = false,
  29. Flag = "BringDirection",
  30. Callback = function(Option)
  31. BringDirection = Option[1]
  32. end,
  33. })
  34. local function GetBringPosition()
  35. local player = game.Players.LocalPlayer
  36. local character = player.Character
  37. if not character or not character:FindFirstChild("HumanoidRootPart") then return nil end
  38. local rootPos = character.HumanoidRootPart.Position
  39. local rootCFrame = character.HumanoidRootPart.CFrame
  40. local offset = Vector3.new(0, 8, 0)
  41. if BringDirection == "Front" then
  42. offset = rootCFrame.LookVector * 6
  43. elseif BringDirection == "Back" then
  44. offset = rootCFrame.LookVector * -6
  45. elseif BringDirection == "Left" then
  46. offset = rootCFrame.RightVector * -6
  47. elseif BringDirection == "Right" then
  48. offset = rootCFrame.RightVector * 6
  49. elseif BringDirection == "Above" then
  50. offset = Vector3.new(0, 8, 0)
  51. end
  52. return rootPos + offset
  53. end
  54. -- ==================== NPC TOOLS TAB ====================
  55. local ScannedNPCs = {}
  56. local ESPNPCsEnabled = false
  57. local ESPConnections = {}
  58. local KillAuraEnabled = false
  59. local KillAuraRange = 10
  60. local KillAuraConnection
  61. local AutoBringNPCsEnabled = false
  62. local AutoBringNPCsConnection
  63. local AutoScanNPCsEnabled = false
  64. local AutoScanInterval = 5
  65. local BringRange = 100 -- Default bring range in studs
  66. -- New NPC Teleport Features (moved up for definition order)
  67. local SelectedNPC = nil
  68. local NPCList = {}
  69. local NPCTeleportIndex = 1 -- Tracks which NPC we are locked to (sequential)
  70. local NPCCFrameLockEnabled = false -- When true, continuously CFrame teleports us in front of NPC
  71. local NPCCFrameLockConnection = nil -- RunService connection for the lock
  72. local function UpdateNPCList()
  73. NPCList = {}
  74. for _, npc in ipairs(ScannedNPCs) do
  75. table.insert(NPCList, npc.Name)
  76. end
  77. end
  78. local function ScanNPCs()
  79. ScannedNPCs = {}
  80. -- Improved scanning: Find all Humanoids in workspace and check if their parent Model is not a player character
  81. for _, humanoid in ipairs(workspace:GetDescendants()) do
  82. if humanoid:IsA("Humanoid") then
  83. local model = humanoid.Parent
  84. if model and model:IsA("Model") then
  85. local isPlayer = false
  86. for _, player in ipairs(game.Players:GetPlayers()) do
  87. if player.Character == model then
  88. isPlayer = true
  89. break
  90. end
  91. end
  92. if not isPlayer then
  93. table.insert(ScannedNPCs, model)
  94. end
  95. end
  96. end
  97. end
  98. UpdateNPCList()
  99. if NPCDropdown then
  100. NPCDropdown:Refresh(NPCList)
  101. end
  102. end
  103. local function BringNPCs()
  104. local targetPos = GetBringPosition()
  105. if not targetPos then return end
  106. local playerPos = game.Players.LocalPlayer.Character.HumanoidRootPart.Position
  107. for _, npc in ipairs(ScannedNPCs) do
  108. -- Improved bringing: Check for HumanoidRootPart, RootPart, or primary part
  109. local root = npc:FindFirstChild("HumanoidRootPart") or npc:FindFirstChild("RootPart") or npc.PrimaryPart
  110. if root then
  111. local dist = (playerPos - root.Position).Magnitude
  112. if dist <= BringRange then
  113. root.CFrame = CFrame.new(targetPos)
  114. end
  115. end
  116. end
  117. end
  118. local function KillNPCs()
  119. for _, npc in ipairs(ScannedNPCs) do
  120. local humanoid = npc:FindFirstChild("Humanoid")
  121. if humanoid and humanoid.Health > 0 then
  122. humanoid.Health = 0 -- Changed to direct health set for instant death
  123. end
  124. end
  125. end
  126. local function EnableKillAura()
  127. if KillAuraEnabled then
  128. KillAuraConnection = RunService.Heartbeat:Connect(function()
  129. local char = game.Players.LocalPlayer.Character
  130. if char and char:FindFirstChild("HumanoidRootPart") then
  131. local pos = char.HumanoidRootPart.Position
  132. for _, npc in ipairs(ScannedNPCs) do
  133. local root = npc:FindFirstChild("HumanoidRootPart") or npc:FindFirstChild("RootPart") or npc.PrimaryPart
  134. if root and (pos - root.Position).Magnitude <= KillAuraRange then
  135. local hum = npc:FindFirstChild("Humanoid")
  136. if hum and hum.Health > 0 then
  137. hum.Health = 0
  138. end
  139. end
  140. end
  141. end
  142. end)
  143. else
  144. if KillAuraConnection then KillAuraConnection:Disconnect() end
  145. end
  146. end
  147. local function EnableAutoBringNPCs()
  148. if AutoBringNPCsEnabled then
  149. AutoBringNPCsConnection = RunService.Heartbeat:Connect(BringNPCs)
  150. else
  151. if AutoBringNPCsConnection then AutoBringNPCsConnection:Disconnect() end
  152. end
  153. end
  154. local function EnableESPNPCs()
  155. if ESPNPCsEnabled then
  156. for _, npc in ipairs(ScannedNPCs) do
  157. if not ESPConnections[npc] then
  158. local billboard = Instance.new("BillboardGui")
  159. billboard.Adornee = npc:FindFirstChild("Head") or npc:FindFirstChild("HumanoidRootPart") or npc.PrimaryPart
  160. billboard.Size = UDim2.new(0, 100, 0, 100)
  161. billboard.StudsOffset = Vector3.new(0, 2, 0)
  162. billboard.AlwaysOnTop = true
  163. billboard.Parent = game.CoreGui
  164. local label = Instance.new("TextLabel", billboard)
  165. label.Text = npc.Name .. " (NPC)"
  166. label.Size = UDim2.new(1,0,1,0)
  167. label.BackgroundTransparency = 1
  168. label.TextColor3 = Color3.new(1,0,0)
  169. label.TextScaled = true
  170. ESPConnections[npc] = billboard
  171. end
  172. end
  173. else
  174. for _, gui in pairs(ESPConnections) do gui:Destroy() end
  175. ESPConnections = {}
  176. end
  177. end
  178. local function TeleportToNPC(npcName)
  179. local localPlayer = game.Players.LocalPlayer
  180. local localChar = localPlayer.Character
  181. if not localChar or not localChar:FindFirstChild("HumanoidRootPart") then return end
  182. for _, npc in ipairs(ScannedNPCs) do
  183. if npc.Name == npcName then
  184. local root = npc:FindFirstChild("HumanoidRootPart") or npc:FindFirstChild("RootPart") or npc.PrimaryPart
  185. if root then
  186. local TweenDuration = 0.5 -- Default tween duration
  187. local tweenInfo = TweenInfo.new(TweenDuration, Enum.EasingStyle.Linear)
  188. local goal = {CFrame = root.CFrame * CFrame.new(0, 0, -2)}
  189. local tween = TweenService:Create(localChar.HumanoidRootPart, tweenInfo, goal)
  190. tween:Play()
  191. end
  192. break
  193. end
  194. end
  195. end
  196. -- Start CFrame lock: continuously teleports you in front of current NPC every frame
  197. -- Uses RunService so the game cannot pull you back. Stays locked until Turn OFF is pressed.
  198. local function StartNPCCFrameLock()
  199. if #ScannedNPCs == 0 then
  200. ScanNPCs()
  201. if #ScannedNPCs == 0 then
  202. Rayfield:Notify({
  203. Title = "No NPCs Found",
  204. Content = "Scan NPCs first, or no NPCs in the world.",
  205. Duration = 2,
  206. Image = 4483362458
  207. })
  208. return
  209. end
  210. end
  211.  
  212. -- Wrap index around if it goes past the list
  213. if NPCTeleportIndex > #ScannedNPCs then
  214. NPCTeleportIndex = 1
  215. end
  216.  
  217. NPCCFrameLockEnabled = true
  218.  
  219. -- Disconnect any existing connection first
  220. if NPCCFrameLockConnection then
  221. NPCCFrameLockConnection:Disconnect()
  222. end
  223.  
  224. local npc = ScannedNPCs[NPCTeleportIndex]
  225.  
  226. Rayfield:Notify({
  227. Title = "CFrame LOCKED ON",
  228. Content = "NPC " .. tostring(NPCTeleportIndex) .. " / " .. tostring(#ScannedNPCs) .. ": " .. npc.Name .. "\nPress Turn OFF to release.",
  229. Duration = 3,
  230. Image = 4483362458
  231. })
  232.  
  233. -- RunService Heartbeat: re-apply CFrame EVERY FRAME so game can't move you back
  234. NPCCFrameLockConnection = RunService.Heartbeat:Connect(function()
  235. if not NPCCFrameLockEnabled then return end
  236.  
  237. -- Refresh NPC reference in case list changed
  238. if NPCTeleportIndex > #ScannedNPCs then
  239. NPCTeleportIndex = 1
  240. end
  241. if #ScannedNPCs == 0 then return end
  242.  
  243. local currentNPC = ScannedNPCs[NPCTeleportIndex]
  244. if not currentNPC then return end
  245.  
  246. local localPlayer = game.Players.LocalPlayer
  247. local localChar = localPlayer.Character
  248. if not localChar or not localChar:FindFirstChild("HumanoidRootPart") then return end
  249.  
  250. local npcRoot = currentNPC:FindFirstChild("HumanoidRootPart") or currentNPC:FindFirstChild("RootPart") or currentNPC.PrimaryPart
  251. if npcRoot then
  252. -- Continuously set CFrame 3 studs INFRONT of the NPC
  253. -- This runs every frame, so you CANNOT move away until turned OFF
  254. localChar.HumanoidRootPart.CFrame = npcRoot.CFrame * CFrame.new(0, 0, -3)
  255. end
  256. end)
  257. end
  258. -- Stop CFrame lock: releases your character so you can move again
  259. local function StopNPCCFrameLock()
  260. NPCCFrameLockEnabled = false
  261. if NPCCFrameLockConnection then
  262. NPCCFrameLockConnection:Disconnect()
  263. NPCCFrameLockConnection = nil
  264. end
  265.  
  266. Rayfield:Notify({
  267. Title = "CFrame Lock RELEASED",
  268. Content = "You can move freely again. Next lock will go to NPC #" .. tostring(NPCTeleportIndex + 1 > #ScannedNPCs and 1 or NPCTeleportIndex + 1),
  269. Duration = 2,
  270. Image = 4483362458
  271. })
  272. end
  273. -- Advance to next NPC (increments counter, does NOT change lock state)
  274. local function AdvanceToNextNPC()
  275. NPCTeleportIndex = NPCTeleportIndex + 1
  276. if NPCTeleportIndex > #ScannedNPCs then
  277. NPCTeleportIndex = 1
  278. end
  279.  
  280. if NPCCFrameLockEnabled then
  281. -- If already locked, immediately start locking to the new NPC
  282. local npc = ScannedNPCs[NPCTeleportIndex]
  283. Rayfield:Notify({
  284. Title = "Locked to Next NPC",
  285. Content = "Now NPC " .. tostring(NPCTeleportIndex) .. " / " .. tostring(#ScannedNPCs) .. ": " .. npc.Name,
  286. Duration = 1.5,
  287. Image = 4483362458
  288. })
  289. else
  290. Rayfield:Notify({
  291. Title = "Advanced Counter",
  292. Content = "Next lock will target NPC #" .. tostring(NPCTeleportIndex),
  293. Duration = 1.5,
  294. Image = 4483362458
  295. })
  296. end
  297. end
  298. -- Added Freeze Aura
  299. local FreezeAuraEnabled = false
  300. local FreezeAuraRange = 10
  301. local FreezeAuraConnection
  302. local function EnableFreezeAura()
  303. if FreezeAuraEnabled then
  304. FreezeAuraConnection = RunService.Heartbeat:Connect(function()
  305. local char = game.Players.LocalPlayer.Character
  306. if char and char:FindFirstChild("HumanoidRootPart") then
  307. local pos = char.HumanoidRootPart.Position
  308. for _, npc in ipairs(ScannedNPCs) do
  309. local root = npc:FindFirstChild("HumanoidRootPart") or npc:FindFirstChild("RootPart") or npc.PrimaryPart
  310. if root and root:IsA("BasePart") then
  311. local dist = (pos - root.Position).Magnitude
  312. if dist <= FreezeAuraRange then
  313. root.Anchored = true
  314. else
  315. root.Anchored = false
  316. end
  317. end
  318. end
  319. end
  320. end)
  321. else
  322. if FreezeAuraConnection then FreezeAuraConnection:Disconnect() end
  323. -- Unanchor all NPCs when disabled
  324. for _, npc in ipairs(ScannedNPCs) do
  325. local root = npc:FindFirstChild("HumanoidRootPart") or npc:FindFirstChild("RootPart") or npc.PrimaryPart
  326. if root and root:IsA("BasePart") then
  327. root.Anchored = false
  328. end
  329. end
  330. end
  331. end
  332. -- NPC Controls
  333. NPCTab:CreateButton({
  334. Name = "Scan NPCs",
  335. Callback = function()
  336. ScanNPCs()
  337. end
  338. })
  339. NPCTab:CreateToggle({
  340. Name = "Auto Scan NPCs",
  341. CurrentValue = false,
  342. Callback = function(Value)
  343. AutoScanNPCsEnabled = Value
  344. if Value then
  345. coroutine.wrap(function()
  346. while AutoScanNPCsEnabled do
  347. ScanNPCs()
  348. UpdateNPCList()
  349. if NPCDropdown then NPCDropdown:Refresh(NPCList) end
  350. wait(AutoScanInterval)
  351. end
  352. end)()
  353. end
  354. end,
  355. })
  356. NPCTab:CreateInput({
  357. Name = "Auto Scan Interval (sec)",
  358. PlaceholderText = "Enter seconds (1 - 30)",
  359. RemoveTextAfterFocusLost = false,
  360. Callback = function(Text)
  361. local num = tonumber(Text)
  362. if num then
  363. AutoScanInterval = math.clamp(num, 1, 30)
  364. end
  365. end,
  366. })
  367. NPCTab:CreateInput({
  368. Name = "Bring Range (studs)",
  369. PlaceholderText = "Enter range (20 - 100)",
  370. RemoveTextAfterFocusLost = false,
  371. Callback = function(Text)
  372. local num = tonumber(Text)
  373. if num then
  374. BringRange = math.clamp(num, 20, 100)
  375. end
  376. end,
  377. })
  378. NPCTab:CreateButton({
  379. Name = "Bring Nearby NPCs",
  380. Callback = BringNPCs
  381. })
  382. NPCTab:CreateToggle({
  383. Name = "Auto Bring Nearby NPCs",
  384. CurrentValue = false,
  385. Callback = function(Value)
  386. AutoBringNPCsEnabled = Value
  387. EnableAutoBringNPCs()
  388. end,
  389. })
  390. NPCTab:CreateButton({
  391. Name = "Kill All NPCs",
  392. Callback = KillNPCs
  393. })
  394. -- NEW BUTTON: Load FE NPC Script
  395. NPCTab:CreateButton({
  396. Name = "Load FE NPC Script",
  397. Callback = function()
  398. loadstring(game:HttpGet("https://raw.githubusercontent.com/randomstring0/fe-source/refs/heads/main/NPC/source/main.Luau"))()
  399. end
  400. })
  401. NPCTab:CreateToggle({
  402. Name = "Kill Aura NPCs",
  403. CurrentValue = false,
  404. Callback = function(Value)
  405. KillAuraEnabled = Value
  406. EnableKillAura()
  407. end,
  408. })
  409. NPCTab:CreateInput({
  410. Name = "Kill Aura Range",
  411. PlaceholderText = "Enter range (5 - 50)",
  412. RemoveTextAfterFocusLost = false,
  413. Callback = function(Text)
  414. local num = tonumber(Text)
  415. if num then
  416. KillAuraRange = math.clamp(num, 5, 50)
  417. end
  418. end,
  419. })
  420. NPCTab:CreateToggle({
  421. Name = "Freeze Aura NPCs",
  422. CurrentValue = false,
  423. Callback = function(Value)
  424. FreezeAuraEnabled = Value
  425. EnableFreezeAura()
  426. end,
  427. })
  428. NPCTab:CreateInput({
  429. Name = "Freeze Aura Range",
  430. PlaceholderText = "Enter range (5 - 50)",
  431. RemoveTextAfterFocusLost = false,
  432. Callback = function(Text)
  433. local num = tonumber(Text)
  434. if num then
  435. FreezeAuraRange = math.clamp(num, 5, 50)
  436. end
  437. end,
  438. })
  439. NPCTab:CreateToggle({
  440. Name = "ESP NPCs",
  441. CurrentValue = false,
  442. Callback = function(Value)
  443. ESPNPCsEnabled = Value
  444. EnableESPNPCs()
  445. end,
  446. })
  447. coroutine.wrap(function()
  448. while wait(1) do
  449. if ESPNPCsEnabled then EnableESPNPCs() end
  450. end
  451. end)()
  452. local NPCDropdown = NPCTab:CreateDropdown({
  453. Name = "Select NPC",
  454. Options = NPCList,
  455. CurrentOption = {},
  456. Callback = function(Option) SelectedNPC = Option[1] end,
  457. })
  458. NPCTab:CreateButton({
  459. Name = "Teleport to Selected NPC",
  460. Callback = function()
  461. if SelectedNPC then TeleportToNPC(SelectedNPC) end
  462. end,
  463. })
  464. NPCTab:CreateButton({
  465. Name = "Turn ON: CFrame Lock to NPC",
  466. Callback = StartNPCCFrameLock
  467. })
  468. NPCTab:CreateButton({
  469. Name = "Turn OFF: Release CFrame Lock",
  470. Callback = StopNPCCFrameLock
  471. })
  472. NPCTab:CreateButton({
  473. Name = "Next NPC (Advance Counter)",
  474. Callback = AdvanceToNextNPC
  475. })
  476. NPCTab:CreateButton({
  477. Name = "Reset NPC Counter to #1",
  478. Callback = function()
  479. NPCTeleportIndex = 1
  480. Rayfield:Notify({
  481. Title = "Counter Reset",
  482. Content = "Next lock will start from NPC #1.",
  483. Duration = 2,
  484. Image = 4483362458
  485. })
  486. end
  487. })
  488. -- ==================== ITEM TOOLS TAB ====================
  489. local itemNames = {
  490. "chestplate", "helmet", "left_pauldron", "right_pauldron", "mining_helmet", "lincoln's_top_hat", "lincoln's_ghost's_top_hat",
  491. "sack", "horse_cart", "saddle", "sheet_metal", "barbed_wire", "lightning_rod", "lantern", "camera", "banjo", "bandage", "snake_oil", "glass_bottle", "strange_mask", "easter_egg", "revive", "chair", "ladder", "campfire",
  492. "crucifix", "gold_bar", "gold_nugget", "gold_statue", "gold_painting", "gold_cup", "gold_plate", "gold_watch", "silver_bar", "silver_nugget", "silver_statue", "silver_painting", "silver_cup", "silver_plate", "silver_watch", "stone_statue", "wooden_painting", "fool's_gold",
  493. "barrel", "rope", "wheel", "book", "newspaper", "tumbleweed", "rock", "vase", "teapot",
  494. "coal", "entity_corpses", "wanted_poster",
  495. "bond", "ripped_bond", "strange_map", "jade_tablet", "brain_in_jar", "werewolf_limb", "strange_machine", "supply_depot_key", "fool's_key", "golden_egg", "jack_o'lantern",
  496. "notes", "poster", "crate", "present", "money", "bonds", "star_points",
  497. "shovel", "axe", "hammer", "pickaxe", "tomahawk", "cavalry_sword", "sword", "excalibur", "jade_sword", "vampire_knife", "spear", "spear_of_longinus",
  498. "revolver", "mauser", "navy_revolver", "flintlock_pistol", "sawed-off_shotgun", "shotgun", "blunderbuss", "revolving_rifle", "rifle", "bolt-action_rifle", "elephant_rifle", "springfield_rifle", "crossbow", "firework_gun", "electrocutioner", "thompson", "maxim_gun", "ballista", "cannon", "tesla_cannon",
  499. "holy_water", "molotov", "bear_trap", "acid_mine", "acid_barrel", "holy_hand_grenade", "landmine", "dynamite", "gunpowder_barrel", "bottle_rocket_launcher",
  500. "arrows", "revolver_ammo", "shotgun_shells", "rifle_ammo", "firework_ammo", "turret_ammo", "ballista_bolt", "cannon_balls",
  501. "water", "kerosene", "milk", "blood", "zombie_blood", "unicorn_blood", "angel_tears", "devil_tears", "primordial_soup", "cerebrus_blood", "fire", "acid"
  502. }
  503. local ScannedItems = {}
  504. local ESPItemsEnabled = false
  505. local ESPItemConnections = {}
  506. local AutoBringItemsEnabled = false
  507. local AutoBringItemsConnection
  508. local AutoScanItemsEnabled = false
  509. local AutoScanItemsInterval = 5
  510. local BringItemRange = 100
  511. local SelectedItem = nil
  512. local ItemList = {}
  513. local function UpdateItemList()
  514. ItemList = {}
  515. for _, item in ipairs(ScannedItems) do
  516. table.insert(ItemList, item.Name)
  517. end
  518. end
  519. local function ScanItems()
  520. ScannedItems = {}
  521. for _, obj in ipairs(workspace:GetDescendants()) do
  522. if table.find(itemNames, obj.Name:lower()) and not obj:IsDescendantOf(game.Players.LocalPlayer.Character) and (obj:IsA("Tool") or obj:IsA("Model") or obj:IsA("BasePart")) then
  523. table.insert(ScannedItems, obj)
  524. end
  525. end
  526. UpdateItemList()
  527. if ItemDropdown then
  528. ItemDropdown:Refresh(ItemList)
  529. end
  530. end
  531. local function BringItems()
  532. local targetPos = GetBringPosition()
  533. if not targetPos then return end
  534. local playerPos = game.Players.LocalPlayer.Character.HumanoidRootPart.Position
  535. for _, item in ipairs(ScannedItems) do
  536. local root = (item:IsA("BasePart") and item) or item:FindFirstChildWhichIsA("BasePart", true) or item.PrimaryPart or item.Handle
  537. if root then
  538. local dist = (playerPos - root.Position).Magnitude
  539. if dist <= BringItemRange then
  540. root.CFrame = CFrame.new(targetPos)
  541. end
  542. end
  543. end
  544. end
  545. local function EnableAutoBringItems()
  546. if AutoBringItemsEnabled then
  547. AutoBringItemsConnection = RunService.Heartbeat:Connect(BringItems)
  548. else
  549. if AutoBringItemsConnection then AutoBringItemsConnection:Disconnect() end
  550. end
  551. end
  552. local function EnableESPItems()
  553. if ESPItemsEnabled then
  554. for _, item in ipairs(ScannedItems) do
  555. if not ESPItemConnections[item] then
  556. local adornee = (item:IsA("BasePart") and item) or item:FindFirstChildWhichIsA("BasePart", true) or item.PrimaryPart or item.Handle
  557. if adornee then
  558. local billboard = Instance.new("BillboardGui")
  559. billboard.Adornee = adornee
  560. billboard.Size = UDim2.new(0, 100, 0, 100)
  561. billboard.StudsOffset = Vector3.new(0, 2, 0)
  562. billboard.AlwaysOnTop = true
  563. billboard.Parent = game.CoreGui
  564. local label = Instance.new("TextLabel", billboard)
  565. label.Text = item.Name .. " (Item)"
  566. label.Size = UDim2.new(1,0,1,0)
  567. label.BackgroundTransparency = 1
  568. label.TextColor3 = Color3.new(0,1,0)
  569. label.TextScaled = true
  570. ESPItemConnections[item] = billboard
  571. end
  572. end
  573. end
  574. else
  575. for _, gui in pairs(ESPItemConnections) do gui:Destroy() end
  576. ESPItemConnections = {}
  577. end
  578. end
  579. local function TeleportToItem(itemName)
  580. local localPlayer = game.Players.LocalPlayer
  581. local localChar = localPlayer.Character
  582. if not localChar or not localChar:FindFirstChild("HumanoidRootPart") then return end
  583. for _, item in ipairs(ScannedItems) do
  584. if item.Name == itemName then
  585. local root = (item:IsA("BasePart") and item) or item:FindFirstChildWhichIsA("BasePart", true) or item.PrimaryPart or item.Handle
  586. if root then
  587. local TweenDuration = 0.5
  588. local tweenInfo = TweenInfo.new(TweenDuration, Enum.EasingStyle.Linear)
  589. local goal = {CFrame = root.CFrame * CFrame.new(0, 0, -2)}
  590. local tween = TweenService:Create(localChar.HumanoidRootPart, tweenInfo, goal)
  591. tween:Play()
  592. end
  593. break
  594. end
  595. end
  596. end
  597. local function BringSelectedItem()
  598. if not SelectedItem then return end
  599. local targetPos = GetBringPosition()
  600. if not targetPos then return end
  601. for _, item in ipairs(ScannedItems) do
  602. if item.Name == SelectedItem then
  603. local root = (item:IsA("BasePart") and item) or item:FindFirstChildWhichIsA("BasePart", true) or item.PrimaryPart or item.Handle
  604. if root then
  605. root.CFrame = CFrame.new(targetPos)
  606. end
  607. break
  608. end
  609. end
  610. end
  611. -- Item Controls
  612. ItemTab:CreateButton({
  613. Name = "Scan Items",
  614. Callback = function()
  615. ScanItems()
  616. end
  617. })
  618. ItemTab:CreateToggle({
  619. Name = "Auto Scan Items",
  620. CurrentValue = false,
  621. Callback = function(Value)
  622. AutoScanItemsEnabled = Value
  623. if Value then
  624. coroutine.wrap(function()
  625. while AutoScanItemsEnabled do
  626. ScanItems()
  627. UpdateItemList()
  628. if ItemDropdown then ItemDropdown:Refresh(ItemList) end
  629. wait(AutoScanItemsInterval)
  630. end
  631. end)()
  632. end
  633. end,
  634. })
  635. ItemTab:CreateInput({
  636. Name = "Auto Scan Interval (sec)",
  637. PlaceholderText = "Enter seconds (1 - 30)",
  638. RemoveTextAfterFocusLost = false,
  639. Callback = function(Text)
  640. local num = tonumber(Text)
  641. if num then
  642. AutoScanItemsInterval = math.clamp(num, 1, 30)
  643. end
  644. end,
  645. })
  646. ItemTab:CreateInput({
  647. Name = "Bring Range (studs)",
  648. PlaceholderText = "Enter range (20 - 100)",
  649. RemoveTextAfterFocusLost = false,
  650. Callback = function(Text)
  651. local num = tonumber(Text)
  652. if num then
  653. BringItemRange = math.clamp(num, 20, 100)
  654. end
  655. end,
  656. })
  657. ItemTab:CreateButton({
  658. Name = "Bring Nearby Items",
  659. Callback = BringItems
  660. })
  661. ItemTab:CreateToggle({
  662. Name = "Auto Bring Nearby Items",
  663. CurrentValue = false,
  664. Callback = function(Value)
  665. AutoBringItemsEnabled = Value
  666. EnableAutoBringItems()
  667. end,
  668. })
  669. ItemTab:CreateToggle({
  670. Name = "ESP Items",
  671. CurrentValue = false,
  672. Callback = function(Value)
  673. ESPItemsEnabled = Value
  674. EnableESPItems()
  675. end,
  676. })
  677. coroutine.wrap(function()
  678. while wait(1) do
  679. if ESPItemsEnabled then EnableESPItems() end
  680. end
  681. end)()
  682. local ItemDropdown = ItemTab:CreateDropdown({
  683. Name = "Select Item",
  684. Options = ItemList,
  685. CurrentOption = {},
  686. Callback = function(Option) SelectedItem = Option[1] end,
  687. })
  688. ItemTab:CreateButton({
  689. Name = "Bring Selected Item",
  690. Callback = function()
  691. BringSelectedItem()
  692. end,
  693. })
  694. ItemTab:CreateButton({
  695. Name = "Teleport to Selected Item",
  696. Callback = function()
  697. if SelectedItem then TeleportToItem(SelectedItem) end
  698. end,
  699. })
  700. -- ==================== GETNIL HELPER FUNCTION ====================
  701. local function GetNil(Name, DebugId)
  702. for _, Object in getnilinstances() do
  703. if Object.Name == Name and Object:GetDebugId() == DebugId then
  704. return Object
  705. end
  706. end
  707. end
  708. -- ==================== BOXING GLOVES ====================
  709. local autoBoxingGlovesEnabled = false
  710. local BoxingGlovesRechargeEnabled = false
  711. local BoxingGlovesToggle = MainTab:CreateToggle({
  712. Name = "Auto Boxing Gloves (Swing Only)",
  713. CurrentValue = false,
  714. Flag = "AutoBoxingGlovesToggle",
  715. Callback = function(Value)
  716. autoBoxingGlovesEnabled = Value
  717. if autoBoxingGlovesEnabled then
  718. coroutine.wrap(function()
  719. while autoBoxingGlovesEnabled do
  720. local character = game:GetService("Players").LocalPlayer.Character
  721. if character then
  722. local gloves = character:FindFirstChild("Boxing Gloves")
  723. if gloves then
  724. local args = {
  725. gloves,
  726. 1787477308.1938,
  727. Vector3.new(0.76200979948044, -0.4384982585907, -0.47650834918022)
  728. }
  729. game:GetService("ReplicatedStorage"):WaitForChild("Shared"):WaitForChild("Universe"):WaitForChild("Network"):WaitForChild("RemoteEvent"):WaitForChild("SwingMelee"):FireServer(unpack(args))
  730. else
  731. -- Try GetNil fallback
  732. local nilGloves = GetNil("Boxing Gloves", "1_310037")
  733. if nilGloves then
  734. local args = {
  735. nilGloves,
  736. 1787477308.1938,
  737. Vector3.new(0.76200979948044, -0.4384982585907, -0.47650834918022)
  738. }
  739. game:GetService("ReplicatedStorage"):WaitForChild("Shared"):WaitForChild("Universe"):WaitForChild("Network"):WaitForChild("RemoteEvent"):WaitForChild("SwingMelee"):FireServer(unpack(args))
  740. end
  741. end
  742. end
  743. task.wait(0.01)
  744. end
  745. end)()
  746. end
  747. end,
  748. })
  749. MainTab:CreateToggle({
  750. Name = "Boxing Gloves Auto Recharge",
  751. CurrentValue = false,
  752. Flag = "BoxingGlovesRechargeToggle",
  753. Callback = function(Value)
  754. BoxingGlovesRechargeEnabled = Value
  755. end,
  756. })
  757. -- Boxing Gloves charge loop
  758. coroutine.wrap(function()
  759. while task.wait(0.01) do
  760. if BoxingGlovesRechargeEnabled then
  761. local character = game:GetService("Players").LocalPlayer.Character
  762. if character then
  763. local gloves = character:FindFirstChild("Boxing Gloves")
  764. if gloves then
  765. local args = {
  766. gloves,
  767. 1787477307.4144
  768. }
  769. local remoteEvent = game:GetService("ReplicatedStorage"):FindFirstChild("Shared")
  770. and game:GetService("ReplicatedStorage").Shared:FindFirstChild("Universe")
  771. and game:GetService("ReplicatedStorage").Shared.Universe:FindFirstChild("Network")
  772. and game:GetService("ReplicatedStorage").Shared.Universe.Network:FindFirstChild("RemoteEvent")
  773. and game:GetService("ReplicatedStorage").Shared.Universe.Network.RemoteEvent:FindFirstChild("ChargeMelee")
  774. if remoteEvent then
  775. remoteEvent:FireServer(unpack(args))
  776. end
  777. else
  778. -- Try GetNil fallback
  779. local nilGloves = GetNil("Boxing Gloves", "1_310037")
  780. if nilGloves then
  781. local args = {
  782. nilGloves,
  783. 1787477307.4144
  784. }
  785. local remoteEvent = game:GetService("ReplicatedStorage"):FindFirstChild("Shared")
  786. and game:GetService("ReplicatedStorage").Shared:FindFirstChild("Universe")
  787. and game:GetService("ReplicatedStorage").Shared.Universe:FindFirstChild("Network")
  788. and game:GetService("ReplicatedStorage").Shared.Universe.Network:FindFirstChild("RemoteEvent")
  789. and game:GetService("ReplicatedStorage").Shared.Universe.Network.RemoteEvent:FindFirstChild("ChargeMelee")
  790. if remoteEvent then
  791. remoteEvent:FireServer(unpack(args))
  792. end
  793. end
  794. end
  795. end
  796. end
  797. end
  798. end)()
  799. local autoSwingEnabled = false
  800. local swingSpeed = 0.01 -- Default speed in seconds (adjustable)
  801. local autoShovelEnabled = false
  802. local ShovelRechargeEnabled = false -- Separate shovel recharge toggle
  803. local autoExcaliburEnabled = false
  804. local ExcaliburRechargeEnabled = false -- Separate excalibur recharge toggle
  805. local autoSpearEnabled = false
  806. local SpearRechargeEnabled = false -- Separate spear recharge toggle
  807. local enlargeEnabled = false
  808. local hitboxSize = 10
  809. local connections = {}
  810. local function isZombie(obj)
  811. return obj:IsA("Model") and obj:FindFirstChild("Humanoid") and obj:FindFirstChild("HumanoidRootPart") and string.find(obj.Name:lower(), "zombie")
  812. end
  813. local Toggle = MainTab:CreateToggle({
  814. Name = "Auto Swing Melee (Vampire Knife)",
  815. CurrentValue = false,
  816. Flag = "AutoSwingToggle",
  817. Callback = function(Value)
  818. autoSwingEnabled = Value
  819. if autoSwingEnabled then
  820. coroutine.wrap(function()
  821. while autoSwingEnabled do
  822. local args = {
  823. game:GetService("Players").LocalPlayer.Character:WaitForChild("Vampire Knife"),
  824. os.clock() * 1000, -- Using current time as approximation; adjust if needed
  825. Vector3.new(0.38748157024383545, -0.469262033700943, 0.7935056090354919)
  826. }
  827. game:GetService("ReplicatedStorage"):WaitForChild("Shared"):WaitForChild("Universe"):WaitForChild("Network"):WaitForChild("RemoteEvent"):WaitForChild("SwingMelee"):FireServer(unpack(args))
  828. task.wait(swingSpeed)
  829. end
  830. end)()
  831. end
  832. end,
  833. })
  834. local Slider = MainTab:CreateSlider({
  835. Name = "Swing Speed (seconds)",
  836. Range = {0.01, 1.0},
  837. Increment = 0.01,
  838. Suffix = "s",
  839. CurrentValue = 0.01,
  840. Flag = "SwingSpeedSlider",
  841. Callback = function(Value)
  842. swingSpeed = Value
  843. end,
  844. })
  845. local ShovelToggle = MainTab:CreateToggle({
  846. Name = "Auto Shovel (Swing Only)",
  847. CurrentValue = false,
  848. Flag = "AutoShovelToggle",
  849. Callback = function(Value)
  850. autoShovelEnabled = Value
  851. if autoShovelEnabled then
  852. coroutine.wrap(function()
  853. while autoShovelEnabled do
  854. local args = {
  855. game:GetService("Players").LocalPlayer.Character:WaitForChild("Shovel"),
  856. 1768150910.657773,
  857. Vector3.new(-0.8638443350791931, -0.3981878459453583, -0.3085765242576599)
  858. }
  859. game:GetService("ReplicatedStorage"):WaitForChild("Shared"):WaitForChild("Universe"):WaitForChild("Network"):WaitForChild("RemoteEvent"):WaitForChild("SwingMelee"):FireServer(unpack(args))
  860. task.wait(0.01)
  861. end
  862. end)()
  863. end
  864. end,
  865. })
  866. -- Separate Shovel Recharge toggle (like Vampire Knife)
  867. MainTab:CreateToggle({
  868. Name = "Shovel Auto Recharge",
  869. CurrentValue = false,
  870. Flag = "ShovelRechargeToggle",
  871. Callback = function(Value)
  872. ShovelRechargeEnabled = Value
  873. end,
  874. })
  875. local ExcaliburToggle = MainTab:CreateToggle({
  876. Name = "Auto Excalibur (Swing Only)",
  877. CurrentValue = false,
  878. Flag = "AutoExcaliburToggle",
  879. Callback = function(Value)
  880. autoExcaliburEnabled = Value
  881. if autoExcaliburEnabled then
  882. coroutine.wrap(function()
  883. while autoExcaliburEnabled do
  884. local args = {
  885. game:GetService("Players").LocalPlayer.Character:WaitForChild("Excalibur"),
  886. 1768326713.962643,
  887. Vector3.new(0.6278625130653381, -0.5555389523506165, 0.5451285243034363)
  888. }
  889. game:GetService("ReplicatedStorage"):WaitForChild("Shared"):WaitForChild("Universe"):WaitForChild("Network"):WaitForChild("RemoteEvent"):WaitForChild("SwingMelee"):FireServer(unpack(args))
  890. task.wait(0.01)
  891. end
  892. end)()
  893. end
  894. end,
  895. })
  896. -- Separate Excalibur Recharge toggle (like Vampire Knife)
  897. MainTab:CreateToggle({
  898. Name = "Excalibur Auto Recharge",
  899. CurrentValue = false,
  900. Flag = "ExcaliburRechargeToggle",
  901. Callback = function(Value)
  902. ExcaliburRechargeEnabled = Value
  903. end,
  904. })
  905. -- ==================== SPEAR OF LONGINUS ====================
  906. local SpearToggle = MainTab:CreateToggle({
  907. Name = "Auto Spear of Longinus (Swing Only)",
  908. CurrentValue = false,
  909. Flag = "AutoSpearToggle",
  910. Callback = function(Value)
  911. autoSpearEnabled = Value
  912. if autoSpearEnabled then
  913. coroutine.wrap(function()
  914. while autoSpearEnabled do
  915. local character = game:GetService("Players").LocalPlayer.Character
  916. if character then
  917. local spear = character:FindFirstChild("Spear of Longinus")
  918. if spear then
  919. local args = {
  920. spear,
  921. 1787412804.5943,
  922. Vector3.new(0.83802497386932, -0.51521301269531, 0.17963778972626)
  923. }
  924. game:GetService("ReplicatedStorage"):WaitForChild("Shared"):WaitForChild("Universe"):WaitForChild("Network"):WaitForChild("RemoteEvent"):WaitForChild("SwingMelee"):FireServer(unpack(args))
  925. end
  926. end
  927. task.wait(0.01)
  928. end
  929. end)()
  930. end
  931. end,
  932. })
  933. MainTab:CreateToggle({
  934. Name = "Spear of Longinus Auto Recharge",
  935. CurrentValue = false,
  936. Flag = "SpearRechargeToggle",
  937. Callback = function(Value)
  938. SpearRechargeEnabled = Value
  939. end,
  940. })
  941. local SliderHitbox = MainTab:CreateSlider({
  942. Name = "Hitbox Size",
  943. Range = {1, 50},
  944. Increment = 1,
  945. Suffix = "studs",
  946. CurrentValue = 10,
  947. Flag = "HitboxSizeSlider",
  948. Callback = function(Value)
  949. hitboxSize = Value
  950. end,
  951. })
  952. local ToggleEnlarge = MainTab:CreateToggle({
  953. Name = "Enlarge Zombie Hitboxes",
  954. CurrentValue = false,
  955. Flag = "EnlargeHitboxToggle",
  956. Callback = function(Value)
  957. enlargeEnabled = Value
  958. if enlargeEnabled then
  959. for _, obj in ipairs(workspace:GetChildren()) do
  960. if isZombie(obj) then
  961. obj.HumanoidRootPart.Size = Vector3.new(hitboxSize, hitboxSize, hitboxSize / 2)
  962. obj.HumanoidRootPart.Transparency = 0.5
  963. end
  964. end
  965. local conn = workspace.ChildAdded:Connect(function(child)
  966. if enlargeEnabled and isZombie(child) then
  967. task.wait(0.1)
  968. if child:FindFirstChild("HumanoidRootPart") then
  969. child.HumanoidRootPart.Size = Vector3.new(hitboxSize, hitboxSize, hitboxSize / 2)
  970. child.HumanoidRootPart.Transparency = 0.5
  971. end
  972. end
  973. end)
  974. table.insert(connections, conn)
  975. else
  976. for _, obj in ipairs(workspace:GetChildren()) do
  977. if isZombie(obj) then
  978. obj.HumanoidRootPart.Size = Vector3.new(2, 2, 1)
  979. obj.HumanoidRootPart.Transparency = 0
  980. end
  981. end
  982. for _, conn in ipairs(connections) do
  983. conn:Disconnect()
  984. end
  985. connections = {}
  986. end
  987. end,
  988. })
  989. -- ==================== UNIFIED TRAIN TELEPORT SYSTEM ====================
  990. -- All supported train types
  991. local TrainNames = {
  992. "ghost",
  993. "presidential",
  994. "default",
  995. "yeat",
  996. "christmas_event_2025",
  997. "dracula",
  998. "frost",
  999. "wooden",
  1000. "armor",
  1001. "passenger",
  1002. "cattle",
  1003. "locomotive"
  1004. }
  1005. -- Unified function to teleport to a specific train's conductor seat
  1006. local function TeleportToTrain(trainName)
  1007. local player = game:GetService("Players").LocalPlayer
  1008. local character = player.Character or player.CharacterAdded:Wait()
  1009. local humanoid = character:WaitForChild("Humanoid")
  1010. local root = character:WaitForChild("HumanoidRootPart")
  1011. local train = workspace:FindFirstChild(trainName)
  1012. if not train then
  1013. Rayfield:Notify({
  1014. Title = "Searching",
  1015. Content = "Looking for " .. trainName .. " train...",
  1016. Duration = 30,
  1017. Image = 4483362458
  1018. })
  1019. local start = tick()
  1020. while not train and tick() - start < 30 do
  1021. task.wait(1)
  1022. train = workspace:FindFirstChild(trainName)
  1023. end
  1024. if not train then
  1025. Rayfield:Notify({
  1026. Title = "Error",
  1027. Content = trainName .. " train not found after 30 seconds.",
  1028. Duration = 5,
  1029. Image = 4483362458
  1030. })
  1031. return
  1032. end
  1033. end
  1034. local seatPath = train:WaitForChild("RequiredComponents"):WaitForChild("Controls"):WaitForChild("ConductorSeat"):WaitForChild("VehicleSeat")
  1035.  
  1036. root.CFrame = seatPath.CFrame + Vector3.new(0, 3, 0)
  1037. wait(0.1)
  1038. humanoid:Sit(seatPath)
  1039. end
  1040. -- Smart teleport: finds any available train and teleports to it
  1041. local function TeleportToAnyTrain()
  1042. local player = game:GetService("Players").LocalPlayer
  1043. local character = player.Character or player.CharacterAdded:Wait()
  1044. local humanoid = character:WaitForChild("Humanoid")
  1045. local root = character:WaitForChild("HumanoidRootPart")
  1046.  
  1047. -- Try each train in order
  1048. for _, trainName in ipairs(TrainNames) do
  1049. local train = workspace:FindFirstChild(trainName)
  1050. if train then
  1051. local seatPath = train:FindFirstChild("RequiredComponents")
  1052. and train.RequiredComponents:FindFirstChild("Controls")
  1053. and train.RequiredComponents.Controls:FindFirstChild("ConductorSeat")
  1054. and train.RequiredComponents.Controls.ConductorSeat:FindFirstChild("VehicleSeat")
  1055. if seatPath then
  1056. root.CFrame = seatPath.CFrame + Vector3.new(0, 3, 0)
  1057. wait(0.1)
  1058. humanoid:Sit(seatPath)
  1059. Rayfield:Notify({
  1060. Title = "Teleported",
  1061. Content = "Teleported to " .. trainName .. " conductor seat.",
  1062. Duration = 3,
  1063. Image = 4483362458
  1064. })
  1065. return
  1066. end
  1067. end
  1068. end
  1069.  
  1070. -- If no train found immediately, wait and search
  1071. Rayfield:Notify({
  1072. Title = "Searching",
  1073. Content = "Looking for any train...",
  1074. Duration = 30,
  1075. Image = 4483362458
  1076. })
  1077.  
  1078. local start = tick()
  1079. while tick() - start < 30 do
  1080. for _, trainName in ipairs(TrainNames) do
  1081. local train = workspace:FindFirstChild(trainName)
  1082. if train then
  1083. local seatPath = train:FindFirstChild("RequiredComponents")
  1084. and train.RequiredComponents:FindFirstChild("Controls")
  1085. and train.RequiredComponents.Controls:FindFirstChild("ConductorSeat")
  1086. and train.RequiredComponents.Controls.ConductorSeat:FindFirstChild("VehicleSeat")
  1087. if seatPath then
  1088. root.CFrame = seatPath.CFrame + Vector3.new(0, 3, 0)
  1089. wait(0.1)
  1090. humanoid:Sit(seatPath)
  1091. Rayfield:Notify({
  1092. Title = "Teleported",
  1093. Content = "Teleported to " .. trainName .. " conductor seat.",
  1094. Duration = 3,
  1095. Image = 4483362458
  1096. })
  1097. return
  1098. end
  1099. end
  1100. end
  1101. task.wait(1)
  1102. end
  1103.  
  1104. Rayfield:Notify({
  1105. Title = "Error",
  1106. Content = "No train found after 30 seconds.",
  1107. Duration = 5,
  1108. Image = 4483362458
  1109. })
  1110. end
  1111. -- ==================== SCREEN TELEPORT ICON (Top-Right) ====================
  1112. local function CreateTeleportIcon()
  1113. local player = game:GetService("Players").LocalPlayer
  1114. local playerGui = player:WaitForChild("PlayerGui")
  1115.  
  1116. -- Remove existing if already present
  1117. if playerGui:FindFirstChild("TrainTeleportIcon") then
  1118. playerGui.TrainTeleportIcon:Destroy()
  1119. end
  1120.  
  1121. local screenGui = Instance.new("ScreenGui")
  1122. screenGui.Name = "TrainTeleportIcon"
  1123. screenGui.ResetOnSpawn = false
  1124. screenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  1125. screenGui.DisplayOrder = 100
  1126.  
  1127. -- Main button container (top-right)
  1128. local button = Instance.new("TextButton")
  1129. button.Name = "TeleportButton"
  1130. button.Size = UDim2.new(0, 60, 0, 60)
  1131. button.Position = UDim2.new(1, -75, 0, 15) -- Top-right corner with margin
  1132. button.BackgroundColor3 = Color3.fromRGB(40, 40, 50)
  1133. button.BackgroundTransparency = 0.2
  1134. button.BorderSizePixel = 0
  1135. button.AutoLocalize = false
  1136. button.Text = ""
  1137.  
  1138. -- Rounded corners
  1139. local corner = Instance.new("UICorner")
  1140. corner.CornerRadius = UDim.new(0, 12)
  1141. corner.Parent = button
  1142.  
  1143. -- Stroke outline
  1144. local stroke = Instance.new("UIStroke")
  1145. stroke.Color = Color3.fromRGB(255, 200, 50)
  1146. stroke.Thickness = 2
  1147. stroke.Parent = button
  1148.  
  1149. -- Train icon (text-based emoji-like icon)
  1150. local iconLabel = Instance.new("TextLabel")
  1151. iconLabel.Name = "IconLabel"
  1152. iconLabel.Size = UDim2.new(1, 0, 0.7, 0)
  1153. iconLabel.Position = UDim2.new(0, 0, 0, 0)
  1154. iconLabel.BackgroundTransparency = 1
  1155. iconLabel.Text = "TRAIN"
  1156. iconLabel.TextSize = 14
  1157. iconLabel.TextColor3 = Color3.fromRGB(255, 220, 80)
  1158. iconLabel.Font = Enum.Font.SourceSansBold
  1159. iconLabel.Parent = button
  1160.  
  1161. -- Label below icon
  1162. local textLabel = Instance.new("TextLabel")
  1163. textLabel.Name = "TextLabel"
  1164. textLabel.Size = UDim2.new(1, 0, 0.3, 0)
  1165. textLabel.Position = UDim2.new(0, 0, 0.7, 0)
  1166. textLabel.BackgroundTransparency = 1
  1167. textLabel.Text = "SEAT"
  1168. textLabel.TextSize = 10
  1169. textLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  1170. textLabel.Font = Enum.Font.SourceSansBold
  1171. textLabel.Parent = button
  1172.  
  1173. -- Hover effect
  1174. button.MouseEnter:Connect(function()
  1175. button.BackgroundColor3 = Color3.fromRGB(60, 60, 80)
  1176. stroke.Color = Color3.fromRGB(255, 230, 100)
  1177. end)
  1178.  
  1179. button.MouseLeave:Connect(function()
  1180. button.BackgroundColor3 = Color3.fromRGB(40, 40, 50)
  1181. stroke.Color = Color3.fromRGB(255, 200, 50)
  1182. end)
  1183.  
  1184. -- Click effect
  1185. button.MouseButton1Down:Connect(function()
  1186. button.Size = UDim2.new(0, 55, 0, 55)
  1187. button.Position = UDim2.new(1, -72, 0, 17)
  1188. end)
  1189.  
  1190. button.MouseButton1Up:Connect(function()
  1191. button.Size = UDim2.new(0, 60, 0, 60)
  1192. button.Position = UDim2.new(1, -75, 0, 15)
  1193. end)
  1194.  
  1195. -- Click action: teleport to conductor seat
  1196. button.MouseButton1Click:Connect(function()
  1197. TeleportToAnyTrain()
  1198. end)
  1199.  
  1200. button.Parent = screenGui
  1201. screenGui.Parent = playerGui
  1202. end
  1203. -- Create the icon when script loads
  1204. coroutine.wrap(CreateTeleportIcon)()
  1205. -- Also recreate on character added in case it gets destroyed
  1206. game:GetService("Players").LocalPlayer.CharacterAdded:Connect(function()
  1207. task.wait(2)
  1208. CreateTeleportIcon()
  1209. end)
  1210. -- ==================== TRAIN TELEPORT BUTTONS ====================
  1211. MainTab:CreateButton({
  1212. Name = "Teleport to Ghost Train Conductor Seat",
  1213. Callback = function() TeleportToTrain("ghost") end,
  1214. })
  1215. MainTab:CreateButton({
  1216. Name = "Teleport to Presidential Conductor Seat",
  1217. Callback = function() TeleportToTrain("presidential") end,
  1218. })
  1219. MainTab:CreateButton({
  1220. Name = "Teleport to Default Train Conductor Seat",
  1221. Callback = function() TeleportToTrain("default") end,
  1222. })
  1223. MainTab:CreateButton({
  1224. Name = "Teleport to Yeat Train Conductor Seat",
  1225. Callback = function() TeleportToTrain("yeat") end,
  1226. })
  1227. MainTab:CreateButton({
  1228. Name = "Teleport to Christmas Event 2025 Conductor Seat",
  1229. Callback = function() TeleportToTrain("christmas_event_2025") end,
  1230. })
  1231. MainTab:CreateButton({
  1232. Name = "Teleport to Dracula Train Conductor Seat",
  1233. Callback = function() TeleportToTrain("dracula") end,
  1234. })
  1235. MainTab:CreateButton({
  1236. Name = "Teleport to Frost Train Conductor Seat",
  1237. Callback = function() TeleportToTrain("frost") end,
  1238. })
  1239. MainTab:CreateButton({
  1240. Name = "Teleport to Wooden Train Conductor Seat",
  1241. Callback = function() TeleportToTrain("wooden") end,
  1242. })
  1243. MainTab:CreateButton({
  1244. Name = "Teleport to Armor Train Conductor Seat",
  1245. Callback = function() TeleportToTrain("armor") end,
  1246. })
  1247. MainTab:CreateButton({
  1248. Name = "Teleport to Passenger Train Conductor Seat",
  1249. Callback = function() TeleportToTrain("passenger") end,
  1250. })
  1251. MainTab:CreateButton({
  1252. Name = "Teleport to Cattle Train Conductor Seat",
  1253. Callback = function() TeleportToTrain("cattle") end,
  1254. })
  1255. MainTab:CreateButton({
  1256. Name = "Teleport to Locomotive Train Conductor Seat",
  1257. Callback = function() TeleportToTrain("locomotive") end,
  1258. })
  1259. -- ==================== VAMPIRE KNIFE RECHARGE (NOW TOGGLEABLE) ====================
  1260. local RechargeEnabled = true -- Default ON like before
  1261. local RechargeToggle = MainTab:CreateToggle({
  1262. Name = "Vampire Knife Auto Recharge",
  1263. CurrentValue = true,
  1264. Flag = "RechargeToggle",
  1265. Callback = function(Value)
  1266. RechargeEnabled = Value
  1267. end,
  1268. })
  1269. -- Vampire knife charge loop (toggleable)
  1270. coroutine.wrap(function()
  1271. while task.wait(0.01) do
  1272. if RechargeEnabled then
  1273. local character = game:GetService("Players").LocalPlayer.Character
  1274. if character then
  1275. local vampireKnife = character:FindFirstChild("Vampire Knife")
  1276. if vampireKnife then
  1277. local args = {
  1278. vampireKnife,
  1279. 1768151606.210378
  1280. }
  1281. local remoteEvent = game:GetService("ReplicatedStorage"):FindFirstChild("Shared")
  1282. and game:GetService("ReplicatedStorage").Shared:FindFirstChild("Universe")
  1283. and game:GetService("ReplicatedStorage").Shared.Universe:FindFirstChild("Network")
  1284. and game:GetService("ReplicatedStorage").Shared.Universe.Network:FindFirstChild("RemoteEvent")
  1285. and game:GetService("ReplicatedStorage").Shared.Universe.Network.RemoteEvent:FindFirstChild("ChargeMelee")
  1286. if remoteEvent then
  1287. remoteEvent:FireServer(unpack(args))
  1288. end
  1289. end
  1290. end
  1291. end
  1292. end
  1293. end)()
  1294. -- Shovel charge loop (separate toggleable)
  1295. coroutine.wrap(function()
  1296. while task.wait(0.01) do
  1297. if ShovelRechargeEnabled then
  1298. local character = game:GetService("Players").LocalPlayer.Character
  1299. if character then
  1300. local shovel = character:FindFirstChild("Shovel")
  1301. if shovel then
  1302. local args = {
  1303. shovel,
  1304. 1768150909.257726
  1305. }
  1306. local remoteEvent = game:GetService("ReplicatedStorage"):FindFirstChild("Shared")
  1307. and game:GetService("ReplicatedStorage").Shared:FindFirstChild("Universe")
  1308. and game:GetService("ReplicatedStorage").Shared.Universe:FindFirstChild("Network")
  1309. and game:GetService("ReplicatedStorage").Shared.Universe.Network:FindFirstChild("RemoteEvent")
  1310. and game:GetService("ReplicatedStorage").Shared.Universe.Network.RemoteEvent:FindFirstChild("ChargeMelee")
  1311. if remoteEvent then
  1312. remoteEvent:FireServer(unpack(args))
  1313. end
  1314. end
  1315. end
  1316. end
  1317. end
  1318. end)()
  1319. -- Excalibur charge loop (separate toggleable)
  1320. coroutine.wrap(function()
  1321. while task.wait(0.01) do
  1322. if ExcaliburRechargeEnabled then
  1323. local character = game:GetService("Players").LocalPlayer.Character
  1324. if character then
  1325. local excalibur = character:FindFirstChild("Excalibur")
  1326. if excalibur then
  1327. local args = {
  1328. excalibur,
  1329. 1768326712.974426
  1330. }
  1331. local remoteEvent = game:GetService("ReplicatedStorage"):FindFirstChild("Shared")
  1332. and game:GetService("ReplicatedStorage").Shared:FindFirstChild("Universe")
  1333. and game:GetService("ReplicatedStorage").Shared.Universe:FindFirstChild("Network")
  1334. and game:GetService("ReplicatedStorage").Shared.Universe.Network:FindFirstChild("RemoteEvent")
  1335. and game:GetService("ReplicatedStorage").Shared.Universe.Network.RemoteEvent:FindFirstChild("ChargeMelee")
  1336. if remoteEvent then
  1337. remoteEvent:FireServer(unpack(args))
  1338. end
  1339. end
  1340. end
  1341. end
  1342. end
  1343. end)()
  1344. -- Spear of Longinus charge loop (separate toggleable)
  1345. coroutine.wrap(function()
  1346. while task.wait(0.01) do
  1347. if SpearRechargeEnabled then
  1348. local character = game:GetService("Players").LocalPlayer.Character
  1349. if character then
  1350. local spear = character:FindFirstChild("Spear of Longinus")
  1351. if spear then
  1352. local args = {
  1353. spear,
  1354. 1787412803.4539
  1355. }
  1356. local remoteEvent = game:GetService("ReplicatedStorage"):FindFirstChild("Shared")
  1357. and game:GetService("ReplicatedStorage").Shared:FindFirstChild("Universe")
  1358. and game:GetService("ReplicatedStorage").Shared.Universe:FindFirstChild("Network")
  1359. and game:GetService("ReplicatedStorage").Shared.Universe.Network:FindFirstChild("RemoteEvent")
  1360. and game:GetService("ReplicatedStorage").Shared.Universe.Network.RemoteEvent:FindFirstChild("ChargeMelee")
  1361. if remoteEvent then
  1362. remoteEvent:FireServer(unpack(args))
  1363. end
  1364. end
  1365. end
  1366. end
  1367. end
  1368. end)()
  1369. -- ============================================================
  1370. -- ==================== WORLD TOOLS TAB =======================
  1371. -- ============================================================
  1372. -- (Lever ESP removed - not working)
  1373. -- ==================== TOWNS ITEM BRINGER (RunService) ====================
  1374. local TownsItems = {} -- [item] = true (tracked items)
  1375. local TownsItemList = {} -- list of unique item names for dropdown
  1376. local SelectedTownsItem = nil
  1377. local TownsItemDropdown = nil
  1378. local TownsScanConnection = nil
  1379. local TownsAutoBringEnabled = false
  1380. local TownsAutoBringConnection = nil
  1381. local LastTownsScan = 0
  1382. local function GetItemRoot(obj)
  1383. if obj:IsA("BasePart") then return obj end
  1384. if obj:IsA("Model") then return obj.PrimaryPart or obj:FindFirstChildWhichIsA("BasePart", true) end
  1385. return obj:FindFirstChild("Handle") or obj:FindFirstChildWhichIsA("BasePart", true)
  1386. end
  1387. local function IsValidTownItem(obj)
  1388. if not table.find(itemNames, obj.Name:lower()) then return false end
  1389. if obj:IsDescendantOf(game.Players.LocalPlayer.Character) then return false end
  1390. if not (obj:IsA("Tool") or obj:IsA("Model") or obj:IsA("BasePart")) then return false end
  1391. return true
  1392. end
  1393. local function ScanTownsItems()
  1394. local towns = workspace:FindFirstChild("Towns")
  1395. if not towns then return end
  1396.  
  1397. local foundItems = {}
  1398. local foundNames = {}
  1399.  
  1400. for _, obj in ipairs(towns:GetDescendants()) do
  1401. if IsValidTownItem(obj) then
  1402. foundItems[obj] = true
  1403. foundNames[obj.Name] = true
  1404. end
  1405. end
  1406.  
  1407. TownsItems = foundItems
  1408.  
  1409. local newList = {}
  1410. for name, _ in pairs(foundNames) do
  1411. table.insert(newList, name)
  1412. end
  1413. table.sort(newList)
  1414.  
  1415. if #newList ~= #TownsItemList then
  1416. TownsItemList = newList
  1417. if TownsItemDropdown then
  1418. TownsItemDropdown:Refresh(TownsItemList)
  1419. end
  1420. else
  1421. local same = true
  1422. table.sort(TownsItemList)
  1423. for i, v in ipairs(TownsItemList) do
  1424. if newList[i] ~= v then same = false break end
  1425. end
  1426. if not same then
  1427. TownsItemList = newList
  1428. if TownsItemDropdown then
  1429. TownsItemDropdown:Refresh(TownsItemList)
  1430. end
  1431. end
  1432. end
  1433. end
  1434. local function BringTownsItemByName(itemName)
  1435. local targetPos = GetBringPosition()
  1436. if not targetPos then
  1437. Rayfield:Notify({
  1438. Title = "Error",
  1439. Content = "Character not found.",
  1440. Duration = 2,
  1441. Image = 4483362458
  1442. })
  1443. return
  1444. end
  1445.  
  1446. local brought = 0
  1447. for item, _ in pairs(TownsItems) do
  1448. if item.Name == itemName then
  1449. local root = GetItemRoot(item)
  1450. if root then
  1451. root.CFrame = CFrame.new(targetPos)
  1452. brought = brought + 1
  1453. end
  1454. end
  1455. end
  1456.  
  1457. if brought > 0 then
  1458. Rayfield:Notify({
  1459. Title = "Item Brought",
  1460. Content = "Brought " .. brought .. "x " .. itemName .. " to you.",
  1461. Duration = 2,
  1462. Image = 4483362458
  1463. })
  1464. else
  1465. Rayfield:Notify({
  1466. Title = "Not Found",
  1467. Content = itemName .. " not found in any town right now.",
  1468. Duration = 2,
  1469. Image = 4483362458
  1470. })
  1471. end
  1472. end
  1473. local function BringAllTownsItems()
  1474. local targetPos = GetBringPosition()
  1475. if not targetPos then
  1476. Rayfield:Notify({
  1477. Title = "Error",
  1478. Content = "Character not found.",
  1479. Duration = 2,
  1480. Image = 4483362458
  1481. })
  1482. return
  1483. end
  1484.  
  1485. local brought = 0
  1486. for item, _ in pairs(TownsItems) do
  1487. local root = GetItemRoot(item)
  1488. if root then
  1489. root.CFrame = CFrame.new(targetPos)
  1490. brought = brought + 1
  1491. end
  1492. end
  1493.  
  1494. Rayfield:Notify({
  1495. Title = "Items Brought",
  1496. Content = "Brought " .. brought .. " items from all towns.",
  1497. Duration = 2,
  1498. Image = 4483362458
  1499. })
  1500. end
  1501. local function StartTownsScanner()
  1502. if TownsScanConnection then return end
  1503. TownsScanConnection = RunService.Heartbeat:Connect(function()
  1504. local now = tick()
  1505. if now - LastTownsScan >= 0.5 then
  1506. LastTownsScan = now
  1507. ScanTownsItems()
  1508. end
  1509. end)
  1510. end
  1511. local function StopTownsScanner()
  1512. if TownsScanConnection then
  1513. TownsScanConnection:Disconnect()
  1514. TownsScanConnection = nil
  1515. end
  1516. end
  1517. WorldTab:CreateToggle({
  1518. Name = "Auto Scan Towns Items (RunService)",
  1519. CurrentValue = false,
  1520. Flag = "TownsScanToggle",
  1521. Callback = function(Value)
  1522. if Value then
  1523. StartTownsScanner()
  1524. Rayfield:Notify({
  1525. Title = "Scanner Active",
  1526. Content = "Continuously scanning towns for items...",
  1527. Duration = 2,
  1528. Image = 4483362458
  1529. })
  1530. else
  1531. StopTownsScanner()
  1532. if TownsAutoBringEnabled then
  1533. TownsAutoBringEnabled = false
  1534. if TownsAutoBringConnection then
  1535. TownsAutoBringConnection:Disconnect()
  1536. TownsAutoBringConnection = nil
  1537. end
  1538. end
  1539. end
  1540. end,
  1541. })
  1542. TownsItemDropdown = WorldTab:CreateDropdown({
  1543. Name = "Select Town Item",
  1544. Options = TownsItemList,
  1545. CurrentOption = {},
  1546. Callback = function(Option) SelectedTownsItem = Option[1] end,
  1547. })
  1548. WorldTab:CreateButton({
  1549. Name = "Bring Selected Item (No Range)",
  1550. Callback = function()
  1551. if SelectedTownsItem then
  1552. BringTownsItemByName(SelectedTownsItem)
  1553. else
  1554. Rayfield:Notify({
  1555. Title = "No Selection",
  1556. Content = "Select an item from the dropdown first.",
  1557. Duration = 2,
  1558. Image = 4483362458
  1559. })
  1560. end
  1561. end
  1562. })
  1563. WorldTab:CreateButton({
  1564. Name = "Bring ALL Town Items (No Range)",
  1565. Callback = BringAllTownsItems
  1566. })
  1567. WorldTab:CreateToggle({
  1568. Name = "Auto Bring Selected Town Item",
  1569. CurrentValue = false,
  1570. Flag = "TownsAutoBringToggle",
  1571. Callback = function(Value)
  1572. TownsAutoBringEnabled = Value
  1573. if Value then
  1574. if not TownsScanConnection then
  1575. StartTownsScanner()
  1576. end
  1577. TownsAutoBringConnection = RunService.Heartbeat:Connect(function()
  1578. if SelectedTownsItem then
  1579. local targetPos = GetBringPosition()
  1580. if targetPos then
  1581. for item, _ in pairs(TownsItems) do
  1582. if item.Name == SelectedTownsItem then
  1583. local root = GetItemRoot(item)
  1584. if root then
  1585. root.CFrame = CFrame.new(targetPos)
  1586. end
  1587. end
  1588. end
  1589. end
  1590. end
  1591. end)
  1592. else
  1593. if TownsAutoBringConnection then
  1594. TownsAutoBringConnection:Disconnect()
  1595. TownsAutoBringConnection = nil
  1596. end
  1597. end
  1598. end,
  1599. })
  1600. -- ==================== VAULT COMBINATION DISPLAY (FIXED - FINDS ALL VAULTS) ====================
  1601. local VaultCombosEnabled = false
  1602. local VaultComboESP = {} -- [key] = BillboardGui
  1603. local VaultComboConnection = nil
  1604. local function ClearVaultESP()
  1605. for _, esp in pairs(VaultComboESP) do
  1606. if esp then esp:Destroy() end
  1607. end
  1608. VaultComboESP = {}
  1609. end
  1610. -- FIXED: Find ALL vaults with a Combination child in the buildings
  1611. -- Searches every building child and every descendant for Vault > Combination
  1612. local function FindAllVaultsInTown(town)
  1613. local foundVaults = {}
  1614. local buildings = town:FindFirstChild("Buildings")
  1615. if not buildings then return foundVaults end
  1616.  
  1617. -- Method 1: Search ALL descendants of Buildings for any object named "Vault" that has a "Combination" child
  1618. -- This catches: BankDestroyed.Vault, Bank.Vault, DestroyedBank.Vault, or even Vault directly under Buildings
  1619. for _, descendant in ipairs(buildings:GetDescendants()) do
  1620. if descendant.Name == "Vault" then
  1621. local combination = descendant:FindFirstChild("Combination")
  1622. if combination then
  1623. -- Get the parent building name for display
  1624. local parentBuilding = descendant.Parent
  1625. local buildingName = parentBuilding and parentBuilding.Name or "Unknown"
  1626. table.insert(foundVaults, {
  1627. Vault = descendant,
  1628. Combination = combination,
  1629. BuildingName = buildingName
  1630. })
  1631. end
  1632. end
  1633. end
  1634.  
  1635. -- Method 2: Also check if any building child itself is named "Combination" (edge case)
  1636. -- Or if buildings have direct children with Combination (like Buildings[22].Vault.Combination)
  1637. for _, child in ipairs(buildings:GetChildren()) do
  1638. -- Check if this child directly has a Vault with Combination
  1639. local vault = child:FindFirstChild("Vault")
  1640. if vault then
  1641. local combination = vault:FindFirstChild("Combination")
  1642. if combination then
  1643. -- Check if already found
  1644. local alreadyFound = false
  1645. for _, v in ipairs(foundVaults) do
  1646. if v.Vault == vault then
  1647. alreadyFound = true
  1648. break
  1649. end
  1650. end
  1651. if not alreadyFound then
  1652. table.insert(foundVaults, {
  1653. Vault = vault,
  1654. Combination = combination,
  1655. BuildingName = child.Name
  1656. })
  1657. end
  1658. end
  1659. end
  1660. end
  1661.  
  1662. return foundVaults
  1663. end
  1664. local function GetCombinationValue(combination)
  1665. -- Try to get the value - could be StringValue, IntValue, NumberValue, Model, Folder, etc.
  1666. if combination:IsA("StringValue") then
  1667. return combination.Value
  1668. elseif combination:IsA("IntValue") or combination:IsA("NumberValue") then
  1669. return tostring(combination.Value)
  1670. elseif combination:IsA("Model") or combination:IsA("Folder") then
  1671. local parts = {}
  1672. for _, child in ipairs(combination:GetChildren()) do
  1673. if child:IsA("ValueBase") then
  1674. table.insert(parts, tostring(child.Value))
  1675. else
  1676. table.insert(parts, child.Name)
  1677. end
  1678. end
  1679. if #parts > 0 then
  1680. return table.concat(parts, " - ")
  1681. end
  1682. return combination.Name
  1683. else
  1684. local ok, val = pcall(function() return combination.Value end)
  1685. if ok and val then return tostring(val) end
  1686. return combination.Name
  1687. end
  1688. end
  1689. local function DisplayVaultCombos()
  1690. local towns = workspace:FindFirstChild("Towns")
  1691. if not towns then return end
  1692.  
  1693. -- Get player position for distance check
  1694. local player = game.Players.LocalPlayer
  1695. local playerChar = player.Character
  1696. local playerPos = nil
  1697. if playerChar and playerChar:FindFirstChild("HumanoidRootPart") then
  1698. playerPos = playerChar.HumanoidRootPart.Position
  1699. end
  1700.  
  1701. local MAX_DISTANCE = 2000 -- Increased range to show all vaults across map
  1702. local activeKeys = {} -- Track which keys are valid this frame
  1703.  
  1704. for _, town in ipairs(towns:GetChildren()) do
  1705. if town:IsA("Folder") or town:IsA("Model") then
  1706. -- FIXED: Get ALL vaults in this town, not just the first bank found
  1707. local allVaults = FindAllVaultsInTown(town)
  1708.  
  1709. for vaultIndex, vaultData in ipairs(allVaults) do
  1710. local combo = GetCombinationValue(vaultData.Combination)
  1711. if not combo then continue end
  1712.  
  1713. local vault = vaultData.Vault
  1714. local buildingName = vaultData.BuildingName
  1715.  
  1716. -- Find adornee and its position for distance check
  1717. local adornee = vault:FindFirstChildWhichIsA("BasePart", true) or vault.PrimaryPart
  1718. if not adornee then
  1719. -- Try parent building
  1720. local parent = vault.Parent
  1721. if parent then
  1722. adornee = parent:FindFirstChildWhichIsA("BasePart", true) or parent.PrimaryPart
  1723. end
  1724. end
  1725. if not adornee then
  1726. adornee = town:FindFirstChildWhichIsA("BasePart", true)
  1727. end
  1728.  
  1729. local adorneePos = nil
  1730. if adornee then
  1731. adorneePos = adornee.Position
  1732. end
  1733.  
  1734. -- Distance check: skip if player is too far
  1735. if playerPos and adorneePos then
  1736. local dist = (playerPos - adorneePos).Magnitude
  1737. if dist > MAX_DISTANCE then
  1738. continue -- Too far, skip this vault
  1739. end
  1740. end
  1741.  
  1742. -- Unique key per vault (supports multiple vaults per town)
  1743. local key = town.Name .. "_" .. buildingName .. "_" .. tostring(vaultIndex) .. "_" .. combo
  1744. activeKeys[key] = true
  1745.  
  1746. -- Only create if it doesn't already exist
  1747. if not VaultComboESP[key] then
  1748. local billboard = Instance.new("BillboardGui")
  1749. billboard.Adornee = adornee
  1750. billboard.Size = UDim2.new(0, 260, 0, 85)
  1751. billboard.StudsOffset = Vector3.new(0, 8, 0)
  1752. billboard.AlwaysOnTop = true
  1753. billboard.Parent = game.CoreGui
  1754.  
  1755. local frame = Instance.new("Frame", billboard)
  1756. frame.Size = UDim2.new(1, 0, 1, 0)
  1757. frame.BackgroundTransparency = 0.5
  1758. frame.BackgroundColor3 = Color3.fromRGB(10, 40, 10)
  1759. frame.BorderSizePixel = 0
  1760.  
  1761. local corner = Instance.new("UICorner")
  1762. corner.CornerRadius = UDim.new(0, 8)
  1763. corner.Parent = frame
  1764.  
  1765. local stroke = Instance.new("UIStroke")
  1766. stroke.Color = Color3.fromRGB(50, 255, 50)
  1767. stroke.Thickness = 2
  1768. stroke.Transparency = 0.2
  1769. stroke.Parent = frame
  1770.  
  1771. local townLabel = Instance.new("TextLabel", frame)
  1772. townLabel.Size = UDim2.new(1, 0, 0.25, 0)
  1773. townLabel.Position = UDim2.new(0, 0, 0, 0)
  1774. townLabel.BackgroundTransparency = 1
  1775. townLabel.Text = town.Name:upper()
  1776. townLabel.TextColor3 = Color3.fromRGB(100, 255, 100)
  1777. townLabel.TextScaled = true
  1778. townLabel.Font = Enum.Font.SourceSansBold
  1779.  
  1780. local buildingLabel = Instance.new("TextLabel", frame)
  1781. buildingLabel.Size = UDim2.new(1, 0, 0.2, 0)
  1782. buildingLabel.Position = UDim2.new(0, 0, 0.25, 0)
  1783. buildingLabel.BackgroundTransparency = 1
  1784. buildingLabel.Text = "[" .. buildingName .. "]"
  1785. buildingLabel.TextColor3 = Color3.fromRGB(200, 200, 255)
  1786. buildingLabel.TextScaled = true
  1787. buildingLabel.Font = Enum.Font.SourceSansItalic
  1788.  
  1789. local comboLabel = Instance.new("TextLabel", frame)
  1790. comboLabel.Size = UDim2.new(1, 0, 0.55, 0)
  1791. comboLabel.Position = UDim2.new(0, 0, 0.45, 0)
  1792. comboLabel.BackgroundTransparency = 1
  1793. comboLabel.Text = combo
  1794. comboLabel.TextColor3 = Color3.fromRGB(255, 255, 100)
  1795. comboLabel.TextScaled = true
  1796. comboLabel.Font = Enum.Font.Code
  1797.  
  1798. VaultComboESP[key] = billboard
  1799. end
  1800. end
  1801. end
  1802. end
  1803.  
  1804. -- Remove ESP for vaults that are no longer active (out of range or gone)
  1805. for key, billboard in pairs(VaultComboESP) do
  1806. if not activeKeys[key] then
  1807. if billboard then billboard:Destroy() end
  1808. VaultComboESP[key] = nil
  1809. end
  1810. end
  1811. end
  1812. WorldTab:CreateToggle({
  1813. Name = "Show Vault Combinations (All Towns - FIXED)",
  1814. CurrentValue = false,
  1815. Flag = "VaultComboToggle",
  1816. Callback = function(Value)
  1817. VaultCombosEnabled = Value
  1818. if Value then
  1819. ClearVaultESP()
  1820. DisplayVaultCombos()
  1821. VaultComboConnection = RunService.Heartbeat:Connect(function()
  1822. DisplayVaultCombos()
  1823. end)
  1824. Rayfield:Notify({
  1825. Title = "Vault Codes Active",
  1826. Content = "Scanning ALL buildings for vaults with combinations...",
  1827. Duration = 3,
  1828. Image = 4483362458
  1829. })
  1830. else
  1831. if VaultComboConnection then
  1832. VaultComboConnection:Disconnect()
  1833. VaultComboConnection = nil
  1834. end
  1835. ClearVaultESP()
  1836. end
  1837. end,
  1838. })
  1839. WorldTab:CreateButton({
  1840. Name = "Print ALL Vault Combinations",
  1841. Callback = function()
  1842. local towns = workspace:FindFirstChild("Towns")
  1843. if not towns then
  1844. Rayfield:Notify({
  1845. Title = "Error",
  1846. Content = "No Towns found in workspace.",
  1847. Duration = 2,
  1848. Image = 4483362458
  1849. })
  1850. return
  1851. end
  1852.  
  1853. local combos = {}
  1854. for _, town in ipairs(towns:GetChildren()) do
  1855. if town:IsA("Folder") or town:IsA("Model") then
  1856. local allVaults = FindAllVaultsInTown(town)
  1857. for _, vaultData in ipairs(allVaults) do
  1858. local combo = GetCombinationValue(vaultData.Combination)
  1859. if combo then
  1860. table.insert(combos, town.Name .. " [" .. vaultData.BuildingName .. "]: " .. combo)
  1861. end
  1862. end
  1863. end
  1864. end
  1865.  
  1866. if #combos > 0 then
  1867. local msg = table.concat(combos, "\n")
  1868. Rayfield:Notify({
  1869. Title = "All Vault Combinations",
  1870. Content = msg,
  1871. Duration = 15,
  1872. Image = 4483362458
  1873. })
  1874. print("=== ALL VAULT COMBINATIONS ===\n" .. msg)
  1875. else
  1876. Rayfield:Notify({
  1877. Title = "None Found",
  1878. Content = "No vault combinations found in any town.",
  1879. Duration = 3,
  1880. Image = 4483362458
  1881. })
  1882. end
  1883. end
  1884. })
  1885. -- ==================== FULL BRIGHTNESS ====================
  1886. local FullBrightnessEnabled = false
  1887. local OriginalLighting = {}
  1888. local Lighting = game:GetService("Lighting")
  1889. -- Save original lighting values
  1890. local function SaveOriginalLighting()
  1891. OriginalLighting = {
  1892. Brightness = Lighting.Brightness,
  1893. Ambient = Lighting.Ambient,
  1894. OutdoorAmbient = Lighting.OutdoorAmbient,
  1895. FogEnd = Lighting.FogEnd,
  1896. FogStart = Lighting.FogStart,
  1897. TimeOfDay = Lighting.TimeOfDay,
  1898. ClockTime = Lighting.ClockTime,
  1899. GeographicLatitude = Lighting.GeographicLatitude,
  1900. GlobalShadows = Lighting.GlobalShadows,
  1901. Technology = Lighting.Technology,
  1902. ShadowSoftness = Lighting.ShadowSoftness,
  1903. EnvironmentDiffuseScale = Lighting.EnvironmentDiffuseScale,
  1904. EnvironmentSpecularScale = Lighting.EnvironmentSpecularScale,
  1905. ExposureCompensation = Lighting.ExposureCompensation,
  1906. ColorShift_Bottom = Lighting.ColorShift_Bottom,
  1907. ColorShift_Top = Lighting.ColorShift_Top
  1908. }
  1909. end
  1910. -- Apply full brightness settings
  1911. local function ApplyFullBrightness()
  1912. Lighting.Brightness = 3
  1913. Lighting.Ambient = Color3.new(1, 1, 1)
  1914. Lighting.OutdoorAmbient = Color3.new(1, 1, 1)
  1915. Lighting.FogEnd = 100000
  1916. Lighting.FogStart = 100000
  1917. Lighting.ClockTime = 14
  1918. Lighting.GeographicLatitude = 41.733
  1919. Lighting.GlobalShadows = false
  1920. Lighting.ShadowSoftness = 0
  1921. Lighting.EnvironmentDiffuseScale = 1
  1922. Lighting.EnvironmentSpecularScale = 1
  1923. Lighting.ExposureCompensation = 1
  1924. Lighting.ColorShift_Bottom = Color3.new(1, 1, 1)
  1925. Lighting.ColorShift_Top = Color3.new(1, 1, 1)
  1926.  
  1927. -- Also disable shadows on all existing parts
  1928. pcall(function()
  1929. for _, desc in ipairs(workspace:GetDescendants()) do
  1930. if desc:IsA("BasePart") then
  1931. desc.CastShadow = false
  1932. end
  1933. end
  1934. end)
  1935. end
  1936. -- Restore original lighting
  1937. local function RestoreLighting()
  1938. if next(OriginalLighting) == nil then return end
  1939. Lighting.Brightness = OriginalLighting.Brightness
  1940. Lighting.Ambient = OriginalLighting.Ambient
  1941. Lighting.OutdoorAmbient = OriginalLighting.OutdoorAmbient
  1942. Lighting.FogEnd = OriginalLighting.FogEnd
  1943. Lighting.FogStart = OriginalLighting.FogStart
  1944. Lighting.ClockTime = OriginalLighting.ClockTime
  1945. Lighting.GeographicLatitude = OriginalLighting.GeographicLatitude
  1946. Lighting.GlobalShadows = OriginalLighting.GlobalShadows
  1947. Lighting.ShadowSoftness = OriginalLighting.ShadowSoftness
  1948. Lighting.EnvironmentDiffuseScale = OriginalLighting.EnvironmentDiffuseScale
  1949. Lighting.EnvironmentSpecularScale = OriginalLighting.EnvironmentSpecularScale
  1950. Lighting.ExposureCompensation = OriginalLighting.ExposureCompensation
  1951. Lighting.ColorShift_Bottom = OriginalLighting.ColorShift_Bottom
  1952. Lighting.ColorShift_Top = OriginalLighting.ColorShift_Top
  1953. end
  1954. WorldTab:CreateToggle({
  1955. Name = "Full Brightness (No Darkness)",
  1956. CurrentValue = false,
  1957. Flag = "FullBrightnessToggle",
  1958. Callback = function(Value)
  1959. FullBrightnessEnabled = Value
  1960. if Value then
  1961. SaveOriginalLighting()
  1962. ApplyFullBrightness()
  1963. Rayfield:Notify({
  1964. Title = "Full Brightness ON",
  1965. Content = "Lighting maximized, shadows disabled.",
  1966. Duration = 3,
  1967. Image = 4483362458
  1968. })
  1969. else
  1970. RestoreLighting()
  1971. Rayfield:Notify({
  1972. Title = "Full Brightness OFF",
  1973. Content = "Original lighting restored.",
  1974. Duration = 3,
  1975. Image = 4483362458
  1976. })
  1977. end
  1978. end,
  1979. })
  1980. -- Continuously maintain full brightness using RunService Heartbeat (every frame)
  1981. -- This fights the game's darkness by re-applying max brightness EVERY SINGLE FRAME
  1982. FullBrightnessConnection = RunService.Heartbeat:Connect(function()
  1983. if FullBrightnessEnabled then
  1984. Lighting.Brightness = 3
  1985. Lighting.Ambient = Color3.new(1, 1, 1)
  1986. Lighting.OutdoorAmbient = Color3.new(1, 1, 1)
  1987. Lighting.FogEnd = 100000
  1988. Lighting.FogStart = 100000
  1989. Lighting.ClockTime = 14
  1990. Lighting.GlobalShadows = false
  1991. Lighting.ShadowSoftness = 0
  1992. Lighting.ExposureCompensation = 1
  1993. Lighting.EnvironmentDiffuseScale = 1
  1994. Lighting.EnvironmentSpecularScale = 1
  1995. Lighting.ColorShift_Bottom = Color3.new(1, 1, 1)
  1996. Lighting.ColorShift_Top = Color3.new(1, 1, 1)
  1997. end
  1998. end)
  1999. -- ==================== OBJECTMODELS SCANNER (RunService) ====================
  2000. local ObjectModelsScanEnabled = false
  2001. local ObjectModelsScanConnection = nil
  2002. local ObjectModelsItems = {} -- [itemName] = count
  2003. local ObjectModelsAutoBring = {} -- [itemName] = connection
  2004. local LastObjectModelsScan = 0
  2005. local ObjectModelItems = {
  2006. "bandage",
  2007. "snake_oil",
  2008. "gold_bar",
  2009. "silver_bar",
  2010. "bond",
  2011. "coal"
  2012. }
  2013. local function GetObjectModelRoot(obj)
  2014. if obj:IsA("BasePart") then return obj end
  2015. if obj:IsA("Model") then return obj.PrimaryPart or obj:FindFirstChildWhichIsA("BasePart", true) end
  2016. return obj:FindFirstChild("Handle") or obj:FindFirstChildWhichIsA("BasePart", true)
  2017. end
  2018. local function ScanObjectModels()
  2019. local objectModels = workspace:FindFirstChild("ObjectModels")
  2020. if not objectModels then return end
  2021.  
  2022. local found = {}
  2023. for _, item in ipairs(ObjectModelItems) do
  2024. found[item] = 0
  2025. end
  2026.  
  2027. for _, obj in ipairs(objectModels:GetChildren()) do
  2028. local name = obj.Name:lower()
  2029. if found[name] ~= nil then
  2030. found[name] = found[name] + 1
  2031. end
  2032. end
  2033.  
  2034. -- Also check descendants in case items are nested
  2035. for _, obj in ipairs(objectModels:GetDescendants()) do
  2036. local name = obj.Name:lower()
  2037. if found[name] ~= nil then
  2038. found[name] = found[name] + 1
  2039. end
  2040. end
  2041.  
  2042. ObjectModelsItems = found
  2043. end
  2044. local function BringObjectModelItem(itemName)
  2045. local objectModels = workspace:FindFirstChild("ObjectModels")
  2046. if not objectModels then
  2047. Rayfield:Notify({
  2048. Title = "Error",
  2049. Content = "workspace.ObjectModels not found.",
  2050. Duration = 2,
  2051. Image = 4483362458
  2052. })
  2053. return
  2054. end
  2055.  
  2056. local targetPos = GetBringPosition()
  2057. if not targetPos then return end
  2058.  
  2059. local brought = 0
  2060.  
  2061. -- Check direct children first
  2062. for _, obj in ipairs(objectModels:GetChildren()) do
  2063. if obj.Name:lower() == itemName:lower() then
  2064. local root = GetObjectModelRoot(obj)
  2065. if root then
  2066. root.CFrame = CFrame.new(targetPos)
  2067. brought = brought + 1
  2068. end
  2069. end
  2070. end
  2071.  
  2072. -- Also check descendants
  2073. for _, obj in ipairs(objectModels:GetDescendants()) do
  2074. if obj.Name:lower() == itemName:lower() then
  2075. local root = GetObjectModelRoot(obj)
  2076. if root then
  2077. root.CFrame = CFrame.new(targetPos)
  2078. brought = brought + 1
  2079. end
  2080. end
  2081. end
  2082.  
  2083. if brought > 0 then
  2084. Rayfield:Notify({
  2085. Title = "Item Brought",
  2086. Content = "Brought " .. brought .. "x " .. itemName .. " from ObjectModels.",
  2087. Duration = 2,
  2088. Image = 4483362458
  2089. })
  2090. else
  2091. Rayfield:Notify({
  2092. Title = "Not Found",
  2093. Content = itemName .. " not found in ObjectModels.",
  2094. Duration = 2,
  2095. Image = 4483362458
  2096. })
  2097. end
  2098. end
  2099. -- Create buttons for each ObjectModels item
  2100. WorldTab:CreateToggle({
  2101. Name = "Auto Scan ObjectModels (RunService)",
  2102. CurrentValue = false,
  2103. Flag = "ObjectModelsScanToggle",
  2104. Callback = function(Value)
  2105. ObjectModelsScanEnabled = Value
  2106. if Value then
  2107. ObjectModelsScanConnection = RunService.Heartbeat:Connect(function()
  2108. local now = tick()
  2109. if now - LastObjectModelsScan >= 0.3 then
  2110. LastObjectModelsScan = now
  2111. ScanObjectModels()
  2112. end
  2113. end)
  2114. Rayfield:Notify({
  2115. Title = "Scanner Active",
  2116. Content = "RunService scanning ObjectModels for items...",
  2117. Duration = 2,
  2118. Image = 4483362458
  2119. })
  2120. else
  2121. if ObjectModelsScanConnection then
  2122. ObjectModelsScanConnection:Disconnect()
  2123. ObjectModelsScanConnection = nil
  2124. end
  2125. -- Stop all auto brings
  2126. for itemName, conn in pairs(ObjectModelsAutoBring) do
  2127. if conn then conn:Disconnect() end
  2128. end
  2129. ObjectModelsAutoBring = {}
  2130. end
  2131. end,
  2132. })
  2133. -- Individual bring buttons for each item
  2134. WorldTab:CreateButton({
  2135. Name = "Bring Bandage",
  2136. Callback = function() BringObjectModelItem("bandage") end
  2137. })
  2138. WorldTab:CreateButton({
  2139. Name = "Bring Snake Oil",
  2140. Callback = function() BringObjectModelItem("snake_oil") end
  2141. })
  2142. WorldTab:CreateButton({
  2143. Name = "Bring Gold Bar",
  2144. Callback = function() BringObjectModelItem("gold_bar") end
  2145. })
  2146. WorldTab:CreateButton({
  2147. Name = "Bring Silver Bar",
  2148. Callback = function() BringObjectModelItem("silver_bar") end
  2149. })
  2150. WorldTab:CreateButton({
  2151. Name = "Bring Bond",
  2152. Callback = function() BringObjectModelItem("bond") end
  2153. })
  2154. WorldTab:CreateButton({
  2155. Name = "Bring Coal",
  2156. Callback = function() BringObjectModelItem("coal") end
  2157. })
  2158. -- Auto bring toggles for each item
  2159. local function CreateAutoBringToggle(itemName, displayName)
  2160. WorldTab:CreateToggle({
  2161. Name = "Auto Bring " .. displayName,
  2162. CurrentValue = false,
  2163. Flag = "AutoBring" .. itemName,
  2164. Callback = function(Value)
  2165. if Value then
  2166. if not ObjectModelsScanConnection then
  2167. ObjectModelsScanEnabled = true
  2168. ObjectModelsScanConnection = RunService.Heartbeat:Connect(function()
  2169. local now = tick()
  2170. if now - LastObjectModelsScan >= 0.3 then
  2171. LastObjectModelsScan = now
  2172. ScanObjectModels()
  2173. end
  2174. end)
  2175. end
  2176. ObjectModelsAutoBring[itemName] = RunService.Heartbeat:Connect(function()
  2177. local objectModels = workspace:FindFirstChild("ObjectModels")
  2178. if not objectModels then return end
  2179. local targetPos = GetBringPosition()
  2180. if not targetPos then return end
  2181.  
  2182. for _, obj in ipairs(objectModels:GetChildren()) do
  2183. if obj.Name:lower() == itemName then
  2184. local root = GetObjectModelRoot(obj)
  2185. if root then
  2186. root.CFrame = CFrame.new(targetPos)
  2187. end
  2188. end
  2189. end
  2190. for _, obj in ipairs(objectModels:GetDescendants()) do
  2191. if obj.Name:lower() == itemName then
  2192. local root = GetObjectModelRoot(obj)
  2193. if root then
  2194. root.CFrame = CFrame.new(targetPos)
  2195. end
  2196. end
  2197. end
  2198. end)
  2199. else
  2200. if ObjectModelsAutoBring[itemName] then
  2201. ObjectModelsAutoBring[itemName]:Disconnect()
  2202. ObjectModelsAutoBring[itemName] = nil
  2203. end
  2204. end
  2205. end,
  2206. })
  2207. end
  2208. CreateAutoBringToggle("bandage", "Bandage")
  2209. CreateAutoBringToggle("snake_oil", "Snake Oil")
  2210. CreateAutoBringToggle("gold_bar", "Gold Bar")
  2211. CreateAutoBringToggle("silver_bar", "Silver Bar")
  2212. CreateAutoBringToggle("bond", "Bond")
  2213. CreateAutoBringToggle("coal", "Coal")
Advertisement
Add Comment
Please, Sign In to add comment