Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function wb(first,second,c0)
- local weld = Instance.new("Weld", first)
- weld.Part0 = first
- weld.Part1 = second
- weld.C0 = second.CFrame:inverse() *second.CFrame *c0
- return weld
- end
- pbl = 0
- weld = wb(owner.Character.Head, owner.Character.Torso, CFrame.new(0,-1.46,0))
- local music = Instance.new("Sound", owner.Character.Head)
- music.SoundId = "rbxassetid://2410687447"
- music.Volume = 2
- music.Looped = true
- music:Play()
- music.Name = "Song"
- local remote = Instance.new("RemoteEvent", owner.Character)
- remote.Name = "SoundAlert"
- owner.Character.Head:FindFirstChildOfClass("Decal").Texture = "http://www.roblox.com/asset/?id=8056256"
- a = [[
- spawn(function()
- Music = owner.Character.Head.Song
- Event = owner.Character.SoundAlert
- RunService = game:GetService("RunService")
- RunService.RenderStepped:Connect(function()
- Event:FireServer(Music.PlaybackLoudness)
- end)
- end)
- ]]
- NLS(a,owner.Character)
- remote.OnServerEvent:connect(function(P,X)
- pbl = X
- end)
- owner.Chatted:connect(function(msg)
- if msg:sub(1,4) == "play" then
- music:Stop()
- music.SoundId = "rbxassetid://"..msg:sub(6)
- music:Play()
- end
- if msg == "stop" then
- music:Stop()
- end
- if msg == "resume" then
- music:Resume()
- end
- if msg:sub(1,5) == "pitch" then
- music.PlaybackSpeed = msg:sub(7)
- end
- end)
- while game:GetService("RunService").Stepped:wait() do
- local goal = {}
- goal.C0 = owner.Character.Torso.CFrame:inverse() *owner.Character.Torso.CFrame *CFrame.new(0,-1.46, pbl/300) *CFrame.Angles(-pbl/300,0,0)
- local tweeninfo = TweenInfo.new(0.5)
- local tween = game:GetService("TweenService"):Create(weld, tweeninfo, goal)
- tween:Play()
- if pbl > 120 then
- owner.Character.Head:FindFirstChildOfClass("Decal").Texture = "http://www.roblox.com/asset/?id=1110715143"
- end
- if pbl < 119 then
- owner.Character.Head:FindFirstChildOfClass("Decal").Texture = "http://www.roblox.com/asset/?id=8056256"
- end
- end
Add Comment
Please, Sign In to add comment