Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local player = game.Players.LocalPlayer
- player.Chatted:connect(function(msg)
- if string.lower(string.sub(msg,1,6)) == "/spawn" then
- local player = game.Players.LocalPlayer
- local VisualPet = Instance.new("Model")
- VisualPet.Parent = workspace
- VisualPet.Name = "VisualPet"
- Instance.new("Humanoid").Parent = VisualPet
- local CurrentColor = Instance.new("Color3Value")
- CurrentColor.Name = "CurrentColor"
- CurrentColor.Parent = VisualPet
- local Music = Instance.new("Folder")
- Music.Parent = VisualPet
- Music.Name = "Music"
- local Sound = Instance.new("Sound")
- Sound.Name = "Sound"
- Sound.Parent = Music
- Sound.Looped = true
- Sound.SoundId = "http://www.roblox.com/asset/?id=853588295"
- local Pet = Instance.new("Part")
- Pet.Parent = VisualPet
- Pet.Size = Vector3.new(2,2,2)
- Pet.Material = "Neon"
- Pet.Anchored = true
- Pet.Name = "Head"
- local Light = Instance.new("PointLight")
- Light.Parent = Pet
- spawn(function()
- while wait() do
- if Sound then
- local OrigCFrame = Pet.CFrame
- Pet.Size = Vector3.new(Sound.PlaybackLoudness / 100, Sound.PlaybackLoudness / 100, Sound.PlaybackLoudness / 100)
- Pet.Color = CurrentColor.Value
- if Pet.Size.X < 0.5 and Pet.Size.Y < 0.5 and Pet.Size.Z < 0.5 then Pet.Size = Vector3.new(2, 2, 2) end
- Light.Color = CurrentColor.Value
- Light.Brightness = 1 + (Sound.PlaybackLoudness / 100)
- Light.Range = 16 + (Sound.PlaybackLoudness / 75)
- end
- end
- end)
- spawn(function()
- while wait() do
- local Color = CurrentColor.Value
- local NewColor = Color3.fromRGB(math.random(0, 255), math.random(0, 255), math.random(0, 255))
- for i=0, 1, 0.01 do
- CurrentColor.Value = Color:lerp(NewColor, i)
- wait()
- end
- end
- end)
- player.Chatted:connect(function(msg)
- if string.lower(string.sub(msg,1,5)) == "/play" then
- Sound:Stop()
- Sound.SoundId = ""
- local Id = string.sub(msg,6)
- print(Id)
- local Asset = game:GetService("MarketplaceService"):GetProductInfo(tonumber(Id))
- local AssetName = "Now Playing: " .. Asset.Name
- VisualPet.Name = AssetName
- Sound.SoundId = "http://www.roblox.com/asset/?id=" .. tonumber(Id)
- Sound.Volume = 1
- Sound.Looped = true
- Sound:Play()
- end
- end)
- player.Chatted:connect(function(msg)
- if string.lower(string.sub(msg,1,5)) == "/stop" then
- VisualPet:Destroy()
- end
- end)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement