Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Minecraft Roblox ore XRAY made by Memo1332 (Denizen Donut#0533)
- -- Z to enable automatic xray
- -- x ping xray
- -- SETTINGS
- local diamonds_enabled = true
- local diamond_blocks_enabled = true
- local iron_enabled = false
- local iron_blocks_enabled = true
- local coal_enabled = false
- local chests_enabled = true
- local special_effects = true
- -- DONT EDIT BELOW
- local debris = game:GetService("Debris") -- debris used for special parts to eliminate memory leaks
- local waittime = 2
- local folder = Instance.new("Folder",workspace.CurrentCamera)
- local active = false -- automatically false because some games lag horribly by this script on the server side.
- local stop = false -- stops all functions within the script (press p)
- local function xray(x,z,d)
- coroutine.resume(coroutine.create(function()
- local chunk = game.ReplicatedStorage.VisualRemotes.GetChunk:InvokeServer(x,z)
- local map = {}
- local coords = {}
- local coordsiron = {}
- local coordscoal = {}
- local coordschests = {}
- local coordsdiamondblock = {}
- local coordsironblock = {}
- setmetatable(map, {__mode = "k"})
- setmetatable(coords, {__mode = "k"})
- setmetatable(coordsiron, {__mode = "k"})
- setmetatable(coordscoal, {__mode = "k"})
- setmetatable(coordschests, {__mode = "k"})
- setmetatable(coordsdiamondblock, {__mode = "k"})
- setmetatable(coordsironblock, {__mode = "k"})
- local function deepCopy(original)
- local copy = {}
- for k, v in pairs(original) do
- if type(v) == "table" then
- v = deepCopy(v)
- end
- copy[k] = v
- end
- return copy
- end
- local function printDiamonds(tab)
- for i,v in pairs(tab) do
- table.insert(map,i)
- if type(v) == "table" then
- printDiamonds(v)
- elseif tostring(i) == "id" then
- if v == 56 and diamonds_enabled then
- table.insert(coords,deepCopy(map))
- elseif v == 15 and iron_enabled then
- table.insert(coordsiron,deepCopy(map))
- elseif v == 16 and coal_enabled then
- table.insert(coordscoal,deepCopy(map))
- elseif v == 54 and chests_enabled then
- table.insert(coordschests,deepCopy(map))
- elseif v == 42 and iron_blocks_enabled then
- table.insert(coordsironblock,deepCopy(map))
- elseif v == 57 and diamond_blocks_enabled then
- table.insert(coordsdiamondblock,deepCopy(map))
- end
- table.remove(map,#map)
- else
- table.remove(map,#map)
- end
- end
- table.remove(map,#map)
- end
- printDiamonds(chunk)
- for i,v in pairs(coords) do
- local positionx = (v[1]+(x*16))*3
- local positiony = (v[2])*3
- local positionz = (v[3]+(z*16))*3
- local part = Instance.new("Part",folder)
- part.Size = Vector3.new(2.9,2.9,2.9)
- part.Transparency = 1
- part.Anchored = true
- part.CanCollide = false
- part.Position = Vector3.new(positionx,positiony,positionz)
- local surf = Instance.new("SurfaceGui",part)
- surf.AlwaysOnTop = true
- surf.LightInfluence = 0
- surf.Face = "Top"
- local fr = Instance.new("Frame",surf)
- fr.BackgroundColor3 = Color3.fromRGB(185,0,255)
- fr.BackgroundTransparency = 0.8
- fr.BorderSizePixel = 0
- fr.Size = UDim2.new(1,0,1,0)
- local surf2 = surf:Clone()
- surf2.Parent = part
- surf2.Face = "Back"
- local surf3 = surf:Clone()
- surf3.Parent = part
- surf3.Face = "Bottom"
- local surf4 = surf:Clone()
- surf4.Parent = part
- surf4.Face = "Front"
- local surf5 = surf:Clone()
- surf5.Parent = part
- surf5.Face = "Left"
- local surf6 = surf:Clone()
- surf6.Parent = part
- surf6.Face = "Right"
- if d ~= "dontclear" then
- debris:AddItem(part,waittime)
- end
- end
- for i,v in pairs(coordsiron) do
- local positionx = (v[1]+(x*16))*3
- local positiony = (v[2])*3
- local positionz = (v[3]+(z*16))*3
- local part = Instance.new("Part",folder)
- part.Size = Vector3.new(2.9,2.9,2.9)
- part.Transparency = 1
- part.Anchored = true
- part.CanCollide = false
- part.Position = Vector3.new(positionx,positiony,positionz)
- local surf = Instance.new("SurfaceGui",part)
- surf.AlwaysOnTop = true
- surf.LightInfluence = 0
- surf.Face = "Top"
- local fr = Instance.new("Frame",surf)
- fr.BackgroundColor3 = Color3.fromRGB(255, 191, 126)
- fr.BackgroundTransparency = 0.8
- fr.BorderSizePixel = 0
- fr.Size = UDim2.new(1,0,1,0)
- local surf2 = surf:Clone()
- surf2.Parent = part
- surf2.Face = "Back"
- local surf3 = surf:Clone()
- surf3.Parent = part
- surf3.Face = "Bottom"
- local surf4 = surf:Clone()
- surf4.Parent = part
- surf4.Face = "Front"
- local surf5 = surf:Clone()
- surf5.Parent = part
- surf5.Face = "Left"
- local surf6 = surf:Clone()
- surf6.Parent = part
- surf6.Face = "Right"
- if d ~= "dontclear" then
- debris:AddItem(part,waittime)
- end
- end
- for i,v in pairs(coordscoal) do
- local positionx = (v[1]+(x*16))*3
- local positiony = (v[2])*3
- local positionz = (v[3]+(z*16))*3
- local part = Instance.new("Part",folder)
- part.Size = Vector3.new(2.9,2.9,2.9)
- part.Transparency = 1
- part.Anchored = true
- part.CanCollide = false
- part.Position = Vector3.new(positionx,positiony,positionz)
- local surf = Instance.new("SurfaceGui",part)
- surf.AlwaysOnTop = true
- surf.LightInfluence = 0
- surf.Face = "Top"
- local fr = Instance.new("Frame",surf)
- fr.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- fr.BackgroundTransparency = 0.8
- fr.BorderSizePixel = 0
- fr.Size = UDim2.new(1,0,1,0)
- local surf2 = surf:Clone()
- surf2.Parent = part
- surf2.Face = "Back"
- local surf3 = surf:Clone()
- surf3.Parent = part
- surf3.Face = "Bottom"
- local surf4 = surf:Clone()
- surf4.Parent = part
- surf4.Face = "Front"
- local surf5 = surf:Clone()
- surf5.Parent = part
- surf5.Face = "Left"
- local surf6 = surf:Clone()
- surf6.Parent = part
- surf6.Face = "Right"
- if d ~= "dontclear" then
- debris:AddItem(part,waittime)
- end
- end
- for i,v in pairs(coordschests) do
- local positionx = (v[1]+(x*16))*3
- local positiony = (v[2])*3
- local positionz = (v[3]+(z*16))*3
- local part = Instance.new("Part",folder)
- part.Size = Vector3.new(2.9,2.9,2.9)
- part.Transparency = 1
- part.Anchored = true
- part.CanCollide = false
- part.Position = Vector3.new(positionx,positiony,positionz)
- local surf = Instance.new("SurfaceGui",part)
- surf.AlwaysOnTop = true
- surf.LightInfluence = 0
- surf.Face = "Top"
- local fr = Instance.new("Frame",surf)
- fr.BackgroundColor3 = Color3.fromRGB(0, 255, 0)
- fr.BackgroundTransparency = 0.8
- fr.BorderSizePixel = 0
- fr.Size = UDim2.new(1,0,1,0)
- local surf2 = surf:Clone()
- surf2.Parent = part
- surf2.Face = "Back"
- local surf3 = surf:Clone()
- surf3.Parent = part
- surf3.Face = "Bottom"
- local surf4 = surf:Clone()
- surf4.Parent = part
- surf4.Face = "Front"
- local surf5 = surf:Clone()
- surf5.Parent = part
- surf5.Face = "Left"
- local surf6 = surf:Clone()
- surf6.Parent = part
- surf6.Face = "Right"
- if d ~= "dontclear" then
- debris:AddItem(part,waittime)
- end
- end
- for i,v in pairs(coordsironblock) do
- local positionx = (v[1]+(x*16))*3
- local positiony = (v[2])*3
- local positionz = (v[3]+(z*16))*3
- local part = Instance.new("Part",folder)
- part.Size = Vector3.new(2.9,2.9,2.9)
- part.Transparency = 1
- part.Anchored = true
- part.CanCollide = false
- part.Position = Vector3.new(positionx,positiony,positionz)
- local surf = Instance.new("SurfaceGui",part)
- surf.AlwaysOnTop = true
- surf.LightInfluence = 0
- surf.Face = "Top"
- local fr = Instance.new("Frame",surf)
- fr.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- fr.BackgroundTransparency = 0.8
- fr.BorderSizePixel = 0
- fr.Size = UDim2.new(1,0,1,0)
- local surf2 = surf:Clone()
- surf2.Parent = part
- surf2.Face = "Back"
- local surf3 = surf:Clone()
- surf3.Parent = part
- surf3.Face = "Bottom"
- local surf4 = surf:Clone()
- surf4.Parent = part
- surf4.Face = "Front"
- local surf5 = surf:Clone()
- surf5.Parent = part
- surf5.Face = "Left"
- local surf6 = surf:Clone()
- surf6.Parent = part
- surf6.Face = "Right"
- if d ~= "dontclear" then
- debris:AddItem(part,waittime)
- end
- for i,v in pairs(coordsdiamondblock) do
- local positionx = (v[1]+(x*16))*3
- local positiony = (v[2])*3
- local positionz = (v[3]+(z*16))*3
- local part = Instance.new("Part",folder)
- part.Size = Vector3.new(2.9,2.9,2.9)
- part.Transparency = 1
- part.Anchored = true
- part.CanCollide = false
- part.Position = Vector3.new(positionx,positiony,positionz)
- local surf = Instance.new("SurfaceGui",part)
- surf.AlwaysOnTop = true
- surf.LightInfluence = 0
- surf.Face = "Top"
- local fr = Instance.new("Frame",surf)
- fr.BackgroundColor3 = Color3.fromRGB(255, 0, 255)
- fr.BackgroundTransparency = 0.8
- fr.BorderSizePixel = 0
- fr.Size = UDim2.new(1,0,1,0)
- local surf2 = surf:Clone()
- surf2.Parent = part
- surf2.Face = "Back"
- local surf3 = surf:Clone()
- surf3.Parent = part
- surf3.Face = "Bottom"
- local surf4 = surf:Clone()
- surf4.Parent = part
- surf4.Face = "Front"
- local surf5 = surf:Clone()
- surf5.Parent = part
- surf5.Face = "Left"
- local surf6 = surf:Clone()
- surf6.Parent = part
- surf6.Face = "Right"
- if d ~= "dontclear" then
- debris:AddItem(part,waittime)
- end
- end
- end
- end))
- end
- local function sonarting()
- if special_effects then
- coroutine.resume(coroutine.create(function()
- local run = game:GetService("RunService")
- local i = tick()
- local part = Instance.new("Part",workspace.CurrentCamera)
- part.Material = Enum.Material.ForceField
- part.Color = Color3.fromRGB(255,0,255)
- part.Shape = Enum.PartType.Ball
- part.Size = Vector3.new(0.1,0.1,0.1)
- part.CanCollide = false
- part.Anchored = true
- part.CastShadow = false
- local sound = Instance.new("Sound",part)
- sound.SoundId = "rbxassetid://1843027546"
- sound.Volume = 0.5
- sound.PlaybackSpeed = 3.5+math.random()
- local loop = nil
- local function loopdoop(deltatime)
- part.Size = part.Size + Vector3.new((deltatime*220),(deltatime*220),(deltatime*220))
- part.Position = game.Players.LocalPlayer.Character:FindFirstChildOfClass("Humanoid").RootPart.Position
- if tick() - i >= 2 then
- part:Destroy()
- loop:Disconnect()
- end
- end
- sound:Play()
- loop = run.RenderStepped:Connect(loopdoop)
- end))
- end
- end
- local connection
- function keydown(key)
- if string.lower(key) == "z" then
- folder:ClearAllChildren()
- active = not active
- elseif string.lower(key) == "x" then -- spamming this key will get you banned from the server, be careful! for safety, only press once every 3 seconds
- folder:ClearAllChildren()
- local blocks = workspace.Blocks:GetChildren()
- waittime = 0.48571428571429*#blocks
- sonarting()
- for i,v in pairs(blocks) do
- local split = string.split(tostring(v),"x")
- print(split[1],split[2])
- xray(tonumber(split[1]),tonumber(split[2]),"dontclear")
- end
- elseif string.lower(key) == "p" then
- stop = true
- folder:ClearAllChildren()
- connection:Disconnect()
- end
- end
- connection = game.Players.LocalPlayer:GetMouse().KeyDown:Connect(keydown)
- while not stop do
- if active then
- local blocks = workspace.Blocks:GetChildren()
- waittime = 0.48571428571429*#blocks
- if waittime == 0 then waittime = 0.48571428571429 end
- sonarting()
- for i,v in pairs(blocks) do
- local split = string.split(tostring(v),"x")
- print(split[1],split[2])
- xray(tonumber(split[1]),tonumber(split[2]))
- end
- wait(waittime)
- else
- wait(0.5)
- end
- end
Add Comment
Please, Sign In to add comment