Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local sp = script.Parent
- local touch = sp.Scan
- local ready = true
- local Settings = require(game.ServerScriptService.Settings)
- local WhitelistedItems = Settings.WhitelistedItems
- local BlacklistedItem = Settings.BlacklistedItems
- function SearchTool(target)
- for _,WhitelistedItems in pairs(WhitelistedItems) do
- print(WhitelistedItems)
- end
- return true
- end
- function Blacklisted(target)
- for _,BlacklistedItem in pairs(BlacklistedItem) do
- print(BlacklistedItem)
- end
- return false
- end
- touch.Touched:connect(function(part)
- if part.Parent:FindFirstChild("Humanoid") then
- if game.Players:GetPlayerFromCharacter(part.Parent) then
- if ready == true then
- ready = false
- local p = game.Players:GetPlayerFromCharacter(part.Parent)
- local c = part.Parent
- if Blacklisted(p.Backpack) == true then
- for i,v in pairs (sp:GetChildren()) do
- if v.Name == "Light" then
- v.BrickColor = BrickColor.new ("Bright red")
- end
- end
- touch.Sound:Play()
- wait(2)
- touch.Sound:Stop()
- for i,v in pairs (sp:GetChildren()) do
- if v.Name == "Light" then
- v.BrickColor = BrickColor.new ("Bright green")
- end
- end
- ready = true
- else
- touch.Passed:Play()
- for i,v in pairs (sp:GetChildren()) do
- if v.Name == "Light" then
- v.BrickColor = BrickColor.new ("Bright yellow")
- end
- end
- wait(Settings.SecuritySettings.WaitTime)
- for i,v in pairs (sp:GetChildren()) do
- if v.Name == "Light" then
- v.BrickColor = BrickColor.new ("Bright green")
- end
- end
- ready = true
- end
- ready = true
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement