Advertisement
kqdragon

no

Mar 23rd, 2019
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.26 KB | None | 0 0
  1. -- This script has been converted to FE by iPxter
  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,Mouse,mouse,UserInputService,ContextActionService = owner
  6. do
  7. print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  8. script.Parent = Player.Character
  9.  
  10. --RemoteEvent for communicating
  11. local Event = Instance.new("RemoteEvent")
  12. Event.Name = "UserInput_Event"
  13.  
  14. --Fake event to make stuff like Mouse.KeyDown work
  15. local function fakeEvent()
  16. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  17. t.connect = t.Connect
  18. return t
  19. end
  20.  
  21. --Creating fake input objects with fake variables
  22. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  23. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  24. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  25. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  26. end}
  27. --Merged 2 functions into one by checking amount of arguments
  28. CAS.UnbindAction = CAS.BindAction
  29.  
  30. --This function will trigger the events that have been :Connect()'ed
  31. local function te(self,ev,...)
  32. local t = m[ev]
  33. if t and t._fakeEvent and t.Function then
  34. t.Function(...)
  35. end
  36. end
  37. m.TrigEvent = te
  38. UIS.TrigEvent = te
  39.  
  40. Event.OnServerEvent:Connect(function(plr,io)
  41. if plr~=Player then return end
  42. if io.isMouse then
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. else
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. for _,t in pairs(CAS.Actions) do
  51. for _,k in pairs(t.Keys) do
  52. if k==io.KeyCode then
  53. t.Function(t.Name,io.UserInputState,io)
  54. end
  55. end
  56. end
  57. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59. end
  60. end)
  61. Event.Parent = NLS([==[
  62. local Player = owner
  63. local Event = script:WaitForChild("UserInput_Event")
  64.  
  65. local UIS = game:GetService("UserInputService")
  66. local input = function(io,a)
  67. if a then return end
  68. --Since InputObject is a client-side instance, we create and pass table instead
  69. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  70. end
  71. UIS.InputBegan:Connect(input)
  72. UIS.InputEnded:Connect(input)
  73.  
  74. local h,t
  75. --Give the server mouse data 30 times every second, but only if the values changed
  76. --If player is not moving their mouse, client won't fire events
  77. while wait(1/30) do
  78. if h~=Mouse.Hit or t~=Mouse.Target then
  79. h,t=Mouse.Hit,Mouse.Target
  80. Event:FireServer({isMouse=true,Target=t,Hit=h})
  81. end
  82. end]==],Player.Character)
  83. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  84. end
  85.  
  86. script.Parent = workspace.CurrentCamera
  87. local plr = owner
  88. local tool = Instance.new("Tool",plr:WaitForChild("Backpack"))
  89. tool.Grip = CFrame.new(0,-0.8,-0.2) * CFrame.Angles(math.rad(0),math.rad(180),math.rad(0))
  90. tool.Name = "bluE"
  91.  
  92. local part = Instance.new("Part",tool)
  93. part.Name = "Handle"
  94. part.Size = Vector3.new(4,6,4)
  95. part.TopSurface = "Smooth"
  96. part.BottomSurface = "Smooth"
  97. part.CanCollide = false
  98. part:BreakJoints()
  99.  
  100. local mesh = Instance.new("SpecialMesh",part)
  101. mesh.MeshId = "rbxassetid://431003868" --mesh.MeshId = "rbxassetid://132920499"
  102. mesh.TextureId = "rbxassetid://430627740" --"http://www.roblox.com/asset/?id=134479421"
  103. mesh.Scale = Vector3.new(2,2,2)
  104.  
  105. local sound = Instance.new("Sound",part)
  106. sound.SoundId = "rbxassetid://511340819"
  107. sound.Volume = 3
  108.  
  109. local sound2 = Instance.new("Sound",part)
  110. sound2.SoundId = "rbxassetid://280667448"
  111. sound2.Volume = 5
  112.  
  113. local sound3 = Instance.new("Sound",part)
  114. sound3.SoundId = "rbxassetid://139100774"
  115. sound3.Volume = 10
  116.  
  117. local sound4 = Instance.new("Sound",part)
  118. sound4.SoundId = "rbxassetid://258057783"
  119. sound4.Volume = 10
  120.  
  121. local sound5 = Instance.new("Sound",part)
  122. sound5.SoundId = "rbxassetid://130932305"
  123. sound5.Volume = 10
  124.  
  125. local sound6 = Instance.new("Sound",part)
  126. sound6.SoundId = "rbxassetid://906084456"
  127. sound6.Volume = 10
  128. sound6.TimePosition = 2
  129.  
  130. function firstHum(target)
  131. for i,v in pairs(target:GetChildren()) do
  132. if v:IsA("Humanoid") then
  133. return v
  134. end
  135. end
  136. return nil
  137. end
  138.  
  139. local slap = false
  140. local cd = false
  141.  
  142. plr:GetMouse().Button1Down:connect(function()
  143. if tool.Parent == plr.Character then
  144. if slap == false then
  145. slap = true
  146. sound2:Play()
  147. local str = Instance.new("StringValue")
  148. str.Name = "toolanim"
  149. str.Value = "Slash"
  150. str.Parent = tool
  151. wait(1)
  152. slap = false
  153. end
  154. end
  155. end)
  156.  
  157. part.Touched:connect(function(hit)
  158. if slap == true then
  159. if cd == false then
  160. if not hit:IsDescendantOf(plr.Character) then
  161. if hit.Parent:IsA("Model") then
  162. local fhum = firstHum(hit.Parent)
  163. if fhum then
  164. cd = true
  165. fhum.PlatformStand = true
  166. sound:Play()
  167. local con1
  168. con1 = game:GetService("RunService").Heartbeat:connect(function()
  169. fhum.PlatformStand = true
  170. end)
  171. wait(0.1)
  172. local vel = Instance.new("BodyVelocity",hit)
  173. vel.Velocity = ((hit.Position - plr.Character:WaitForChild("HumanoidRootPart").Position).unit + Vector3.new(0,0.5,0))*50
  174. vel.MaxForce = Vector3.new(10000000,10000000,10000000)
  175. wait(1)
  176. cd = false
  177. vel:Destroy()
  178. local vel2 = Instance.new("BodyVelocity",hit)
  179. vel2.Velocity = Vector3.new(0,12.5,0)
  180. vel2.MaxForce = Vector3.new(10000000,10000000,10000000)
  181. local p2 = Instance.new("Part",hit)
  182. p2.Anchored = true
  183. p2.Transparency = 0.6
  184. p2.CanCollide = false
  185. p2.Size = Vector3.new(0.2,0.2,0.2)
  186. p2.CFrame = CFrame.new(hit.CFrame.p) * CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))
  187. p2.BrickColor = BrickColor.new("New Yeller")
  188. p2.Material = "Neon"
  189. local m2 = Instance.new("CylinderMesh",p2)
  190. m2.Scale = Vector3.new(60,10000,60)
  191. local scln = sound3:Clone()
  192. scln.Parent = hit
  193. scln:Play()
  194. local con2
  195. con2 = game:GetService("RunService").Heartbeat:connect(function()
  196. p2.CFrame = CFrame.new(hit.CFrame.p) * CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))
  197. end)
  198. wait(7)
  199. vel2.Velocity = Vector3.new(0,0,0)
  200. wait(0.5)
  201. scln:Stop()
  202. local scln3 = sound5:Clone()
  203. scln3.Parent = hit
  204. scln3:Play()
  205. wait(1)
  206. local bav = Instance.new("BodyAngularVelocity",hit)
  207. bav.AngularVelocity = Vector3.new(math.random(0,360),math.random(0,360),math.random(0,360))
  208. vel2.Velocity = Vector3.new(0,-250,0)
  209. p2.BrickColor = BrickColor.new("Really red")
  210. local scln6 = sound6:Clone()
  211. scln6.Parent = hit
  212. scln6:Play()
  213. local continue = false
  214. local htc
  215. htc = hit.Touched:connect(function(hitp)
  216. if not hitp:IsDescendantOf(hit.Parent) then
  217. continue = true
  218. scln6:Stop()
  219. vel2:Destroy()
  220. con2:Disconnect()
  221. con1:Disconnect()
  222. htc:Disconnect()
  223. p2:Destroy()
  224. end
  225. end)
  226. repeat wait() until continue == true
  227. local ctab = {}
  228. for i=1,4 do
  229. local p = Instance.new("Part",hit)
  230. p.Size = Vector3.new(30,30,30)
  231. p.Anchored = true
  232. p.CanCollide = false
  233. p.TopSurface = "Smooth"
  234. p.BottomSurface = "Smooth"
  235. p.Color = Color3.fromRGB(255,math.random(0,255),0)
  236. p.CFrame = hit.CFrame
  237. local con
  238. con = game:GetService("RunService").Heartbeat:connect(function()
  239. p.CFrame = p.CFrame * CFrame.Angles(math.rad(math.random(0,360)),math.rad(math.random(0,360)),math.rad(math.random(0,360)))
  240. p.Transparency = p.Transparency + 0.01
  241. if p.Transparency >= 1 then
  242. con:Disconnect()
  243. end
  244. end)
  245. table.insert(ctab,con)
  246. end
  247. Instance.new("Explosion",workspace).Position = hit.Position
  248. local scln2 = sound4:Clone()
  249. scln2.Parent = hit
  250. scln2:Play()
  251. vel2:Destroy()
  252. hit.Parent:BreakJoints()
  253. repeat wait() until not hit:IsDescendantOf(workspace)
  254. con2:Disconnect()
  255. end
  256. end
  257. end
  258. end
  259. end
  260. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement