Advertisement
PiterMosskva_TV

lol

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