Advertisement
lafur

Untitled

Aug 31st, 2018
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.80 KB | None | 0 0
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  4. local RealPlayer = Player
  5. do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end local Me = game.Players.LocalPlayer
  6. if script.Parent.className ~= "HopperBin" then
  7. local h = Instance.new("HopperBin", Me.Backpack)
  8. h.Name = "Swords"
  9. script.Parent = h
  10. end
  11. char = Me.Character
  12. Torso = char.Torso
  13. Rarm = char["Right Arm"]
  14. Larm = char["Left Arm"]
  15. local bin = script.Parent
  16. pcall(function() char[":P"]:remove() end)
  17. local Model = Instance.new("Model",char)
  18. Model.Name = ":P"
  19. local RAB = Instance.new("Part") -- Right Arm Brick
  20. RAB.formFactor = "Custom"
  21. RAB.Size = Vector3.new(0.2, 0.2, 0.2)
  22. RAB.Transparency = 1
  23. RAB.Parent = Model
  24. RAB:BreakJoints()
  25. local RABW = Instance.new("Weld",RAB) -- Right Arm Brick Weld
  26. RABW.Part0 = Torso
  27. RABW.Part1 = RAB
  28. RABW.C1 = CFrame.new(-1.5, -0.5, 0)
  29. local LAB = Instance.new("Part") -- Right Arm Brick
  30. LAB.formFactor = "Custom"
  31. LAB.Size = Vector3.new(0.2, 0.2, 0.2)
  32. LAB.Transparency = 1
  33. LAB.Parent = Model
  34. LAB:BreakJoints()
  35. local LABW = Instance.new("Weld",LAB) -- Left Arm Brick Weld
  36. LABW.Part0 = Torso
  37. LABW.Part1 = LAB
  38. LABW.C1 = CFrame.new(1.5, -0.5, 0)
  39. local RAW = Instance.new("Weld",RAB) -- Right Arm Weld
  40. RAW.Part0 = RAB
  41. RAW.Part1 = nil
  42. RAW.C1 = CFrame.new(0, 0.5, 0)
  43. local LAW = Instance.new("Weld",LAB) -- Left Arm Weld
  44. LAW.Part0 = LAB
  45. LAW.Part1 = nil
  46. LAW.C1 = CFrame.new(0, 0.5, 0)
  47. mo = Instance.new("Model")
  48. mo.Name = "Swords"
  49. mo.Parent = Me.Character
  50. function new(part, x, y, z, parent, color)
  51. local brick = part
  52. brick.formFactor = "Custom"
  53. brick:BreakJoints()
  54. brick.CanCollide = false
  55. brick.Size = Vector3.new(x, y, z)
  56. brick.Parent = parent
  57. brick.BrickColor = BrickColor.new(color)
  58. end
  59. function prop(part, parent, collide, tran, ref, x, y, z, color, anchor, form)
  60. part.Parent = parent
  61. part.formFactor = form
  62. part.CanCollide = collide
  63. part.Transparency = tran
  64. part.Reflectance = ref
  65. part.Size = Vector3.new(x,y,z)
  66. part.BrickColor = BrickColor.new(color)
  67. part.TopSurface = 0
  68. part.BottomSurface = 0
  69. part.Anchored = anchor
  70. part.Locked = true
  71. part:BreakJoints()
  72. end
  73. function mesh(mesh, parent, x, y, z, type)
  74. mesh.Parent = parent
  75. mesh.Scale = Vector3.new(x, y, z)
  76. mesh.MeshType = type
  77. end
  78. function mes(mesh, x, y, z, parent)
  79. local mes = mesh
  80. mes.Scale = Vector3.new(x, y, z)
  81. mes.Parent = parent
  82. end
  83. function wel(weld, x, y, z, parent, part, parta, xx, yy, zz)
  84. local wel = weld
  85. wel.Parent = parent
  86. wel.Part0 = part
  87. wel.Part1 = parta
  88. wel.C1 = CFrame.new(x, y, z) * CFrame.Angles(xx, yy, zz)
  89. end
  90. h2 = Instance.new("Part")
  91. hm2 = Instance.new("BlockMesh")
  92. hw2 = Instance.new("Weld")
  93. new(h2, 0.75, 0.2, 0.2, mo, "Brown")
  94. mes(hm2, 1.01, 1.01, 1.01, h2)
  95. wel(hw2, 0, -2.1, -0.51, h2, Torso, h2, 0, 0, -5.5)
  96. h4 = Instance.new("Part")
  97. hm4 = Instance.new("SpecialMesh")
  98. hw4 = Instance.new("Weld")
  99. new(h4, 0.35, 1, 0.2, mo, "Brown")
  100. mes(hm4, 1.01, 1.01, 1.01, h4)
  101. wel(hw4, 0, -0.5, 0, h4, h2, h4, 0, 0, 0)
  102. h1 = Instance.new("Part")
  103. hm1 = Instance.new("BlockMesh")
  104. hw1 = Instance.new("Weld")
  105. new(h1, 0.75, 0.2, 0.2, mo, "Brown")
  106. mes(hm1, 1.01, 1.01, 1.01, h2)
  107. wel(hw1, 0, -2.1, -0.5, h1, Torso, h1, 0, 0, 5.5)
  108. h4 = Instance.new("Part")
  109. hm4 = Instance.new("SpecialMesh")
  110. hw4 = Instance.new("Weld")
  111. new(h4, 0.35, 1, 0.2, mo, "Brown")
  112. mes(hm4, 1.01, 1.01, 1.01, h4)
  113. wel(hw4, 0, -0.5, 0, h4, h1, h4, 0, 0, 0)
  114. p = Instance.new("Part")
  115. m = Instance.new("BlockMesh")
  116. w = Instance.new("Weld")
  117. new(p, 0.75, 4, 0.2, mo, "Gray")
  118. mes(m, 1.01, 1.01, 1.01, p)
  119. wel(w, 0, 2.1, 0, p, h1, p, 0, 0, 0)
  120. p2 = Instance.new("Part")
  121. m2 = Instance.new("BlockMesh")
  122. w2 = Instance.new("Weld")
  123. new(p2, 0.75, 4, 0.2, mo, "Gray")
  124. mes(m2, 1.01, 1.01, 1.01, p2)
  125. wel(w2, 0, 2.1, 0, p2, h2, p2, 0, 0, 0)
  126. function fade(brick,mesh,scale,tran,speed)
  127. coroutine.resume(coroutine.create(function()
  128. for i=tran,1,speed do
  129. wait()
  130. brick.Transparency = i
  131. mesh.Scale = mesh.Scale - Vector3.new(scale,scale,scale)
  132. end
  133. brick:remove()
  134. end))
  135. end
  136. function bv(part)
  137. b = Instance.new("BodyVelocity")
  138. b.Parent = part
  139. b.velocity = Vector3.new(0, 25, 0)
  140. wait(1.5)
  141. b.velocity = Vector3.new(0, -75, 0)
  142. wait(0.285)
  143. b:remove()
  144. end
  145. function bvc(part)
  146. b = Instance.new("BodyVelocity")
  147. b.Parent = part
  148. b.velocity = part.CFrame.lookVector * 25
  149. wait(1.5)
  150. b:remove()
  151. end
  152. function spikes(part,color)
  153. local p = Instance.new("Part",Me.Character)
  154. prop(p,Me.Character,false,0.4,0,0.2,0.2,0.2,color,true,"Custom")
  155. p.CFrame = part.CFrame * CFrame.new(0,-2.5,-3.5)
  156. local mww = Instance.new("SpecialMesh")
  157. mesh(mww,p,6,5,6,"FileMesh")
  158. mww.MeshId = "http://www.roblox.com/asset/?id=20329976"
  159. fade(p,mww,0.55,p.Transparency,0.08)
  160. end
  161. function spikes2(part,color)
  162. local p = Instance.new("Part",Me.Character)
  163. prop(p,Me.Character,false,0.4,0,0.2,0.2,0.2,color,true,"Custom")
  164. p.CFrame = part.CFrame * CFrame.new(0,0,6) * CFrame.Angles(math.pi/2,0,0)
  165. local mww = Instance.new("SpecialMesh")
  166. mesh(mww,p,8,7,8,"FileMesh")
  167. mww.MeshId = "http://www.roblox.com/asset/?id=20329976"
  168. fade(p,mww,0.55,p.Transparency,0.06)
  169. end
  170. function onSelected(mouse)
  171. RAW.Part1 = Rarm
  172. LAW.Part1 = Larm
  173. for i = 0, 1, 0.1 do
  174. RAW.C0 = CFrame.Angles(math.rad(210*i), math.rad(-12*i), math.rad(12*i))
  175. LAW.C0 = CFrame.Angles(math.rad(210*i), math.rad(12*i), math.rad(-12*i))
  176. wait()
  177. end
  178. h1.Weld.Part0 = Larm
  179. h1.Weld.C1 = CFrame.new(0, 1, -1) * CFrame.Angles(-7.8, 0, 0)
  180. h2.Weld.Part0 = Rarm
  181. h2.Weld.C1 = CFrame.new(0, 1, -1) * CFrame.Angles(-7.8, 0, 0)
  182. for i = 0, 1, 0.1 do
  183. RAW.C0 = CFrame.Angles(math.rad(210-185*i), math.rad(-12+12*i), math.rad(12*i))
  184. LAW.C0 = CFrame.Angles(math.rad(210-185*i), math.rad(12-12*i), math.rad(-12*i))
  185. wait()
  186. end
  187. --[[ for i = 0, 1, 0.05 do
  188. RAW.C0 = CFrame.Angles(math.rad(90-110*i), 0, math.rad(35*i))
  189. wait()
  190. end
  191. for i = 0, 1, 0.15 do
  192. RAW.C0 = CFrame.Angles(math.rad(175-175*i), 0, math.rad(35-35*i))
  193. wait()
  194. end ]]--
  195. mouse.Button1Down:connect(function()
  196. for i = 0, 1, 0.15 do
  197. LAW.C0 = CFrame.Angles(math.rad(90-110*i), math.rad(-12*i), math.rad(-12*i))
  198. wait()
  199. end
  200. spikes(Torso, "Bright blue")
  201. local dist = 5
  202. for _, v in pairs(game.Players:GetChildren()) do
  203. if not v.Character then return end
  204. if (v.Character.Torso.Position - p.Position).magnitude < dist then
  205. if v.Name ~= Torso.Parent.Name then
  206. v.Character.Humanoid.Health = v.Character.Humanoid.Health - math.random(15, 35)
  207. end
  208. end
  209. end
  210. for i = 0, 1, 0.15 do
  211. LAW.C0 = CFrame.Angles(math.rad(-20+20*i), math.rad(-12*i), math.rad(-12*i))
  212. wait()
  213. end
  214. end)
  215. mouse.Button2Down:connect(function()
  216. for i = 0, 1, 0.15 do
  217. RAW.C0 = CFrame.Angles(math.rad(90-110*i), math.rad(12*i), math.rad(12*i))
  218. wait()
  219. end
  220. spikes(Torso, "Bright blue")
  221. local dist = 5
  222. for _, v in pairs(game.Players:GetChildren()) do
  223. if not v.Character then return end
  224. if (v.Character.Torso.Position - p.Position).magnitude < dist then
  225. if v.Name ~= Torso.Parent.Name then
  226. v.Character.Humanoid.Health = v.Character.Humanoid.Health - math.random(15, 35)
  227. end
  228. end
  229. end
  230. for i = 0, 1, 0.15 do
  231. RAW.C0 = CFrame.Angles(math.rad(-20+20*i), math.rad(12*i), math.rad(12*i))
  232. wait()
  233. end
  234. end)
  235. mouse.KeyDown:connect(function(key)
  236. if key == "q" then
  237. for i = 0, 1, 0.15 do
  238. RAW.C0 = CFrame.Angles(math.rad(150-110*i), math.rad(12*i), math.rad(12*i))
  239. LAW.C0 = CFrame.Angles(math.rad(150-110*i), math.rad(-12*i), math.rad(-12*i))
  240. wait()
  241. end
  242. spikes2(Torso, "Bright blue")
  243. bv(Torso)
  244. wait(0.75)
  245. spikes(Torso, "Bright blue")
  246. local dist = 5
  247. for _, v in pairs(game.Players:GetChildren()) do
  248. if not v.Character then return end
  249. if (v.Character.Torso.Position - p.Position).magnitude < dist then
  250. if v.Name ~= Torso.Parent.Name then
  251. v.Character.Humanoid.Health = v.Character.Humanoid.Health - math.random(25, 45)
  252. end
  253. end
  254. end
  255. for i = 0, 1, 0.15 do
  256. RAW.C0 = CFrame.Angles(math.rad(-20+20*i), math.rad(12*i), math.rad(12*i))
  257. LAW.C0 = CFrame.Angles(math.rad(-20+20*i), math.rad(-12*i), math.rad(-12*i))
  258. wait()
  259. end
  260. end
  261. if key == "e" then
  262. for i = 0, 1, 0.15 do
  263. RAW.C0 = CFrame.Angles(math.rad(150-110*i), math.rad(12*i), math.rad(12*i))
  264. LAW.C0 = CFrame.Angles(math.rad(150-110*i), math.rad(-12*i), math.rad(-12*i))
  265. wait()
  266. end
  267. spikes2(Torso, "Bright blue")
  268. bvc(Torso)
  269. wait(0.75)
  270. spikes(Torso, "Bright blue")
  271. local dist = 5
  272. for _, v in pairs(game.Players:GetChildren()) do
  273. if not v.Character then return end
  274. if (v.Character.Torso.Position - p.Position).magnitude < dist then
  275. if v.Name ~= Torso.Parent.Name then
  276. v.Character.Humanoid.Health = v.Character.Humanoid.Health - math.random(25, 45)
  277. end
  278. end
  279. end
  280. for i = 0, 1, 0.15 do
  281. RAW.C0 = CFrame.Angles(math.rad(-20+20*i), math.rad(12*i), math.rad(12*i))
  282. LAW.C0 = CFrame.Angles(math.rad(-20+20*i), math.rad(-12*i), math.rad(-12*i))
  283. wait()
  284. end
  285. end
  286. end)
  287. end
  288. function onDesel(mouse)
  289. for i = 0, 1, 0.1 do
  290. RAW.C0 = CFrame.Angles(math.rad(210*i), math.rad(-12*i), math.rad(12*i))
  291. LAW.C0 = CFrame.Angles(math.rad(210*i), math.rad(12*i), math.rad(-12*i))
  292. wait()
  293. end
  294. h1.Weld.Part0 = Torso
  295. h1.Weld.C1 = CFrame.new(0, -2.1, -0.51) * CFrame.Angles(0, 0, 5.5)
  296. h2.Weld.Part0 = Torso
  297. h2.Weld.C1 = CFrame.new(0, -2.1, -0.51) * CFrame.Angles(0, 0, -5.5)
  298. for i = 0, 1, 0.1 do
  299. RAW.C0 = CFrame.Angles(math.rad(210-210*i), math.rad(-12+12*i), math.rad(12-12*i))
  300. LAW.C0 = CFrame.Angles(math.rad(210-210*i), math.rad(12-12*i), math.rad(-12+12*i))
  301. wait()
  302. end
  303. RAW.Part1 = nil
  304. LAW.Part1 = nil
  305. end
  306. bin.Selected:connect(onSelected)
  307. bin.Deselected:connect(onDesel)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement