Advertisement
wamandnj

Untitled

Feb 24th, 2019
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- Instructions:
  2. --[[
  3. Any local variables with :
  4.  = LocalPlayer:
  5.     Must be replaced with "owner". So if your local variable is game.Players.LocalPlayer , replace it with owner
  6.  = :GetMouse():
  7.     Remove the variable entirely.
  8.  
  9. then paste this over the desired script
  10. --]]
  11.  
  12. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  13. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  14. do
  15.     print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  16.     script.Parent = Player.Character
  17.  
  18.     --RemoteEvent for communicating
  19.     local Event = Instance.new("RemoteEvent")
  20.     Event.Name = "UserInput_Event"
  21.     --Fake event to make stuff like Mouse.KeyDown work
  22.     local function fakeEvent()
  23.         local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  24.         t.connect = t.Connect
  25.         return t
  26.     end
  27.     --Creating fake input objects with fake variables
  28.     local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  29.     local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  30.     local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  31.         CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  32.     end}
  33.     --Merged 2 functions into one by checking amount of arguments
  34.     CAS.UnbindAction = CAS.BindAction
  35.  
  36.     --This function will trigger the events that have been :Connect()'ed
  37.     local function te(self,ev,...)
  38.         local t = m[ev]
  39.         if t and t._fakeEvent and t.Function then
  40.             t.Function(...)
  41.         end
  42.     end
  43.     m.TrigEvent = te
  44.     UIS.TrigEvent = te
  45.     Event.OnServerEvent:Connect(function(plr,io)
  46.         if plr~=Player then return end
  47.         if io.isMouse then
  48.             m.Target = io.Target
  49.             m.Hit = io.Hit
  50.         else
  51.             local b = io.UserInputState == Enum.UserInputState.Begin
  52.             if io.UserInputType == Enum.UserInputType.MouseButton1 then
  53.                 return m:TrigEvent(b and "Button1Down" or "Button1Up")
  54.             end
  55.             for _,t in pairs(CAS.Actions) do
  56.                 for _,k in pairs(t.Keys) do
  57.                     if k==io.KeyCode then
  58.                         t.Function(t.Name,io.UserInputState,io)
  59.                     end
  60.                 end
  61.             end
  62.             m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  63.             UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  64.         end
  65.     end)
  66.     Event.Parent = NLS([==[
  67.     local Player = game:GetService("Players").LocalPlayer
  68.     local Event = script:WaitForChild("UserInput_Event")
  69.     local UIS = game:GetService("UserInputService")
  70.     local input = function(io,a)
  71.         if a then return end
  72.         --Since InputObject is a client-side instance, we create and pass table instead
  73.         Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  74.     end
  75.     UIS.InputBegan:Connect(input)
  76.     UIS.InputEnded:Connect(input)
  77.     local Mouse = Player:GetMouse()
  78.     local h,t
  79.     --Give the server mouse data 30 times every second, but only if the values changed
  80.     --If player is not moving their mouse, client won't fire events
  81.     while wait(1/30) do
  82.         if h~=Mouse.Hit or t~=Mouse.Target then
  83.             h,t=Mouse.Hit,Mouse.Target
  84.             Event:FireServer({isMouse=true,Target=t,Hit=h})
  85.         end
  86.     end]==],Player.Character)
  87.     Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  88. end
  89. -- End of FE converter
  90.  
  91. local char = owner.Character
  92.  
  93. function weldi(part1,part2)
  94.     local weld0 = Instance.new("WeldConstraint",part1)
  95.     weld0.Part0 = part1
  96.     weld0.Part1 = part2
  97. end
  98. if char then
  99.     wait(1)
  100.     local CCC = char:GetChildren()
  101.     TorsoIsTrue = "Part"
  102.     TorsoID = nil
  103.     for _, v in pairs(CCC) do
  104.         if v:IsA("CharacterMesh") then
  105.             if v.MeshId==48112070 then
  106.                 TorsoIsTrue = "FE"
  107.                 TorsoID = v.MeshId     
  108.             end
  109.         end
  110.     end
  111.     if TorsoIsTrue=="FE" then
  112.         local part_1 = Instance.new("Part",char)
  113.         part_1.CFrame = char.Torso.CFrame* CFrame.new(0,.75,0)
  114.         part_1.CanCollide = false
  115.         weldi(char.Torso,part_1)
  116.         part_1.BrickColor = BrickColor.new("Really Black")
  117.         part_1.Material = Enum.Material.Fabric
  118.         part_1.Size = Vector3.new(2.05,.55,1.05)
  119.        
  120.         local part_2 = Instance.new("WedgePart",char)
  121.         part_2.CFrame = char.Torso.CFrame* CFrame.new(-.771,-.25,0)
  122.         part_2.Orientation =char.Torso.Orientation + Vector3.new(90,0,90)
  123.         part_2.CanCollide = false
  124.         weldi(char.Torso,part_2)
  125.         part_2.BrickColor = BrickColor.new("Really Black")
  126.         part_2.Material = Enum.Material.Fabric
  127.         part_2.Size = Vector3.new(1, 0.55, 1.65)
  128.        
  129.         local part_3 = Instance.new("WedgePart",char)
  130.         part_3.CFrame = char.Torso.CFrame* CFrame.new(-.75,-.25,0)
  131.         part_3.Orientation =char.Torso.Orientation + Vector3.new(-90,0,90)
  132.         part_3.CanCollide = false
  133.         weldi(char.Torso,part_3)
  134.         part_3.BrickColor = BrickColor.new("Really Black")
  135.         part_3.Material = Enum.Material.Fabric
  136.         part_3.Size = Vector3.new(1, 0.55, 1.65)
  137.        
  138.         local part_4 = Instance.new("WedgePart",char)
  139.         part_4.CFrame = char.Torso.CFrame* CFrame.new(.75,-.25,0)
  140.         part_4.Orientation =char.Torso.Orientation + Vector3.new(-90,180,90)
  141.         part_4.CanCollide = false
  142.         weldi(char.Torso,part_4)
  143.         part_4.BrickColor = BrickColor.new("Really Black")
  144.         part_4.Material = Enum.Material.Fabric
  145.         part_4.Size = Vector3.new(1, 0.55, 1.65)
  146.        
  147.         local part_5 = Instance.new("WedgePart",char)
  148.         part_5.CFrame = char.Torso.CFrame* CFrame.new(.77,-.25,0)
  149.         part_5.Orientation =char.Torso.Orientation + Vector3.new(90,180,90)
  150.         part_5.CanCollide = false
  151.         weldi(char.Torso,part_5)
  152.         part_5.BrickColor = BrickColor.new("Really Black")
  153.         part_5.Material = Enum.Material.Fabric
  154.         part_5.Size = Vector3.new(1, 0.55, 1.65)
  155.        
  156.         local part_6 = Instance.new("Part",char)
  157.         part_6.CFrame = char.Torso.CFrame* CFrame.new(0,-.25,0)
  158.         part_6.CanCollide = false
  159.         weldi(char.Torso,part_6)
  160.         part_6.BrickColor = BrickColor.new("Really Black")
  161.         part_6.Material = Enum.Material.Fabric
  162.         part_6.Size = Vector3.new(1, 1.6, 1)
  163.     else
  164.         local part1 = Instance.new("Part",char)
  165.         part1.CFrame = char.Torso.CFrame
  166.         part1.CanCollide = false
  167.         weldi(char.Torso,part1)
  168.         part1.BrickColor = BrickColor.new("Really Black")
  169.         part1.Material = Enum.Material.Fabric
  170.         part1.Size = Vector3.new(char.Torso.Size.X*1.05,char.Torso.Size.Y*1.05,char.Torso.Size.Z*1.05)
  171.     end
  172.    
  173.     part2 = Instance.new("Part",char)
  174.     part2.CFrame = char["Left Arm"].CFrame *CFrame.new(0,.1,0)
  175.     part2.CanCollide = false
  176.     weldi(char["Left Arm"],part2)
  177.     part2.BrickColor = BrickColor.new("Really Black")
  178.     part2.Material = Enum.Material.Fabric
  179.     part2.Size = Vector3.new(char["Left Arm"].Size.X*1.05,char["Left Arm"].Size.Y*.95,char["Left Arm"].Size.Z*1.05)
  180.    
  181.     part3 = Instance.new("Part",char)
  182.     part3.CFrame = char["Right Arm"].CFrame*CFrame.new(0,.1,0)
  183.     part3.CanCollide = false
  184.     weldi(char["Right Arm"],part3)
  185.     part3.BrickColor = BrickColor.new("Really Black")
  186.     part3.Material = Enum.Material.Fabric
  187.     part3.Size = Vector3.new(char["Right Arm"].Size.X*1.05,char["Right Arm"].Size.Y*.95,char["Right Arm"].Size.Z*1.05)
  188. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement