local times = 1
local codes = 4
repeat wait() until game.IsLoaded
while true do
for _, remotes in pairs(game:GetDescendants()) do
if remotes:IsA('RemoteEvent') or remotes:IsA('BindableEvent') then
remotes.Name = ''
if codes >= 1 then
for i=1, codes do
remotes.Name = remotes.Name .. ' ' .. game:GetService("HttpService"):GenerateGUID(true)
end
else
warn("The variable code need to be a number and be greater than 0.")
break
end
remotes.Parent = nil
end
end
if times >= 0 then
wait(times)
else
warn("The variable code need to be a number and be greater or equals to 0.")
break
end
end
You have to parent the remote to ReplicatedStorage to fire it so something like
local SomeRemote = Instance.new("RemoteEvent")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Fire = Remote.FireServer
local function FireServer(Remote, ...)
Remote.Parent = ReplicatedStorage
Fire(Remote, ...)
Remote.Parent = nil
end
FireServer(SomeRemote, "a", 1)
by the way … is used instead of doing parameter1 parameter2 it’s basically everything that was passed to the function
local times = 0
local codes = 4
repeat wait() until game.IsLoaded
local Location = {
nil,
game,
}
for i, v in pairs(workspace:GetDescendants()) do
if v:IsDescendantOf(game.Workspace)
or v:IsDescendantOf(game.Players)
or v:IsDescendantOf(game.Lighting)
or v:IsDescendantOf(game.MaterialService)
or v:IsDescendantOf(game.ReplicatedFirst)
or v:IsDescendantOf(game.ReplicatedStorage)
or v:IsDescendantOf(game.ServerScriptService)
or v:IsDescendantOf(game.ServerStorage)
or v:IsDescendantOf(game.StarterGui)
or v:IsDescendantOf(game.StarterPack)
or v:IsDescendantOf(game.StarterPlayer)
or v:IsDescendantOf(game.Teams)
or v:IsDescendantOf(game.SoundService)
or v:IsDescendantOf(game.Chat)
or v:IsDescendantOf(game.TextChatService) then
table.insert(Location, v)
end
end
while true do
for _, remotes in pairs(game:GetDescendants()) do
if remotes:IsA('RemoteEvent') or remotes:IsA('BindableEvent') then
remotes.Name = ''
if codes >= 1 then
for i=1, codes do
remotes.Name = remotes.Name .. ' ' .. game:GetService("HttpService"):GenerateGUID(true)
end
else
warn("The variable code need to be a number and be greater than 0.")
break
end
remotes.Parent = Location[math.random(1, #Location)]
end
end
if times >= 0 then
wait(times)
else
warn("The variable code need to be a number and be greater or equals to 0.")
break
end
end
I think it is one of the best! I can’t use game:GetDescendants() because there are some Service that cannot have a child like remoteEvents
local times = 0
local codes = 4
repeat wait() until game.IsLoaded
local Location = {
nil,
game,
}
for i, v in pairs(game:GetDescendants()) do
if v:IsDescendantOf(game.Workspace)
or v:IsDescendantOf(game.MaterialService)
or v:IsDescendantOf(game.ReplicatedFirst)
or v:IsDescendantOf(game.ServerScriptService)
or v:IsDescendantOf(game.ServerStorage)
or v:IsDescendantOf(game.StarterGui)
or v:IsDescendantOf(game.StarterPack)
or v:IsDescendantOf(game.Teams)
or v:IsDescendantOf(game.SoundService)
or v:IsA('workspace')
or v:IsA('MaterialService')
or v:IsA('ReplicatedFirst')
or v:IsA('ReplicatedStorage')
or v:IsA('ServerScriptService')
or v:IsA('ServerStorage')
or v:IsA('StarterGui')
or v:IsA('StarterPack')
or v:IsA('StarterPlayer')
or v:IsA('Teams')
or v:IsA('SoundService') then
if v:IsA('BasePart') and v.Locked == false then
table.insert(Location, v)
else
table.insert(Location, v)
end
end
end
while true do
for _, remotes in pairs(game:GetDescendants()) do
if remotes:IsA('RemoteEvent') or remotes:IsA('BindableEvent') then
remotes.Name = ''
if codes >= 1 then
for i=1, codes do
remotes.Name = remotes.Name .. ' ' .. game:GetService("HttpService"):GenerateGUID(true)
end
else
warn("The variable code need to be a number and be greater than 0.")
break
end
local success, errormessage = pcall(function()
remotes.Parent = Location[math.random(1, #Location)]
end)
if not success then
warn('there was an error parenting remotes')
warn(print(errormessage))
if times >= 0 then
wait(times)
else
warn("The variable code need to be a number and be greater or equals to 0.")
break
end
continue
end
end
end
if times >= 0 then
wait(times)
else
warn("The variable code need to be a number and be greater or equals to 0.")
break
end
end