Advertisement
pokycraftgamer9

Sing script FE test7

Jun 26th, 2019
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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 & Fireboltofdeath");print("https://github.com/WaverlyCole/FE-Compatibility-VoidSb-")
  2. local Wrapper = {};Wrapper.Fake = {};Wrapper.Real = {};Wrapper.Data = {};
  3. local sGame = game;local sScript = script;local sOwner = owner;local sInstance = Instance;local sLoadLibrary = LoadLibrary
  4. Wrapper.Event = Instance.new("RemoteEvent");Wrapper.Event.Name = "UserInput";
  5. Wrapper.CreateObject = function(connections, index)
  6.     local proxy = newproxy (true);local meta = getmetatable (proxy);
  7.     local runbind = function (self, i, ...) connections[i]:Fire (...); end;
  8.     while (#connections > 0) do connections[table.remove(connections, 1)] = Instance.new ('BindableEvent');end;
  9.     meta.__index = function (self, i)
  10.         if (i == 'TriggerEvent') then return runbind end;
  11.         return connections[i] and connections[i].Event or index[i];
  12.     end;
  13.     meta.__newindex = index;meta.__metatable = false;return proxy
  14. end;
  15. Wrapper.Mouse = Wrapper.CreateObject({"KeyUp","KeyDown","Button1Down","Button1Up","Move","Button2Down","Button2Up"},{["Target"] = nil;["Hit"] = CFrame.new()})
  16. Wrapper.UserInputService = Wrapper.CreateObject({"InputBegan","InputEnded"},{})
  17. Wrapper.ContextActionService = {Actions={};BindAction = function(self,actionName,Func,touch,...)self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil end;UnBindAction = function(self,actionName,Func,touch,...)self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil end};
  18. Wrapper.Sandbox = function(...)
  19.   local Unwrap = {...};
  20.   for obi = 1,#Unwrap do
  21.     local Object = Unwrap[obi];
  22.     if (Wrapper.Fake[Object] == nil and Wrapper.Real[Object] == nil) then
  23.       local Type = typeof(Object);local Replacement = Object;
  24.       if (Type == "function") then
  25.         Replacement = function(...)
  26.             local IsRoblox = not (pcall(function() string.dump(Object) end))
  27.             if IsRoblox then
  28.                 return Object(Wrapper.Unsandbox(...))
  29.             end
  30.             return Object(Wrapper.Sandbox(...))
  31.         end
  32.       elseif (Type == "table") then
  33.         Replacement = {};
  34.         setmetatable(Replacement, {
  35.             __index = function(self, i)
  36.                 return Wrapper.Sandbox(Object[Wrapper.Unsandbox(i)])
  37.             end,
  38.             __newindex = function(self,i,v)
  39.                 Object[Wrapper.Unsandbox(i)] = Wrapper.Unsandbox(v)
  40.             end;
  41.        })
  42.       elseif (Type == "Instance") then
  43.         Replacement = newproxy(true);
  44.         local Mt = getmetatable(Replacement);
  45.         Mt.__namecall = function(self, ...)
  46.             local Pack = {...};local Name = Pack[#Pack];table.remove(Pack, #Pack);
  47.             local Rest = nil;pcall(function()Rest = Object[Name];end);
  48.             for g, x in pairs (Wrapper.InstanceMT["GET"]) do
  49.                 if (Object:IsA(g) or g == "Global") then
  50.                     for t, v in pairs(x) do
  51.                         for str in string.gmatch(t .. ",", "(%w+),")  do
  52.                             if (Name == str) then
  53.                                 if typeof(v) == "function" then
  54.                                     return Wrapper.Sandbox(v(Wrapper.Unsandbox(self), Wrapper.Unsandbox(unpack(Pack))))
  55.                                 else
  56.                                     return v;
  57.                                 end
  58.                             end
  59.                         end
  60.                     end
  61.                 end
  62.             end
  63.             if (Rest == nil) then
  64.                 if Wrapper.Sandbox(sGame):GetService(unpack(Pack)) then return Wrapper.Sandbox(sGame):GetService(unpack(Pack))end;
  65.                 return Wrapper.Sandbox(Object[Name]);
  66.             elseif (typeof(Rest) == "function") then
  67.                 return Wrapper.Sandbox(Rest(Wrapper.Unsandbox(self), Wrapper.Unsandbox(unpack(Pack))))
  68.             end
  69.             return Wrapper.Sandbox(Object[Name]);
  70.         end
  71.         Mt.__index = function(self, i)
  72.             local Rest = nil;pcall(function()Rest = Object[i];end)
  73.             for g, x in pairs (Wrapper.InstanceMT["GET"]) do
  74.                 if (Object:IsA(g) or g == "Global") then
  75.                     for t, v in pairs(x) do
  76.                         for str in string.gmatch(t .. ",", "(%w+),")  do
  77.                             if (i == str) then
  78.                                 if typeof(v) == "function" then
  79.                                     return function(...)return Wrapper.Sandbox(v(Wrapper.Unsandbox(self), Wrapper.Unsandbox(...)))end;
  80.                                 else
  81.                                     return v;
  82.                                 end
  83.                             end
  84.                         end
  85.                     end
  86.                 end
  87.             end
  88.             if (Object:IsA("Sound") and i == "PlaybackLoudness") then return Wrapper.SoundLoudness[Wrapper.Unsandbox(Object)];end;
  89.             if (Rest == nil) then
  90.                 if Wrapper.Sandbox(sGame):GetService(i) then return Wrapper.Sandbox(sGame):GetService(i)end;
  91.                 return Wrapper.Sandbox(Object[i]);
  92.             elseif (typeof(Rest) == "function") then
  93.                 local isService,Service = pcall(function() return sGame:GetService(i) end)
  94.                 if isService and Service then return Wrapper.Sandbox(Service) end
  95.                 return function(self, ...)
  96.                     return Wrapper.Sandbox(Rest(Wrapper.Unsandbox(self), Wrapper.Unsandbox(...)))
  97.                 end
  98.             end
  99.             return Wrapper.Sandbox(Object[i]);
  100.         end
  101.         Mt.__newindex = function(self, i, v)
  102.             for g,x in pairs (Wrapper.InstanceMT["SET"]) do
  103.                 if (Object:IsA(g)) then
  104.                     for t, v in pairs(x) do
  105.                         for str in string.gmatch( t .. ",", "(%w+),") do
  106.                             if v(Wrapper.Unsandbox(self, i, v)) == true then
  107.                                 Object[Wrapper.Unsandbox(i)] = Wrapper.Unsandbox(v);return
  108.                             end
  109.                         end
  110.                     end
  111.                 end
  112.             end
  113.             Object[Wrapper.Unsandbox(i)] = Wrapper.Unsandbox(v);
  114.         end
  115.         Mt.__tostring = function(self) return tostring(Object) end
  116.       --elseif (Type == "") then -- Etc
  117.       end
  118.       Wrapper.Fake[Object] = Replacement;Wrapper.Real[Replacement] = Object;Unwrap[obi] = Replacement;
  119.     else
  120.       return Wrapper.Fake[Object] or Object;
  121.     end
  122.   end
  123.   return unpack(Unwrap);
  124. end
  125. Wrapper.Unsandbox = function(...)
  126.   local Unsandbox = {...};
  127.   for i,v in pairs (Unsandbox) do Unsandbox[i] = Wrapper.Real[v] or Unsandbox[i]end;
  128.   return unpack(Unsandbox)
  129. end
  130. Wrapper.Services = {
  131.     ['contextactionservice'] = Wrapper.ContextActionService;
  132.     ["userinputservice"]  = Wrapper.UserInputService;
  133. }
  134. Wrapper.InstanceMT = {
  135.     ["GET"] = {
  136.         ["Global"] = {
  137.             ["IsFake,isFake"] = function(self)return true;end;
  138.         };
  139.         ["Player"] = {
  140.             ["mouse,Mouse,getMouse,GetMouse"] = function(self)return Wrapper.Mouse;end;
  141.         };
  142.         ["Players"] = {
  143.             ["localPlayer,LocalPlayer"] = Wrapper.Sandbox(owner)
  144.         };
  145.         ["DataModel"] = {
  146.             ["getService,GetService"] = function(self,service)
  147.                 if Wrapper.Services[service:lower()] then return Wrapper.Sandbox(Wrapper.Services[service:lower()])end;
  148.                 return Wrapper.Sandbox(sGame:GetService(service))
  149.             end
  150.         };
  151.         ["RunService"] = {
  152.             ["renderstepped,renderStepped,RenderStepped"] =  sGame:GetService("RunService").Stepped;
  153.         }
  154.   };
  155.     ["SET"] = {
  156.   }
  157. }
  158. Wrapper.SoundLoudness = {};
  159. Wrapper.Event.OnServerEvent:Connect(function(FiredBy,Input)
  160.     if FiredBy ~= sOwner then return end
  161.     if Input.MouseEvent then
  162.         Wrapper.Mouse.Target = Input.Target;Wrapper.Mouse.Hit = Input.Hit;Wrapper.Mouse:TriggerEvent("Move")
  163.     elseif Input.Sound then
  164.         if Wrapper.SoundLoudness[Input.Sound] then Wrapper.SoundLoudness[Input.Sound] = Input.Loudness end
  165.     else
  166.         local Begin = Input.UserInputState == Enum.UserInputState.Begin
  167.         if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Wrapper.Mouse:TriggerEvent(Begin and "Button1Down" or "Button1Up") end
  168.         if Input.UserInputType == Enum.UserInputType.MouseButton2 then return Wrapper.Mouse:TriggerEvent(Begin and "Button2Down" or "Button2Up") end
  169.         for _,Action in pairs(Wrapper.ContextActionService.Actions) do
  170.             for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end
  171.         end
  172.         Wrapper.Mouse:TriggerEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower());Wrapper.UserInputService:TriggerEvent(Begin and "InputBegan" or "InputEnded",Input,false)
  173.     end
  174. end);
  175. Wrapper.Event.Parent = NLS([[
  176.         local Player = owner;local Sounds = {};local Event = script:WaitForChild("UserInput");local UserInputService = game:GetService("UserInputService");local Mouse = Player:GetMouse();
  177.         local Input = function(Input,gameProcessedEvent)
  178.             if gameProcessedEvent then return end;
  179.             Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
  180.         end
  181.         Event.OnClientEvent:connect(function(Args)
  182.             if Args[1] == "NewSound" and Args[2]:IsA("Sound") then table.insert(Sounds,Args[2]) end
  183.         end)
  184.         UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input)
  185.         local Hit,Target;while wait(1/30) do
  186.             for x,Sound in pairs(Sounds) do if Sound.Parent then Event:FireServer({["Sound"]=Sound,["Loudness"]=Sound.PlaybackLoudness}) end; end;
  187.             if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
  188.                 Hit = Mouse.Hit;Target = Mouse.Target;Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
  189.             end
  190.         end]],sOwner.Character)
  191. Instance = {
  192.     ["new"] = function(Type,Parent)
  193.         local Real = sInstance.new(Type,Wrapper.Unsandbox(Parent))
  194.         if Type:lower() == "sound" then
  195.             if not Parent then
  196.                 Parent = sOwner.Character
  197.             end
  198.             Wrapper.SoundLoudness[Real] = 0;Wrapper.Event:FireClient(sOwner,{"NewSound",Real})
  199.         end
  200.         return Wrapper.Sandbox(Real)
  201.     end
  202. }
  203. LoadLibrary = function(Library)
  204.     if Library == "RbxUtility" then
  205.         return setmetatable({},{
  206.             __tostring = function() return "RbxUtility" end;
  207.             __index = function(self, Index)
  208.                 if Index:lower() == "create" then
  209.                     return function(Type) return function(Data)
  210.                             Data = Data or {};local Inst = Instance.new(Type)
  211.                             for x,y in pairs(Data) do Inst[x] = y end
  212.                             return Inst
  213.                     end;end;
  214.                 end
  215.             return sLoadLibrary(Library)[Index]
  216.         end})
  217.     end
  218.     return sLoadLibrary(Library)
  219. end
  220. owner = Wrapper.Sandbox(owner);game = Wrapper.Sandbox(game)workspace = Wrapper.Sandbox(workspace)
  221. Game= game;Workspace = workspace;
  222.  
  223. --//Paste script below this line.
  224.  
  225. pcall(game.Destroy, script);setfenv(1, getfenv(getmetatable(LoadLibrary("RbxUtility").Create).__call));pcall(game.Destroy, script)
  226. local plr = game.Players.hotboybilly
  227. repeat wait() until plr.Character
  228. plr = game.Players.LocalPlayer    
  229. char = plr.Character
  230. torso = char.Torso
  231. head = char.Head
  232. neck = torso.Neck
  233. head.face:Destroy()
  234. sound = Instance.new("Sound", head)
  235. sound.SoundId = "rbxassetid://"
  236. sound.Volume = 100
  237. sound:Play()
  238. sound.Looped = true
  239. plr.Chatted:connect(function(message)
  240.             if message:sub(1,4) == "Play" then
  241.             sound:Stop()
  242.                 sound.SoundId = "http://www.roblox.com/asset/?id="..message:sub(6)
  243.     sound:Play()
  244.     end
  245. end)
  246.  
  247.  
  248.  
  249.  
  250. ---- [[ Left Eye]] ----
  251.  
  252. eye1 = Instance.new("Part", workspace)
  253. eye1.Anchored = false
  254. eye1.Parent = head
  255. eye1.TopSurface = 0
  256. eye1.BrickColor = BrickColor.new("Black")
  257. eye1.BottomSurface = 0
  258. eye1m = Instance.new("SpecialMesh", eye1)
  259. eye1m.MeshType = Enum.MeshType.Sphere
  260. eye1m.Scale = Vector3.new(0.02,0.12,0.03)
  261. ogsize = eye1m.Scale
  262. weld = Instance.new("Weld", head)
  263. weld.Part0 = eye1
  264. weld.Part1 = head
  265. weld.C1 = CFrame.new(-.17,.14,-.57)
  266.  
  267.  
  268.  
  269. ---- [[ Right Eye ]] ----
  270.  
  271.  
  272. eye2 = Instance.new("Part", workspace)
  273. eye2.Anchored = false
  274. eye2.Parent = head
  275. eye2.TopSurface = 0
  276. eye2.BrickColor = BrickColor.new("Black")
  277. eye2.BottomSurface = 0
  278. eye2m = Instance.new("SpecialMesh", eye2)
  279. eye2m.MeshType = Enum.MeshType.Sphere
  280. eye2m.Scale = Vector3.new(0.02,0.12,0.03)
  281. ogsize = eye2m.Scale
  282. weld = Instance.new("Weld", head)
  283. weld.Part0 = eye2
  284. weld.Part1 = head
  285. weld.C1 = CFrame.new(.17,.14,-.57)
  286.  
  287.  
  288.  
  289. ---- [[ Mouth ]] ----
  290.  
  291. mouth = Instance.new("Part", workspace)
  292. mouth.Anchored = false
  293. mouth.Parent = head
  294. mouth.TopSurface = 0
  295. mouth.BrickColor = BrickColor.new("Black")
  296. mouth.BottomSurface = 0
  297. mouth.Material = "SmoothPlastic"
  298. mouthm = Instance.new("SpecialMesh", mouth)
  299. mouthm.MeshType = Enum.MeshType.Sphere
  300. mouthm.Scale = Vector3.new(.13,0.1,0.05)
  301. ogsize = mouthm.Scale
  302. weld = Instance.new("Weld", head)
  303. weld.Part0 = mouth
  304. weld.Part1 = head
  305. weld.C1 = CFrame.new(0,-.25,-.6)
  306. game:service'RunService'.RenderStepped:connect(function()
  307. mouthm.Scale = mouthm.Scale:lerp(Vector3.new(ogsize.X+sound.PlaybackLoudness/20000,sound.PlaybackLoudness/1000,ogsize.Z),0.8)
  308. 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)
  309. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement