Advertisement
ghostteen14

Untitled

Mar 7th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.22 KB | None | 0 0
  1. -- This script has convert to FE by who i don't know?
  2.  
  3. -----------------------------------------------------
  4. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  5. local Player,game,owner = owner,game
  6. local RealPlayer = Player
  7. do
  8. print("FE Compatibility code by Joseph Deramus")
  9. local rp = RealPlayer
  10. script.Parent = rp.Character
  11.  
  12. --RemoteEvent for communicating
  13. local Event = Instance.new("RemoteEvent")
  14. Event.Name = "UserInput_Event"
  15.  
  16. --Fake event to make stuff like Mouse.KeyDown work
  17. local function fakeEvent()
  18. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  19. t.connect = t.Connect
  20. return t
  21. end
  22.  
  23. --Creating fake input objects with fake variables
  24. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  25. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  26. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  27. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  28. end}
  29. --Merged 2 functions into one by checking amount of arguments
  30. CAS.UnbindAction = CAS.BindAction
  31.  
  32. --This function will trigger the events that have been :Connect()'ed
  33. local function te(self,ev,...)
  34. local t = m[ev]
  35. if t and t._fakeEvent then
  36. for _,f in pairs(t.Functions) do
  37. f(...)
  38. end
  39. end
  40. end
  41. m.TrigEvent = te
  42. UIS.TrigEvent = te
  43.  
  44. Event.OnServerEvent:Connect(function(plr,io)
  45. if plr~=rp then return end
  46. m.Target = io.Target
  47. m.Hit = io.Hit
  48. if not io.isMouse then
  49. local b = io.UserInputState == Enum.UserInputState.Begin
  50. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  51. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  52. end
  53. for _,t in pairs(CAS.Actions) do
  54. for _,k in pairs(t.Keys) do
  55. if k==io.KeyCode then
  56. t.Function(t.Name,io.UserInputState,io)
  57. end
  58. end
  59. end
  60. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  61. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  62. end
  63. end)
  64. Event.Parent = NLS([==[
  65. local Player = game:GetService("Players").LocalPlayer
  66. local Event = script:WaitForChild("UserInput_Event")
  67.  
  68. local Mouse = Player:GetMouse()
  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,Hit=Mouse.Hit,Target=Mouse.Target})
  74. end
  75. UIS.InputBegan:Connect(input)
  76. UIS.InputEnded:Connect(input)
  77.  
  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.  
  88. ----Sandboxed game object that allows the usage of client-side methods and services
  89. --Real game object
  90. local _rg = game
  91.  
  92. --Metatable for fake service
  93. local fsmt = {
  94. __index = function(self,k)
  95. local s = rawget(self,"_RealService")
  96. if s then return s[k] end
  97. end,
  98. __newindex = function(self,k,v)
  99. local s = rawget(self,"_RealService")
  100. if s then s[k]=v end
  101. end,
  102. __call = function(self,...)
  103. local s = rawget(self,"_RealService")
  104. if s then return s(...) end
  105. end
  106. }
  107. local function FakeService(t,RealService)
  108. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  109. return setmetatable(t,fsmt)
  110. end
  111.  
  112. --Fake game object
  113. local g = {
  114. GetService = function(self,s)
  115. return self[s]
  116. end,
  117. Players = FakeService({
  118. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  119. },"Players"),
  120. UserInputService = FakeService(UIS,"UserInputService"),
  121. ContextActionService = FakeService(CAS,"ContextActionService"),
  122. }
  123. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  124. g.service = g.GetService
  125.  
  126. g.RunService = FakeService({
  127. RenderStepped = _rg:GetService("RunService").Heartbeat,
  128. BindToRenderStep = function(self,name,_,fun)
  129.  
  130. end,
  131. UnbindFromRenderStep = function(self,name)
  132. self._btrs[name]:Disconnect()
  133. end,
  134. },"RunService")
  135.  
  136. setmetatable(g,{
  137. __index=function(self,s)
  138. return _rg:GetService(s) or typeof(_rg[s])=="function"
  139. and function(_,...)return _rg[s](_rg,...)end or _rg[s]
  140. end,
  141. __newindex = fsmt.__newindex,
  142. __call = fsmt.__call
  143. })
  144. --Changing owner to fake player object to support owner:GetMouse()
  145. game,owner = g,g.Players.LocalPlayer
  146. end
  147. function fWeld(zName, zParent, zPart0, zPart1, zCoco, a, b, c, d, e, f)
  148. local funcw = Instance.new("Weld")
  149. funcw.Name = zName
  150. funcw.Parent = zParent
  151. funcw.Part0 = zPart0
  152. funcw.Part1 = zPart1
  153. if (zCoco == true) then
  154. funcw.C0 = CFrame.new(a, b, c) * CFrame.fromEulerAnglesXYZ(d, e, f)
  155. else
  156. funcw.C1 = CFrame.new(a, b, c) * CFrame.fromEulerAnglesXYZ(d, e, f)
  157. end
  158. return funcw
  159. end
  160. function fun(n1, n2)
  161. pcall(function()
  162. t1 = game.Players[n1].Character.Torso
  163. t2 = game.Players[n2].Character.Torso
  164. t2.Parent.Humanoid.PlatformStand = true
  165. t1["Left Shoulder"]:Remove()
  166. ls1 = Instance.new("Weld")
  167. ls1.Parent = t1
  168. ls1.Part0 = t1
  169. ls1.Part1 = t1.Parent["Left Arm"]
  170. ls1.C0 = CFrame.new(-1.5,0,0)
  171. ls1.Name = "Left Shoulder"
  172. t1["Right Shoulder"]:Remove()
  173. rs1 = Instance.new("Weld")
  174. rs1.Parent = t1
  175. rs1.Part0 = t1
  176. rs1.Part1 = t1.Parent["Right Arm"]
  177. rs1.C0 = CFrame.new(1.5,0,0)
  178. rs1.Name = "Right Shoulder"
  179. t2["Left Shoulder"]:Remove()
  180. ls2 = Instance.new("Weld")
  181. ls2.Parent = t2
  182. ls2.Part0 = t2
  183. ls2.Part1 = t2.Parent["Left Arm"]
  184. ls2.C0 = CFrame.new(-1.5,0,0)
  185. ls2.Name = "Left Shoulder"
  186. t2["Right Shoulder"]:Remove()
  187. rs2 = Instance.new("Weld")
  188. rs2.Parent = t2
  189. rs2.Part0 = t2
  190. rs2.Part1 = t2.Parent["Right Arm"]
  191. rs2.C0 = CFrame.new(1.5,0,0)
  192. rs2.Name = "Right Shoulder"
  193. t2["Left Hip"]:Remove()
  194. lh2 = Instance.new("Weld")
  195. lh2.Parent = t2
  196. lh2.Part0 = t2
  197. lh2.Part1 = t2.Parent["Left Leg"]
  198. lh2.C0 = CFrame.new(-0.5,-2,0)
  199. lh2.Name = "Left Hip"
  200. t2["Right Hip"]:Remove()
  201. rh2 = Instance.new("Weld")
  202. rh2.Parent = t2
  203. rh2.Part0 = t2
  204. rh2.Part1 = t2.Parent["Right Leg"]
  205. rh2.C0 = CFrame.new(0.5,-2,0)
  206. rh2.Name = "Right Hip"
  207. local d = Instance.new("Part")
  208. d.TopSurface = 0
  209. d.BottomSurface = 0
  210. d.CanCollide = false
  211. d.BrickColor = BrickColor.new("Medium stone grey")
  212. d.Shape = "Ball"
  213. d.Parent = t1
  214. d.Size = Vector3.new(1,1,1)
  215. local dm = Instance.new("SpecialMesh")
  216. dm.MeshType = "Sphere"
  217. dm.Parent = d
  218. dm.Scale = Vector3.new(0.4,0.4,0.4)
  219. fWeld("weld",t1,t1,d,true,-0.2,-1.3,-0.6,0,0,0)
  220. d2 = d:Clone()
  221. d2.Parent = t1
  222. fWeld("weld",t1,t1,d2,true,0.2,-1.3,-0.6,0,0,0)
  223. local c = Instance.new("Part")
  224. c.TopSurface = 0
  225. c.BottomSurface = 0
  226. c.CanCollide = false
  227. c.BrickColor = BrickColor.new("Pastel brown")
  228. c.Parent = t1
  229. c.formFactor = "Custom"
  230. c.Size = Vector3.new(0.4,1.3,0.4)
  231. cm = Instance.new("CylinderMesh")
  232. cm.Parent = c
  233. a = fWeld("weld",t1,t1,c,true,0,-1,-0.52+(-c.Size.y/2),math.rad(-80),0,0)
  234. c2 = d:Clone()
  235. c2.BrickColor = BrickColor.new("Medium stone grey")
  236. c2.Mesh.Scale = Vector3.new(0.4,0.62,0.4)
  237. c2.Parent = t1
  238. fWeld("weld",c,c,c2,true,0,0+(c.Size.y/2),0,math.rad(-10),0,0)
  239. local bl = Instance.new("Part")
  240. bl.TopSurface = 0
  241. bl.BottomSurface = 0
  242. bl.CanCollide = false
  243. bl.BrickColor = BrickColor.new("Pastel brown")
  244. bl.Shape = "Ball"
  245. bl.Parent = t2
  246. bl.Size = Vector3.new(1,1,1)
  247. local dm = Instance.new("SpecialMesh")
  248. dm.MeshType = "Sphere"
  249. dm.Parent = bl
  250. dm.Scale = Vector3.new(1.2,1.2,1.2)
  251. fWeld("weld",t2,t2,bl,true,-0.5,0.5,-0.6,0,0,0)
  252. local br = Instance.new("Part")
  253. br.TopSurface = 0
  254. br.BottomSurface = 0
  255. br.CanCollide = false
  256. br.BrickColor = BrickColor.new("Pastel brown")
  257. br.Shape = "Ball"
  258. br.Parent = t2
  259. br.Size = Vector3.new(1,1,1)
  260. local dm = Instance.new("SpecialMesh")
  261. dm.MeshType = "Sphere"
  262. dm.Parent = br
  263. dm.Scale = Vector3.new(1.2,1.2,1.2)
  264. fWeld("weld",t2,t2,br,true,0.5,0.5,-0.6,0,0,0)
  265. local bln = Instance.new("Part")
  266. bln.TopSurface = 0
  267. bln.BottomSurface = 0
  268. bln.CanCollide = false
  269. bln.Shape = "Ball"
  270. bln.Parent = t2
  271. bln.Size = Vector3.new(1,1,1)
  272. local dm = Instance.new("SpecialMesh")
  273. dm.MeshType = "Sphere"
  274. dm.Parent = bln
  275. dm.Scale = Vector3.new(0.2,0.2,0.2)
  276. fWeld("weld",t2,t2,bln,true,-0.5,0.5,-1.2,0,0,0)
  277. local brn = Instance.new("Part")
  278. brn.TopSurface = 0
  279. brn.BottomSurface = 0
  280. brn.CanCollide = false
  281. brn.Shape = "Ball"
  282. brn.Parent = t2
  283. brn.Size = Vector3.new(1,1,1)
  284. local dm = Instance.new("SpecialMesh")
  285. dm.MeshType = "Sphere"
  286. dm.Parent = brn
  287. dm.Scale = Vector3.new(0.2,0.2,0.2)
  288. fWeld("weld",t2,t2,brn,true,0.5,0.5,-1.2,0,0,0)
  289. lh2.C1 = CFrame.new(0,-1.5,-0.5) * CFrame.Angles(0.9,-0.4,0)
  290. rh2.C1 = CFrame.new(0,-1.5,-0.5) * CFrame.Angles(0.9,0.4,0)
  291. ls2.C1 = CFrame.new(-0.5,-1.3,-0.5) * CFrame.Angles(0.9,-0.4,0)
  292. rs2.C1 = CFrame.new(0.5,-1.3,-0.5) * CFrame.Angles(0.9,0.4,0)
  293. ls1.C1 = CFrame.new(-0.5,0.7,0) * CFrame.Angles(-0.9,-0.4,0)
  294. rs1.C1 = CFrame.new(0.5,0.7,0) * CFrame.Angles(-0.9,0.4,0)
  295. if t1:findFirstChild("weldx") ~= nil then
  296. t1.weldx:Remove()
  297. end
  298. we = fWeld("weldx", t1, t1, t2, true, 0, -0.9, -1.3, math.rad(-90), 0, 0)
  299. n = t2.Neck
  300. n.C0 = CFrame.new(0, 1.5, 0) * CFrame.Angles(math.rad(-210), math.rad(180), 0)
  301. end)
  302. coroutine.resume(coroutine.create(function()
  303. while wait() do
  304. for i = 1,6 do
  305. we.C1 = we.C1 * CFrame.new(0,-0.3,0)
  306. wait()
  307. end
  308.  
  309. for i = 1,6 do
  310. we.C1 = we.C1 * CFrame.new(0,0.3,0)
  311. wait()
  312. end
  313. end
  314. end))
  315. end
  316. fun("josephderamus2985", "mikeys39")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement