Advertisement
INEEDITEMS

OOf

Jan 18th, 2019
1,708
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.51 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,game,owner = owner,game
  4. local RealPlayer = Player
  5. do print("FE Compatibility code V2 by Mokiros")local RealPlayer=RealPlayer;script.Parent=RealPlayer.Character;local a=function(b)b[1].f[b[2]]=nil end;local c={__index={disconnect=a,Disconnect=a}}local d={__index={Connect=function(b,e)local f=tostring(math.random(0,10000))while b.f[f]do f=tostring(math.random(0,10000))end;b.f[f]=e;return setmetatable({b,f},c)end}}d.__index.connect=d.__index.Connect;local function g()return setmetatable({f={}},d)end;local h={Hit=CFrame.new(),KeyUp=g(),KeyDown=g(),Button1Up=g(),Button1Down=g(),Button2Up=g(),Button2Down=g()}h.keyUp=h.KeyUp;h.keyDown=h.KeyDown;local i={InputBegan=g(),InputEnded=g()}local CAS={Actions={},BindAction=function(self,j,k,l,...)CAS.Actions[j]=k and{Name=j,Function=k,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function m(self,n,...)for o,e in pairs(self[n].f)do e(...)end end;h.T=m;i.T=m;local p=Instance.new("RemoteEvent")p.Name="UserInput_Event"p.OnServerEvent:Connect(function(q,r)if q~=RealPlayer then return end;h.Target=r.e;h.Hit=r.d;if not r.f then local s=r.c==Enum.UserInputState.Begin;if r.b==Enum.UserInputType.MouseButton1 then return h:T(s and"Button1Down"or"Button1Up")end;if r.b==Enum.UserInputType.MouseButton2 then return h:T(s and"Button2Down"or"Button2Up")end;for o,t in pairs(CAS.Actions)do for o,u in pairs(t.Keys)do if u==r.a then t.Function(t.Name,r.c,r)end end end;h:T(s and"KeyDown"or"KeyUp",r.a.Name:lower())i:T(s and"InputBegan"or"InputEnded",r,false)end end)p.Parent=NLS([==[local a=script:WaitForChild("UserInput_Event")local b=owner:GetMouse()local c=game:GetService("UserInputService")local d=function(e,f)if f then return end;a:FireServer({a=e.KeyCode,b=e.UserInputType,c=e.UserInputState,d=b.Hit,e=b.Target})end;c.InputBegan:Connect(d)c.InputEnded:Connect(d)local g,h;local i=game:GetService("RunService").Heartbeat;while true do if g~=b.Hit or h~=b.Target then g,h=b.Hit,b.Target;a:FireServer({f=1,Target=h,d=g})end;for j=1,2 do i:Wait()end end]==],script)local v=game;local w={__index=function(self,u)local x=rawget(self,"_RealService")if x then return typeof(x[u])=="function"and function(o,...)return x[u](x,...)end or x[u]end end,__newindex=function(self,u,y)local x=rawget(self,"_RealService")if x then x[u]=y end end}local function z(t,A)t._RealService=typeof(A)=="string"and v:GetService(A)or A;return setmetatable(t,w)end;local B={GetService=function(self,x)return rawget(self,x)or v:GetService(x)end,Players=z({LocalPlayer=z({GetMouse=function(self)return h end},Player)},"Players"),UserInputService=z(i,"UserInputService"),ContextActionService=z(CAS,"ContextActionService"),RunService=z({_btrs={},RenderStepped=v:GetService("RunService").Heartbeat,BindToRenderStep=function(self,j,o,k)self._btrs[j]=self.Heartbeat:Connect(k)end,UnbindFromRenderStep=function(self,j)self._btrs[j]:Disconnect()end},"RunService")}rawset(B.Players,"localPlayer",B.Players.LocalPlayer)B.service=B.GetService;z(B,game)game,owner=B,B.Players.LocalPlayer end
  6. script.Parent = workspace.CurrentCamera
  7. local plr = game:GetService("Players").LocalPlayer
  8.  
  9. local tool = Instance.new("Tool",plr:WaitForChild("Backpack"))
  10. tool.Grip = CFrame.new(0,-0.8,-0.2) * CFrame.Angles(math.rad(0),math.rad(180),math.rad(0))
  11. tool.Name = "bluE"
  12.  
  13. local part = Instance.new("Part",tool)
  14. part.Name = "Handle"
  15. part.Size = Vector3.new(4,6,4)
  16. part.TopSurface = "Smooth"
  17. part.BottomSurface = "Smooth"
  18. part.CanCollide = false
  19. part:BreakJoints()
  20.  
  21. local mesh = Instance.new("SpecialMesh",part)
  22. mesh.MeshId = "rbxassetid://431003868" --mesh.MeshId = "rbxassetid://132920499"
  23. mesh.TextureId = "rbxassetid://430627740" --"http://www.roblox.com/asset/?id=134479421"
  24. mesh.Scale = Vector3.new(2,2,2)
  25.  
  26. local sound = Instance.new("Sound",part)
  27. sound.SoundId = "rbxassetid://511340819"
  28. sound.Volume = 3
  29.  
  30. local sound2 = Instance.new("Sound",part)
  31. sound2.SoundId = "rbxassetid://280667448"
  32. sound2.Volume = 5
  33.  
  34. local sound3 = Instance.new("Sound",part)
  35. sound3.SoundId = "rbxassetid://139100774"
  36. sound3.Volume = 10
  37.  
  38. local sound4 = Instance.new("Sound",part)
  39. sound4.SoundId = "rbxassetid://258057783"
  40. sound4.Volume = 10
  41.  
  42. local sound5 = Instance.new("Sound",part)
  43. sound5.SoundId = "rbxassetid://130932305"
  44. sound5.Volume = 10
  45.  
  46. local sound6 = Instance.new("Sound",part)
  47. sound6.SoundId = "rbxassetid://906084456"
  48. sound6.Volume = 10
  49. sound6.TimePosition = 2
  50.  
  51. function firstHum(target)
  52. for i,v in pairs(target:GetChildren()) do
  53. if v:IsA("Humanoid") then
  54. return v
  55. end
  56. end
  57. return nil
  58. end
  59.  
  60. local slap = false
  61. local cd = false
  62.  
  63. plr:GetMouse().Button1Down:connect(function()
  64. if tool.Parent == plr.Character then
  65. if slap == false then
  66. slap = true
  67. sound2:Play()
  68. local str = Instance.new("StringValue")
  69. str.Name = "toolanim"
  70. str.Value = "Slash"
  71. str.Parent = tool
  72. wait(1)
  73. slap = false
  74. end
  75. end
  76. end)
  77.  
  78. part.Touched:connect(function(hit)
  79. if slap == true then
  80. if cd == false then
  81. if not hit:IsDescendantOf(plr.Character) then
  82. if hit.Parent:IsA("Model") then
  83. local fhum = firstHum(hit.Parent)
  84. if fhum then
  85. cd = true
  86. fhum.PlatformStand = true
  87. sound:Play()
  88. local con1
  89. con1 = game:GetService("RunService").Heartbeat:connect(function()
  90. fhum.PlatformStand = true
  91. end)
  92. wait(0.1)
  93. local vel = Instance.new("BodyVelocity",hit)
  94. vel.Velocity = ((hit.Position - plr.Character:WaitForChild("HumanoidRootPart").Position).unit + Vector3.new(0,0.5,0))*50
  95. vel.MaxForce = Vector3.new(10000000,10000000,10000000)
  96. wait(1)
  97. cd = false
  98. vel:Destroy()
  99. local vel2 = Instance.new("BodyVelocity",hit)
  100. vel2.Velocity = Vector3.new(0,12.5,0)
  101. vel2.MaxForce = Vector3.new(10000000,10000000,10000000)
  102. local p2 = Instance.new("Part",hit)
  103. p2.Anchored = true
  104. p2.Transparency = 0.6
  105. p2.CanCollide = false
  106. p2.Size = Vector3.new(0.2,0.2,0.2)
  107. p2.CFrame = CFrame.new(hit.CFrame.p) * CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))
  108. p2.BrickColor = BrickColor.new("New Yeller")
  109. p2.Material = "Neon"
  110. local m2 = Instance.new("CylinderMesh",p2)
  111. m2.Scale = Vector3.new(60,10000,60)
  112. local scln = sound3:Clone()
  113. scln.Parent = hit
  114. scln:Play()
  115. local con2
  116. con2 = game:GetService("RunService").Heartbeat:connect(function()
  117. p2.CFrame = CFrame.new(hit.CFrame.p) * CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))
  118. end)
  119. wait(7)
  120. vel2.Velocity = Vector3.new(0,0,0)
  121. wait(0.5)
  122. scln:Stop()
  123. local scln3 = sound5:Clone()
  124. scln3.Parent = hit
  125. scln3:Play()
  126. wait(1)
  127. local bav = Instance.new("BodyAngularVelocity",hit)
  128. bav.AngularVelocity = Vector3.new(math.random(0,360),math.random(0,360),math.random(0,360))
  129. vel2.Velocity = Vector3.new(0,-250,0)
  130. p2.BrickColor = BrickColor.new("Really red")
  131. local scln6 = sound6:Clone()
  132. scln6.Parent = hit
  133. scln6:Play()
  134. local continue = false
  135. local htc
  136. htc = hit.Touched:connect(function(hitp)
  137. if not hitp:IsDescendantOf(hit.Parent) then
  138. continue = true
  139. scln6:Stop()
  140. vel2:Destroy()
  141. con2:Disconnect()
  142. con1:Disconnect()
  143. htc:Disconnect()
  144. p2:Destroy()
  145. end
  146. end)
  147. repeat wait() until continue == true
  148. local ctab = {}
  149. for i=1,4 do
  150. local p = Instance.new("Part",hit)
  151. p.Size = Vector3.new(30,30,30)
  152. p.Anchored = true
  153. p.CanCollide = false
  154. p.TopSurface = "Smooth"
  155. p.BottomSurface = "Smooth"
  156. p.Color = Color3.fromRGB(255,math.random(0,255),0)
  157. p.CFrame = hit.CFrame
  158. local con
  159. con = game:GetService("RunService").Heartbeat:connect(function()
  160. p.CFrame = p.CFrame * CFrame.Angles(math.rad(math.random(0,360)),math.rad(math.random(0,360)),math.rad(math.random(0,360)))
  161. p.Transparency = p.Transparency + 0.01
  162. if p.Transparency >= 1 then
  163. con:Disconnect()
  164. end
  165. end)
  166. table.insert(ctab,con)
  167. end
  168. Instance.new("Explosion",workspace).Position = hit.Position
  169. local scln2 = sound4:Clone()
  170. scln2.Parent = hit
  171. scln2:Play()
  172. vel2:Destroy()
  173. hit.Parent:BreakJoints()
  174. repeat wait() until not hit:IsDescendantOf(workspace)
  175. con2:Disconnect()
  176. end
  177. end
  178. end
  179. end
  180. end
  181. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement