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,game,owner = owner,game
- local RealPlayer = Player
- do
- print("FE Compatibility code V2 by Mokiros")
- local RealPlayer = RealPlayer
- script.Parent = RealPlayer.Character
- --Fake event to make stuff like Mouse.KeyDown work
- local Disconnect_Function = function(this)
- this[1].Functions[this[2]] = nil
- end
- local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
- local FakeEvent_Metatable = {__index={
- Connect = function(this,f)
- local i = tostring(math.random(0,10000))
- while this.Functions[i] do
- i = tostring(math.random(0,10000))
- end
- this.Functions[i] = f
- return setmetatable({this,i},Disconnect_Metatable)
- end
- }}
- FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
- local function fakeEvent()
- return setmetatable({Functions={}},FakeEvent_Metatable)
- end
- --Creating fake input objects with fake variables
- local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
- FakeMouse.keyUp = FakeMouse.KeyUp
- FakeMouse.keyDown = FakeMouse.KeyDown
- local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
- local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
- CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
- end}
- --Merged 2 functions into one by checking amount of arguments
- CAS.UnbindAction = CAS.BindAction
- --This function will trigger the events that have been :Connect()'ed
- local function TriggerEvent(self,ev,...)
- for _,f in pairs(self[ev].Functions) do
- f(...)
- end
- end
- FakeMouse.TriggerEvent = TriggerEvent
- UIS.TriggerEvent = TriggerEvent
- --Client communication
- local Event = Instance.new("RemoteEvent")
- Event.Name = "UserInput_Event"
- Event.OnServerEvent:Connect(function(plr,io)
- if plr~=RealPlayer then return end
- FakeMouse.Target = io.Target
- FakeMouse.Hit = io.Hit
- if not io.isMouse then
- local b = io.UserInputState == Enum.UserInputState.Begin
- if io.UserInputType == Enum.UserInputType.MouseButton1 then
- return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
- end
- if io.UserInputType == Enum.UserInputType.MouseButton2 then
- return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
- end
- for _,t in pairs(CAS.Actions) do
- for _,k in pairs(t.Keys) do
- if k==io.KeyCode then
- t.Function(t.Name,io.UserInputState,io)
- end
- end
- end
- FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
- UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
- end
- end)
- Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
- local Mouse = owner:GetMouse()
- local UIS = game:GetService("UserInputService")
- local input = function(io,RobloxHandled)
- if RobloxHandled then return end
- --Since InputObject is a client-side instance, we create and pass table instead
- Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
- end
- UIS.InputBegan:Connect(input)
- UIS.InputEnded:Connect(input)
- local h,t
- --Give the server mouse data every second frame, but only if the values changed
- --If player is not moving their mouse, client won't fire events
- local HB = game:GetService("RunService").Heartbeat
- while true do
- if h~=Mouse.Hit or t~=Mouse.Target then
- h,t=Mouse.Hit,Mouse.Target
- Event:FireServer({isMouse=true,Target=t,Hit=h})
- end
- --Wait 2 frames
- for i=1,2 do
- HB:Wait()
- end
- end]==],script)
- ----Sandboxed game object that allows the usage of client-side methods and services
- --Real game object
- local RealGame = game
- --Metatable for fake service
- local FakeService_Metatable = {
- __index = function(self,k)
- local s = rawget(self,"_RealService")
- if s then
- return typeof(s[k])=="function"
- and function(_,...)return s[k](s,...)end or s[k]
- end
- end,
- __newindex = function(self,k,v)
- local s = rawget(self,"_RealService")
- if s then s[k]=v end
- end
- }
- local function FakeService(t,RealService)
- t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
- return setmetatable(t,FakeService_Metatable)
- end
- --Fake game object
- local FakeGame = {
- GetService = function(self,s)
- return rawget(self,s) or RealGame:GetService(s)
- end,
- Players = FakeService({
- LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
- },"Players"),
- UserInputService = FakeService(UIS,"UserInputService"),
- ContextActionService = FakeService(CAS,"ContextActionService"),
- RunService = FakeService({
- _btrs = {},
- RenderStepped = RealGame:GetService("RunService").Heartbeat,
- BindToRenderStep = function(self,name,_,fun)
- self._btrs[name] = self.Heartbeat:Connect(fun)
- end,
- UnbindFromRenderStep = function(self,name)
- self._btrs[name]:Disconnect()
- end,
- },"RunService")
- }
- rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
- FakeGame.service = FakeGame.GetService
- FakeService(FakeGame,game)
- --Changing owner to fake player object to support owner:GetMouse()
- game,owner = FakeGame,FakeGame.Players.LocalPlayer
- end
- local Player = owner
- local Character = Player.Character
- local Torso = Character.Torso
- local Torso2 = Character.Head
- --GUI???꾩슂?쒕뜲?댄꽣 :D
- local SurfaceGui = Instance.new("SurfaceGui")
- local Frame = Instance.new("Frame")
- local TextLabel = Instance.new("TextLabel")
- local Frame_2 = Instance.new("Frame")
- local TextLabel = Instance.new("TextLabel")
- local TextLabel_2 = Instance.new("TextLabel")
- local TextLabel_3 = Instance.new("TextLabel")
- local TextButton = Instance.new("TextButton")
- local function Smooth(Part)
- Part.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- Part.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- Part.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- Part.RightSurface = Enum.SurfaceType.SmoothNoOutlines
- Part.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- Part.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- end
- local Keyboard = Instance.new("Part")
- Keyboard.BrickColor = BrickColor.new("Lsvender")
- Keyboard.Transparency = 0.6
- Keyboard.Size = Vector3.new(2.24, 0.24, 2.89)
- Keyboard.CanCollide = false
- Keyboard.Locked = true
- local Keyboard2 = Instance.new("Part")
- Keyboard2.BrickColor = BrickColor.new("Lsvender")
- Keyboard2.Material = Enum.Material.Neon
- Keyboard2.Transparency = 0.6
- Keyboard2.Size = Vector3.new(12.38, 0.24, 6.97)
- Keyboard2.CanCollide = false
- Keyboard2.Locked = true
- Smooth(Keyboard) --二쇱꽍
- Smooth(Keyboard2)
- local KeyboardWeld = Instance.new("Weld")
- KeyboardWeld.Part0 = Torso
- KeyboardWeld.Part1 = Keyboard
- KeyboardWeld.C0 = CFrame.new(1, 0.4, -2) * CFrame.Angles(0.5, 0, 0)
- -- Gui to Lua
- -- Version: 3.1
- SurfaceGui.Parent = game.Players.LocalPlayer.PlayerGui
- SurfaceGui.Face = "Top"
- Frame.Parent = SurfaceGui
- Frame.BackgroundColor3 = Color3.fromRGB(44, 44, 44)
- Frame.BorderSizePixel = 0
- Frame.ClipsDescendants = true
- Frame.Size = UDim2.new(0, 421, 0, 278)
- Frame_2.Parent = Frame
- Frame_2.BackgroundColor3 = Color3.fromRGB(65, 65, 65)
- Frame_2.BorderSizePixel = 0
- Frame_2.Position = UDim2.new(0.895486891, 0, 0, 0)
- Frame_2.Size = UDim2.new(0, 7, 0, 278)
- TextLabel.Parent = Frame
- TextLabel.BackgroundColor3 = Color3.fromRGB(107, 107, 107)
- TextLabel.BackgroundTransparency = 0.100
- TextLabel.BorderSizePixel = 0
- TextLabel.Position = UDim2.new(0.912114024, 0, 0, 0)
- TextLabel.Size = UDim2.new(0, 37, 0, 278)
- TextLabel.Font = Enum.Font.SourceSans
- TextLabel.Text = ""
- TextLabel.TextColor3 = Color3.fromRGB(0, 0, 0)
- TextLabel.TextSize = 14.000
- TextLabel_2.Parent = Frame
- TextLabel_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel_2.BackgroundTransparency = 1.000
- TextLabel_2.Position = UDim2.new(-5.43662324e-08, 0, 0.953237414, 0)
- TextLabel_2.Size = UDim2.new(0, 39, 0, 13)
- TextLabel_2.Font = Enum.Font.SourceSans
- TextLabel_2.Text = "TURBO"
- TextLabel_2.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel_2.TextSize = 14.000
- TextButton.Parent = Frame
- TextButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- TextButton.Size = UDim2.new(0, 376, 0, 21)
- TextButton.Font = Enum.Font.SourceSans
- TextButton.Text = "MUSIC"
- TextButton.TextColor3 = Color3.fromRGB(0, 0, 0)
- TextButton.TextSize = 14.000
- TextButton.MouseButton1Click:Connect(function()
- -- Objects
- local WindowH = Instance.new("ScreenGui")
- local Window = Instance.new("Frame")
- local TopBar = Instance.new("Frame")
- local X = Instance.new("ImageButton")
- local HeaderOfTopBar = Instance.new("TextLabel")
- local InfoButton = Instance.new("TextButton")
- local Content = Instance.new("Frame")
- local ChangeID = Instance.new("TextButton")
- local ChangeShape = Instance.new("TextButton")
- local RunDec = Instance.new("TextButton")
- local ID = Instance.new("TextBox")
- local IDec = Instance.new("TextButton")
- local ShapeDec = Instance.new("TextButton")
- local Shape = Instance.new("TextBox")
- local Info = Instance.new("ScrollingFrame")
- local InfoText = Instance.new("TextLabel")
- -- Properties
- WindowH.Name = "WindowH"
- WindowH.Parent = game.Players.LocalPlayer.PlayerGui
- Window.Name = "Window"
- Window.Parent = WindowH
- Window.Active = true
- Window.BackgroundColor3 = Color3.new(0.666667, 0, 0)
- Window.Draggable = true
- Window.Position = UDim2.new(0, 177, 0, 137)
- Window.Size = UDim2.new(0, 471, 0, 322)
- TopBar.Name = "TopBar"
- TopBar.Parent = Window
- TopBar.BackgroundColor3 = Color3.new(0, 0, 0)
- TopBar.BorderSizePixel = 0
- TopBar.Size = UDim2.new(0, 471, 0, 28)
- X.Name = "X"
- X.Parent = TopBar
- X.BackgroundColor3 = Color3.new(1, 1, 1)
- X.Position = UDim2.new(0, 442, 0, 0)
- X.Size = UDim2.new(0, 29, 0, 28)
- X.Style = Enum.ButtonStyle.RobloxRoundDropdownButton
- X.Image = "rbxassetid://190837466"
- HeaderOfTopBar.Name = "HeaderOfTopBar"
- HeaderOfTopBar.Parent = TopBar
- HeaderOfTopBar.BackgroundColor3 = Color3.new(0, 0, 0)
- HeaderOfTopBar.BackgroundTransparency = 1
- HeaderOfTopBar.Size = UDim2.new(0, 367, 0, 28)
- HeaderOfTopBar.Font = Enum.Font.Cartoon
- HeaderOfTopBar.FontSize = Enum.FontSize.Size14
- HeaderOfTopBar.Text = "Welcome to Anonymous's Audio visualizer GUI"
- HeaderOfTopBar.TextColor3 = Color3.new(0, 1, 0.498039)
- HeaderOfTopBar.TextScaled = true
- HeaderOfTopBar.TextSize = 14
- HeaderOfTopBar.TextWrapped = true
- HeaderOfTopBar.TextXAlignment = Enum.TextXAlignment.Left
- InfoButton.Name = "InfoButton"
- InfoButton.Parent = TopBar
- InfoButton.BackgroundColor3 = Color3.new(1, 1, 1)
- InfoButton.Position = UDim2.new(0, 373, 0, 0)
- InfoButton.Size = UDim2.new(0, 67, 0, 28)
- InfoButton.Style = Enum.ButtonStyle.RobloxRoundDropdownButton
- InfoButton.Font = Enum.Font.SourceSans
- InfoButton.FontSize = Enum.FontSize.Size18
- InfoButton.Text = "Info"
- InfoButton.TextColor3 = Color3.new(0.0117647, 0.207843, 0)
- InfoButton.TextSize = 16
- Content.Name = "Content"
- Content.Parent = Window
- Content.BackgroundColor3 = Color3.new(0, 0, 0)
- Content.BackgroundTransparency = 0.5
- Content.Position = UDim2.new(0, 0, 0, 29)
- Content.Size = UDim2.new(0, 471, 0, 293)
- ChangeID.Name = "ChangeID"
- ChangeID.Parent = Content
- ChangeID.BackgroundColor3 = Color3.new(1, 1, 1)
- ChangeID.Size = UDim2.new(0, 236, 0, 50)
- ChangeID.Style = Enum.ButtonStyle.RobloxRoundDropdownButton
- ChangeID.FontSize = Enum.FontSize.Size14
- ChangeID.Text = "Change Sound Id"
- ChangeID.TextColor3 = Color3.new(0, 0, 0)
- ChangeID.TextScaled = true
- ChangeID.TextSize = 14
- ChangeID.TextWrapped = true
- ChangeShape.Name = "ChangeShape"
- ChangeShape.Parent = Content
- ChangeShape.BackgroundColor3 = Color3.new(1, 1, 1)
- ChangeShape.Position = UDim2.new(0, 0, 0, 55)
- ChangeShape.Size = UDim2.new(0, 236, 0, 50)
- ChangeShape.Style = Enum.ButtonStyle.RobloxRoundDropdownButton
- ChangeShape.FontSize = Enum.FontSize.Size14
- ChangeShape.Text = "Change Shape"
- ChangeShape.TextColor3 = Color3.new(0, 0, 0)
- ChangeShape.TextScaled = true
- ChangeShape.TextSize = 14
- ChangeShape.TextWrapped = true
- RunDec.Name = "RunDec"
- RunDec.Parent = Content
- RunDec.BackgroundColor3 = Color3.new(1, 1, 1)
- RunDec.Position = UDim2.new(0, 0, 0, 243)
- RunDec.Size = UDim2.new(0, 236, 0, 50)
- RunDec.Style = Enum.ButtonStyle.RobloxRoundDropdownButton
- RunDec.Font = Enum.Font.SciFi
- RunDec.FontSize = Enum.FontSize.Size14
- RunDec.Text = "Run Decoration"
- RunDec.TextColor3 = Color3.new(0.333333, 0.666667, 1)
- RunDec.TextScaled = true
- RunDec.TextSize = 14
- RunDec.TextWrapped = true
- ID.Name = "ID"
- ID.Parent = Content
- ID.BackgroundColor3 = Color3.new(1, 1, 1)
- ID.BackgroundTransparency = 1
- ID.Position = UDim2.new(0, 271, 0, 0)
- ID.Size = UDim2.new(0, 200, 0, 50)
- ID.ZIndex = 2
- ID.Font = Enum.Font.Bodoni
- ID.FontSize = Enum.FontSize.Size14
- ID.Text = "Sound ID"
- ID.TextScaled = true
- ID.TextSize = 14
- ID.TextWrapped = true
- IDec.Name = "IDec"
- IDec.Parent = Content
- IDec.BackgroundColor3 = Color3.new(1, 1, 1)
- IDec.Position = UDim2.new(0, 271, 0, 0)
- IDec.Size = UDim2.new(0, 200, 0, 50)
- IDec.Style = Enum.ButtonStyle.RobloxRoundButton
- IDec.Font = Enum.Font.SourceSans
- IDec.FontSize = Enum.FontSize.Size14
- IDec.Text = ""
- IDec.TextSize = 14
- ShapeDec.Name = "ShapeDec"
- ShapeDec.Parent = Content
- ShapeDec.BackgroundColor3 = Color3.new(1, 1, 1)
- ShapeDec.Position = UDim2.new(0, 271, 0, 55)
- ShapeDec.Size = UDim2.new(0, 200, 0, 50)
- ShapeDec.Style = Enum.ButtonStyle.RobloxRoundButton
- ShapeDec.Font = Enum.Font.SourceSans
- ShapeDec.FontSize = Enum.FontSize.Size14
- ShapeDec.Text = ""
- ShapeDec.TextSize = 14
- Shape.Name = "Shape"
- Shape.Parent = Content
- Shape.BackgroundColor3 = Color3.new(1, 1, 1)
- Shape.BackgroundTransparency = 1
- Shape.Position = UDim2.new(0, 274, 0, 55)
- Shape.Size = UDim2.new(0, 196, 0, 50)
- Shape.ZIndex = 2
- Shape.Font = Enum.Font.Bodoni
- Shape.FontSize = Enum.FontSize.Size14
- Shape.Text = "Shape Name"
- Shape.TextScaled = true
- Shape.TextSize = 14
- Shape.TextWrapped = true
- Info.Name = "Info"
- Info.Parent = Window
- Info.BackgroundColor3 = Color3.new(0.333333, 0.333333, 0)
- Info.BorderSizePixel = 0
- Info.Position = UDim2.new(0, 0, 0, 28)
- Info.Size = UDim2.new(0, 471, 0, 294)
- Info.Visible = false
- Info.ZIndex = 3
- Info.BottomImage = "rbxassetid://162937863"
- Info.CanvasSize = UDim2.new(0, 0, 4, 0)
- Info.MidImage = "rbxassetid://162937890"
- Info.TopImage = "rbxassetid://162937878"
- InfoText.Name = "InfoText"
- InfoText.Parent = Info
- InfoText.BackgroundColor3 = Color3.new(1, 1, 1)
- InfoText.BackgroundTransparency = 1
- InfoText.Size = UDim2.new(0, 456, 0, 294)
- InfoText.ZIndex = 4
- InfoText.Font = Enum.Font.Cartoon
- InfoText.FontSize = Enum.FontSize.Size24
- InfoText.Text = "The currents functions are:\n \n1.Change Shape, shapes are Block and Ball with caps\n \n2.Change Audio ID\n \n3.Run Decoration\nWhat does the 3 functions do?\n \n1.Change the visualizer shape\n \n2.Change the audios's ID to the new one\n \n3.You will get a better experience with (Run Decoration)\n \n 1.FogEnd will change to 500\n \n 2.It would add BlurEffect and a clean sky\n \n 3.Brightness will be 0\n \n 4.Color will be changed to Black to see the Visualizer \n Color Better ;)"
- InfoText.TextColor3 = Color3.new(0, 0, 0)
- InfoText.TextSize = 20
- InfoText.TextXAlignment = Enum.TextXAlignment.Left
- InfoText.TextYAlignment = Enum.TextYAlignment.Top
- ----------------------------------------------------------------
- ----------------------------------------------------------------
- InfoButton.MouseButton1Click:Connect(function()
- if Info.Visible == false then
- Info.Visible = true
- else Info.Visible = false
- end
- end)
- X.MouseButton1Click:Connect(function()
- WindowH:Destroy()
- end)
- ChangeID.MouseButton1Click:Connect(function()
- _G.sound2.SoundId = "rbxassetid://"..ID.Text
- _G.sound2:Play()
- end)
- ChangeShape.MouseButton1Click:Connect(function()
- _G.ball.Shape = Shape.Text
- end)
- RunDec.MouseButton1Click:Connect(function()
- local ln = game:FindFirstChildOfClass("Lighting")
- local blur = Instance.new("ColorCorrectionEffect",game:FindFirstChildOfClass("Lighting"))
- blur.Contrast = 1
- blur.Brightness = 0.5
- local sky = Instance.new("Sky",game:FindFirstChildOfClass("Lighting"))
- sky.CelestialBodiesShown = false
- ln.Brightness = 0
- ln.Ambient = Color3.new(0,0,0)
- ln.OutdoorAmbient = Color3.new(0,0,0)
- ln.TimeOfDay = "00:00:00"
- ln.FogEnd = 50
- ln.FogColor = Color3.new(0,0,0)
- end)
- local id = "565649306"
- if head:FindFirstChild("MyAssIsSoCool") then
- head:FindFirstChild("MyAssIsSoCool"):Destroy()
- end
- local model = Instance.new("Model", Torso2)
- _G.ball = Instance.new("Part", model)
- local ball = _G.ball
- _G.sound2 = Instance.new("Sound", ball)
- local sound = _G.sound2
- _G.light = Instance.new("PointLight", ball)
- local light = _G.light
- local id2 = "rbxassetid://"..id
- sound.SoundId = id2
- ball.Anchored = true
- model.Name = "MyAssIsSoCool"
- ball.CanCollide = false
- sound:Play()
- sound.Volume = 10
- ball.Shape = "Block"
- ball.Material = "Neon"
- while wait() do
- local sp = sound.PlaybackLoudness/50
- ball.BrickColor = BrickColor.Random()
- ball.CFrame = head.CFrame*CFrame.new(0,6,0)
- ball.Size = Vector3.new(sp,sp,sp)
- light.Range = sp+15
- light.Brightness = sp+25
- light.Color = Color3.new(math.random(),math.random(),math.random())
- end
- end)
- local KeyboardWeld2 = Instance.new("Weld")
- KeyboardWeld2.Part0 = Torso2
- KeyboardWeld2.Part1 = Keyboard2
- KeyboardWeld2.C0 = CFrame.new(1, 0.4, -3) * CFrame.Angles(2, 0, 0)
- KeyboardWeld.Parent = Keyboard
- Keyboard.Parent = Torso
- KeyboardWeld2.Parent = Keyboard2
- Keyboard2.Parent = Torso2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement