DontDoItIDareU

Kenshiro [FE]

Jan 28th, 2019
448
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.71 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 = owner
  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 h,t
  72. --Give the server mouse data 30 times every second, but only if the values changed
  73. --If player is not moving their mouse, client won't fire events
  74. while wait(1/30) do
  75. if h~=Mouse.Hit or t~=Mouse.Target then
  76. h,t=Mouse.Hit,Mouse.Target
  77. Event:FireServer({isMouse=true,Target=t,Hit=h})
  78. end
  79. end]==],Player.Character)
  80. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  81. end
  82.  
  83. local oldtick = tick()
  84. warn("Omae Wa Mou Shinderu")
  85. local plr = owner
  86. local char, mouse = plr.Character, plr:GetMouse()
  87. local hitTab = {}
  88. local fadeTab = {}
  89. local spd = 0.2 * char:FindFirstChild("Humanoid").WalkSpeed / 16
  90. local sound1 = Instance.new("Sound", char.HumanoidRootPart)
  91. local sound2 = Instance.new("Sound", char.HumanoidRootPart)
  92. local sound3 = Instance.new("Sound")
  93. sound1.SoundId = "rbxassetid://130767866"
  94. sound1.Volume = 10
  95. sound2.SoundId = "rbxassetid://142684400"
  96. sound2.Volume = 10
  97. sound3.SoundId = "rbxassetid://985132972"
  98. sound3.Volume = 10
  99. local particle = Instance.new("ParticleEmitter")
  100. particle.LightEmission = 0.2
  101. particle.Texture = "rbxassetid://50263573"
  102. particle.Size = NumberSequence.new({
  103. NumberSequenceKeypoint.new(0, 0),
  104. NumberSequenceKeypoint.new(0.5, 1),
  105. NumberSequenceKeypoint.new(1, 0)
  106. })
  107. particle.Acceleration = Vector3.new(0, 0, 0)
  108. particle.Lifetime = NumberRange.new(0.15, 0.3)
  109. particle.Rate = 50
  110. particle.Rotation = NumberRange.new(0, 360)
  111. particle.RotSpeed = NumberRange.new(0, 0)
  112. particle.Speed = NumberRange.new(0, 0)
  113. local dfj = {}
  114. char:WaitForChild("Animate"):Destroy()
  115. char:WaitForChild("Humanoid"):WaitForChild("Animator"):Destroy()
  116. for i, v in pairs(char:FindFirstChild("Torso"):GetChildren()) do
  117. if v:IsA("Motor6D") and v.Name ~= "Neck" then
  118. table.insert(dfj, v:Clone())
  119. v:Destroy()
  120. end
  121. end
  122. local state = "idle"
  123. local rootpart = char:FindFirstChild("HumanoidRootPart")
  124. local rootjoint = rootpart:FindFirstChild("RootJoint")
  125. rootjoint.C1 = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(180))
  126. local rarm = Instance.new("Weld", char:FindFirstChild("Right Arm") or nil)
  127. rarm.Part0 = char:FindFirstChild("Torso") or nil
  128. rarm.Part1 = char:FindFirstChild("Right Arm") or nil
  129. rarm.C0 = CFrame.new(1, 0.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  130. rarm.C1 = CFrame.new(-0.5, 0.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  131. local larm = Instance.new("Weld", char:FindFirstChild("Left Arm") or nil)
  132. larm.Part0 = char:FindFirstChild("Torso") or nil
  133. larm.Part1 = char:FindFirstChild("Left Arm") or nil
  134. larm.C0 = CFrame.new(-1, 0.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  135. larm.C1 = CFrame.new(0.5, 0.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  136. local rleg = Instance.new("Weld", char:FindFirstChild("Right Leg") or nil)
  137. rleg.Part0 = char:FindFirstChild("Torso") or nil
  138. rleg.Part1 = char:FindFirstChild("Right Leg") or nil
  139. rleg.C0 = CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  140. rleg.C1 = CFrame.new(0.5, 1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  141. local lleg = Instance.new("Weld", char:FindFirstChild("Left Leg") or nil)
  142. lleg.Part0 = char:FindFirstChild("Torso") or nil
  143. lleg.Part1 = char:FindFirstChild("Left Leg") or nil
  144. lleg.C0 = CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  145. lleg.C1 = CFrame.new(-0.5, 1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  146. local neck = char:FindFirstChild("Torso"):FindFirstChild("Neck") or nil
  147. neck.Part0 = char:FindFirstChild("Torso") or nil
  148. neck.Part1 = char:FindFirstChild("Head") or nil
  149. neck.C0 = CFrame.new(0, 1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  150. neck.C1 = CFrame.new(0, -0.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  151. function hitSphere()
  152. local function recSearch(par)
  153. local tab = {}
  154. local function rec(parent)
  155. if parent:IsA("Humanoid") and parent ~= char:FindFirstChildOfClass("Humanoid") then
  156. table.insert(tab, parent)
  157. end
  158. for i, v in pairs(parent:GetChildren()) do
  159. rec(v)
  160. end
  161. end
  162. rec(par)
  163. return tab
  164. end
  165. local humsFound = {}
  166. for i, v in pairs(recSearch(workspace)) do
  167. table.insert(humsFound, v)
  168. end
  169. return humsFound
  170. end
  171. mouse.Button1Down:connect(function()
  172. if state ~= "busy" then
  173. state = "busy"
  174. do
  175. local foundHums = {}
  176. local prtcls = {}
  177. local sounds = {}
  178. local parts = {}
  179. sound1:Play()
  180. local hit = false
  181. local toggle = false
  182. local frmcon
  183. local frame = 0
  184. frmcon = game:service("RunService").RenderStepped:connect(function()
  185. frame = frame + 1
  186. if frame / 4 == math.floor(frame / 4) then
  187. if toggle == false then
  188. toggle = true
  189. else
  190. toggle = false
  191. end
  192. end
  193. if toggle == true then
  194. rleg.C0 = rleg.C0:lerp(CFrame.new(1, -1 - math.cos(tick()) / 16, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd)
  195. lleg.C0 = lleg.C0:lerp(CFrame.new(-1, -1 - math.cos(tick()) / 16, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd)
  196. rarm.C0 = rarm.C0:lerp(CFrame.new(1, 0.5, 0) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(45)), spd * 1.5)
  197. larm.C0 = larm.C0:lerp(CFrame.new(-1, 0.5, 0) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(90)), spd * 1.5)
  198. rootjoint.C0 = rootjoint.C0:lerp(CFrame.new(0, math.cos(tick()) / 16, 0) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(225)), spd * 1.5)
  199. neck.C0 = neck.C0:lerp(CFrame.new(0, 1, 0) * CFrame.Angles(math.rad(0), math.rad(-45), math.rad(0)), spd * 1.5)
  200. else
  201. rleg.C0 = rleg.C0:lerp(CFrame.new(1, -1 - math.cos(tick()) / 16, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd)
  202. lleg.C0 = lleg.C0:lerp(CFrame.new(-1, -1 - math.cos(tick()) / 16, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd)
  203. rarm.C0 = rarm.C0:lerp(CFrame.new(1, 0.5, 0) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(-90)), spd * 1.5)
  204. larm.C0 = larm.C0:lerp(CFrame.new(-1, 0.5, 0) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(-45)), spd * 1.5)
  205. rootjoint.C0 = rootjoint.C0:lerp(CFrame.new(0, math.cos(tick()) / 16, 0) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(135)), spd * 1.5)
  206. neck.C0 = neck.C0:lerp(CFrame.new(0, 1, 0) * CFrame.Angles(math.rad(0), math.rad(45), math.rad(0)), spd * 1.5)
  207. end
  208. if frame % 5 == 0 then
  209. for i, v in pairs(hitSphere()) do
  210. for o, b in pairs(v.Parent:GetChildren()) do
  211. if b:IsA("BasePart") and 4 >= (b.Position - rootjoint.Parent.CFrame * CFrame.new(0, 0, -2.25).p).Magnitude then
  212. hit = true
  213. if foundHums[v] then
  214. foundHums[v] = foundHums[v] + 1
  215. else
  216. foundHums[v] = 1
  217. local ns = sound3:Clone()
  218. ns.Parent = b
  219. table.insert(sounds, ns)
  220. end
  221. if not prtcls[b] then
  222. partClone = particle:Clone()
  223. partClone.Enabled = false
  224. partClone.Parent = b
  225. prtcls[b] = partClone
  226. end
  227. local p = Instance.new("Part")
  228. p.Size = Vector3.new(0.2, 0.2, 0.2)
  229. p.Color = Color3.new(1, 1, 1)
  230. p.TopSurface = "Smooth"
  231. p.BottomSurface = "Smooth"
  232. p.Anchored = true
  233. p.CanCollide = false
  234. p.Shape = "Ball"
  235. p.CFrame = CFrame.new(b.CFrame.p + Vector3.new(math.random(-10, 10) / 10, math.random(-10, 10) / 10, math.random(-10, 10) / 10))
  236. p.Parent = workspace
  237. table.insert(fadeTab, p)
  238. parts[b] = b
  239. end
  240. end
  241. end
  242. end
  243. end)
  244. local bucon
  245. bucon = mouse.Button1Up:connect(function()
  246. frmcon:disconnect()
  247. sound1:Stop()
  248. state = "idle"
  249. if hit == true then
  250. sound2:Play()
  251. wait(2.7)
  252. for i, v in pairs(sounds) do
  253. spawn(function()
  254. wait(math.random(0, 100) / 600)
  255. v.TimePosition = 2.5
  256. v:Play()
  257. end)
  258. end
  259. wait(1.2)
  260. for i, v in pairs(prtcls) do
  261. v.Enabled = true
  262. end
  263. wait(1.3)
  264. spawn(function()
  265. local rcon
  266. local frame = 0
  267. rcon = game:service("RunService").RenderStepped:connect(function()
  268. frame = frame + 1
  269. for i, v in pairs(sounds) do
  270. v.Volume = 10 - frame / 5
  271. if v.Volume <= 0 then
  272. v.Volume = 0
  273. v:Destroy()
  274. end
  275. end
  276. if frame >= 200 then
  277. for i, v in pairs(sounds) do
  278. v:Destroy()
  279. end
  280. end
  281. end)
  282. end)
  283. for i, v in pairs(parts) do
  284. v.RotVelocity = Vector3.new(math.random(-100, 100), math.random(-100, 100), math.random(-100, 100))
  285. v.Velocity = v.Velocity + Vector3.new(0, 20, 0)
  286. local bvel = Instance.new("BodyVelocity", v)
  287. bvel.MaxForce = Vector3.new(1000000, 1000000, 1000000)
  288. bvel.Velocity = Vector3.new(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  289. game:service("Debris"):AddItem(bvel, 0.5)
  290. end
  291. for i, v in pairs(foundHums) do
  292. if i.MaxHealth >= math.huge then
  293. i.MaxHealth = 100
  294. end
  295. i.Health = 0
  296. end
  297. wait(0.7)
  298. for i, v in pairs(prtcls) do
  299. v.Enabled = false
  300. end
  301. end
  302. bucon:disconnect()
  303. end)
  304. end
  305. end
  306. end)
  307. game:GetService("RunService").Heartbeat:connect(function()
  308. for i, v in pairs(fadeTab) do
  309. v.Transparency = v.Transparency + 0.1
  310. local savecf = v.CFrame
  311. v.Size = v.Size + Vector3.new(0.3, 0.3, 0.3)
  312. v.CFrame = savecf
  313. end
  314. local isub = 0
  315. for i = 1, #fadeTab do
  316. if fadeTab[i - isub].Transparency >= 1 then
  317. fadeTab[i - isub]:Destroy()
  318. table.remove(fadeTab, i - isub)
  319. isub = isub + 1
  320. end
  321. end
  322. char:FindFirstChild("Humanoid").WalkSpeed = 26
  323. spd = 0.2 * char:FindFirstChild("Humanoid").WalkSpeed / 16
  324. if state ~= "busy" then
  325. local ray = Ray.new(rootpart.Position, Vector3.new(0, -4, 0))
  326. local part, pos, normal = workspace:FindPartOnRayWithIgnoreList(ray, char:GetChildren(), false, true)
  327. if rootpart.Velocity.Magnitude > 0.5 and part ~= nil then
  328. state = "running"
  329. elseif rootpart.Velocity.Magnitude <= 0.5 and part ~= nil then
  330. state = "idle"
  331. elseif 0 < rootpart.Velocity.Y and part == nil then
  332. state = "jumping"
  333. elseif 0 >= rootpart.Velocity.Y and part == nil then
  334. state = "falling"
  335. end
  336. if state == "idle" then
  337. rleg.C0 = rleg.C0:lerp(CFrame.new(1, -1 - math.cos(tick()) / 16, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd)
  338. lleg.C0 = lleg.C0:lerp(CFrame.new(-1, -1 - math.cos(tick()) / 16, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd)
  339. rarm.C0 = rarm.C0:lerp(CFrame.new(1, 0.5 + math.cos(tick() + 0.5) / 16, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad((math.cos(tick()) + 1) / 16) * 20), spd)
  340. larm.C0 = larm.C0:lerp(CFrame.new(-1, 0.5 + math.cos(tick() + 0.5) / 16, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-(math.cos(tick()) + 1) / 16) * 20), spd)
  341. rootjoint.C0 = rootjoint.C0:lerp(CFrame.new(0, math.cos(tick()) / 16, 0) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(180)), spd)
  342. neck.C0 = neck.C0:lerp(CFrame.new(0, 1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd)
  343. elseif state == "running" then
  344. rleg.C0 = rleg.C0:lerp(CFrame.new(1, -1 - -math.sin(tick() * 8 + 90) / 8, math.sin(tick() * 8 + 90) / 10) * CFrame.Angles(math.rad(math.sin(tick() * 8) * 60), math.rad(0), math.rad(0)), spd)
  345. lleg.C0 = lleg.C0:lerp(CFrame.new(-1, -1 - math.sin(tick() * 8 + 90) / 8, -math.sin(tick() * 8 + 90) / 10) * CFrame.Angles(-math.rad(math.sin(tick() * 8) * 60), math.rad(0), math.rad(0)), spd)
  346. rarm.C0 = rarm.C0:lerp(CFrame.new(1, 0.5, 0) * CFrame.Angles(math.rad(math.sin(tick() * 8) * 80), math.rad(0), math.rad(0)), spd)
  347. larm.C0 = larm.C0:lerp(CFrame.new(-1, 0.5, 0) * CFrame.Angles(-math.rad(math.sin(tick() * 8) * 80), math.rad(0), math.rad(0)), spd)
  348. rootjoint.C0 = rootjoint.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(-110), math.rad(0), math.rad(180)), spd)
  349. neck.C0 = neck.C0:lerp(CFrame.new(0, 1, 0) * CFrame.Angles(math.rad(20), math.rad(0), math.rad(0)), spd)
  350. elseif state == "jumping" then
  351. rleg.C0 = rleg.C0:lerp(CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd)
  352. lleg.C0 = lleg.C0:lerp(CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd)
  353. rarm.C0 = rarm.C0:lerp(CFrame.new(1, 0.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd)
  354. larm.C0 = larm.C0:lerp(CFrame.new(-1, 0.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd)
  355. rootjoint.C0 = rootjoint.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(180)), spd)
  356. neck.C0 = neck.C0:lerp(CFrame.new(0, 1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd)
  357. elseif state == "falling" then
  358. rleg.C0 = rleg.C0:lerp(CFrame.new(1, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd)
  359. lleg.C0 = lleg.C0:lerp(CFrame.new(-1, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd)
  360. rarm.C0 = rarm.C0:lerp(CFrame.new(1, 0.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd)
  361. larm.C0 = larm.C0:lerp(CFrame.new(-1, 0.5, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd)
  362. rootjoint.C0 = rootjoint.C0:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(180)), spd)
  363. neck.C0 = neck.C0:lerp(CFrame.new(0, 1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), spd)
  364. end
  365. end
  366. end)
  367. warn("Loaded! Time elapsed: " .. tick() - oldtick)
Advertisement
Add Comment
Please, Sign In to add comment