Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --]]
- --https://github.com/Mokiros/roblox-FE-compatibility
- if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
- local Player,Mouse,mouse,UserInputService,ContextActionService = owner
- local RealPlayer = Player
- 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
- --[[
- CEIRIOS' SOUND VISUALIZER
- READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
- READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
- READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
- READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
- READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
- READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
- READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
- READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
- READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
- READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
- CEIRIOS' SOUND VISUALIZER
- There are several commands for this;
- Prefix - the symbol before saying a command, make sure it is 1 character long, the default is @.
- Color - the default color when the Rainbow command isn't active.
- Body - how high up or low the parts are from the HumanoidRootPart.
- Rainbow - depicts if the parts and pointlights are changing colors or not.
- Global - if the music is in the workspace or not.
- Angle - used to create shapes with the visualizer.
- Goal - [DON'T GO OVER 1 OR BELOW 0, IT'LL LAG THE GAME] how fast the parts reach their destination point.
- Split - another command to help create shapes with the visualizer.
- Parts - how many parts there're in the visualizer.
- Disp - how far away the parts are from the player.
- Power - how much the PlaybackLoudness is divided by. (depicts how long the parts get.)
- Material - the material of the parts.
- Play - changes the SoundId of the music, ex: Play 226205163
- Don't forget the Prefix before Play.
- Pause - pauses the sound.
- Resume - resumes the sound.
- Tpos - how far it is into the sound.
- MaxDis - how far the sound reaches in distance.
- Emit - how far before the sound starts getting quiet.
- Vol - how loud the sound is.
- Pitch - defines the pitch of the sound.
- Follow - changes who the parts follow.
- Whitelist - allows other people to use the commands above, including this one.
- Made entirely by Ceirios.
- DO NOT EDIT THE CODE BELOW, UNLESS YOU KNOW WHAT YOU'RE DOING, YOU'LL BREAK IT IF YOU MESS ANYTHING UP!
- DO NOT EDIT THE CODE BELOW, UNLESS YOU KNOW WHAT YOU'RE DOING, YOU'LL BREAK IT IF YOU MESS ANYTHING UP!
- DO NOT EDIT THE CODE BELOW, UNLESS YOU KNOW WHAT YOU'RE DOING, YOU'LL BREAK IT IF YOU MESS ANYTHING UP!
- DO NOT EDIT THE CODE BELOW, UNLESS YOU KNOW WHAT YOU'RE DOING, YOU'LL BREAK IT IF YOU MESS ANYTHING UP!
- DO NOT EDIT THE CODE BELOW, UNLESS YOU KNOW WHAT YOU'RE DOING, YOU'LL BREAK IT IF YOU MESS ANYTHING UP!
- DO NOT EDIT THE CODE BELOW, UNLESS YOU KNOW WHAT YOU'RE DOING, YOU'LL BREAK IT IF YOU MESS ANYTHING UP!
- DO NOT EDIT THE CODE BELOW, UNLESS YOU KNOW WHAT YOU'RE DOING, YOU'LL BREAK IT IF YOU MESS ANYTHING UP!
- DO NOT EDIT THE CODE BELOW, UNLESS YOU KNOW WHAT YOU'RE DOING, YOU'LL BREAK IT IF YOU MESS ANYTHING UP!
- ]]--
- local Follow='LocalPlayer'
- local Plr=game.Players[Follow]
- local Char=Plr.Character
- local RootPart=Char.HumanoidRootPart
- local Parts=Instance.new('Model')
- Parts.Parent=Char
- local Whitelist={}
- Whitelist[Plr.Name]={Name=Plr.Name,UserId=Plr.UserId}
- local Settings={
- Prefix='@',
- Color='Light blue',
- Body=-3,
- Rainbow=false,
- Global=false,
- Angle=24,
- Goal=.15,
- Split=2,
- Parts=0,
- Disposition=4,
- Power=450,
- Material='Neon',
- Colors={
- Color3.fromRGB(244,66,66),
- Color3.fromRGB(244,149,66),
- Color3.fromRGB(244,203,66),
- Color3.fromRGB(83,244,66),
- Color3.fromRGB(66,244,212),
- Color3.fromRGB(66,152,244),
- Color3.fromRGB(107,66,244),
- Color3.fromRGB(229,66,244)
- }
- }
- function Sound(Name,Looped,Pitch,Volume,ID,Parent)
- local Snd=Instance.new('Sound')
- Snd.Name=Name
- Snd.SoundId='rbxassetid://'..ID
- Snd.Looped=Looped
- Snd.PlaybackSpeed=Pitch
- Snd.Volume=Volume
- Snd.EmitterSize=10
- Snd.MaxDistance=100
- Snd.Parent=Parent
- return Snd
- end
- local Music=Sound('Music',true,1,1,0,RootPart)
- function Part(Num)
- Settings.Parts=Num
- for i,v in pairs(Parts:GetChildren()) do
- v:Destroy()
- end
- for i=1,Num do
- local P=Instance.new('Part')
- local Light=Instance.new('PointLight')
- Light.Brightness=10
- Light.Range=10
- Light.Parent=P
- P.BrickColor=BrickColor.new(Settings.Color)
- P.Transparency=0
- P.Anchored=true
- P.CanCollide=false
- P.Material=Settings.Material
- P.Size=Vector3.new(.2,.2,.2)
- P.CFrame=CFrame.new(RootPart.CFrame.X,RootPart.CFrame.Y+Settings.Body,RootPart.CFrame.Z)
- P.Locked=true
- P.Parent=Parts
- end
- end
- Part(31)
- function ColorChange()
- while game:GetService'RunService'.RenderStepped:wait() do
- local Color=Settings.Colors[math.random(1,#Settings.Colors)]
- for i,v in pairs(Parts:GetChildren()) do
- v.Material=Settings.Material
- if Settings.Rainbow==false then
- v.BrickColor=BrickColor.new(Settings.Color)
- v.PointLight.Color=Color3.fromRGB(255,255,255)
- else
- v.BrickColor=BrickColor.new(Color)
- v.PointLight.Color=Color
- end
- end
- end
- end
- local Rad=0
- function Rot()
- while game:GetService'RunService'.RenderStepped:wait() do
- Rad=Rad+1
- if Rad>=360 then
- Rad=0
- end
- for i,v in pairs(Parts:GetChildren()) do
- 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)
- end
- end
- end
- function Size()
- while game:GetService'RunService'.RenderStepped:wait() do
- for i,v in pairs(Parts:GetChildren()) do
- v.Size=v.Size:Lerp(Vector3.new(.2,.2,(Music.PlaybackLoudness/Settings.Power)*math.random(4,8)),Settings.Goal)
- end
- end
- end
- spawn(Rot)
- spawn(Size)
- spawn(ColorChange)
- function Chatted(Speaker,Message)
- for i,v in pairs(Whitelist) do
- if v.Name==Speaker.Name or v.UserId==Speaker.UserId then
- if Message:sub(1,6):lower():match(Settings.Prefix..'play ') then
- Music.SoundId='rbxassetid://'..Message:sub(7)
- Music:Play()
- elseif Message:sub(1,6):lower():match(Settings.Prefix..'pause') then
- Music:Pause()
- elseif Message:sub(1,7):lower():match(Settings.Prefix..'resume') then
- Music:Resume()
- elseif Message:sub(1,6):lower():match(Settings.Prefix..'tpos ') then
- Music.TimePosition=tonumber(Message:sub(7))
- elseif Message:sub(1,6):lower():match(Settings.Prefix..'emit ') then
- Music.EmitterSize=tonumber(Message:sub(7))
- elseif Message:sub(1,5):lower():match(Settings.Prefix..'vol ') then
- Music.Volume=tonumber(Message:sub(6))
- elseif Message:sub(1,7):lower():match(Settings.Prefix..'pitch ') then
- Music.PlaybackSpeed=tonumber(Message:sub(8))
- elseif Message:sub(1,8):lower():match(Settings.Prefix..'maxdis ') then
- Music.MaxDistance=tonumber(Message:sub(9))
- elseif Message:sub(1,8):lower():match(Settings.Prefix..'prefix ') then
- Settings.Prefix=Message:sub(9)
- elseif Message:sub(1,7):lower():match(Settings.Prefix..'angle ') then
- Settings.Angle=tonumber(Message:sub(8))
- elseif Message:sub(1,7):lower():match(Settings.Prefix..'split ') then
- Settings.Split=tonumber(Message:sub(8))
- elseif Message:sub(1,6):lower():match(Settings.Prefix..'goal ') then
- Settings.Goal=tonumber(Message:sub(7))
- elseif Message:sub(1,7):lower():match(Settings.Prefix..'color ') then
- Settings.Color=Message:sub(8)
- elseif Message:sub(1,6):lower():match(Settings.Prefix..'body ') then
- Settings.Body=tonumber(Message:sub(7))
- elseif Message:sub(1,10):lower():match(Settings.Prefix..'material ') then
- Settings.Material=Message:sub(11)
- elseif Message:sub(1,7):lower():match(Settings.Prefix..'global') then
- if Settings.Global==false then
- Settings.Global=true
- Music.Parent=workspace
- else
- Settings.Global=false
- Music.Parent=RootPart
- end
- elseif Message:sub(1,6):lower():match(Settings.Prefix..'disp ') then
- Settings.Disposition=tonumber(Message:sub(7))
- elseif Message:sub(1,7):lower():match(Settings.Prefix..'parts ') then
- Part(tonumber(Message:sub(8)))
- elseif Message:sub(1,7):lower():match(Settings.Prefix..'power ') then
- Settings.Power=tonumber(Message:sub(8))
- elseif Message:sub(1,8):lower():match(Settings.Prefix..'follow ') then
- for i,v in pairs(game.Players:GetPlayers()) do
- if v.Name:lower():match(Message:sub(9):lower()) then
- Follow=v.Name
- Plr=game.Players[Follow]
- Char=Plr.Character
- RootPart=Char.HumanoidRootPart
- if Settings.Global==false then
- Music.Parent=RootPart
- end
- end
- end
- elseif Message:sub(1,11):lower():match(Settings.Prefix..'whitelist ') then
- for i,v in pairs(game.Players:GetPlayers()) do
- if v.Name:lower():match(Message:sub(12):lower()) then
- Whitelist[v.Name]={Name=v.Name,UserId=v.UserId}
- end
- end
- elseif Message:sub(1,8):lower():match(Settings.Prefix..'rainbow') then
- if Settings.Rainbow==false then
- Settings.Rainbow=true
- else
- Settings.Rainbow=false
- end
- end
- end
- end
- end
- game.Players.PlayerAdded:connect(function(Plyr)
- Plyr.Chatted:connect(function(Message) Chatted(Plyr,Message) end)
- end)
- for i,v in pairs(game.Players:GetPlayers()) do
- v.Chatted:connect(function(Message) Chatted(v,Message) end)
- end
- --[[
- CEIRIOS' SOUND VISUALIZER
- READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
- READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
- READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
- READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
- READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
- READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
- READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
- READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
- READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
- READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
- CEIRIOS' SOUND VISUALIZER
- There are several commands for this;
- Prefix - the symbol before saying a command, make sure it is 1 character long, the default is @.
- Color - the default color when the Rainbow command isn't active.
- Body - how high up or low the parts are from the HumanoidRootPart.
- Rainbow - depicts if the parts and pointlights are changing colors or not.
- Global - if the music is in the workspace or not.
- Angle - used to create shapes with the visualizer.
- Goal - [DON'T GO OVER 1 OR BELOW 0, IT'LL LAG THE GAME] how fast the parts reach their destination point.
- Split - another command to help create shapes with the visualizer.
- Parts - how many parts there're in the visualizer.
- Disp - how far away the parts are from the player.
- Power - how much the PlaybackLoudness is divided by. (depicts how long the parts get.)
- Material - the material of the parts.
- Play - changes the SoundId of the music, ex: Play 226205163
- Don't forget the Prefix before Play.
- Pause - pauses the sound.
- Resume - resumes the sound.
- Tpos - how far it is into the sound.
- MaxDis - how far the sound reaches in distance.
- Emit - how far before the sound starts getting quiet.
- Vol - how loud the sound is.
- Pitch - defines the pitch of the sound.
- Follow - changes who the parts follow.
- Whitelist - allows other people to use the commands above, including this one.
- Made entirely by Ceirios.
- ]]--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement