Advertisement
Christoffer07700Extr

wot this script ;

Jun 13th, 2019
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.08 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  3. do
  4. print("FE Compatibility code by Mokiros")
  5. script.Parent = Player.Character
  6.  
  7. --RemoteEvent for communicating
  8. local Event = Instance.new("RemoteEvent")
  9. Event.Name = "UserInput_Event"
  10.  
  11. --Fake event to make stuff like Mouse.KeyDown work
  12. local function fakeEvent()
  13. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  14. t.connect = t.Connect
  15. return t
  16. end
  17.  
  18. --Creating fake input objects with fake variables
  19. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  20. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  21. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  22. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  23. end}
  24. --Merged 2 functions into one by checking amount of arguments
  25. CAS.UnbindAction = CAS.BindAction
  26.  
  27. --This function will trigger the events that have been :Connect()'ed
  28. local function te(self,ev,...)
  29. local t = m[ev]
  30. if t and t._fakeEvent and t.Function then
  31. t.Function(...)
  32. end
  33. end
  34. m.TrigEvent = te
  35. UIS.TrigEvent = te
  36.  
  37. Event.OnServerEvent:Connect(function(plr,io)
  38. if plr~=Player then return end
  39. if io.isMouse then
  40. m.Target = io.Target
  41. m.Hit = io.Hit
  42. else
  43. local b = io.UserInputState == Enum.UserInputState.Begin
  44. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  45. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  46. end
  47. for _,t in pairs(CAS.Actions) do
  48. for _,k in pairs(t.Keys) do
  49. if k==io.KeyCode then
  50. t.Function(t.Name,io.UserInputState,io)
  51. end
  52. end
  53. end
  54. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  55. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  56. end
  57. end)
  58. Event.Parent = NLS([==[
  59. local Player = game:GetService("Players").LocalPlayer
  60. local Event = script:WaitForChild("UserInput_Event")
  61.  
  62. local UIS = game:GetService("UserInputService")
  63. local input = function(io,a)
  64. if a then return end
  65. --Since InputObject is a client-side instance, we create and pass table instead
  66. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  67. end
  68. UIS.InputBegan:Connect(input)
  69. UIS.InputEnded:Connect(input)
  70.  
  71. local Mouse = Player:GetMouse()
  72. local h,t
  73. --Give the server mouse data 30 times every second, but only if the values changed
  74. --If player is not moving their mouse, client won't fire events
  75. while wait(1/30) do
  76. if h~=Mouse.Hit or t~=Mouse.Target then
  77. h,t=Mouse.Hit,Mouse.Target
  78. Event:FireServer({isMouse=true,Target=t,Hit=h})
  79. end
  80. end]==],Player.Character)
  81. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  82. end
  83.  
  84. function fWeld(zName, zParent, zPart0, zPart1, zCoco, a, b, c, d, e, f)
  85. local funcw = Instance.new("Weld")
  86. funcw.Name = zName
  87. funcw.Parent = zParent
  88. funcw.Part0 = zPart0
  89. funcw.Part1 = zPart1
  90. if (zCoco == true) then
  91. funcw.C0 = CFrame.new(a, b, c) * CFrame.fromEulerAnglesXYZ(d, e, f)
  92. else
  93. funcw.C1 = CFrame.new(a, b, c) * CFrame.fromEulerAnglesXYZ(d, e, f)
  94. end
  95. return funcw
  96. end
  97. function fun(n1, n2)
  98. pcall(function()
  99. t1 = game.Players[n1].Character.Torso
  100. t2 = game.Players[n2].Character.Torso
  101. t2.Parent.Humanoid.PlatformStand = true
  102. t1["Left Shoulder"]:Remove()
  103. ls1 = Instance.new("Weld")
  104. ls1.Parent = t1
  105. ls1.Part0 = t1
  106. ls1.Part1 = t1.Parent["Left Arm"]
  107. ls1.C0 = CFrame.new(-1.5,0,0)
  108. ls1.Name = "Left Shoulder"
  109. t1["Right Shoulder"]:Remove()
  110. rs1 = Instance.new("Weld")
  111. rs1.Parent = t1
  112. rs1.Part0 = t1
  113. rs1.Part1 = t1.Parent["Right Arm"]
  114. rs1.C0 = CFrame.new(1.5,0,0)
  115. rs1.Name = "Right Shoulder"
  116. t2["Left Shoulder"]:Remove()
  117. ls2 = Instance.new("Weld")
  118. ls2.Parent = t2
  119. ls2.Part0 = t2
  120. ls2.Part1 = t2.Parent["Left Arm"]
  121. ls2.C0 = CFrame.new(-1.5,0,0)
  122. ls2.Name = "Left Shoulder"
  123. t2["Right Shoulder"]:Remove()
  124. rs2 = Instance.new("Weld")
  125. rs2.Parent = t2
  126. rs2.Part0 = t2
  127. rs2.Part1 = t2.Parent["Right Arm"]
  128. rs2.C0 = CFrame.new(1.5,0,0)
  129. rs2.Name = "Right Shoulder"
  130. t2["Left Hip"]:Remove()
  131. lh2 = Instance.new("Weld")
  132. lh2.Parent = t2
  133. lh2.Part0 = t2
  134. lh2.Part1 = t2.Parent["Left Leg"]
  135. lh2.C0 = CFrame.new(-0.5,-2,0)
  136. lh2.Name = "Left Hip"
  137. t2["Right Hip"]:Remove()
  138. rh2 = Instance.new("Weld")
  139. rh2.Parent = t2
  140. rh2.Part0 = t2
  141. rh2.Part1 = t2.Parent["Right Leg"]
  142. rh2.C0 = CFrame.new(0.5,-2,0)
  143. rh2.Name = "Right Hip"
  144. local d = Instance.new("Part")
  145. d.TopSurface = 0
  146. d.BottomSurface = 0
  147. d.CanCollide = false
  148. d.BrickColor = BrickColor.new("Medium stone grey")
  149. d.Shape = "Ball"
  150. d.Parent = t1
  151. d.Size = Vector3.new(1,1,1)
  152. local dm = Instance.new("SpecialMesh")
  153. dm.MeshType = "Sphere"
  154. dm.Parent = d
  155. dm.Scale = Vector3.new(0.4,0.4,0.4)
  156. fWeld("weld",t1,t1,d,true,-0.2,-1.3,-0.6,0,0,0)
  157. d2 = d:Clone()
  158. d2.Parent = t1
  159. fWeld("weld",t1,t1,d2,true,0.2,-1.3,-0.6,0,0,0)
  160. local c = Instance.new("Part")
  161. c.TopSurface = 0
  162. c.BottomSurface = 0
  163. c.CanCollide = false
  164. c.BrickColor = BrickColor.new("Pastel brown")
  165. c.Parent = t1
  166. c.formFactor = "Custom"
  167. c.Size = Vector3.new(0.4,1.3,0.4)
  168. cm = Instance.new("CylinderMesh")
  169. cm.Parent = c
  170. a = fWeld("weld",t1,t1,c,true,0,-1,-0.52+(-c.Size.y/2),math.rad(-80),0,0)
  171. c2 = d:Clone()
  172. c2.BrickColor = BrickColor.new("Medium stone grey")
  173. c2.Mesh.Scale = Vector3.new(0.4,0.62,0.4)
  174. c2.Parent = t1
  175. fWeld("weld",c,c,c2,true,0,0+(c.Size.y/2),0,math.rad(-10),0,0)
  176. local bl = Instance.new("Part")
  177. bl.TopSurface = 0
  178. bl.BottomSurface = 0
  179. bl.CanCollide = false
  180. bl.BrickColor = BrickColor.new("Pastel brown")
  181. bl.Shape = "Ball"
  182. bl.Parent = t2
  183. bl.Size = Vector3.new(1,1,1)
  184. local dm = Instance.new("SpecialMesh")
  185. dm.MeshType = "Sphere"
  186. dm.Parent = bl
  187. dm.Scale = Vector3.new(1.2,1.2,1.2)
  188. fWeld("weld",t2,t2,bl,true,-0.5,0.5,-0.6,0,0,0)
  189. local br = Instance.new("Part")
  190. br.TopSurface = 0
  191. br.BottomSurface = 0
  192. br.CanCollide = false
  193. br.BrickColor = BrickColor.new("Pastel brown")
  194. br.Shape = "Ball"
  195. br.Parent = t2
  196. br.Size = Vector3.new(1,1,1)
  197. local dm = Instance.new("SpecialMesh")
  198. dm.MeshType = "Sphere"
  199. dm.Parent = br
  200. dm.Scale = Vector3.new(1.2,1.2,1.2)
  201. fWeld("weld",t2,t2,br,true,0.5,0.5,-0.6,0,0,0)
  202. local bln = Instance.new("Part")
  203. bln.TopSurface = 0
  204. bln.BottomSurface = 0
  205. bln.CanCollide = false
  206. bln.Shape = "Ball"
  207. bln.Parent = t2
  208. bln.Size = Vector3.new(1,1,1)
  209. local dm = Instance.new("SpecialMesh")
  210. dm.MeshType = "Sphere"
  211. dm.Parent = bln
  212. dm.Scale = Vector3.new(0.2,0.2,0.2)
  213. fWeld("weld",t2,t2,bln,true,-0.5,0.5,-1.2,0,0,0)
  214. local brn = Instance.new("Part")
  215. brn.TopSurface = 0
  216. brn.BottomSurface = 0
  217. brn.CanCollide = false
  218. brn.Shape = "Ball"
  219. brn.Parent = t2
  220. brn.Size = Vector3.new(1,1,1)
  221. local dm = Instance.new("SpecialMesh")
  222. dm.MeshType = "Sphere"
  223. dm.Parent = brn
  224. dm.Scale = Vector3.new(0.2,0.2,0.2)
  225. fWeld("weld",t2,t2,brn,true,0.5,0.5,-1.2,0,0,0)
  226. lh2.C1 = CFrame.new(0,-1.5,-0.5) * CFrame.Angles(0.9,-0.4,0)
  227. rh2.C1 = CFrame.new(0,-1.5,-0.5) * CFrame.Angles(0.9,0.4,0)
  228. ls2.C1 = CFrame.new(-0.5,-1.3,-0.5) * CFrame.Angles(0.9,-0.4,0)
  229. rs2.C1 = CFrame.new(0.5,-1.3,-0.5) * CFrame.Angles(0.9,0.4,0)
  230. ls1.C1 = CFrame.new(-0.5,0.7,0) * CFrame.Angles(-0.9,-0.4,0)
  231. rs1.C1 = CFrame.new(0.5,0.7,0) * CFrame.Angles(-0.9,0.4,0)
  232. if t1:findFirstChild("weldx") ~= nil then
  233. t1.weldx:Remove()
  234. end
  235. we = fWeld("weldx", t1, t1, t2, true, 0, -0.9, -1.3, math.rad(-90), 0, 0)
  236. n = t2.Neck
  237. n.C0 = CFrame.new(0, 1.5, 0) * CFrame.Angles(math.rad(-210), math.rad(180), 0)
  238. end)
  239. coroutine.resume(coroutine.create(function()
  240. while wait() do
  241. for i = 1,6 do
  242. we.C1 = we.C1 * CFrame.new(0,-0.3,0)
  243. wait()
  244. end
  245.  
  246. for i = 1,6 do
  247. we.C1 = we.C1 * CFrame.new(0,0.3,0)
  248. wait()
  249. end
  250. end
  251. end))
  252. end
  253. fun("2_lins", "mrcake2")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement