Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Original thread: https://v3rmillion.net/showthread.php?tid=1202877
- --[[
- 1. Change the "excludedOres" below for each world to however you like it. I removed most of the useless ores, but you are free to remove more ores or add them back.
- 2. If you want to see the ore outline, you can enable it by changing "showBox" to true.
- 3. If you have all of your settings and excludedOres ready, hit execute! Enjoy the script!
- ]]
- local showBox = false -- Change to true if you want to see ore box outline. Off by default for performance.
- --[[
- Only excludes World 1 ores, you have to modify script yourself if you want to use this for World 2, some ores could be:
- excludedOres = {"Moon Stone", "Tin", "Moon Mantle", "Jasper", "Aluminum", "Moon Core", "Zinc", "Coal", "Magma", "Copper", "Titanium", "Legacy Uranium", "Lithium", "Nickel", "Quartz", "Gold", "Tourmaline","Jade","Silver","Lapis Lazuli","Bismuth","Nebula","Strontium","Scandium","Platinum","Amethyst","Barrier","Garnet","Cobalt","Emerald","Heliodor","Aquamarine","Topaz","Diamond","Beryllium","Morganite","Ruby","Rocc","Moonrock","nil"}
- ]]
- excludedOres = {"Magma", "Stone", "Copper", "Basalt", "Amber", "Diorite", "Coal", "Crystallized Stone", "Nickel", "Bedrock", "Gold", "Granite", "Iron", "Marble", "Etherstone", "Prismatistone","Silver","Obsidian","Ice","Voidstone","Ruby","Celestone","Mantle","Goldstone","Barrier","Quartz","Reflectistone","Emerald"}
- ----- Don't edit below if you don't know what you're doing -----
- local folder = game:GetService("Workspace").Mine
- local Players = game:GetService("Players")
- local LocalPlayer = Players.LocalPlayer
- local CoreGui = game:GetService("CoreGui")
- local function isValidName(name)
- for _, validName in pairs(excludedOres) do
- if name == validName then
- return false
- end
- end
- return true
- end
- local function createESP(primary, distance)
- local player = game:GetService("Players").LocalPlayer
- local rootPart = player.Character.HumanoidRootPart
- if showBox then
- local box = Instance.new("BoxHandleAdornment", game.CoreGui)
- box.Adornee = primary
- box.AlwaysOnTop = true
- box.Color = primary.BrickColor
- box.ZIndex = 10
- box.Size = primary.Size + Vector3.new(0.1, 0.1, 0.1)
- local function handleRemovedEvent()
- box:Destroy()
- connection:Disconnect()
- end
- primary.AncestryChanged:Connect(function()
- if not primary:IsDescendantOf(game.Workspace) then
- handleRemovedEvent()
- end
- end)
- end
- local billboard = Instance.new("BillboardGui", game.CoreGui)
- billboard.Adornee = primary
- billboard.AlwaysOnTop = true
- billboard.Size = UDim2.new(0, 100, 0, 60)
- billboard.StudsOffset = Vector3.new(0, 3, 0)
- local nameLabel = Instance.new("TextLabel", billboard)
- nameLabel.BackgroundTransparency = 1
- nameLabel.Size = UDim2.new(1, 0, 0.225, 0)
- nameLabel.Text = primary.Name
- nameLabel.Font = Enum.Font.GothamSemibold
- nameLabel.TextColor3 = primary.Color
- nameLabel.TextScaled = true
- local distLabel = Instance.new("TextLabel", billboard)
- distLabel.BackgroundTransparency = 1
- distLabel.Size = UDim2.new(1, 0, 0.175, 0)
- distLabel.Position = UDim2.new(0, 0, 0.225, 0)
- distLabel.Text = "Distance: " .. math.floor(distance)
- distLabel.Font = Enum.Font.GothamSemibold
- distLabel.TextColor3 = primary.Color
- distLabel.TextScaled = true
- local connection = game:GetService("RunService").Heartbeat:Connect(function()
- local newDistance = (rootPart.Position - primary.Position).magnitude
- distLabel.Text = "Distance: " .. math.floor(newDistance)
- end)
- return {Gui = billboard, Connection = connection, HandleRemovedEvent = handleRemovedEvent}
- end
- function isOreExcluded(block)
- if block:IsA("BasePart") and isValidName(block.Name) then
- local distance = (game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position - block.Position).magnitude
- createESP(block, distance)
- else
- block.Transparency = 0.3
- end
- end
- for _, part in pairs(folder:GetChildren()) do
- part.Transparency = 0.3
- isOreExcluded(part)
- end
- folder.ChildAdded:Connect(isOreExcluded)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement