Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[ LOCAL SCRIPT ]]--
- repeat wait() until game:IsLoaded();
- local uis = game:GetService("UserInputService");
- local ob;
- local code;
- game.ReplicatedStorage.REMOTE.OnClientEvent:Connect(function(a,c)
- if not c then
- ob = a;
- else
- code = a;
- end
- end);
- local key = game.ReplicatedStorage.REMOTE.SECRET.Value;
- game.ReplicatedStorage.REMOTE:Destroy()
- uis.InputBegan:Connect(function(k)
- if k.KeyCode == Enum.KeyCode.F then
- ob:FireServer(key,game.Players.LocalPlayer.Character,code);
- end
- end)
- --[[ SERVER SCRIPT ]]--
- local ob = game.ReplicatedStorage.Remotes.obfuscate;
- local e = math.random(1,#game.ReplicatedStorage.Remotes:GetChildren());
- local code = game.ReplicatedStorage.Remotes:GetChildren()[e];
- game.Players.PlayerAdded:Connect(function(plr)
- game.ReplicatedStorage.REMOTE:FireClient(plr,ob);
- game.ReplicatedStorage.REMOTE:FireClient(plr,code,'code')
- end)
- ob.OnServerEvent:Connect(function(plr,arg,p,cod)
- if arg == ob.Name and p then
- p:BreakJoints()
- end
- end)
- while true do
- for i , v in pairs(game.ReplicatedStorage.Remotes:GetChildren()) do
- v.Name = game:GetService("HttpService"):GenerateGUID();
- end
- wait(1);
- code = game.ReplicatedStorage.Remotes:GetChildren()[math.random(1,#game.ReplicatedStorage.Remotes:GetChildren())]
- game.ReplicatedStorage.REMOTE:FireAllClients(code,'CODE')
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement