Advertisement
ProtonDev-Sys

Untitled

Dec 7th, 2020
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. --[[ LOCAL SCRIPT ]]--
  2. repeat wait() until game:IsLoaded();
  3. local uis = game:GetService("UserInputService");
  4.  
  5. local ob;
  6. local code;
  7. game.ReplicatedStorage.REMOTE.OnClientEvent:Connect(function(a,c)
  8. if not c then
  9. ob = a;
  10. else
  11. code = a;
  12. end
  13. end);
  14. local key = game.ReplicatedStorage.REMOTE.SECRET.Value;
  15. game.ReplicatedStorage.REMOTE:Destroy()
  16. uis.InputBegan:Connect(function(k)
  17. if k.KeyCode == Enum.KeyCode.F then
  18. ob:FireServer(key,game.Players.LocalPlayer.Character,code);
  19. end
  20. end)
  21.  
  22. --[[ SERVER SCRIPT ]]--
  23. local ob = game.ReplicatedStorage.Remotes.obfuscate;
  24.  
  25. local e = math.random(1,#game.ReplicatedStorage.Remotes:GetChildren());
  26. local code = game.ReplicatedStorage.Remotes:GetChildren()[e];
  27. game.Players.PlayerAdded:Connect(function(plr)
  28. game.ReplicatedStorage.REMOTE:FireClient(plr,ob);
  29. game.ReplicatedStorage.REMOTE:FireClient(plr,code,'code')
  30. end)
  31.  
  32. ob.OnServerEvent:Connect(function(plr,arg,p,cod)
  33. if arg == ob.Name and p then
  34. p:BreakJoints()
  35. end
  36. end)
  37.  
  38. while true do
  39. for i , v in pairs(game.ReplicatedStorage.Remotes:GetChildren()) do
  40. v.Name = game:GetService("HttpService"):GenerateGUID();
  41. end
  42. wait(1);
  43. code = game.ReplicatedStorage.Remotes:GetChildren()[math.random(1,#game.ReplicatedStorage.Remotes:GetChildren())]
  44. game.ReplicatedStorage.REMOTE:FireAllClients(code,'CODE')
  45. end
  46.  
  47.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement