Advertisement
yeetusFE

omua

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