BobMe

Minecraft Xray but way more overpowered (roblox)

Mar 18th, 2021 (edited)
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.53 KB | None | 0 0
  1. -- Minecraft Roblox ore XRAY made by Memo1332 (Denizen Donut#0533)
  2. -- Z to enable automatic xray
  3. -- x ping xray
  4.  
  5. -- SETTINGS
  6. local diamonds_enabled = true
  7. local diamond_blocks_enabled = true
  8. local iron_enabled = false
  9. local iron_blocks_enabled = true
  10. local coal_enabled = false
  11. local chests_enabled = true
  12. local special_effects = true
  13. -- DONT EDIT BELOW
  14. local debris = game:GetService("Debris") -- debris used for special parts to eliminate memory leaks
  15. local waittime = 2
  16. local folder = Instance.new("Folder",workspace.CurrentCamera)
  17. local active = false -- automatically false because some games lag horribly by this script on the server side.
  18. local stop = false -- stops all functions within the script (press p)
  19. local function xray(x,z,d)
  20. coroutine.resume(coroutine.create(function()
  21. local chunk = game.ReplicatedStorage.VisualRemotes.GetChunk:InvokeServer(x,z)
  22.  
  23. local map = {}
  24. local coords = {}
  25. local coordsiron = {}
  26. local coordscoal = {}
  27. local coordschests = {}
  28. local coordsdiamondblock = {}
  29. local coordsironblock = {}
  30. setmetatable(map, {__mode = "k"})
  31. setmetatable(coords, {__mode = "k"})
  32. setmetatable(coordsiron, {__mode = "k"})
  33. setmetatable(coordscoal, {__mode = "k"})
  34. setmetatable(coordschests, {__mode = "k"})
  35. setmetatable(coordsdiamondblock, {__mode = "k"})
  36. setmetatable(coordsironblock, {__mode = "k"})
  37. local function deepCopy(original)
  38. local copy = {}
  39. for k, v in pairs(original) do
  40. if type(v) == "table" then
  41. v = deepCopy(v)
  42. end
  43. copy[k] = v
  44. end
  45. return copy
  46. end
  47. local function printDiamonds(tab)
  48. for i,v in pairs(tab) do
  49. table.insert(map,i)
  50. if type(v) == "table" then
  51. printDiamonds(v)
  52. elseif tostring(i) == "id" then
  53. if v == 56 and diamonds_enabled then
  54. table.insert(coords,deepCopy(map))
  55. elseif v == 15 and iron_enabled then
  56. table.insert(coordsiron,deepCopy(map))
  57. elseif v == 16 and coal_enabled then
  58. table.insert(coordscoal,deepCopy(map))
  59. elseif v == 54 and chests_enabled then
  60. table.insert(coordschests,deepCopy(map))
  61. elseif v == 42 and iron_blocks_enabled then
  62. table.insert(coordsironblock,deepCopy(map))
  63. elseif v == 57 and diamond_blocks_enabled then
  64. table.insert(coordsdiamondblock,deepCopy(map))
  65. end
  66. table.remove(map,#map)
  67. else
  68. table.remove(map,#map)
  69. end
  70. end
  71. table.remove(map,#map)
  72. end
  73.  
  74. printDiamonds(chunk)
  75. for i,v in pairs(coords) do
  76. local positionx = (v[1]+(x*16))*3
  77. local positiony = (v[2])*3
  78. local positionz = (v[3]+(z*16))*3
  79. local part = Instance.new("Part",folder)
  80. part.Size = Vector3.new(2.9,2.9,2.9)
  81. part.Transparency = 1
  82. part.Anchored = true
  83. part.CanCollide = false
  84. part.Position = Vector3.new(positionx,positiony,positionz)
  85. local surf = Instance.new("SurfaceGui",part)
  86. surf.AlwaysOnTop = true
  87. surf.LightInfluence = 0
  88. surf.Face = "Top"
  89. local fr = Instance.new("Frame",surf)
  90. fr.BackgroundColor3 = Color3.fromRGB(185,0,255)
  91. fr.BackgroundTransparency = 0.8
  92. fr.BorderSizePixel = 0
  93. fr.Size = UDim2.new(1,0,1,0)
  94. local surf2 = surf:Clone()
  95. surf2.Parent = part
  96. surf2.Face = "Back"
  97. local surf3 = surf:Clone()
  98. surf3.Parent = part
  99. surf3.Face = "Bottom"
  100. local surf4 = surf:Clone()
  101. surf4.Parent = part
  102. surf4.Face = "Front"
  103. local surf5 = surf:Clone()
  104. surf5.Parent = part
  105. surf5.Face = "Left"
  106. local surf6 = surf:Clone()
  107. surf6.Parent = part
  108. surf6.Face = "Right"
  109. if d ~= "dontclear" then
  110. debris:AddItem(part,waittime)
  111. end
  112. end
  113. for i,v in pairs(coordsiron) do
  114. local positionx = (v[1]+(x*16))*3
  115. local positiony = (v[2])*3
  116. local positionz = (v[3]+(z*16))*3
  117. local part = Instance.new("Part",folder)
  118. part.Size = Vector3.new(2.9,2.9,2.9)
  119. part.Transparency = 1
  120. part.Anchored = true
  121. part.CanCollide = false
  122. part.Position = Vector3.new(positionx,positiony,positionz)
  123. local surf = Instance.new("SurfaceGui",part)
  124. surf.AlwaysOnTop = true
  125. surf.LightInfluence = 0
  126. surf.Face = "Top"
  127. local fr = Instance.new("Frame",surf)
  128. fr.BackgroundColor3 = Color3.fromRGB(255, 191, 126)
  129. fr.BackgroundTransparency = 0.8
  130. fr.BorderSizePixel = 0
  131. fr.Size = UDim2.new(1,0,1,0)
  132. local surf2 = surf:Clone()
  133. surf2.Parent = part
  134. surf2.Face = "Back"
  135. local surf3 = surf:Clone()
  136. surf3.Parent = part
  137. surf3.Face = "Bottom"
  138. local surf4 = surf:Clone()
  139. surf4.Parent = part
  140. surf4.Face = "Front"
  141. local surf5 = surf:Clone()
  142. surf5.Parent = part
  143. surf5.Face = "Left"
  144. local surf6 = surf:Clone()
  145. surf6.Parent = part
  146. surf6.Face = "Right"
  147. if d ~= "dontclear" then
  148. debris:AddItem(part,waittime)
  149. end
  150. end
  151. for i,v in pairs(coordscoal) do
  152. local positionx = (v[1]+(x*16))*3
  153. local positiony = (v[2])*3
  154. local positionz = (v[3]+(z*16))*3
  155. local part = Instance.new("Part",folder)
  156. part.Size = Vector3.new(2.9,2.9,2.9)
  157. part.Transparency = 1
  158. part.Anchored = true
  159. part.CanCollide = false
  160. part.Position = Vector3.new(positionx,positiony,positionz)
  161. local surf = Instance.new("SurfaceGui",part)
  162. surf.AlwaysOnTop = true
  163. surf.LightInfluence = 0
  164. surf.Face = "Top"
  165. local fr = Instance.new("Frame",surf)
  166. fr.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  167. fr.BackgroundTransparency = 0.8
  168. fr.BorderSizePixel = 0
  169. fr.Size = UDim2.new(1,0,1,0)
  170. local surf2 = surf:Clone()
  171. surf2.Parent = part
  172. surf2.Face = "Back"
  173. local surf3 = surf:Clone()
  174. surf3.Parent = part
  175. surf3.Face = "Bottom"
  176. local surf4 = surf:Clone()
  177. surf4.Parent = part
  178. surf4.Face = "Front"
  179. local surf5 = surf:Clone()
  180. surf5.Parent = part
  181. surf5.Face = "Left"
  182. local surf6 = surf:Clone()
  183. surf6.Parent = part
  184. surf6.Face = "Right"
  185. if d ~= "dontclear" then
  186. debris:AddItem(part,waittime)
  187. end
  188. end
  189. for i,v in pairs(coordschests) do
  190. local positionx = (v[1]+(x*16))*3
  191. local positiony = (v[2])*3
  192. local positionz = (v[3]+(z*16))*3
  193. local part = Instance.new("Part",folder)
  194. part.Size = Vector3.new(2.9,2.9,2.9)
  195. part.Transparency = 1
  196. part.Anchored = true
  197. part.CanCollide = false
  198. part.Position = Vector3.new(positionx,positiony,positionz)
  199. local surf = Instance.new("SurfaceGui",part)
  200. surf.AlwaysOnTop = true
  201. surf.LightInfluence = 0
  202. surf.Face = "Top"
  203. local fr = Instance.new("Frame",surf)
  204. fr.BackgroundColor3 = Color3.fromRGB(0, 255, 0)
  205. fr.BackgroundTransparency = 0.8
  206. fr.BorderSizePixel = 0
  207. fr.Size = UDim2.new(1,0,1,0)
  208. local surf2 = surf:Clone()
  209. surf2.Parent = part
  210. surf2.Face = "Back"
  211. local surf3 = surf:Clone()
  212. surf3.Parent = part
  213. surf3.Face = "Bottom"
  214. local surf4 = surf:Clone()
  215. surf4.Parent = part
  216. surf4.Face = "Front"
  217. local surf5 = surf:Clone()
  218. surf5.Parent = part
  219. surf5.Face = "Left"
  220. local surf6 = surf:Clone()
  221. surf6.Parent = part
  222. surf6.Face = "Right"
  223. if d ~= "dontclear" then
  224. debris:AddItem(part,waittime)
  225. end
  226. end
  227. for i,v in pairs(coordsironblock) do
  228. local positionx = (v[1]+(x*16))*3
  229. local positiony = (v[2])*3
  230. local positionz = (v[3]+(z*16))*3
  231. local part = Instance.new("Part",folder)
  232. part.Size = Vector3.new(2.9,2.9,2.9)
  233. part.Transparency = 1
  234. part.Anchored = true
  235. part.CanCollide = false
  236. part.Position = Vector3.new(positionx,positiony,positionz)
  237. local surf = Instance.new("SurfaceGui",part)
  238. surf.AlwaysOnTop = true
  239. surf.LightInfluence = 0
  240. surf.Face = "Top"
  241. local fr = Instance.new("Frame",surf)
  242. fr.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  243. fr.BackgroundTransparency = 0.8
  244. fr.BorderSizePixel = 0
  245. fr.Size = UDim2.new(1,0,1,0)
  246. local surf2 = surf:Clone()
  247. surf2.Parent = part
  248. surf2.Face = "Back"
  249. local surf3 = surf:Clone()
  250. surf3.Parent = part
  251. surf3.Face = "Bottom"
  252. local surf4 = surf:Clone()
  253. surf4.Parent = part
  254. surf4.Face = "Front"
  255. local surf5 = surf:Clone()
  256. surf5.Parent = part
  257. surf5.Face = "Left"
  258. local surf6 = surf:Clone()
  259. surf6.Parent = part
  260. surf6.Face = "Right"
  261. if d ~= "dontclear" then
  262. debris:AddItem(part,waittime)
  263. end
  264. for i,v in pairs(coordsdiamondblock) do
  265. local positionx = (v[1]+(x*16))*3
  266. local positiony = (v[2])*3
  267. local positionz = (v[3]+(z*16))*3
  268. local part = Instance.new("Part",folder)
  269. part.Size = Vector3.new(2.9,2.9,2.9)
  270. part.Transparency = 1
  271. part.Anchored = true
  272. part.CanCollide = false
  273. part.Position = Vector3.new(positionx,positiony,positionz)
  274. local surf = Instance.new("SurfaceGui",part)
  275. surf.AlwaysOnTop = true
  276. surf.LightInfluence = 0
  277. surf.Face = "Top"
  278. local fr = Instance.new("Frame",surf)
  279. fr.BackgroundColor3 = Color3.fromRGB(255, 0, 255)
  280. fr.BackgroundTransparency = 0.8
  281. fr.BorderSizePixel = 0
  282. fr.Size = UDim2.new(1,0,1,0)
  283. local surf2 = surf:Clone()
  284. surf2.Parent = part
  285. surf2.Face = "Back"
  286. local surf3 = surf:Clone()
  287. surf3.Parent = part
  288. surf3.Face = "Bottom"
  289. local surf4 = surf:Clone()
  290. surf4.Parent = part
  291. surf4.Face = "Front"
  292. local surf5 = surf:Clone()
  293. surf5.Parent = part
  294. surf5.Face = "Left"
  295. local surf6 = surf:Clone()
  296. surf6.Parent = part
  297. surf6.Face = "Right"
  298. if d ~= "dontclear" then
  299. debris:AddItem(part,waittime)
  300. end
  301. end
  302. end
  303. end))
  304. end
  305. local function sonarting()
  306. if special_effects then
  307. coroutine.resume(coroutine.create(function()
  308. local run = game:GetService("RunService")
  309. local i = tick()
  310. local part = Instance.new("Part",workspace.CurrentCamera)
  311. part.Material = Enum.Material.ForceField
  312. part.Color = Color3.fromRGB(255,0,255)
  313. part.Shape = Enum.PartType.Ball
  314. part.Size = Vector3.new(0.1,0.1,0.1)
  315. part.CanCollide = false
  316. part.Anchored = true
  317. part.CastShadow = false
  318. local sound = Instance.new("Sound",part)
  319. sound.SoundId = "rbxassetid://1843027546"
  320. sound.Volume = 0.5
  321. sound.PlaybackSpeed = 3.5+math.random()
  322. local loop = nil
  323. local function loopdoop(deltatime)
  324. part.Size = part.Size + Vector3.new((deltatime*220),(deltatime*220),(deltatime*220))
  325. part.Position = game.Players.LocalPlayer.Character:FindFirstChildOfClass("Humanoid").RootPart.Position
  326. if tick() - i >= 2 then
  327. part:Destroy()
  328. loop:Disconnect()
  329. end
  330. end
  331. sound:Play()
  332. loop = run.RenderStepped:Connect(loopdoop)
  333. end))
  334. end
  335. end
  336. local connection
  337. function keydown(key)
  338. if string.lower(key) == "z" then
  339. folder:ClearAllChildren()
  340. active = not active
  341. 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
  342. folder:ClearAllChildren()
  343. local blocks = workspace.Blocks:GetChildren()
  344. waittime = 0.48571428571429*#blocks
  345. sonarting()
  346. for i,v in pairs(blocks) do
  347. local split = string.split(tostring(v),"x")
  348. print(split[1],split[2])
  349. xray(tonumber(split[1]),tonumber(split[2]),"dontclear")
  350. end
  351. elseif string.lower(key) == "p" then
  352. stop = true
  353. folder:ClearAllChildren()
  354. connection:Disconnect()
  355. end
  356. end
  357. connection = game.Players.LocalPlayer:GetMouse().KeyDown:Connect(keydown)
  358.  
  359. while not stop do
  360. if active then
  361. local blocks = workspace.Blocks:GetChildren()
  362. waittime = 0.48571428571429*#blocks
  363. if waittime == 0 then waittime = 0.48571428571429 end
  364. sonarting()
  365. for i,v in pairs(blocks) do
  366. local split = string.split(tostring(v),"x")
  367. print(split[1],split[2])
  368. xray(tonumber(split[1]),tonumber(split[2]))
  369. end
  370. wait(waittime)
  371. else
  372. wait(0.5)
  373. end
  374. end
Add Comment
Please, Sign In to add comment