Advertisement
ghostteen14

Untitled

Jun 9th, 2019
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 32.04 KB | None | 0 0
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,game,owner = owner,game
  4. local RealPlayer = Player
  5. do
  6. print("FE Compatibility code V2 by Mokiros")
  7. local RealPlayer = RealPlayer
  8. script.Parent = RealPlayer.Character
  9.  
  10. --Fake event to make stuff like Mouse.KeyDown work
  11. local Disconnect_Function = function(this)
  12. this[1].Functions[this[2]] = nil
  13. end
  14. local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
  15. local FakeEvent_Metatable = {__index={
  16. Connect = function(this,f)
  17. local i = tostring(math.random(0,10000))
  18. while this.Functions[i] do
  19. i = tostring(math.random(0,10000))
  20. end
  21. this.Functions[i] = f
  22. return setmetatable({this,i},Disconnect_Metatable)
  23. end
  24. }}
  25. FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
  26. local function fakeEvent()
  27. return setmetatable({Functions={}},FakeEvent_Metatable)
  28. end
  29.  
  30. --Creating fake input objects with fake variables
  31. local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  32. FakeMouse.keyUp = FakeMouse.KeyUp
  33. FakeMouse.keyDown = FakeMouse.KeyDown
  34. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  35. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  36. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  37. end}
  38. --Merged 2 functions into one by checking amount of arguments
  39. CAS.UnbindAction = CAS.BindAction
  40.  
  41. --This function will trigger the events that have been :Connect()'ed
  42. local function TriggerEvent(self,ev,...)
  43. for _,f in pairs(self[ev].Functions) do
  44. f(...)
  45. end
  46. end
  47. FakeMouse.TriggerEvent = TriggerEvent
  48. UIS.TriggerEvent = TriggerEvent
  49.  
  50. --Client communication
  51. local Event = Instance.new("RemoteEvent")
  52. Event.Name = "UserInput_Event"
  53. Event.OnServerEvent:Connect(function(plr,io)
  54. if plr~=RealPlayer then return end
  55. FakeMouse.Target = io.Target
  56. FakeMouse.Hit = io.Hit
  57. if not io.isMouse then
  58. local b = io.UserInputState == Enum.UserInputState.Begin
  59. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  60. return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
  61. end
  62. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  63. return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
  64. end
  65. for _,t in pairs(CAS.Actions) do
  66. for _,k in pairs(t.Keys) do
  67. if k==io.KeyCode then
  68. t.Function(t.Name,io.UserInputState,io)
  69. end
  70. end
  71. end
  72. FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  73. UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
  74. end
  75. end)
  76. Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
  77. local Mouse = owner:GetMouse()
  78. local UIS = game:GetService("UserInputService")
  79. local input = function(io,RobloxHandled)
  80. if RobloxHandled then return end
  81. --Since InputObject is a client-side instance, we create and pass table instead
  82. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  83. end
  84. UIS.InputBegan:Connect(input)
  85. UIS.InputEnded:Connect(input)
  86.  
  87. local h,t
  88. --Give the server mouse data every second frame, but only if the values changed
  89. --If player is not moving their mouse, client won't fire events
  90. local HB = game:GetService("RunService").Heartbeat
  91. while true do
  92. if h~=Mouse.Hit or t~=Mouse.Target then
  93. h,t=Mouse.Hit,Mouse.Target
  94. Event:FireServer({isMouse=true,Target=t,Hit=h})
  95. end
  96. --Wait 2 frames
  97. for i=1,2 do
  98. HB:Wait()
  99. end
  100. end]==],script)
  101.  
  102. ----Sandboxed game object that allows the usage of client-side methods and services
  103. --Real game object
  104. local RealGame = game
  105.  
  106. --Metatable for fake service
  107. local FakeService_Metatable = {
  108. __index = function(self,k)
  109. local s = rawget(self,"_RealService")
  110. if s then
  111. return typeof(s[k])=="function"
  112. and function(_,...)return s[k](s,...)end or s[k]
  113. end
  114. end,
  115. __newindex = function(self,k,v)
  116. local s = rawget(self,"_RealService")
  117. if s then s[k]=v end
  118. end
  119. }
  120. local function FakeService(t,RealService)
  121. t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
  122. return setmetatable(t,FakeService_Metatable)
  123. end
  124.  
  125. --Fake game object
  126. local FakeGame = {
  127. GetService = function(self,s)
  128. return rawget(self,s) or RealGame:GetService(s)
  129. end,
  130. Players = FakeService({
  131. LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
  132. },"Players"),
  133. UserInputService = FakeService(UIS,"UserInputService"),
  134. ContextActionService = FakeService(CAS,"ContextActionService"),
  135. RunService = FakeService({
  136. _btrs = {},
  137. RenderStepped = RealGame:GetService("RunService").Heartbeat,
  138. BindToRenderStep = function(self,name,_,fun)
  139. self._btrs[name] = self.Heartbeat:Connect(fun)
  140. end,
  141. UnbindFromRenderStep = function(self,name)
  142. self._btrs[name]:Disconnect()
  143. end,
  144. },"RunService")
  145. }
  146. rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
  147. FakeGame.service = FakeGame.GetService
  148. FakeService(FakeGame,game)
  149. --Changing owner to fake player object to support owner:GetMouse()
  150. game,owner = FakeGame,FakeGame.Players.LocalPlayer
  151. end
  152. ---
  153. local p = game.Players.LocalPlayer
  154. local char = p.Character
  155. local mouse = p:GetMouse()
  156. local larm = char["Left Arm"]
  157. local rarm = char["Right Arm"]
  158. local lleg = char["Left Leg"]
  159. local rleg = char["Right Leg"]
  160. local hed = char.Head
  161. local torso = char.Torso
  162. local ASD = BrickColor.new("Pastel brown")
  163. local hum = char.Humanoid
  164. local cam = game.Workspace.CurrentCamera
  165. local root = char.HumanoidRootPart
  166. local deb = false
  167. local shot = 0
  168. local l = game:GetService("Lighting")
  169. local rs = game:GetService("RunService").RenderStepped
  170. local stanceToggle = "Normal"
  171. math.randomseed(os.time())
  172. hum.WalkSpeed = 7
  173. char.Health:Destroy()
  174. hum.MaxHealth = 5000000
  175. wait(0.1)
  176. hum.Health = 5000000
  177. z = Instance.new("Sound", char.Torso)
  178. z.SoundId = "rbxassetid://719841541"
  179. z.Looped = true
  180. z.Pitch = 1
  181. z.Volume = 1
  182. ----------------------------------------------------
  183. local SM = Instance.new("Smoke",torso)
  184. SM.Size = 15
  185. local S = Instance.new("Part",char)
  186. S.Size = Vector3.new(1,1,1)
  187. S.Material = "Neon"
  188. S.BrickColor = BrickColor.new("Deep orange")
  189. S.Transparency = 0
  190. S.Anchored = true
  191. S.CFrame = torso.CFrame*CFrame.new(0,0,0)
  192. local Ring = Instance.new("Part",S)
  193. Ring.Size = Vector3.new(1,1,1)
  194. Ring.BrickColor = BrickColor.new("Deep orange")
  195. Ring.Anchored = true
  196. Ring.CanCollide = false
  197. Ring.CFrame = S.CFrame*CFrame.new(0,0,0)*CFrame.Angles(1.55,0,0)
  198. local Ring2 = Instance.new("SpecialMesh",Ring)
  199. Ring2.MeshId = "rbxassetid://3270017"
  200. Ring2.Scale = Vector3.new(0.1,0.1,0.1)
  201. local S2 = Instance.new("SpecialMesh",S)
  202. S2.MeshType = "Sphere"
  203. S2.Scale = Vector3.new(1,1,1)
  204. v = Instance.new("Sound")
  205. v.SoundId = "rbxassetid://821439273"
  206. v.Parent = char.Torso
  207. v.Looped = false
  208. v.Pitch = 1
  209. v.Volume = 1
  210. wait(.01)
  211. v:Play()
  212. local partasdeff = Instance.new("ParticleEmitter",S)
  213. partasdeff.Color = ColorSequence.new(Color3.new(0,0,0), Color3.new(204,130,2))
  214. partasdeff.LightEmission = .1
  215. partasdeff.Size = NumberSequence.new(0.2)
  216. partasdeff.Texture = "http://www.roblox.com/asset/?ID=300899516"
  217. aaa = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.2),NumberSequenceKeypoint.new(1, 5)})
  218. bbb = NumberSequence.new({NumberSequenceKeypoint.new(0, 1),NumberSequenceKeypoint.new(0.0636, 0), NumberSequenceKeypoint.new(1, 1)})
  219. partasdeff.Transparency = bbb
  220. partasdeff.Size = aaa
  221. partasdeff.ZOffset = .9
  222. partasdeff.Acceleration = Vector3.new(0, -5, 0)
  223. partasdeff.LockedToPart = false
  224. partasdeff.EmissionDirection = "Top"
  225. partasdeff.Lifetime = NumberRange.new(1, 2)
  226. partasdeff.Rate = 1000
  227. partasdeff.Rotation = NumberRange.new(-100, 100)
  228. partasdeff.RotSpeed = NumberRange.new(-100, 100)
  229. partasdeff.Speed = NumberRange.new(10)
  230. partasdeff.VelocitySpread = 300
  231. partasdeff.Enabled = true
  232. for i = 1,100 do
  233. Ring2.Scale = Ring2.Scale + Vector3.new(2,2,2)
  234. Ring.Transparency = Ring.Transparency + 0.01
  235. S2.Scale = S2.Scale + Vector3.new(0.3,0.3,0.3)
  236. S.Transparency = S.Transparency + 0.01
  237. game:GetService("RunService").RenderStepped:wait()
  238. end
  239. S:remove()
  240. wait(1)
  241. SM:remove()
  242. hed.face.Texture = "rbxassetid://141107361"
  243. char.Shirt.ShirtTemplate = "rbxassetid://270992313"
  244. char.Pants:remove()
  245. v = Instance.new("Sound")
  246. v.SoundId = "rbxassetid://181384451"
  247. v.Parent = torso
  248. v.Looped = false
  249. v.Pitch = 1.04
  250. v.Volume = 1
  251. wait(.01)
  252. v:Play()
  253. z:Play()
  254. ----------------------------------------------------
  255. Debounces = {
  256. on = false;
  257. ks = false;
  258. CanAttack = true;
  259. CanJoke = true;
  260. NoIdl = false;
  261. Slashing = false;
  262. Slashed = false;
  263. Grabbing = false;
  264. Grabbed = false;
  265. }
  266. local Touche = {char.Name, }
  267. ----------------------------------------------------
  268. function lerp(a, b, t) -- Linear interpolation
  269. return a + (b - a)*t
  270. end
  271.  
  272. function slerp(a, b, t) --Spherical interpolation
  273. dot = a:Dot(b)
  274. if dot > 0.99999 or dot < -0.99999 then
  275. return t <= 0.5 and a or b
  276. else
  277. r = math.acos(dot)
  278. return (a*math.sin((1 - t)*r) + b*math.sin(t*r)) / math.sin(r)
  279. end
  280. end
  281.  
  282. function matrixInterpolate(a, b, t)
  283. local ax, ay, az, a00, a01, a02, a10, a11, a12, a20, a21, a22 = a:components()
  284. local bx, by, bz, b00, b01, b02, b10, b11, b12, b20, b21, b22 = b:components()
  285. local v0 = lerp(Vector3.new(ax, ay, az), Vector3.new(bx , by , bz), t) -- Position
  286. local v1 = slerp(Vector3.new(a00, a01, a02), Vector3.new(b00, b01, b02), t) -- Vector right
  287. local v2 = slerp(Vector3.new(a10, a11, a12), Vector3.new(b10, b11, b12), t) -- Vector up
  288. local v3 = slerp(Vector3.new(a20, a21, a22), Vector3.new(b20, b21, b22), t) -- Vector back
  289. local t = v1:Dot(v2)
  290. if not (t < 0 or t == 0 or t > 0) then -- Failsafe
  291. return CFrame.new()
  292. end
  293. return CFrame.new(
  294. v0.x, v0.y, v0.z,
  295. v1.x, v1.y, v1.z,
  296. v2.x, v2.y, v2.z,
  297. v3.x, v3.y, v3.z)
  298. end
  299. ----------------------------------------------------
  300. function genWeld(a,b)
  301. local w = Instance.new("Weld",a)
  302. w.Part0 = a
  303. w.Part1 = b
  304. return w
  305. end
  306. function weld(a, b)
  307. local weld = Instance.new("Weld")
  308. weld.Name = "W"
  309. weld.Part0 = a
  310. weld.Part1 = b
  311. weld.C0 = a.CFrame:inverse() * b.CFrame
  312. weld.Parent = a
  313. return weld;
  314. end
  315. ----------------------------------------------------
  316. function Lerp(c1,c2,al)
  317. local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
  318. local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
  319. for i,v in pairs(com1) do
  320. com1[i] = v+(com2[i]-v)*al
  321. end
  322. return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1)))
  323. end
  324. ----------------------------------------------------
  325. newWeld = function(wp0, wp1, wc0x, wc0y, wc0z)
  326. local wld = Instance.new("Weld", wp1)
  327. wld.Part0 = wp0
  328. wld.Part1 = wp1
  329. wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
  330. end
  331. ----------------------------------------------------
  332. for i,v in pairs(char:children()) do
  333. if v:IsA("Hat") then
  334. v:Destroy()
  335. end
  336. end
  337. for i,v in pairs(hed:children()) do
  338. if v:IsA("Sound") then
  339. v:Destroy()
  340. end
  341. end
  342. ----------------------------------------------------
  343. function HasntTouched(plrname)
  344. local ret = true
  345. for _, v in pairs(Touche) do
  346. if v == plrname then
  347. ret = false
  348. end
  349. end
  350. return ret
  351. end
  352. ----------------------------------------------------
  353. larm.Size = larm.Size * 5
  354. rarm.Size = rarm.Size * 5
  355. lleg.Size = lleg.Size * 5
  356. rleg.Size = rleg.Size * 5
  357. torso.Size = torso.Size * 5
  358. hed.Size = hed.Size * 5
  359. root.Size = root.Size * 5
  360. ----------------------------------------------------
  361. newWeld(torso, larm, -1.5, 0.5, 0)
  362. larm.Weld.C1 = CFrame.new(0, 0.5, 0)
  363. newWeld(torso, rarm, 1.5, 0.5, 0)
  364. rarm.Weld.C1 = CFrame.new(0, 0.5, 0)
  365. newWeld(torso, hed, 0, 1.5, 0)
  366. newWeld(torso, lleg, -0.5, -1, 0)
  367. lleg.Weld.C1 = CFrame.new(0, 1, 0)
  368. newWeld(torso, rleg, 0.5, -1, 0)
  369. rleg.Weld.C1 = CFrame.new(0, 1, 0)
  370. newWeld(root, torso, 0, -1, 0)
  371. torso.Weld.C1 = CFrame.new(0, -1, 0)
  372. ----------------------------------------------------
  373. local Part = Instance.new("Part",hed)
  374. Part.BrickColor = BrickColor.new("Really black")
  375. Part.Size = Vector3.new(1,1,1)
  376. Part.CanCollide = false
  377. Part.Material = "Neon"
  378. local M = Instance.new("SpecialMesh",Part)
  379. M.MeshId = "rbxassetid://62246019"
  380. M.Scale = Vector3.new(5,5,5)
  381. local Part2 = Instance.new("Weld",Part)
  382. Part2.Part0 = hed
  383. Part2.Part1 = Part
  384. Part2.C0 = CFrame.new(-0.2,1.5,0.8)
  385. ----------------------------------------------------
  386. ----------------------------------------------------
  387. ----------------------------------------------------
  388.  
  389. ----------------------------------------------------
  390. function weld5(part0, part1, c0, c1)
  391. weeld=Instance.new("Weld", part0)
  392. weeld.Part0=part0
  393. weeld.Part1=part1
  394. weeld.C0=c0
  395. weeld.C1=c1
  396. return weeld
  397. end
  398. ----------------------------------------------------
  399. function newRay(start,face,range,wat)
  400. local rey=Ray.new(start.p,(face.p-start.p).Unit*range)
  401. hit,pos=Workspace:FindPartOnRayWithIgnoreList(rey,wat)
  402. return rey,hit,pos
  403. end
  404. ----------------------------------------------------
  405. mod5 = Instance.new("Model",char)
  406.  
  407. function FindNearestTorso(Position,Distance,SinglePlayer)
  408. if SinglePlayer then return(SinglePlayer.Torso.CFrame.p -Position).magnitude < Distance end
  409. local List = {}
  410. for i,v in pairs(workspace:GetChildren())do
  411. if v:IsA("Model")then
  412. if v:findFirstChild("Torso")then
  413. if v ~= char then
  414. if(v.Torso.Position -Position).magnitude <= Distance then
  415. table.insert(List,v)
  416. end
  417. end
  418. end
  419. end
  420. end
  421. return List
  422. end
  423.  
  424. function Landing()
  425. part=Instance.new('Part',mod5)
  426. part.Anchored=true
  427. part.CanCollide=false
  428. part.FormFactor='Custom'
  429. part.Size=Vector3.new(.2,.2,.2)
  430. part.CFrame=root.CFrame*CFrame.new(0,-2,0)
  431. part.Transparency=.7
  432. part.BrickColor=BrickColor.new('Really black')
  433. mesh=Instance.new('SpecialMesh',part)
  434. mesh.MeshId='http://www.roblox.com/asset/?id=20329976'
  435. mesh.Scale=Vector3.new(10,5,10)
  436.  
  437. for i,v in pairs(FindNearestTorso(torso.CFrame.p,40))do
  438. if v:FindFirstChild('Humanoid') then
  439. v.Humanoid:TakeDamage(math.random(20,30))
  440. v.Humanoid.PlatformStand = true
  441. v:FindFirstChild("Torso").Velocity = hed.CFrame.lookVector * 100
  442. end
  443. end
  444.  
  445. coroutine.resume(coroutine.create(function()
  446. for i=0,3.8,0.05 do
  447. wait()
  448. part.CFrame=part.CFrame
  449. part.Transparency=i
  450. mesh.Scale=mesh.Scale+Vector3.new(1,0.2,1)
  451. end
  452. part.Parent = nil
  453. end))
  454. end
  455. ----------------------------------------------------
  456. mod4 = Instance.new("Model",char)
  457.  
  458. ptez = {0.7, 0.8, 0.9, 1}
  459.  
  460. function FindNearestTorso(Position,Distance,SinglePlayer)
  461. if SinglePlayer then return(SinglePlayer.Torso.CFrame.p -Position).magnitude < Distance end
  462. local List = {}
  463. for i,v in pairs(workspace:GetChildren())do
  464. if v:IsA("Model")then
  465. if v:findFirstChild("Torso")then
  466. if v ~= char then
  467. if(v.Torso.Position -Position).magnitude <= Distance then
  468. table.insert(List,v)
  469. end
  470. end
  471. end
  472. end
  473. end
  474. return List
  475. end
  476.  
  477. ----------------------------------------------------
  478.  
  479. local acos = math.acos
  480. local sqrt = math.sqrt
  481. local Vec3 = Vector3.new
  482. local fromAxisAngle = CFrame.fromAxisAngle
  483.  
  484. local function toAxisAngle(CFr)
  485. local X,Y,Z,R00,R01,R02,R10,R11,R12,R20,R21,R22 = CFr:components()
  486. local Angle = math.acos((R00+R11+R22-1)/2)
  487. local A = (R21-R12)^2+(R02-R20)^2+(R10-R01)^2
  488. A = A == 0 and 0.00001 or A
  489. local B = (R21-R12)^2+(R02-R20)^2+(R10-R01)^2
  490. B = B == 0 and 0.00001 or B
  491. local C = (R21-R12)^2+(R02-R20)^2+(R10-R01)^2
  492. C = C == 0 and 0.00001 or C
  493. local x = (R21-R12)/sqrt(A)
  494. local y = (R02-R20)/sqrt(B)
  495. local z = (R10-R01)/sqrt(C)
  496. return Vec3(x,y,z),Angle
  497. end
  498.  
  499. function ApplyTrig(Num,Func)
  500. local Min,Max = Func(0),Func(1)
  501. local i = Func(Num)
  502. return (i-Min)/(Max-Min)
  503. --[[if Func == "sin" then
  504. return (math.sin((1-Num)*math.pi)+1)/2
  505. elseif Func == "cos" then
  506. return (math.cos((1-Num)*math.pi)+1)/2
  507. end]]
  508. end
  509.  
  510. function LerpCFrame(CFrame1,CFrame2,Num)
  511. local Vec,Ang = toAxisAngle(CFrame1:inverse()*CFrame2)
  512. return CFrame1*fromAxisAngle(Vec,Ang*Num) + (CFrame2.p-CFrame1.p)*Num
  513. end
  514. mouse.KeyDown:connect(function(key)
  515. if key == "e" then
  516. if Debounces.CanAttack == true then
  517. Debounces.CanAttack = false
  518. Debounces.on = true
  519. Debounces.NoIdl = true
  520. for i = 1,20 do
  521. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(7.6,1,-3) * CFrame.Angles(1.3,0,0),.3)
  522. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-7.6,1,0) * CFrame.Angles(-0.5,0,0),.3)
  523. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,7.5,0) * CFrame.Angles(0,0,0),.3)
  524. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -8, 0) * CFrame.Angles(-0.5,0,0),.3)
  525. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-2.5, -3.3,-3.5) *CFrame.Angles(0.5,0,0),.3)
  526. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(2.5, -7.6,0.5) * CFrame.Angles(-1.1,0,0),.3)
  527. if Debounces.on == false then break end
  528. wait()
  529. end
  530. local HitBox = Instance.new("Part",char)
  531. HitBox.Size = Vector3.new(5,5,5)
  532. HitBox.CanCollide = false
  533. HitBox.Transparency = math.huge
  534. local HitBox2 = Instance.new("Weld",HitBox)
  535. HitBox2.Part0 = rarm
  536. HitBox2.Part1 = HitBox
  537. HitBox2.C0 = CFrame.new(0,-4.5,0)
  538. HitBox.Touched:connect(function(hit)
  539. if hit.Parent:FindFirstChild("Humanoid") and hit.Parent ~= nil then
  540. if not DD then DD = true
  541. hit.Parent.Humanoid.PlatformStand = true
  542. local We = Instance.new("Weld",hit.Parent.Torso)
  543. We.Part0 = rarm
  544. We.Part1 = hit.Parent.Torso
  545. We.C0 = CFrame.new(0,-5,0)*CFrame.Angles(-1.55,0,0)
  546. wait(1)
  547. for i = 1,20 do
  548. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(7.6,4,0) * CFrame.Angles(3.1,0,1),.3)
  549. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-7.6,4,0) * CFrame.Angles(-3.1,0,-1),.3)
  550. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,7.5,0) * CFrame.Angles(1,0,0),.3)
  551. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -8, 0) * CFrame.Angles(-0.5,0,0),.3)
  552. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-2.5, -3.3,-3.5) *CFrame.Angles(0.5,0,0),.3)
  553. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(2.5, -7.6,0.5) * CFrame.Angles(-1.1,0,0),.3)
  554. if Debounces.on == false then break end
  555. wait()
  556. end
  557. hit.Parent.Humanoid:TakeDamage(20)
  558. for i = 1,20 do
  559. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(6,4,-1) * CFrame.Angles(1.55,0,-1),.3)
  560. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-6,4,-1) * CFrame.Angles(1.55,0,1),.3)
  561. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,7.5,0) * CFrame.Angles(-0.4,0,0),.3)
  562. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -8, 0) * CFrame.Angles(-0.5,0,0),.3)
  563. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-2.5, -3.3,-3.5) *CFrame.Angles(0.5,0,0),.3)
  564. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(2.5, -7.6,0.5) * CFrame.Angles(-1.1,0,0),.3)
  565. if Debounces.on == false then break end
  566. wait()
  567. end
  568. for i = 1,20 do
  569. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(5,4,-1) * CFrame.Angles(1.55,0,-1.3),.3)
  570. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-5,4,-1) * CFrame.Angles(1.55,0,1.3),.3)
  571. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,7.5,0) * CFrame.Angles(-0.4,0,0),.3)
  572. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -8, 0) * CFrame.Angles(-0.5,0,0),.3)
  573. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-2.5, -3.3,-3.5) *CFrame.Angles(0.5,0,0),.3)
  574. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(2.5, -7.6,0.5) * CFrame.Angles(-1.1,0,0),.3)
  575. if Debounces.on == false then break end
  576. wait()
  577. end
  578. local partasdeff = Instance.new("ParticleEmitter",hit.Parent.Torso)
  579. partasdeff.Color = ColorSequence.new(Color3.new(1, 0, 0), Color3.new(1, 0, 0))
  580. partasdeff.LightEmission = .1
  581. partasdeff.Size = NumberSequence.new(0.2)
  582. partasdeff.Texture = "http://www.roblox.com/asset/?ID=380529823"
  583. aaa = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.2),NumberSequenceKeypoint.new(1, 5)})
  584. bbb = NumberSequence.new({NumberSequenceKeypoint.new(0, 1),NumberSequenceKeypoint.new(0.0636, 0), NumberSequenceKeypoint.new(1, 1)})
  585. partasdeff.Transparency = bbb
  586. partasdeff.Size = aaa
  587. partasdeff.ZOffset = .9
  588. partasdeff.Acceleration = Vector3.new(0, -5, 0)
  589. partasdeff.LockedToPart = false
  590. partasdeff.EmissionDirection = "Top"
  591. partasdeff.Lifetime = NumberRange.new(1, 2)
  592. partasdeff.Rate = 1000
  593. partasdeff.Rotation = NumberRange.new(-100, 100)
  594. partasdeff.RotSpeed = NumberRange.new(-100, 100)
  595. partasdeff.Speed = NumberRange.new(10)
  596. partasdeff.VelocitySpread = 300
  597. partasdeff.Enabled = true
  598. wait(1.5)
  599. hit.Parent:BreakJoints()
  600. We:remove()
  601. partasdeff.Enabled = false
  602. if Debounces.CanAttack == false then
  603. Debounces.CanAttack = true
  604. Debounces.on = false
  605. Debounces.NoIdl = false
  606. end
  607. wait(1313)
  608. DD = false
  609. end
  610. end
  611. end)
  612. ---ANIMATION REPLAY
  613. end
  614. end
  615. end)
  616. mouse.KeyDown:connect(function(key)
  617. if key == "r" then
  618. if Debounces.CanAttack == true then
  619. Debounces.CanAttack = false
  620. Debounces.on = true
  621. Debounces.NoIdl = true
  622. for i = 1,20 do
  623. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(7.6,1,0) * CFrame.Angles(0.5,0,0),.3)
  624. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-7.6,1,0) * CFrame.Angles(-0.5,0,0),.3)
  625. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,7.5,0) * CFrame.Angles(0,0,0),.3)
  626. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -2.2, 0) * CFrame.Angles(-0.5,0,0),.3)
  627. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-2.5, -8.8, -2) *CFrame.Angles(0.5,0,0),.3)
  628. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(2.5, -7.6, 1.2) * CFrame.Angles(-1.5,0,0),.3)
  629. if Debounces.on == false then break end
  630. wait()
  631. end
  632. local HitBox = Instance.new("Part",char)
  633. HitBox.Size = Vector3.new(5,5,5)
  634. HitBox.CanCollide = false
  635. HitBox.Transparency = math.huge
  636. local HitBox2 = Instance.new("Weld",HitBox)
  637. HitBox2.Part0 = rleg
  638. HitBox2.Part1 = HitBox
  639. HitBox2.C0 = CFrame.new(0,-1.1,0)
  640. local SFXZ = Instance.new("Sound",torso)
  641. SFXZ.SoundId = "rbxassetid://169259383"
  642. SFXZ.Volume = math.huge
  643. SFXZ.Pitch = 0.5
  644. SFXZ.Looped = false
  645. wait(0.01)
  646. SFXZ:Play()
  647. HitBox.Touched:connect(function(hit)
  648. if hit.Parent:FindFirstChild("Humanoid") and hit.Parent ~= nil then
  649. local SFXZ = Instance.new("Sound",torso)
  650. SFXZ.SoundId = "rbxassetid://743886825"
  651. SFXZ.Volume = 1
  652. SFXZ.Pitch = 0.5
  653. SFXZ.Looped = false
  654. SFXZ:Play()
  655. HitBox:remove()
  656. hit.Parent.Humanoid:TakeDamage(44)
  657. hit.Parent.Humanoid.PlatformStand = true
  658. local Fl = Instance.new("BodyVelocity",hit.Parent.Torso)
  659. Fl.maxForce = Vector3.new(math.huge,math.huge,math.huge)
  660. Fl.velocity = rleg.CFrame.lookVector*350
  661. wait(0.1)
  662. Fl:remove()
  663. end
  664. end)
  665. for i = 1,20 do
  666. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(7.6,1,0) * CFrame.Angles(-0.5,0,0),.3)
  667. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-7.6,1,0) * CFrame.Angles(0.5,0,0),.3)
  668. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,7.5,0) * CFrame.Angles(0,0,0),.3)
  669. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -2.2, 0) * CFrame.Angles(0.5,0,0),.3)
  670. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-2.5, -8.8, 2) *CFrame.Angles(-0.5,0,0),.3)
  671. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(2.5, -7.6, -1.2) * CFrame.Angles(1.5,0,0),.3)
  672. if Debounces.on == false then break end
  673. wait()
  674. end
  675. if Debounces.CanAttack == false then
  676. Debounces.CanAttack = true
  677. Debounces.on = false
  678. Debounces.NoIdl = false
  679. HitBox:remove()
  680. end
  681. end
  682. end
  683. end)
  684. ----------------------------------------------------
  685. mouse.KeyDown:connect(function(key)
  686. if string.byte(key) == 48 then
  687. char.Humanoid.WalkSpeed = 34
  688. end
  689. end)
  690. mouse.KeyUp:connect(function(key)
  691. if string.byte(key) == 48 then
  692. char.Humanoid.WalkSpeed = 5
  693. end
  694. end)
  695. ----------------------------------------------------
  696. local animpose = "Idle"
  697. local lastanimpose = "Idle"
  698. local sine = 0
  699. local change = 1
  700. local val = 0
  701. local ffing = false
  702. ----------------------------------------------------
  703. local x = Instance.new("Sound", char.Torso)
  704. x.SoundId = "http://www.roblox.com/asset/?id=273962540"
  705. x.Looped = true
  706. x.Volume = 1
  707. x.Pitch = 1
  708. local footsteps = false
  709. -------------------------------
  710. game:GetService("RunService").RenderStepped:connect(function()
  711. rarm.BrickColor = ASD
  712. larm.BrickColor = ASD
  713. rleg.BrickColor = ASD
  714. lleg.BrickColor = ASD
  715. hed.BrickColor = ASD
  716. torso.BrickColor = ASD
  717. --[[if char.Humanoid.Jump == true then
  718. jump = true
  719. else
  720. jump = false
  721. end]]
  722. char.Humanoid.FreeFalling:connect(function(f)
  723. if f then
  724. ffing = true
  725. else
  726. ffing = false
  727. end
  728. end)
  729. sine = sine + change
  730. if jumpn == true then
  731. animpose = "Jumping"
  732. elseif ffing == true then
  733. animpose = "Freefalling"
  734. elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 2 then
  735. animpose = "Idle"
  736. elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 20 then
  737. animpose = "Walking"
  738. elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude > 20 then
  739. animpose = "Running"
  740. end
  741. if animpose ~= lastanimpose then
  742. sine = 0
  743. if Debounces.NoIdl == false then
  744. if animpose == "Idle" then
  745. for i = 1, 2 do
  746. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(8,.9,0)*CFrame.Angles(math.rad(90),math.rad(0),math.rad(20)), 0.2)
  747. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-8,.9,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(-20)), 0.2)
  748. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,7.5,-.2)*CFrame.Angles(math.rad(-14),math.rad(0),0), 0.2)
  749. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -2.2, 0) * CFrame.Angles(0, math.rad(0), 0), 0.2)
  750. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-3, -8.8, 0) * CFrame.Angles(0, 0, math.rad(-10)), 0.2)
  751. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(3, -8.8, 0) * CFrame.Angles(0, 0, math.rad(10)), 0.2)
  752. end
  753. elseif animpose == "Walking" then
  754. for i = 1, 2 do
  755. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(7.3, .9, 0) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(20)), 0.2)
  756. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-7.3, .9, 0)*CFrame.Angles(0, math.rad(1), math.rad(-10)), 0.2)
  757. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,7.5,0)*CFrame.Angles(math.rad(-8), math.rad(0), math.rad(0)),0.2)
  758. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -2.2, 0) * CFrame.Angles(math.rad(-4), 0, math.rad(0)), 0.2)
  759. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-2.5, -8.8, -.05) * CFrame.Angles(math.rad(-18), 0, 0), .4)
  760. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(2.5, -8.8, -.05) * CFrame.Angles(math.rad(-18), 0, 0), .4)
  761. end
  762. elseif animpose == "Running" then
  763. for i = 1, 2 do
  764. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(7.8, 0.9, .5) * CFrame.Angles(math.rad(-10), math.rad(-40), math.rad(50)), 0.2)
  765. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-7.8, 1.2, 0-1*math.cos(sine/4)/2)*CFrame.Angles(math.rad(50-80*math.cos(sine/8)/2), math.rad(0), math.rad(0-70*math.cos(sine/8)/2)), 0.2)
  766. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,7.5,0)*CFrame.Angles(math.rad(6+8*math.cos(sine/4)/1.8), math.rad(0), math.rad(0)),0.2)
  767. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -2.2+0.2*math.cos(sine/4)/2, 0) * CFrame.Angles(math.rad(-14+4*math.cos(sine/4)/2), 0, math.rad(0)), 0.2)
  768. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-2.5, -8.8-0.44*math.cos(sine/8)/2.4, -.15 + math.sin(sine/8)/1.5) * CFrame.Angles(math.rad(-20) + -math.sin(sine/8)/1.7, 0, 0), .4)
  769. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(2.5, -8.8+0.44*math.cos(sine/8)/2.4, -.15 + -math.sin(sine/8)/1.5) * CFrame.Angles(math.rad(-20) + math.sin(sine/8)/1.7, 0, 0), .4)
  770. end
  771. wait()
  772. end
  773. else
  774. end
  775. end
  776. lastanimpose = animpose
  777. if Debounces.NoIdl == false then
  778. if animpose == "Idle" then
  779. if stanceToggle == "Normal" then
  780. change = 0.5
  781. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(8,1,0)*CFrame.Angles(0,0,0-.1*math.sin(tick()*1))*CFrame.Angles(0,0,0.3),.2)
  782. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-8,1,0)*CFrame.Angles(0,0,0+.1*math.sin(tick()*1))*CFrame.Angles(0,0,-0.3),.2)
  783. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,7.5,-.2)*CFrame.Angles(math.rad(-14+1*math.cos(sine/14)),math.rad(40),0), 0.2)
  784. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -2.2, 0) * CFrame.Angles(0, math.rad(-40), 0), 0.2)
  785. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-3, -8.8, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-10)), 0.2)
  786. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(3, -8.8, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(10)), 0.2)
  787. elseif stanceToggle == "Sitting" then
  788. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(3, .9, 0) * CFrame.Angles(math.rad(100-1*math.cos(sine/14)), math.rad(0), math.rad(20)), 0.2)
  789. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-2, .9, -1)*CFrame.Angles(math.rad(78+1*math.cos(sine/14)), math.rad(0), math.rad(50)), 0.2)
  790. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0, 3, -.3) * CFrame.Angles(math.rad(-14+1*math.cos(sine/14)), math.rad(0), math.rad(0)),0.2)
  791. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -3, 0) * CFrame.Angles(math.rad(-10+1*math.cos(sine/14)), 0, math.rad(0)), 0.2)
  792. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-1, -1, -2) * CFrame.Angles(math.rad(-10-1*math.cos(sine/14)), 0, 0), 0.2)
  793. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(1, -3, .6) * CFrame.Angles(math.rad(-50-1*math.cos(sine/14)), 0, 0), 0.2)
  794. end
  795. elseif animpose == "Walking" then
  796. if stanceToggle == "Normal" then
  797. change = 1
  798. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(7.3,0.8,0)*CFrame.Angles(0-.5*math.sin(tick()*2/0.7),0,0),.3)
  799. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-7.3,0.8,0)*CFrame.Angles(0+.5*math.sin(tick()*2/0.7),0,0),.3)
  800. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,7.5,0)*CFrame.Angles(-0.2,0,0),.3)
  801. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0,-2.2,0)*CFrame.new(0,0-.1*math.sin(tick()*2),0)*CFrame.Angles(0,0,0),.3)
  802. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-2.5, -8.8-0.3*math.cos(sine/16)/4, -.05 + math.sin(sine/16)/2) * CFrame.Angles(math.rad(-18) + -math.sin(sine/16)/2.3, 0, 0), .4)
  803. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(2.5, -8.8+0.3*math.cos(sine/16)/4, -.05 + -math.sin(sine/16)/2) * CFrame.Angles(math.rad(-18) + math.sin(sine/16)/2.3, 0, 0), .4)
  804. end
  805. elseif animpose == "Running" then
  806. change = 1
  807. rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(7.8,0.5,0)*CFrame.Angles(0-.5*math.sin(tick()*7),0,0),.3)
  808. larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-7.8,0.5,0)*CFrame.Angles(0+.5*math.sin(tick()*7),0,0),.3)
  809. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,7.5,0)*CFrame.Angles(math.rad(6+6*math.cos(sine/4)/1.8), math.rad(0), math.rad(0)),0.2)
  810. torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -2.2+0.2*math.cos(sine/4)/2, 0) * CFrame.Angles(math.rad(-14+10*math.cos(sine/4)/2), 0, math.rad(0)), 0.2)
  811. lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-2.5, -8.8-0.44*math.cos(sine/8)/2.4, -.15 + math.sin(sine/8)/1.5) * CFrame.Angles(math.rad(-20) + -math.sin(sine/8)/1.7, 0, 0), .4)
  812. rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(2.5, -8.8+0.44*math.cos(sine/8 )/2.4, -.15 + -math.sin(sine/8)/1.5) * CFrame.Angles(math.rad(-20) + math.sin(sine/8)/1.7, 0, 0), .4)
  813. end
  814. end
  815. if animpose == "Walking" then
  816. if footsteps == false then
  817. x:Play()
  818. footsteps = true
  819. end
  820. x.Pitch = 1.1
  821. elseif animpose == "Idle" then
  822. x:Stop()
  823. footsteps = false
  824. elseif animpose == "Running" then
  825. x.Pitch = 1.2
  826. if footsteps == false then
  827. x:Play()
  828. footsteps = true
  829. end
  830. end
  831. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement