Advertisement
voidman

Untitled

Jan 4th, 2019
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.73 KB | None | 0 0
  1. --]]
  2. --https://github.com/Mokiros/roblox-FE-compatibility
  3. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  4. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  5. local RealPlayer = Player
  6. do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end
  7. --[[
  8.  
  9. CEIRIOS' SOUND VISUALIZER
  10.  
  11. READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
  12. READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
  13. READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
  14. READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
  15. READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
  16. READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
  17. READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
  18. READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
  19. READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
  20. READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
  21.  
  22. CEIRIOS' SOUND VISUALIZER
  23.  
  24. There are several commands for this;
  25. Prefix - the symbol before saying a command, make sure it is 1 character long, the default is @.
  26. Color - the default color when the Rainbow command isn't active.
  27. Body - how high up or low the parts are from the HumanoidRootPart.
  28. Rainbow - depicts if the parts and pointlights are changing colors or not.
  29. Global - if the music is in the workspace or not.
  30. Angle - used to create shapes with the visualizer.
  31. Goal - [DON'T GO OVER 1 OR BELOW 0, IT'LL LAG THE GAME] how fast the parts reach their destination point.
  32. Split - another command to help create shapes with the visualizer.
  33. Parts - how many parts there're in the visualizer.
  34. Disp - how far away the parts are from the player.
  35. Power - how much the PlaybackLoudness is divided by. (depicts how long the parts get.)
  36. Material - the material of the parts.
  37. Play - changes the SoundId of the music, ex: Play 226205163
  38. Don't forget the Prefix before Play.
  39. Pause - pauses the sound.
  40. Resume - resumes the sound.
  41. Tpos - how far it is into the sound.
  42. MaxDis - how far the sound reaches in distance.
  43. Emit - how far before the sound starts getting quiet.
  44. Vol - how loud the sound is.
  45. Pitch - defines the pitch of the sound.
  46. Follow - changes who the parts follow.
  47. Whitelist - allows other people to use the commands above, including this one.
  48.  
  49. Made entirely by Ceirios.
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59. DO NOT EDIT THE CODE BELOW, UNLESS YOU KNOW WHAT YOU'RE DOING, YOU'LL BREAK IT IF YOU MESS ANYTHING UP!
  60. DO NOT EDIT THE CODE BELOW, UNLESS YOU KNOW WHAT YOU'RE DOING, YOU'LL BREAK IT IF YOU MESS ANYTHING UP!
  61. DO NOT EDIT THE CODE BELOW, UNLESS YOU KNOW WHAT YOU'RE DOING, YOU'LL BREAK IT IF YOU MESS ANYTHING UP!
  62. DO NOT EDIT THE CODE BELOW, UNLESS YOU KNOW WHAT YOU'RE DOING, YOU'LL BREAK IT IF YOU MESS ANYTHING UP!
  63. DO NOT EDIT THE CODE BELOW, UNLESS YOU KNOW WHAT YOU'RE DOING, YOU'LL BREAK IT IF YOU MESS ANYTHING UP!
  64. DO NOT EDIT THE CODE BELOW, UNLESS YOU KNOW WHAT YOU'RE DOING, YOU'LL BREAK IT IF YOU MESS ANYTHING UP!
  65. DO NOT EDIT THE CODE BELOW, UNLESS YOU KNOW WHAT YOU'RE DOING, YOU'LL BREAK IT IF YOU MESS ANYTHING UP!
  66. DO NOT EDIT THE CODE BELOW, UNLESS YOU KNOW WHAT YOU'RE DOING, YOU'LL BREAK IT IF YOU MESS ANYTHING UP!
  67.  
  68. ]]--
  69.  
  70. local Follow='LocalPlayer'
  71. local Plr=game.Players[Follow]
  72. local Char=Plr.Character
  73. local RootPart=Char.HumanoidRootPart
  74.  
  75. local Parts=Instance.new('Model')
  76. Parts.Parent=Char
  77.  
  78. local Whitelist={}
  79.  
  80. Whitelist[Plr.Name]={Name=Plr.Name,UserId=Plr.UserId}
  81.  
  82. local Settings={
  83. Prefix='@',
  84. Color='Light blue',
  85. Body=-3,
  86. Rainbow=false,
  87. Global=false,
  88. Angle=24,
  89. Goal=.15,
  90. Split=2,
  91. Parts=0,
  92. Disposition=4,
  93. Power=450,
  94. Material='Neon',
  95. Colors={
  96. Color3.fromRGB(244,66,66),
  97. Color3.fromRGB(244,149,66),
  98. Color3.fromRGB(244,203,66),
  99. Color3.fromRGB(83,244,66),
  100. Color3.fromRGB(66,244,212),
  101. Color3.fromRGB(66,152,244),
  102. Color3.fromRGB(107,66,244),
  103. Color3.fromRGB(229,66,244)
  104. }
  105. }
  106.  
  107. function Sound(Name,Looped,Pitch,Volume,ID,Parent)
  108. local Snd=Instance.new('Sound')
  109. Snd.Name=Name
  110. Snd.SoundId='rbxassetid://'..ID
  111. Snd.Looped=Looped
  112. Snd.PlaybackSpeed=Pitch
  113. Snd.Volume=Volume
  114. Snd.EmitterSize=10
  115. Snd.MaxDistance=100
  116. Snd.Parent=Parent
  117.  
  118. return Snd
  119. end
  120.  
  121. local Music=Sound('Music',true,1,1,0,RootPart)
  122.  
  123. function Part(Num)
  124. Settings.Parts=Num
  125.  
  126. for i,v in pairs(Parts:GetChildren()) do
  127. v:Destroy()
  128. end
  129.  
  130. for i=1,Num do
  131. local P=Instance.new('Part')
  132. local Light=Instance.new('PointLight')
  133. Light.Brightness=10
  134. Light.Range=10
  135. Light.Parent=P
  136. P.BrickColor=BrickColor.new(Settings.Color)
  137. P.Transparency=0
  138. P.Anchored=true
  139. P.CanCollide=false
  140. P.Material=Settings.Material
  141. P.Size=Vector3.new(.2,.2,.2)
  142. P.CFrame=CFrame.new(RootPart.CFrame.X,RootPart.CFrame.Y+Settings.Body,RootPart.CFrame.Z)
  143. P.Locked=true
  144. P.Parent=Parts
  145. end
  146. end
  147.  
  148. Part(31)
  149.  
  150. function ColorChange()
  151. while game:GetService'RunService'.RenderStepped:wait() do
  152. local Color=Settings.Colors[math.random(1,#Settings.Colors)]
  153. for i,v in pairs(Parts:GetChildren()) do
  154. v.Material=Settings.Material
  155. if Settings.Rainbow==false then
  156. v.BrickColor=BrickColor.new(Settings.Color)
  157. v.PointLight.Color=Color3.fromRGB(255,255,255)
  158. else
  159. v.BrickColor=BrickColor.new(Color)
  160. v.PointLight.Color=Color
  161. end
  162. end
  163. end
  164. end
  165.  
  166. local Rad=0
  167.  
  168. function Rot()
  169. while game:GetService'RunService'.RenderStepped:wait() do
  170. Rad=Rad+1
  171.  
  172. if Rad>=360 then
  173. Rad=0
  174. end
  175.  
  176. for i,v in pairs(Parts:GetChildren()) do
  177. v.CFrame=v.CFrame:Lerp(CFrame.new(RootPart.CFrame.X,RootPart.CFrame.Y+Settings.Body,RootPart.CFrame.Z)*CFrame.Angles(0,math.rad((360/Settings.Parts)*((i+(i*Settings.Angle))/Settings.Split)+Rad),0)*CFrame.new(0,0,Settings.Disposition+(v.Size.Z)),Settings.Goal)
  178. end
  179. end
  180. end
  181.  
  182. function Size()
  183. while game:GetService'RunService'.RenderStepped:wait() do
  184. for i,v in pairs(Parts:GetChildren()) do
  185. v.Size=v.Size:Lerp(Vector3.new(.2,.2,(Music.PlaybackLoudness/Settings.Power)*math.random(4,8)),Settings.Goal)
  186. end
  187. end
  188. end
  189.  
  190. spawn(Rot)
  191. spawn(Size)
  192. spawn(ColorChange)
  193.  
  194. function Chatted(Speaker,Message)
  195. for i,v in pairs(Whitelist) do
  196. if v.Name==Speaker.Name or v.UserId==Speaker.UserId then
  197. if Message:sub(1,6):lower():match(Settings.Prefix..'play ') then
  198. Music.SoundId='rbxassetid://'..Message:sub(7)
  199. Music:Play()
  200. elseif Message:sub(1,6):lower():match(Settings.Prefix..'pause') then
  201. Music:Pause()
  202. elseif Message:sub(1,7):lower():match(Settings.Prefix..'resume') then
  203. Music:Resume()
  204. elseif Message:sub(1,6):lower():match(Settings.Prefix..'tpos ') then
  205. Music.TimePosition=tonumber(Message:sub(7))
  206. elseif Message:sub(1,6):lower():match(Settings.Prefix..'emit ') then
  207. Music.EmitterSize=tonumber(Message:sub(7))
  208. elseif Message:sub(1,5):lower():match(Settings.Prefix..'vol ') then
  209. Music.Volume=tonumber(Message:sub(6))
  210. elseif Message:sub(1,7):lower():match(Settings.Prefix..'pitch ') then
  211. Music.PlaybackSpeed=tonumber(Message:sub(8))
  212. elseif Message:sub(1,8):lower():match(Settings.Prefix..'maxdis ') then
  213. Music.MaxDistance=tonumber(Message:sub(9))
  214. elseif Message:sub(1,8):lower():match(Settings.Prefix..'prefix ') then
  215. Settings.Prefix=Message:sub(9)
  216. elseif Message:sub(1,7):lower():match(Settings.Prefix..'angle ') then
  217. Settings.Angle=tonumber(Message:sub(8))
  218. elseif Message:sub(1,7):lower():match(Settings.Prefix..'split ') then
  219. Settings.Split=tonumber(Message:sub(8))
  220. elseif Message:sub(1,6):lower():match(Settings.Prefix..'goal ') then
  221. Settings.Goal=tonumber(Message:sub(7))
  222. elseif Message:sub(1,7):lower():match(Settings.Prefix..'color ') then
  223. Settings.Color=Message:sub(8)
  224. elseif Message:sub(1,6):lower():match(Settings.Prefix..'body ') then
  225. Settings.Body=tonumber(Message:sub(7))
  226. elseif Message:sub(1,10):lower():match(Settings.Prefix..'material ') then
  227. Settings.Material=Message:sub(11)
  228. elseif Message:sub(1,7):lower():match(Settings.Prefix..'global') then
  229. if Settings.Global==false then
  230. Settings.Global=true
  231. Music.Parent=workspace
  232. else
  233. Settings.Global=false
  234. Music.Parent=RootPart
  235. end
  236. elseif Message:sub(1,6):lower():match(Settings.Prefix..'disp ') then
  237. Settings.Disposition=tonumber(Message:sub(7))
  238. elseif Message:sub(1,7):lower():match(Settings.Prefix..'parts ') then
  239. Part(tonumber(Message:sub(8)))
  240. elseif Message:sub(1,7):lower():match(Settings.Prefix..'power ') then
  241. Settings.Power=tonumber(Message:sub(8))
  242. elseif Message:sub(1,8):lower():match(Settings.Prefix..'follow ') then
  243. for i,v in pairs(game.Players:GetPlayers()) do
  244. if v.Name:lower():match(Message:sub(9):lower()) then
  245. Follow=v.Name
  246. Plr=game.Players[Follow]
  247. Char=Plr.Character
  248. RootPart=Char.HumanoidRootPart
  249. if Settings.Global==false then
  250. Music.Parent=RootPart
  251. end
  252. end
  253. end
  254. elseif Message:sub(1,11):lower():match(Settings.Prefix..'whitelist ') then
  255. for i,v in pairs(game.Players:GetPlayers()) do
  256. if v.Name:lower():match(Message:sub(12):lower()) then
  257. Whitelist[v.Name]={Name=v.Name,UserId=v.UserId}
  258. end
  259. end
  260. elseif Message:sub(1,8):lower():match(Settings.Prefix..'rainbow') then
  261. if Settings.Rainbow==false then
  262. Settings.Rainbow=true
  263. else
  264. Settings.Rainbow=false
  265. end
  266. end
  267. end
  268. end
  269. end
  270.  
  271. game.Players.PlayerAdded:connect(function(Plyr)
  272. Plyr.Chatted:connect(function(Message) Chatted(Plyr,Message) end)
  273. end)
  274.  
  275. for i,v in pairs(game.Players:GetPlayers()) do
  276. v.Chatted:connect(function(Message) Chatted(v,Message) end)
  277. end
  278.  
  279. --[[
  280.  
  281. CEIRIOS' SOUND VISUALIZER
  282.  
  283. READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
  284. READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
  285. READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
  286. READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
  287. READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
  288. READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
  289. READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
  290. READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
  291. READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
  292. READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
  293.  
  294. CEIRIOS' SOUND VISUALIZER
  295.  
  296. There are several commands for this;
  297. Prefix - the symbol before saying a command, make sure it is 1 character long, the default is @.
  298. Color - the default color when the Rainbow command isn't active.
  299. Body - how high up or low the parts are from the HumanoidRootPart.
  300. Rainbow - depicts if the parts and pointlights are changing colors or not.
  301. Global - if the music is in the workspace or not.
  302. Angle - used to create shapes with the visualizer.
  303. Goal - [DON'T GO OVER 1 OR BELOW 0, IT'LL LAG THE GAME] how fast the parts reach their destination point.
  304. Split - another command to help create shapes with the visualizer.
  305. Parts - how many parts there're in the visualizer.
  306. Disp - how far away the parts are from the player.
  307. Power - how much the PlaybackLoudness is divided by. (depicts how long the parts get.)
  308. Material - the material of the parts.
  309. Play - changes the SoundId of the music, ex: Play 226205163
  310. Don't forget the Prefix before Play.
  311. Pause - pauses the sound.
  312. Resume - resumes the sound.
  313. Tpos - how far it is into the sound.
  314. MaxDis - how far the sound reaches in distance.
  315. Emit - how far before the sound starts getting quiet.
  316. Vol - how loud the sound is.
  317. Pitch - defines the pitch of the sound.
  318. Follow - changes who the parts follow.
  319. Whitelist - allows other people to use the commands above, including this one.
  320.  
  321. Made entirely by Ceirios.
  322.  
  323. ]]--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement