Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Players = game:GetService("Players")
- local Player = owner
- repeat wait() until Player.Character
- local Character = Player.Character
- local Humanoid = Character.Humanoid
- local LoudnessEvent = Instance.new("RemoteEvent")
- LoudnessEvent.Name = "LoudnessEvent"
- LoudnessEvent.Parent = NLS([==[
- local Character = script.Parent.Parent.Character
- local Theme = nil
- Character.DescendantAdded:Connect(function(Descendant)
- if Descendant:IsA("Sound") then
- if Descendant.Name == "Theme" then
- Theme = Descendant
- end
- end
- end)
- game:GetService("RunService").Heartbeat:Connect(function()
- if Theme ~= nil then
- script.LoudnessEvent:FireServer(Theme.PlaybackLoudness)
- end
- end)
- ]==],Player.PlayerGui)
- Humanoid.BodyHeightScale.Value = 0.6
- Humanoid.BodyDepthScale.Value = 0.6
- Humanoid.BodyWidthScale.Value = 0.6
- Humanoid.HeadScale.Value = 0.6
- function Connect()
- Player.Chatted:Connect(function(Msg)
- if string.lower(Msg:sub(1,7)) == "/e play" then
- local ID = Msg:sub(9,#Msg)
- PlaySong(ID)
- end
- end)
- end
- if Character.Humanoid.RigType ~= Enum.HumanoidRigType.R15 then
- warn("You must be R15 in order to use this script")
- else
- Connect()
- end
- function PlaySong(ID)
- if Character.HumanoidRootPart:FindFirstChild("Theme") then
- Character.HumanoidRootPart.Theme:Destroy()
- end
- local Theme = Instance.new("Sound")
- Theme.Name = "Theme"
- Theme.Volume = 3
- Theme.SoundId = ("rbxassetid://"..ID)
- Theme.Looped = true
- Theme.Parent = Character.HumanoidRootPart
- Theme:Play()
- end
- LoudnessEvent.OnServerEvent:Connect(function(Plr,Loudness)
- Humanoid.BodyHeightScale.Value = Loudness/1000+0.6
- Humanoid.BodyDepthScale.Value = Loudness/1000+0.6
- Humanoid.BodyWidthScale.Value = Loudness/1000+0.6
- Humanoid.HeadScale.Value = Loudness/1000+0.6
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement