SHOW:
|
|
- or go back to the newest paste.
| 1 | - | local Player = game:GetService("Players").EncryptedWiki
|
| 1 | + | local Player = game:GetService("Players").LocalPlayer
|
| 2 | local Character = Player.Character | |
| 3 | local Torso = Character.Torso | |
| 4 | local Sound = Instance.new("Sound",Torso)
| |
| 5 | local Play = false | |
| 6 | local Pause = false | |
| 7 | local Loop = false | |
| 8 | local Beat = .8 | |
| 9 | ||
| 10 | p = game:GetService('Players').LocalPlayer
| |
| 11 | p.Chatted:connect(function(msg) | |
| 12 | if msg:sub(1,5):lower()=='play/' then | |
| 13 | Play = true | |
| 14 | local val = Instance.new("NumberValue", p.Character)
| |
| 15 | val.Name = "Song" | |
| 16 | val.Value = tonumber(msg:sub(6)) | |
| 17 | local id = val.Value | |
| 18 | Sound:Stop() | |
| 19 | Sound.SoundId='rbxassetid://'..id | |
| 20 | Sound:Play() | |
| 21 | wait(1) | |
| 22 | val:Remove() | |
| 23 | ||
| 24 | elseif msg:sub(1,5):lower()=='pitch/' then | |
| 25 | local val = Instance.new("NumberValue", p.Character)
| |
| 26 | val.Name = "Pitch" | |
| 27 | val.Value = tonumber(msg:sub(6)) | |
| 28 | local Pitch = val.Value | |
| 29 | Sound.Pitch = Pitch | |
| 30 | val:Remove() | |
| 31 | elseif msg:sub(1,4):lower()=='vol/' then | |
| 32 | local val = Instance.new("NumberValue", p.Character)
| |
| 33 | val.Name = "Vol" | |
| 34 | val.Value = tonumber(msg:sub(5)) | |
| 35 | if val.Value > 10 then val.Value = math.huge | |
| 36 | end | |
| 37 | local id = val.Value | |
| 38 | Sound.Volume = id | |
| 39 | val:Remove() | |
| 40 | elseif msg:sub(1,5) == 'stop/' then | |
| 41 | Play = false | |
| 42 | Sound:Stop() | |
| 43 | end | |
| 44 | ||
| 45 | end) | |
| 46 | ||
| 47 | function Random(num) | |
| 48 | local section=num % 1 * 3; | |
| 49 | local secondary=0.5 * math.pi * (section % 1); | |
| 50 | if section < 1 then | |
| 51 | return 1,1 - math.cos(secondary),1 - math.sin(secondary); | |
| 52 | elseif section < 2 then | |
| 53 | return 1 - math.sin(secondary),1,1 - math.cos(secondary); | |
| 54 | else | |
| 55 | return 1 - math.cos(secondary),1 - math.sin(secondary),1; | |
| 56 | end | |
| 57 | end | |
| 58 | ||
| 59 | local Part = Instance.new("Part",Torso)
| |
| 60 | Part.BrickColor = BrickColor.new("Really black")
| |
| 61 | Part.Anchored = true | |
| 62 | Part.CanCollide = false | |
| 63 | Part.TopSurface = 'Smooth' | |
| 64 | Part.Material = Enum.Material.Neon | |
| 65 | Part.Transparency = 0 | |
| 66 | local SelectionBox = Instance.new("SelectionBox",Part)
| |
| 67 | SelectionBox.Adornee = Part | |
| 68 | SelectionBox.LineThickness = .009 | |
| 69 | local a = 0 | |
| 70 | game:GetService('RunService').Heartbeat(function()
| |
| 71 | ||
| 72 | SelectionBox.Color = BrickColor.new(Random(tick())) | |
| 73 | local Beats = Sound.PlaybackLoudness/60 * Beat | |
| 74 | a=a+.1 | |
| 75 | Part.Size = Vector3.new(6+Beats ,.1 ,6+Beats) | |
| 76 | Part.CFrame = Torso.CFrame * CFrame.new(0,-3,0) * CFrame.Angles(0,a,0) | |
| 77 | ||
| 78 | end) |