Advertisement
Insanity_Mark

pomi

Dec 14th, 2018
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.42 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. ------------------------------------------------
  88.  
  89. wait(1/60)
  90. Effects = { }
  91. local Player = owner
  92. local chara = Player.Character
  93. local Humanoid = chara:FindFirstChildOfClass("Humanoid")
  94. local LeftArm = chara["Left Arm"]
  95. local RightArm = chara["Right Arm"]
  96. local LeftLeg = chara["Left Leg"]
  97. local RightLeg = chara["Right Leg"]
  98. local Head = chara.Head
  99. local Torso = chara.Torso
  100. local Camera = game.Workspace.CurrentCamera
  101. local RootPart = chara.HumanoidRootPart
  102. local RootJoint = RootPart.RootJoint
  103. local attack = false
  104. local Anim = 'Idle'
  105. local attacktype = 1
  106. local delays = false
  107. local play = true
  108. local targetted = nil
  109. local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  110. local velocity = RootPart.Velocity.y
  111. local sine = 0
  112. local change = 1
  113. local doe = 0
  114. local Create = LoadLibrary("RbxUtility").Create
  115. Humanoid.WalkSpeed = 2
  116.  
  117. Humanoid.Animator.Parent = nil
  118. chara.Animate.Parent = nil
  119.  
  120. local newMotor = function(part0, part1, c0, c1)
  121. local w = Create('Motor'){
  122. Parent = part0,
  123. Part0 = part0,
  124. Part1 = part1,
  125. C0 = c0,
  126. C1 = c1,
  127. }
  128. return w
  129. end
  130.  
  131. function clerp(a, b, t)
  132. return a:lerp(b, t)
  133. end
  134.  
  135. RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  136. NeckCF = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  137.  
  138. local RW = newMotor(Torso, RightArm, CFrame.new(1.5, 0, 0), CFrame.new(0, 0, 0))
  139. local LW = newMotor(Torso, LeftArm, CFrame.new(-1.5, 0, 0), CFrame.new(0, 0, 0))
  140. local RH = newMotor(Torso, RightLeg, CFrame.new(.5, -2, 0), CFrame.new(0, 0, 0))
  141. local LH = newMotor(Torso, LeftLeg, CFrame.new(-.5, -2, 0), CFrame.new(0, 0, 0))
  142. RootJoint.C1 = CFrame.new(0, 0, 0)
  143. RootJoint.C0 = CFrame.new(0, 0, 0)
  144. Torso.Neck.C1 = CFrame.new(0, 0, 0)
  145. Torso.Neck.C0 = CFrame.new(0, 1.5, 0)
  146.  
  147. local rarmc1 = RW.C1
  148. local larmc1 = LW.C1
  149. local rlegc1 = RH.C1
  150. local llegc1 = LH.C1
  151.  
  152. local resetc1 = false
  153.  
  154. function PlayAnimationFromTable(table, speed, bool)
  155. RootJoint.C0 = clerp(RootJoint.C0, table[1], speed)
  156. Torso.Neck.C0 = clerp(Torso.Neck.C0, table[2], speed)
  157. RW.C0 = clerp(RW.C0, table[3], speed)
  158. LW.C0 = clerp(LW.C0, table[4], speed)
  159. RH.C0 = clerp(RH.C0, table[5], speed)
  160. LH.C0 = clerp(LH.C0, table[6], speed)
  161. if bool == true then
  162. if resetc1 == false then
  163. resetc1 = true
  164. RootJoint.C1 = RootJoint.C1
  165. Torso.Neck.C1 = Torso.Neck.C1
  166. RW.C1 = rarmc1
  167. LW.C1 = larmc1
  168. RH.C1 = rlegc1
  169. LH.C1 = llegc1
  170. end
  171. end
  172. end
  173.  
  174. ArtificialHB = Instance.new("BindableEvent", script)
  175. ArtificialHB.Name = "Heartbeat"
  176. script:WaitForChild("Heartbeat")
  177. frame = 0.03333333333333
  178. tf = 0
  179. allowframeloss = false
  180. tossremainder = false
  181. lastframe = tick()
  182. script.Heartbeat:Fire()
  183. game:GetService("RunService").Heartbeat:connect(function(s, p)
  184. tf = tf + s
  185. if tf >= frame then
  186. if allowframeloss then
  187. script.Heartbeat:Fire()
  188. lastframe = tick()
  189. else
  190. for i = 1, math.floor(tf / frame) do
  191. script.Heartbeat:Fire()
  192. end
  193. lastframe = tick()
  194. end
  195. if tossremainder then
  196. tf = 0
  197. else
  198. tf = tf - frame * math.floor(tf / frame)
  199. end
  200. end
  201. end)
  202. function swait(num)
  203. if num == 0 or num == nil then
  204. ArtificialHB.Event:wait()
  205. else
  206. for i = 0, num do
  207. ArtificialHB.Event:wait()
  208. end
  209. end
  210. end
  211.  
  212. function RemoveOutlines(part)
  213. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  214. end
  215.  
  216. sndid = "rbxassetid://426760325"
  217. sndpi = .7
  218. saun = Instance.new("Sound",Head)
  219. saun.Volume = 1
  220. saun.Pitch = 1
  221. saun.SoundId = sndid
  222. saun.Name = "a"
  223. saun.Looped = true
  224. saun:Play()
  225.  
  226. dant = 0
  227.  
  228. Mouse.KeyDown:connect(function(key)
  229. key=key:lower()
  230. if key=="e" then
  231. if dant == 0 then
  232. dant = 1
  233. sndid = "rbxassetid://448668887"
  234. sndpi = 1
  235. elseif dant == 1 then
  236. dant = 0
  237. sndid = "rbxassetid://426760325"
  238. sndpi = .7
  239. end
  240. saun.Pitch = 1
  241. saun.SoundId = sndid
  242. saun:Play()
  243. end
  244. end)
  245.  
  246. while true do
  247. if Head:FindFirstChild("a")==nil then
  248. saun = Instance.new("Sound",Head)
  249. saun.Volume = 1
  250. saun.Pitch = 1
  251. saun.SoundId = sndid
  252. saun.Name = "a"
  253. saun.Looped = true
  254. saun:Play()
  255. end
  256. if dant == 0 then
  257. for i = 0, 1, 0.25 do
  258. swait()
  259. PlayAnimationFromTable({
  260. CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  261. CFrame.new(0, 1.4999938, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  262. CFrame.new(0.833580494, 1.12330246, 6.2584877e-07, -0.342020094, -1.63087847e-07, 0.939692676, 0.321394086, -0.939692557, 0.116977669, 0.883022249, 0.342020333, 0.321393758),
  263. CFrame.new(-0.833579302, 1.12330115, -1.49011612e-07, -0.342019886, 4.07719511e-08, -0.939692736, -0.321392894, -0.939693034, 0.116977319, -0.883022726, 0.342019141, 0.321393728),
  264. CFrame.new(0.5, -2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  265. CFrame.new(-0.5, -2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  266. }, .5, false)
  267. end
  268. for i = 0, 1, 0.25 do
  269. swait()
  270. PlayAnimationFromTable({
  271. CFrame.new(-0.268402338, -0.187939167, 0, 0.939692736, 0.342019886, 0, -0.342019916, 0.939692736, 0, 0, 0, 1),
  272. CFrame.new(-0.409892142, 1.36144388, 0, 0.766044796, -0.642787218, 0, 0.642787218, 0.766044855, 0, 0, 0, 1),
  273. CFrame.new(0.535924554, 1.16478181, 3.87430191e-07, -0.431316972, 0.32139343, 0.843013644, 0.185034022, -0.883022308, 0.431316644, 0.883022249, 0.342020333, 0.321393758),
  274. CFrame.new(-1.03069234, 0.594579875, -2.38418579e-07, -0.211470842, 0.321393758, -0.923030972, -0.418988168, -0.883022726, -0.211470872, -0.883022726, 0.342019141, 0.321393728),
  275. CFrame.new(0.951213062, -1.54518354, 0, 0.866025686, -0.499999642, 0, 0.499999642, 0.866025686, 0, 0, 0, 1),
  276. CFrame.new(0.214191973, -1.8503952, 0, 0.766044796, -0.642787218, 0, 0.642787218, 0.766044855, 0, 0, 0, 1),
  277. }, .5, false)
  278. end
  279. for i = 0, 1, 0.25 do
  280. swait()
  281. PlayAnimationFromTable({
  282. CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  283. CFrame.new(0, 1.4999938, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  284. CFrame.new(0.833580494, 1.12330246, 6.2584877e-07, -0.342020094, -1.63087847e-07, 0.939692676, 0.321394086, -0.939692557, 0.116977669, 0.883022249, 0.342020333, 0.321393758),
  285. CFrame.new(-0.833579302, 1.12330115, -1.49011612e-07, -0.342019886, 4.07719511e-08, -0.939692736, -0.321392894, -0.939693034, 0.116977319, -0.883022726, 0.342019141, 0.321393728),
  286. CFrame.new(0.5, -2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  287. CFrame.new(-0.5, -2, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  288. }, .5, false)
  289. end
  290. for i = 0, 1, 0.25 do
  291. swait()
  292. PlayAnimationFromTable({
  293. CFrame.new(0.268400908, -0.187940732, 0, 0.939692855, -0.342019945, 0, 0.342019975, 0.939692795, 0, 0, 0, 1),
  294. CFrame.new(0.409947664, 1.36144304, 0, 0.766039729, 0.642798781, 0, -0.642787337, 0.766043961, 0, 0, 0, 1),
  295. CFrame.new(1.03070939, 0.594575524, -2.2649765e-06, -0.21146287, -0.321413547, 0.923025966, 0.418989599, -0.883016884, -0.21149224, 0.883023918, 0.342015505, 0.321394145),
  296. CFrame.new(-0.535904408, 1.16477537, -3.27825546e-07, -0.431322306, -0.321409196, -0.843005002, -0.185032129, -0.883013964, 0.431334615, -0.883019984, 0.342027217, 0.321392536),
  297. CFrame.new(-0.214235365, -1.8503921, 0, 0.766041398, 0.64279145, 0, -0.64279151, 0.766041279, 0, 0, 0, 1),
  298. CFrame.new(-0.965987146, -1.57677674, 0, 0.866024733, 0.500001609, 0, -0.500001609, 0.866024613, 0, 0, 0, 1),
  299. }, .5, false)
  300. end
  301. elseif dant == 1 then
  302. for i = 0, 1, 0.1 do
  303. swait()
  304. PlayAnimationFromTable({
  305. CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  306. CFrame.new(0, 1.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  307. CFrame.new(1.09999847, 1.1920929e-07, -0.600001514, 0, 0, 1, 0.173647985, 0.984807849, 0, -0.984807849, 0.173647985, 0),
  308. CFrame.new(-1.09999847, 1.1920929e-07, -0.600001514, 0, 0, -1, -0.173647985, 0.984807849, 0, 0.984807849, 0.173647985, 0),
  309. CFrame.new(0.5, -1.99999881, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  310. CFrame.new(-0.5, -1.99999881, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  311. }, .2, false)
  312. end
  313. for i = 0, 1, 0.1 do
  314. swait()
  315. PlayAnimationFromTable({
  316. CFrame.new(-0.0436433926, 0, -0.113613628, 0.64278698, 0, -0.766044974, 0, 1, 0, 0.766044974, 0, 0.64278698),
  317. CFrame.new(0, 1.49999809, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  318. CFrame.new(1.09998989, 1, -0.599998474, 0, 0, 1, 1, 0, 0, 0, 1, 0),
  319. CFrame.new(-1.10000229, 1, -0.599998474, 0, 0, -1, -1, 0, 0, 0, 1, 0),
  320. CFrame.new(0.499988556, -1.99999797, -3.81469727e-06, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  321. CFrame.new(-0.500012398, -1.78038144, -0.819608092, 1, 0, 1.49011612e-08, 0, 0.499999046, -0.866025984, 0, 0.866026044, 0.499999046),
  322. }, .2, false)
  323. end
  324. for i = 0, 1, 0.1 do
  325. swait()
  326. PlayAnimationFromTable({
  327. CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  328. CFrame.new(0, 1.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  329. CFrame.new(1.09999847, 1.1920929e-07, -0.600001514, 0, 0, 1, 0.173647985, 0.984807849, 0, -0.984807849, 0.173647985, 0),
  330. CFrame.new(-1.09999847, 1.1920929e-07, -0.600001514, 0, 0, -1, -0.173647985, 0.984807849, 0, 0.984807849, 0.173647985, 0),
  331. CFrame.new(0.5, -1.99999881, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  332. CFrame.new(-0.5, -1.99999881, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  333. }, .2, false)
  334. end
  335. for i = 0, 1, 0.1 do
  336. swait()
  337. PlayAnimationFromTable({
  338. CFrame.new(0.261404335, 0, -0.167939946, 0.76604414, 0, 0.642788053, 0, 1, 0, -0.642788053, 0, 0.76604414),
  339. CFrame.new(0, 1.49999285, 0, 1.00000012, 0, 0, 0, 1, 0, 0, 0, 1.00000012),
  340. CFrame.new(1.10000622, 0.999999046, -0.599996626, 0, 0, 1.00000012, 1, 0, 0, 0, 1.00000012, 0),
  341. CFrame.new(-1.09999859, 0.999999046, -0.59999758, 0, 0, -1.00000012, -1, 0, 0, 0, 1.00000012, 0),
  342. CFrame.new(0.500000179, -1.78038287, -0.81961149, 1.00000012, -2.98023224e-08, 2.98023224e-08, 0, 0.499999046, -0.866025925, 0, 0.866025984, 0.499999106),
  343. CFrame.new(-0.500003874, -1.99999893, 3.81469772e-06, 1.00000012, 0, 0, 0, 1, 0, 0, 0, 1.00000012),
  344. }, .2, false)
  345. end
  346. end
  347. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement