How To make Dj Event On Roblox Studio!
———————————————————————
— 🎧 DJ Spawn Admin Script 🎧
— HOW TO CUSTOMIZE:
— 1. Replace “EnterYourUsernameHere” with YOUR Roblox username.
— 2. The DJ model must be stored in ReplicatedStorage with the name “DJ”.
— 3. The music will automatically play when the DJ spawns.
———————————————————————
local OWNER_NAME = “EnterYourUsernameHere” — 👈 replace this with your username
———————————————————————
— DO NOT EDIT BELOW UNLESS YOU KNOW WHAT YOU’RE DOING
———————————————————————
local Players = game:GetService(“Players”)
local ReplicatedStorage = game:GetService(“ReplicatedStorage”)
— DJ model stored in ReplicatedStorage
local DJModel = ReplicatedStorage:WaitForChild(“DJ”)
— Keep track of spawned DJ
local currentDJ = nil
— Function to spawn DJ at its default position
local function spawnDJ()
— If a DJ already exists, remove it first
if currentDJ and currentDJ.Parent then
currentDJ:Destroy()
end
local djClone = DJModel:Clone()
— Anchor all parts so it does not move
for _, part in ipairs(djClone:GetDescendants()) do
if part:IsA(“BasePart”) then
part.Anchored = true
end
end
— Parent it to Workspace (keeps original position)
djClone.Parent = workspace
currentDJ = djClone
— Create sound
local sound = Instance.new(“Sound”)
sound.SoundId = “rbxassetid://106586241621814”
sound.Volume = 10 — 🔊 Max volume (100% loud)
sound.Looped = true — loops like DJ music
sound.Parent = djClone:FindFirstChildWhichIsA(“BasePart”) or djClone
sound:Play()
end
— Function to remove DJ
local function removeDJ()
if currentDJ and currentDJ.Parent then
currentDJ:Destroy()
currentDJ = nil
end
end
— Listen for chat commands
Players.PlayerAdded:Connect(function(player)
player.Chatted:Connect(function(msg)
msg = msg:lower()
if player.Name == OWNER_NAME then
if msg == “!spawn dj” then
spawnDJ()
elseif msg == “!byedj” then
removeDJ()
end
end
end)
end)
Plss give me script
it no work pls help
but how does it count? that’s dj
is it global?
help me pls