Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Trace = {"Kappa", "Twitchite", "Dragonstone", "Rainbonite", "Unobtainium", "Moonstone", "Dragonglass", "Azure", "Illuminunium"}
- local Surfaces = {"Bottom", "Top"}
- for _,v in pairs(game.Workspace.Mine:GetChildren()) do
- for _,c in pairs(Trace) do
- if v.Name == c then
- local xRay = Instance.new("BoxHandleAdornment")
- xRay.Color3 = game.ReplicatedStorage.Ores[v.Name].OreColor.Value
- xRay.Size = v.Size
- xRay.AlwaysOnTop = true
- xRay.ZIndex = 1
- xRay.Adornee = v
- xRay.Parent = game.Workspace.CurrentCamera
- game.Workspace.Mine.ChildRemoved:connect(function(child)
- if child == v then
- xRay:Destroy()
- end
- end)
- for _,t in pairs(Surfaces) do
- local Surface = Instance.new("SurfaceGui")
- Surface.Name = t
- Surface.CanvasSize = Vector2.new(250, 250)
- Surface.Face = t
- Surface.AlwaysOnTop = true
- Surface.Adornee = v
- Surface.Parent = v
- local Label = Instance.new("TextLabel")
- Label.Text = v.Name
- Label.Size = UDim2.new(1, 0, 1, 0)
- Label.Position = UDim2.new(0, 255, 0, 0)
- Label.BackgroundTransparency = 1
- Label.FontSize = "Size96"
- Label.Font = "SourceSansBold"
- Label.TextColor3 = Color3.new(255/255, 255/255, 255/255)
- Label.TextStrokeTransparency = 0
- Label.Parent = Surface
- end
- end
- end
- end
- game.Workspace.Mine.ChildAdded:connect(function(v)
- for _,c in pairs(Trace) do
- if v.Name == c then
- local xRay = Instance.new("BoxHandleAdornment")
- xRay.Color3 = game.ReplicatedStorage.Ores[v.Name].OreColor.Value
- xRay.Size = v.Size
- xRay.AlwaysOnTop = true
- xRay.ZIndex = 1
- xRay.Adornee = v
- xRay.Parent = game.Workspace.CurrentCamera
- game.Workspace.Mine.ChildRemoved:connect(function(child)
- if child == v then
- xRay:Destroy()
- end
- end)
- for _,t in pairs(Surfaces) do
- local Surface = Instance.new("SurfaceGui")
- Surface.Name = t
- Surface.CanvasSize = Vector2.new(250, 250)
- Surface.Face = t
- Surface.AlwaysOnTop = true
- Surface.Parent = v
- local Label = Instance.new("TextLabel")
- Label.Text = v.Name
- Label.Size = UDim2.new(1, 0, 1, 0)
- Label.Position = UDim2.new(0, 255, 0, 0)
- Label.BackgroundTransparency = 1
- Label.FontSize = "Size96"
- Label.Font = "SourceSansBold"
- Label.TextColor3 = Color3.new(255/255, 255/255, 255/255)
- Label.TextStrokeTransparency = 0
- Label.Parent = Surface
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement