Advertisement
idkwhatiam

singing me fe

Apr 29th, 2019
542
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 8.64 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient()then error("Please run as a server script. Use h/ instead of hl/.")end;print("FE Compatibility: by WaverlyCole");InternalData = {}
  2. do
  3.     script.Parent = owner.Character
  4.     local Event = Instance.new("RemoteEvent");Event.Name = "UserInput"
  5.     local function NewFakeEvent()
  6.         local Bind = Instance.new("BindableEvent")
  7.         local Fake;Fake = {Connections = {},
  8.         fakeEvent=true;
  9.         Connect=function(self,Func)
  10.             Bind.Event:connect(Func)
  11.             self.Connections[Bind] = true
  12.             return setmetatable({Connected = true},{
  13.             __index = function (self,Index)
  14.                 if Index:lower() == "disconnect" then
  15.                     return function() Fake.Connections[Bind] = false;self.Connected = false end
  16.                 end
  17.                 return Fake[Index]
  18.             end;
  19.             __tostring = function() return "Connection" end;
  20.         })
  21.         end}
  22.         Fake.connect = Fake.Connect;return Fake;
  23.     end
  24.     local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
  25.     local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
  26.     local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
  27.         self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
  28.     end};ContextActionService.UnBindAction = ContextActionService.BindAction
  29.     local function TriggerEvent(self,Event,...)
  30.         local Trigger = Mouse[Event]
  31.         if Trigger and Trigger.fakeEvent and Trigger.Connections then
  32.             for Connection,Active in pairs(Trigger.Connections) do if Active then Connection:Fire(...) end end
  33.         end
  34.     end
  35.     Mouse.TrigEvent = TriggerEvent;UserInputService.TrigEvent = TriggerEvent
  36.     Event.OnServerEvent:Connect(function(FiredBy,Input)
  37.         if FiredBy.Name ~= owner.Name then return end
  38.         if Input.MouseEvent then
  39.             Mouse.Target = Input.Target;Mouse.Hit = Input.Hit
  40.         else
  41.             local Begin = Input.UserInputState == Enum.UserInputState.Begin
  42.             if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") end
  43.             for _,Action in pairs(ContextActionService.Actions) do
  44.                 for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end
  45.             end
  46.             Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower())
  47.             UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false)
  48.         end
  49.     end)
  50.     InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService
  51.     Event.Parent = NLS([[
  52.         local Player = owner;local Event = script:WaitForChild("UserInput");local UserInputService = game:GetService("UserInputService");local Mouse = Player:GetMouse()
  53.         local Input = function(Input,gameProcessedEvent)
  54.             if gameProcessedEvent then return end
  55.             Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
  56.         end
  57.         UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input)
  58.         local Hit,Target
  59.         while wait(1/30) do
  60.             if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
  61.                 Hit,Target = Mouse.Hit,Mouse.Target;Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
  62.             end
  63.         end
  64.     ]],owner.Character)
  65. end
  66. RealGame = game;game = setmetatable({},{
  67.     __index = function (self,Index)
  68.         local Sandbox = function (Thing)
  69.             if Thing:IsA("Player") then
  70.                 local RealPlayer = Thing
  71.                 return setmetatable({},{
  72.                     __index = function (self,Index)
  73.                         local Type = type(RealPlayer[Index])
  74.                         if Type == "function" then
  75.                             if Index:lower() == "getmouse" or Index:lower() == "mouse" then
  76.                                 return function (self)return InternalData["Mouse"] end
  77.                             end
  78.                             return function (self,...)return RealPlayer[Index](RealPlayer,...) end
  79.                         end
  80.                         return RealPlayer[Index]
  81.                     end;
  82.                     __tostring = function(self) return RealPlayer.Name end
  83.                 })
  84.             end
  85.         end
  86.         if RealGame[Index] then
  87.             local Type = type(RealGame[Index])
  88.             if Type == "function" then
  89.                 if Index:lower() == "getservice" or Index:lower() == "service" then
  90.                     return function (self,Service)
  91.                         local FakeServices = {
  92.                             ["players"] = function()
  93.                                 return setmetatable({},{
  94.                                     __index = function (self2,Index2)
  95.                                         local RealService = RealGame:GetService(Service)
  96.                                         local Type2 = type(Index2)
  97.                                         if Type2 == "function" then
  98.                                             return function (self,...) return RealService[Index2](RealService,...)end
  99.                                         else
  100.                                             if Index2:lower() == "localplayer" then return Sandbox(owner) end
  101.                                             return RealService[Index2]
  102.                                         end
  103.                                     end;
  104.                                     __tostring = function(self) return RealGame:GetService(Service).Name end
  105.                                 })
  106.                             end;
  107.                             ["contextactionservice"] = function() return InternalData["ContextActionService"] end;
  108.                             ["userinputservice"] = function() return InternalData["UserInputService"] end;
  109.                             ["runservice"] = function()
  110.                                 return setmetatable({},{
  111.                                     __index = function(self2,Index2)
  112.                                         local RealService = RealGame:GetService(Service)
  113.                                         local Type2 = type(Index2)
  114.                                         if Type2 == "function" then
  115.                                             return function (self,...) return RealService[Index2](RealService,...) end
  116.                                         else
  117.                                             local RunServices = {
  118.                                                 ["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return RealGame:GetService("RunService").Stepped:Connect(Function) end end;
  119.                                                 ["renderstepped"] = function() return RealService["Stepped"] end
  120.                                             }
  121.                                             if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end
  122.                                             return RealService[Index2]
  123.                                         end
  124.                                     end
  125.                                 })
  126.                             end
  127.                         }
  128.                         if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end
  129.                         return RealGame:GetService(Service)
  130.                     end
  131.                 end
  132.                 return function (self,...) return RealGame[Index](RealGame,...) end
  133.             else
  134.                 if game:GetService(Index) then return game:GetService(Index) end
  135.                 return RealGame[Index]
  136.             end
  137.         end
  138.         return nil
  139.     end
  140. });Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("Complete! Running...")
  141.  
  142.  
  143. pcall(game.Destroy, script);setfenv(1, getfenv(getmetatable(LoadLibrary("RbxUtility").Create).__call));pcall(game.Destroy, script)
  144. local plr = game.Players.LocalPlayer
  145. repeat wait() until plr.Character
  146. plr = game.Players.LocalPlayer    
  147. char = plr.Character
  148. torso = char.Torso
  149. head = char.Head
  150. neck = torso.Neck
  151. head.face:Destroy()
  152. sound = Instance.new("Sound", head)
  153. sound.SoundId = "rbxassetid://"
  154. sound.Volume = 100
  155. sound:Play()
  156. sound.Looped = true
  157. plr.Chatted:connect(function(message)
  158.             if message:sub(1,4) == "Play" then
  159.             sound:Stop()
  160.                 sound.SoundId = "http://www.roblox.com/asset/?id="..message:sub(6)
  161.     sound:Play()
  162.     end
  163. end)
  164.  
  165.  
  166.  
  167.  
  168. ---- [[ Left Eye]] ----
  169.  
  170. eye1 = Instance.new("Part", workspace)
  171. eye1.Anchored = false
  172. eye1.Parent = head
  173. eye1.TopSurface = 0
  174. eye1.BrickColor = BrickColor.new("Black")
  175. eye1.BottomSurface = 0
  176. eye1m = Instance.new("SpecialMesh", eye1)
  177. eye1m.MeshType = Enum.MeshType.Sphere
  178. eye1m.Scale = Vector3.new(0.02,0.12,0.03)
  179. ogsize = eye1m.Scale
  180. weld = Instance.new("Weld", head)
  181. weld.Part0 = eye1
  182. weld.Part1 = head
  183. weld.C1 = CFrame.new(-.17,.14,-.57)
  184.  
  185.  
  186.  
  187. ---- [[ Right Eye ]] ----
  188.  
  189.  
  190. eye2 = Instance.new("Part", workspace)
  191. eye2.Anchored = false
  192. eye2.Parent = head
  193. eye2.TopSurface = 0
  194. eye2.BrickColor = BrickColor.new("Black")
  195. eye2.BottomSurface = 0
  196. eye2m = Instance.new("SpecialMesh", eye2)
  197. eye2m.MeshType = Enum.MeshType.Sphere
  198. eye2m.Scale = Vector3.new(0.02,0.12,0.03)
  199. ogsize = eye2m.Scale
  200. weld = Instance.new("Weld", head)
  201. weld.Part0 = eye2
  202. weld.Part1 = head
  203. weld.C1 = CFrame.new(.17,.14,-.57)
  204.  
  205.  
  206.  
  207. ---- [[ Mouth ]] ----
  208.  
  209. mouth = Instance.new("Part", workspace)
  210. mouth.Anchored = false
  211. mouth.Parent = head
  212. mouth.TopSurface = 0
  213. mouth.BrickColor = BrickColor.new("Black")
  214. mouth.BottomSurface = 0
  215. mouth.Material = "SmoothPlastic"
  216. mouthm = Instance.new("SpecialMesh", mouth)
  217. mouthm.MeshType = Enum.MeshType.Sphere
  218. mouthm.Scale = Vector3.new(.13,0.1,0.05)
  219. ogsize = mouthm.Scale
  220. weld = Instance.new("Weld", head)
  221. weld.Part0 = mouth
  222. weld.Part1 = head
  223. weld.C1 = CFrame.new(0,-.25,-.6)
  224. game:service'RunService'.RenderStepped:connect(function()
  225. mouthm.Scale = mouthm.Scale:lerp(Vector3.new(ogsize.X+sound.PlaybackLoudness/20000,sound.PlaybackLoudness/1000,ogsize.Z),0.8)
  226. neck.C0 = neck.C0:lerp(CFrame.new(0,1,0)*CFrame.Angles(math.rad(mouthm.Scale.Y*100)    +math.rad(-90),0,math.rad(180)),0.1)
  227. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement