Advertisement
DrawingJhon

Function value from datastore string

Jun 11th, 2020
2,663
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. local function getServerType()
  2. if game.PrivateServerId ~= "" then
  3. if game.PrivateServerOwnerId ~= 0 then
  4. return "VIPServer"
  5. else
  6. return "ReservedServer"
  7. end
  8. else
  9. return "StandardServer"
  10. end
  11. end
  12. local serverType = getServerType()
  13. if serverType == "VIPServer" then
  14. game.Players.PlayerAdded:Connect(function(player)
  15. local val = game.ServerStorage:WaitForChild("Slock"):WaitForChild("Comprobation")
  16. player.Chatted:Connect(function(msg)
  17. if msg:lower() == "/ownerslock" and player.UserId == game.PrivateServerOwnerId then
  18. val.Value = true
  19. end
  20. if msg:lower() == "/ownersunlock" and player.UserId == game.PrivateServerOwnerId then
  21. val.Value = false
  22. end
  23. end)
  24. if player.UserId == game.PrivateServerOwnerId then
  25. game.ServerStorage:WaitForChild("Slock"):WaitForChild("ownerHere").Value = true
  26. end
  27. end)
  28. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement