Advertisement
bmrx13

One last thing before I go.

Dec 9th, 2018
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 26.58 KB | None | 0 0
  1.  
  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 by Mokiros")
  7. local rp = RealPlayer
  8. script.Parent = rp.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,Functions={},Connect=function(self,f)table.insert(self.Functions,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(),Button2Up=fakeEvent(),Button2Down=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 then
  34. for _,f in pairs(t.Functions) do
  35. f(...)
  36. end
  37. end
  38. end
  39. m.TrigEvent = te
  40. UIS.TrigEvent = te
  41.  
  42. Event.OnServerEvent:Connect(function(plr,io)
  43. if plr~=rp then return end
  44. m.Target = io.Target
  45. m.Hit = io.Hit
  46. if not io.isMouse then
  47. local b = io.UserInputState == Enum.UserInputState.Begin
  48. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  49. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  50. end
  51. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  52. return m:TrigEvent(b and "Button2Down" or "Button2Up")
  53. end
  54. for _,t in pairs(CAS.Actions) do
  55. for _,k in pairs(t.Keys) do
  56. if k==io.KeyCode then
  57. t.Function(t.Name,io.UserInputState,io)
  58. end
  59. end
  60. end
  61. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  62. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  63. end
  64. end)
  65. Event.Parent = NLS([==[
  66. local Player = game:GetService("Players").LocalPlayer
  67. local Event = script:WaitForChild("UserInput_Event")
  68.  
  69. local Mouse = Player:GetMouse()
  70. local UIS = game:GetService("UserInputService")
  71. local input = function(io,a)
  72. if a then return end
  73. --Since InputObject is a client-side instance, we create and pass table instead
  74. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  75. end
  76. UIS.InputBegan:Connect(input)
  77. UIS.InputEnded:Connect(input)
  78.  
  79. local h,t
  80. --Give the server mouse data 30 times every second, but only if the values changed
  81. --If player is not moving their mouse, client won't fire events
  82. while wait(1/30) do
  83. if h~=Mouse.Hit or t~=Mouse.Target then
  84. h,t=Mouse.Hit,Mouse.Target
  85. Event:FireServer({isMouse=true,Target=t,Hit=h})
  86. end
  87. end]==],Player.Character)
  88.  
  89. ----Sandboxed game object that allows the usage of client-side methods and services
  90. --Real game object
  91. local _rg = game
  92.  
  93. --Metatable for fake service
  94. local fsmt = {
  95. __index = function(self,k)
  96. local s = rawget(self,"_RealService")
  97. if s then
  98. return typeof(s[k])=="function"
  99. and function(_,...)return s[k](s,...)end or s[k]
  100. end
  101. end,
  102. __newindex = function(self,k,v)
  103. local s = rawget(self,"_RealService")
  104. if s then s[k]=v end
  105. end
  106. }
  107. local function FakeService(t,RealService)
  108. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  109. return setmetatable(t,fsmt)
  110. end
  111.  
  112. --Fake game object
  113. local g = {
  114. GetService = function(self,s)
  115. return rawget(self,s) or _rg:GetService(s)
  116. end,
  117. Players = FakeService({
  118. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  119. },"Players"),
  120. UserInputService = FakeService(UIS,"UserInputService"),
  121. ContextActionService = FakeService(CAS,"ContextActionService"),
  122. RunService = FakeService({
  123. _btrs = {},
  124. RenderStepped = _rg:GetService("RunService").Heartbeat,
  125. BindToRenderStep = function(self,name,_,fun)
  126. self._btrs[name] = self.Heartbeat:Connect(fun)
  127. end,
  128. UnbindFromRenderStep = function(self,name)
  129. self._btrs[name]:Disconnect()
  130. end,
  131. },"RunService")
  132. }
  133. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  134. g.service = g.GetService
  135. FakeService(g,game)
  136. --Changing owner to fake player object to support owner:GetMouse()
  137. game,owner = g,g.Players.LocalPlayer
  138. end
  139.  
  140.  
  141.  
  142. p = game.Players.LocalPlayer
  143. char = p.Character
  144. pgui = p.PlayerGui
  145. Debounce = false
  146. local sin, cos, atan, rad, rand, rands = math.sin, math.cos, math.atan, math.rad, math.random, math.randomseed
  147. mouse= p:GetMouse()
  148. rarm = char["Right Arm"]
  149. larm = char["Left Arm"]
  150. rleg = char["Right Leg"]
  151. lleg = char["Left Leg"]
  152. local Euler = CFrame.fromEulerAnglesXYZ
  153. hed = char.Head
  154. torso = char.Torso
  155. root = char.HumanoidRootPart
  156. sinestep = 0
  157. melee = false
  158. smelee = false
  159. local sine, change = 0, 1
  160. local animpose = "Idle"
  161. local lastanimpose = "Idle"
  162. local sine = 0
  163. local change = 1
  164. local rs = game:service'RunService'
  165. local srs = rs.Stepped
  166. local animstop = false
  167. local animstopr = false
  168. local cf, ang, eu, v3 = CFrame.new, CFrame.Angles, CFrame.fromEulerAnglesXYZ, Vector3.new
  169. function clerp(c1,c2,al)
  170. local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
  171. local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
  172. for i,v in pairs(com1) do
  173. com1[i] = v+(com2[i]-v)*al
  174. end
  175. return cf(com1[1],com1[2],com1[3]) * ang(select(4,unpack(com1)))
  176. end
  177. srs:connect(function()
  178. sine = tick() * (change * 25)
  179. end)
  180. --Welds--
  181. newWeld = function(wp0, wp1, wc0x, wc0y, wc0z)
  182. local wld = Instance.new("Weld", wp1)
  183. wld.Part0 = wp0
  184. wld.Part1 = wp1
  185. wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
  186. end
  187. newWeld(torso, larm, -1.5, 0.5, 0)
  188. larm.Weld.C1 = CFrame.new(0, 0.5, 0)
  189. newWeld(torso, rarm, 1.5, 0.5, 0)
  190. rarm.Weld.C1 = CFrame.new(0, 0.5, 0)
  191. newWeld(torso, hed, 0, 1.5, 0)
  192. newWeld(torso, lleg, -0.5, -1, 0)
  193. lleg.Weld.C1 = CFrame.new(0, 1, 0)
  194. newWeld(torso, rleg, 0.5, -1, 0)
  195. rleg.Weld.C1 = CFrame.new(0, 1, 0)
  196. newWeld(root, torso, 0, -1, 0)
  197. torso.Weld.C1 = CFrame.new(0, -1, 0)
  198.  
  199. o1 = Instance.new("Part")
  200. o1.Parent = char
  201. o1.CanCollide = false
  202. o1.Shape = Enum.PartType.Ball
  203. o1.Size = Vector3.new(1.67000008, 1.67000008, 1.67000008)
  204. o1.BottomSurface = Enum.SurfaceType.Smooth
  205. o1.TopSurface = Enum.SurfaceType.Smooth
  206. newWeld(torso, o1, 0, -1, 0)
  207. o1.Weld.C1 = CFrame.new(0,-1,1.7)
  208. o1.BrickColor = BrickColor.new("New Yeller")
  209. o2 = Instance.new("Decal",o1)
  210. o2.Texture = "http://www.roblox.com/asset/?id=93815042"
  211.  
  212.  
  213. Knife = Instance.new("Part")
  214. Knim = Instance.new("SpecialMesh")
  215. Knife.Name = "Handle"
  216. Knife.Parent = game.Lighting
  217. Knife.CanCollide = false
  218. Knife.Anchored = false
  219. Knife.Material = Enum.Material.DiamondPlate
  220. Knife.BrickColor = BrickColor.new("Really black")
  221. Knife.Reflectance = 0.0099999997764826
  222. Knife.Elasticity = 0
  223. Knife.FormFactor = Enum.FormFactor.Custom
  224. Knife.Size = Vector3.new(0.400000006, 5, 0.800000012)
  225. Knife.BottomSurface = Enum.SurfaceType.Smooth
  226. Knife.TopSurface = Enum.SurfaceType.Smooth
  227. Knife.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  228. Knim.Parent = Knife
  229. Knim.MeshId = "http://www.roblox.com/asset/?id=121944778 "
  230. Knim.TextureId = "http://www.roblox.com/asset/?id=162822166"
  231. Knim.MeshType = Enum.MeshType.FileMesh
  232. Inst = Instance.new
  233. BC = BrickColor.new
  234. Vec = Vector3.new
  235. Colour1 = "New Yeller"
  236. Cf = CFrame.new
  237. local function MakeWave()
  238. local Wave = Inst("Model", workspace)
  239. Wave.Name = "Wave"
  240. local WM = Inst("Part", Wave)
  241. WM.BrickColor = BC("New Yeller")
  242. WM.Material = "Neon"
  243. WM.Name = "WavePart"
  244. WM.Position = Vec(10.3, 7.6, -239.4)
  245. WM.Rotation = Vec(-180, 0, -180)
  246. WM.Anchored = true
  247. WM.CanCollide = false
  248. WM.Locked = true
  249. WM.Size = Vec(1, 2.4, 1)
  250. local W1 = Inst("Part", Wave)
  251. W1.BrickColor = BC(Colour1)
  252. W1.Material = "Neon"
  253. W1.Name = "WavePart"
  254. W1.Position = Vec(10.3, 9.648, -239.664)
  255. W1.Rotation = Vec(165, 0, -180)
  256. W1.Anchored = true
  257. W1.CanCollide = false
  258. W1.Locked = true
  259. W1.Size = Vec(1, 2.1, 1)
  260. local W2 = Inst("Part", Wave)
  261. W2.BrickColor = BC(Colour1)
  262. W2.Material = "Neon"
  263. W2.Name = "WavePart"
  264. W2.Position = Vec(10.3, 11.4, -240.4)
  265. W2.Rotation = Vec(150, 0, -180)
  266. W2.Anchored = true
  267. W2.CanCollide = false
  268. W2.Locked = true
  269. W2.Size = Vec(1, 2, 1)
  270. local W3 = Inst("Part", Wave)
  271. W3.BrickColor = BC(Colour1)
  272. W3.Material = "Neon"
  273. W3.Name = "WavePart"
  274. W3.Position = Vec(10.3, 5.552, -239.663)
  275. W3.Rotation = Vec(-165, 0, -180)
  276. W3.Anchored = true
  277. W3.CanCollide = false
  278. W3.Locked = true
  279. W3.Size = Vec(1, 2.1, 1)
  280. local W4 = Inst("Part", Wave)
  281. W4.BrickColor = BC(Colour1)
  282. W4.Material = "Neon"
  283. W4.Name = "WavePart"
  284. W4.Position = Vec(10.3, 3.8, -240.4)
  285. W4.Rotation = Vec(-150, 0, -180)
  286. W4.Anchored = true
  287. W4.CanCollide = false
  288. W4.Locked = true
  289. W4.Size = Vec(1, 2, 1)
  290. local WH = Inst("Part", Wave)
  291. WH.Transparency = 1
  292. WH.Name = "WaveHitbox"
  293. WH.Position = Vec(10.3, 7.6, -240.2)
  294. WH.Rotation = Vec(-180, 0, -180)
  295. WH.Anchored = true
  296. WH.CanCollide = false
  297. WH.Locked = true
  298. WH.Size = Vec(5, 12, 8)
  299. for _, w in pairs(Wave:GetChildren()) do
  300. if w:IsA("BasePart") and w ~= WH then
  301. local W = Inst("Weld", WH)
  302. W.Part0 = WH
  303. W.Part1 = w
  304. W.C0 = WH.CFrame:inverse() * Cf(WH.Position)
  305. W.C1 = w.CFrame:inverse() * Cf(WH.Position)
  306. local M = Inst("BlockMesh", w)
  307. M.Scale = Vec(0, 1, 1)
  308. end
  309. end
  310. local SiP = {NumberSequenceKeypoint.new(0, 1, 0), NumberSequenceKeypoint.new(1, .188, 0)}
  311. local TrP = {NumberSequenceKeypoint.new(0, 0, 0), NumberSequenceKeypoint.new(1, 1, 0)}
  312. local PE = Inst("ParticleEmitter", WH)
  313. PE.Color = ColorSequence.new(BC(Colour1).Color)
  314. PE.LightEmission = 1
  315. PE.Size = NumberSequence.new(SiP)
  316. PE.Transparency = NumberSequence.new(TrP)
  317. PE.EmissionDirection = "Back"
  318. PE.Lifetime = NumberRange.new(.2, .8)
  319. PE.Rate = 500
  320. PE.Rotation = NumberRange.new(60, 120)
  321. PE.RotSpeed = NumberRange.new(120, 360)
  322. PE.Speed = NumberRange.new(30)
  323. return Wave, WH
  324. end
  325. --Mouse Attack--
  326. hit1 = true
  327. hit2 = false
  328. hited = false
  329. attackdeb = false
  330. mouse.Button1Down:connect(function()
  331. if melee == false then
  332. if smelee == false then
  333. if Debounce == false then
  334. Debounce = true
  335. char.Humanoid.WalkSpeed = 0
  336. local Sound = Instance.new("Sound",o1)
  337. Sound.SoundId = "rbxassetid://138097010"
  338. Sound:Play()
  339. local Eff = Instance.new("Part",o1)
  340. Eff.Size = Vector3.new(3,3,3)
  341. Eff.CFrame = o1.CFrame
  342. Eff.CanCollide = false
  343. Eff.Anchored = true
  344. Eff.Transparency = 0.5
  345. Eff.Material = "Neon"
  346. Eff.BrickColor = BrickColor.new("Really red")
  347. for i = 1,100 do
  348. wait()
  349. Eff.CFrame = Eff.CFrame * CFrame.Angles(math.random(),math.random(),math.random())
  350. end
  351. local Beam = Instance.new("Part",o1)
  352. Beam.Size = Vector3.new(3,3,3)
  353. Beam.CFrame = torso.CFrame * CFrame.new(0,0,-2)
  354. Beam.CanCollide = false
  355. Beam.Anchored = true
  356. Beam.Transparency = 0.5
  357. Beam.Material = "Neon"
  358. Beam.BrickColor = BrickColor.new("Really red")
  359. local si = 0
  360. Sound.SoundId = 'rbxassetid://164826470'
  361. Sound:Play()
  362. for i = 1, 100 do
  363. si = si + 1
  364. Eff.CFrame = Eff.CFrame * CFrame.Angles(math.random(),math.random(),math.random())
  365. Beam.Size = Beam.Size + Vector3.new(0, 0, 4)
  366. Beam.Touched:connect(function(Hit)
  367. if Hit.Anchored == false and Hit.Parent ~= char then
  368. Hit:remove()
  369. end
  370. wait()
  371. end)
  372. Beam.CFrame = char.HumanoidRootPart.CFrame * CFrame.new(0, 0, -4 + -2 * si)
  373. wait()
  374. end
  375. for i = 1,6 do
  376. wait()
  377. Beam.Size = Beam.Size - Vector3.new(.5, 0, 0)
  378. end
  379. Beam:Destroy()
  380. Eff:Destroy()
  381. Sound:Destroy()
  382. char.Humanoid.WalkSpeed = 8
  383. Debounce = false
  384. end
  385. end
  386. end
  387. if melee == true then
  388. if Debounce == false then
  389. Debounce = true
  390. animstopr = true
  391. for i=1,10 do
  392. wait()
  393. rarm.Weld.C1 = clerp(rarm.Weld.C1, cf(-0.3,.5,0.5) * ang(rad(-120),rad(0),rad(-90)),0.3)
  394. end
  395. for i=1,6 do
  396. wait()
  397. rarm.Weld.C1 = clerp(rarm.Weld.C1, cf(-0.2,0,0) * ang(rad(20),rad(0),rad(-90)),0.3)
  398. end
  399. local Wave, WHB = MakeWave()
  400. for _, p in pairs(Wave:GetChildren()) do
  401. if p:IsA("BasePart") then
  402. p.Anchored = false
  403. end
  404. end
  405. WHB.CFrame = root.CFrame * Euler(0, 0, rad(90))
  406. local Vel = Inst("BodyVelocity", WHB)
  407. Vel.MaxForce = Vec(math.huge, math.huge, math.huge)
  408. Vel.Velocity = WHB.CFrame.lookVector * 220
  409. local Gyr = Inst("BodyGyro", WHB)
  410. Gyr.CFrame = WHB.CFrame
  411. Gyr.MaxTorque = Vec(math.huge, math.huge, math.huge)
  412. local attack = false
  413. warn("Made by Owlv?")
  414.  
  415. local list = {}
  416. local numFrags = 2
  417. math.randomseed(tick())
  418. WHB.Touched:connect(function(hit)
  419. if hit.Name ~= "Fragment" and hit.Name ~= "Base" and hit.Parent ~= char and hit.Parent.Parent ~= char then
  420. local sizeX = hit.Size.X/numFrags
  421. local sizeY = hit.Size.Y/numFrags
  422. local sizeZ = hit.Size.Z/numFrags
  423.  
  424. local startX = (hit.Position.X - hit.Size.X/2) + sizeX/2
  425. local startY = (hit.Position.Y - hit.Size.Y/2) + sizeY/2
  426. local startZ = (hit.Position.Z - hit.Size.Z/2) + sizeZ/2
  427.  
  428. for x=0,numFrags-1 do
  429. for y=0,numFrags-1 do
  430. for z=0,numFrags-1 do
  431. local part = Instance.new("Part")
  432. part.Size = Vector3.new(sizeX,sizeY,sizeZ)
  433. part.BrickColor = hit.BrickColor
  434. part.Material = hit.Material
  435. part.Transparency = hit.Transparency
  436. part.Reflectance = hit.Reflectance
  437. part.CanCollide = true
  438. part.CFrame = CFrame.new(startX+x*sizeX, startY+y*sizeY, startZ+z*sizeZ)
  439. part.Anchored = true
  440. table.insert(list, part)
  441. part.Name = "Fragment"
  442. part.Parent = hit.Parent
  443. end
  444. end
  445. end
  446.  
  447. hit:Destroy()
  448.  
  449. for i,v in pairs(list) do
  450. v.Anchored = false
  451. end
  452.  
  453. end
  454. end)
  455. Debounce = false
  456. animstopr = false
  457. end
  458.  
  459. end
  460. if smelee == true then
  461. if melee == false then
  462. if Debounce == false then
  463. Debounce = true
  464. animstopr = true
  465. attackdeb = true
  466. Knife.Touched:connect(function(hit)
  467. if attackdeb == false then
  468. local ehum = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
  469. if ehum ~= char.Humanoid and ehum ~= nil then
  470. attackdeb = true
  471.  
  472. hit.Parent.Head.face.Texture = "http://www.roblox.com/asset/?id=93815042"
  473. local Head = hit.Parent:FindFirstChild("Head")
  474. local i
  475. local ch = hit.Parent:GetChildren()
  476. for i = 1,#ch do
  477. if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" or ch[i].ClassName == "Script" then
  478. ch[i]:remove()
  479. end
  480. end
  481. local function Scan(ch)
  482. local e
  483. for e = 1,#ch do
  484. Scan(ch[e]:GetChildren())
  485. if ch[e].ClassName == "Weld" or ch[e].ClassName == "Motor6D" then
  486. ch[e]:remove()
  487. end
  488. end
  489. end
  490. Scan(hit.Parent:GetChildren())
  491. if Head then
  492. Torso = hit.Parent.Torso
  493. local Neck = Instance.new("Weld")
  494. Neck.Name = "Neck"
  495. Neck.Part0 = Torso
  496. Neck.Part1 = Head
  497. Neck.C0 = CFrame.new(0, 1.5, 0)
  498. Neck.C1 = CFrame.new()
  499. Neck.Parent = Torso
  500. end
  501. local Limb = hit.Parent:FindFirstChild("Right Arm")
  502. if Limb then
  503.  
  504. Limb.CFrame = Torso.CFrame * CFrame.new(1.5, 0, 0)
  505. local Joint = Instance.new("Glue")
  506. Joint.Name = "RightShoulder"
  507. Joint.Part0 = Torso
  508. Joint.Part1 = Limb
  509. Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  510. Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  511. Joint.Parent = Torso
  512.  
  513. local B = Instance.new("Part")
  514. B.TopSurface = 0
  515. B.BottomSurface = 0
  516. B.formFactor = "Symmetric"
  517. B.Size = Vector3.new(1, 1, 1)
  518. B.Transparency = 1
  519. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  520. B.Parent = hit.Parent
  521. local W = Instance.new("Weld")
  522. W.Part0 = Limb
  523. W.Part1 = B
  524. W.C0 = CFrame.new(0, -0.5, 0)
  525. W.Parent = Limb
  526.  
  527. end
  528. local Limb = hit.Parent:FindFirstChild("Left Arm")
  529. if Limb then
  530.  
  531. Limb.CFrame = Torso.CFrame * CFrame.new(-1.5, 0, 0)
  532. local Joint = Instance.new("Glue")
  533. Joint.Name = "LeftShoulder"
  534. Joint.Part0 = Torso
  535. Joint.Part1 = Limb
  536. Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  537. Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  538. Joint.Parent = Torso
  539.  
  540. local B = Instance.new("Part")
  541. B.TopSurface = 0
  542. B.BottomSurface = 0
  543. B.formFactor = "Symmetric"
  544. B.Size = Vector3.new(1, 1, 1)
  545. B.Transparency = 1
  546. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  547. B.Parent = hit.Parent
  548. local W = Instance.new("Weld")
  549. W.Part0 = Limb
  550. W.Part1 = B
  551. W.C0 = CFrame.new(0, -0.5, 0)
  552. W.Parent = Limb
  553.  
  554. end
  555. local Limb = hit.Parent:FindFirstChild("Right Leg")
  556. if Limb then
  557.  
  558. Limb.CFrame = Torso.CFrame * CFrame.new(0.5, -2, 0)
  559. local Joint = Instance.new("Glue")
  560. Joint.Name = "RightHip"
  561. Joint.Part0 = Torso
  562. Joint.Part1 = Limb
  563. Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  564. Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  565. Joint.Parent = Torso
  566.  
  567. local B = Instance.new("Part")
  568. B.TopSurface = 0
  569. B.BottomSurface = 0
  570. B.formFactor = "Symmetric"
  571. B.Size = Vector3.new(1, 1, 1)
  572. B.Transparency = 1
  573. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  574. B.Parent = hit.Parent
  575. local W = Instance.new("Weld")
  576. W.Part0 = Limb
  577. W.Part1 = B
  578. W.C0 = CFrame.new(0, -0.5, 0)
  579. W.Parent = Limb
  580.  
  581. end
  582. local Limb = hit.Parent:FindFirstChild("Left Leg")
  583. if Limb then
  584.  
  585. Limb.CFrame = Torso.CFrame * CFrame.new(-0.5, -2, 0)
  586. local Joint = Instance.new("Glue")
  587. Joint.Name = "LeftHip"
  588. Joint.Part0 = Torso
  589. Joint.Part1 = Limb
  590. Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  591. Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  592. Joint.Parent = Torso
  593.  
  594. local B = Instance.new("Part")
  595. B.TopSurface = 0
  596. B.BottomSurface = 0
  597. B.formFactor = "Symmetric"
  598. B.Size = Vector3.new(1, 1, 1)
  599. B.Transparency = 1
  600. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  601. B.Parent = hit.Parent
  602. local W = Instance.new("Weld")
  603. W.Part0 = Limb
  604. W.Part1 = B
  605. W.C0 = CFrame.new(0, -0.5, 0)
  606. W.Parent = Limb
  607.  
  608. end
  609. --[
  610. local Bar = Instance.new("Part")
  611. Bar.TopSurface = 0
  612. Bar.BottomSurface = 0
  613. Bar.formFactor = "Symmetric"
  614. Bar.Size = Vector3.new(1, 1, 1)
  615. Bar.Transparency = 1
  616. Bar.CFrame = Torso.CFrame * CFrame.new(0, 0.5, 0)
  617. Bar.Parent = hit.Parent
  618. local Weld = Instance.new("Weld")
  619. Weld.Part0 = Torso
  620. Weld.Part1 = Bar
  621. Weld.C0 = CFrame.new(0, 0.5, 0)
  622. Weld.Parent = Torso
  623. --]]
  624. for i,v in pairs(hit.Parent:GetChildren()) do
  625. if v:IsA'Hat' or v:IsA'Shirt' or v:IsA'Pants' or v:IsA'Accessory' or v:IsA'CharacterMesh' then
  626. v:Destroy()
  627. end
  628. if v:IsA'Part' then
  629. if v.Name ~= 'Torso' and v.Name ~= 'Right Leg' and v.Name ~= 'Left Leg' then
  630. v.BrickColor = BrickColor.new("New Yeller")
  631. end
  632. if v.Name ~= 'Torso' and v.Name ~= 'Right Arm' and v.Name ~= 'Left Arm' and v.Name ~= 'Head' then
  633. v.BrickColor = BrickColor.new("Br. yellowish green")
  634. end
  635. if v.Name == 'Torso' then
  636. v.BrickColor = BrickColor.new("Bright blue")
  637. end
  638.  
  639. end
  640. end
  641. end
  642. end
  643. end)
  644. if hit1 == true then
  645. for i=1,10 do
  646. wait()
  647. rarm.Weld.C1 = clerp(rarm.Weld.C1, cf(-0.3,.5,0.5) * ang(rad(-120),rad(0),rad(-90)),0.3)
  648. end
  649. for i=1,6 do
  650. wait()
  651. rarm.Weld.C1 = clerp(rarm.Weld.C1, cf(-0.2,0,0) * ang(rad(20),rad(0),rad(-90)),0.3)
  652. end
  653. hited = true
  654. hit2 = true
  655. hit1 = false
  656. end
  657. if hit2 == true then
  658. if hited == false then
  659. for i=1,10 do
  660. wait()
  661. rarm.Weld.C1 = clerp(rarm.Weld.C1, cf(-0.2,0,0) * ang(rad(20),rad(0),rad(-90)),0.3)
  662. end
  663. for i=1,6 do
  664. wait()
  665. rarm.Weld.C1 = clerp(rarm.Weld.C1, cf(-0.3,0.5,0.5) * ang(rad(-140),rad(0),rad(-90)),0.3)
  666. end
  667. hit1 = true
  668. hit2 = false
  669. end
  670. end
  671. Debounce = false
  672. animstopr = false
  673. hited = false
  674. attackdeb = false
  675. end
  676. end
  677. end
  678. end)
  679. --Knife/Sword Mode--
  680. once = false
  681. mouse.KeyDown:connect(function(key)
  682. if key == "b" then
  683. if smelee == false then
  684. if Debounce == false then
  685. Debounce = true
  686. if melee == false then
  687. o1.Anchored = true
  688. for i = 1,10 do
  689. wait()
  690. o1.Size = o1.Size - Vector3.new(0.1,0.1,0.1)
  691. end
  692. o1.Parent = game.Lighting
  693. Knife.Parent = rarm
  694. newWeld(rarm, Knife, 0, -1, 0)
  695. Knife.Weld.C1 = CFrame.new(0.2,-1,0) * CFrame.Angles(90,rad(0),rad(0))
  696. melee = true
  697. once = true
  698. end
  699.  
  700. if melee == true then
  701. if once == false then
  702. o1.Parent = char
  703. Knife.Rotation = Vector3.new(0,0,0)
  704. Knife.Parent = game.Lighting
  705. o1.CFrame = torso.CFrame * CFrame.new(0,-1,-1.7)
  706. for i = 1,10 do
  707. wait()
  708. o1.Size = o1.Size + Vector3.new(0.1,0.1,0.1)
  709. end
  710. o1.Anchored = false
  711. newWeld(torso, o1, 0, -1, 0)
  712. o1.Weld.C1 = CFrame.new(0,-1,1.7)
  713. melee = false
  714. end
  715. end
  716. Debounce = false
  717. once = false
  718. end
  719. end
  720. end
  721. if key == 'x' then
  722. if melee == false then
  723. if smelee == false then
  724. if Debounce == false then
  725. once = true
  726. animstop = true
  727. Debounce = true
  728. o1.Weld:Destroy()
  729. root.Anchored = true
  730. newWeld(rarm, o1, 0, -1, 0)
  731. o1.Weld.C1 = CFrame.new(0,1,1)
  732. for i=1,6 do
  733. wait()
  734. rarm.Weld.C1 = clerp(rarm.Weld.C1, cf(-0.2,0.3,0.2) * ang(rad(-150),rad(30),-rad(1)),0.3)
  735. end
  736. o1.Anchored = true
  737. o1.Weld:Destroy()
  738. local Spin = coroutine.create(function()
  739. for i =1,100 do
  740. wait()
  741. o1.CFrame = o1.CFrame * CFrame.Angles(math.random(),math.random(),math.random())
  742. end
  743. o1.Parent = game.Lighting
  744. Knife.Parent = rarm
  745. newWeld(rarm, Knife, 0, -1, 0)
  746. Knife.Weld.C1 = CFrame.new(0.2,-1.8,0) * CFrame.Angles(90,rad(0),rad(0))
  747. Knim.Scale = Vector3.new(1,2,1)
  748. smelee = true
  749. wait(0.5)
  750. animstop = false
  751. root.Anchored = false
  752. end)
  753.  
  754. coroutine.resume(Spin)
  755. local pat = Instance.new("ParticleEmitter")
  756. pat.Parent = o1
  757. pat.Size = NumberSequence.new(0.40000000596046,0.40000000596046)
  758. pat.Texture = "rbxassetid://83563926"
  759. pat.Speed = NumberRange.new(0.89999997615814,0.89999997615814)
  760. local naeeym = Instance.new("BillboardGui",char)
  761. naeeym.Size = UDim2.new(0,100,0,40)
  762. naeeym.StudsOffset = Vector3.new(0,2,0)
  763. naeeym.Adornee = char.Head
  764. local tecks = Instance.new("TextLabel",naeeym)
  765. tecks.BackgroundTransparency = 1
  766. tecks.BorderSizePixel = 0
  767. tecks.Font = "Arial"
  768. tecks.FontSize = "Size36"
  769. tecks.TextStrokeTransparency = 0.5
  770. tecks.TextColor3 = Color3.new(255,255,0)
  771. tecks.Size = UDim2.new(1,0,0.5,0)
  772. tecks.Text = "S"
  773. wait(0.1)
  774. tecks.Text = "SU"
  775. wait(0.1)
  776. tecks.Text = "SUM"
  777. wait(0.1)
  778. tecks.Text = "SUMM"
  779. wait(0.1)
  780. tecks.Text = "SUMMO"
  781. wait(0.1)
  782. tecks.Text = "SUMMON"
  783. wait(0.1)
  784. tecks.Text = "SUMMON D"
  785. wait(0.1)
  786. tecks.Text = "SUMMON DE"
  787. wait(0.1)
  788. tecks.Text = "SUMMON DER"
  789. wait(0.1)
  790. tecks.Text = "SUMMON DERP"
  791. wait(0.1)
  792. tecks.Text = "SUMMON DERP S"
  793. wait(0.1)
  794. tecks.Text = "SUMMON DERP SW"
  795. wait(0.1)
  796. tecks.Text = "SUMMON DERP SWO"
  797. wait(0.1)
  798. tecks.Text = "SUMMON DERP SWOR"
  799. wait(0.1)
  800. tecks.Text = "SUMMON DERP SWORD"
  801. wait(1)
  802. naeeym:Destroy()
  803. for i = 1,10 do
  804. wait()
  805. o1.Size = o1.Size - Vector3.new(0.1,0.1,0.1)
  806. end
  807. Debounce = false
  808. pat:Destroy()
  809. end
  810. end
  811. if smelee == true then
  812. if Debounce == false then
  813. if once == false then
  814. Debounce = true
  815. o1.Parent = char
  816. Knife.Rotation = Vector3.new(0,0,0)
  817. Knife.Parent = game.Lighting
  818. Knim.Scale = Vector3.new(1,1,1)
  819. o1.CFrame = torso.CFrame * CFrame.new(0,-1,-1.7)
  820. for i = 1,10 do
  821. wait()
  822. o1.Size = o1.Size + Vector3.new(0.1,0.1,0.1)
  823. end
  824. o1.Anchored = false
  825. newWeld(torso, o1, 0, -1, 0)
  826. o1.Weld.C1 = CFrame.new(0,-1,1.7)
  827. smelee = false
  828. end
  829. end
  830. end
  831. end
  832. once = false
  833. Debounce = false
  834. end
  835. end)
  836. --Animation--
  837. char.Humanoid.WalkSpeed = 8
  838. srs:connect(function()
  839. if (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 2 then
  840. animpose = "Idle"
  841. elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 20 then
  842. animpose = "Walking"
  843. end
  844. if animpose == "Walking" then
  845. if animstop == false then
  846. if melee == false then
  847. local animspd = .1
  848. rleg.Weld.C1 = clerp(rleg.Weld.C1, cf(0,1,0) * ang(-rad(1)+-sin(sine/6)/2.2,-sin(sine/6)/13,rad(1)),animspd)
  849. lleg.Weld.C1 = clerp(lleg.Weld.C1, cf(0,1,0) * ang(rad(1)-sin(-sine/6)/2.2,sin(-sine/6)/13,-rad(1)),animspd)
  850. if animstopr == false then
  851. rarm.Weld.C1 = clerp(rarm.Weld.C1, cf(.1,.6,.1) * ang(rad(-70)-sin(-sine/14)/14,rad(-15)+sin(-sine/18)/18,-rad(1)),animspd)
  852. end
  853. larm.Weld.C1 = clerp(larm.Weld.C1, cf(-.1,.6,.1) * ang(rad(-70)-sin(sine/14)/14,rad(15)+sin(sine/18)/18,-rad(1)),animspd)
  854. end
  855. end
  856. end
  857. if animpose == "Idle" then
  858. if animstop == false then
  859. if melee == false then
  860. local animspd = .1
  861. rleg.Weld.C1 = clerp(rleg.Weld.C1, cf(0,1,0) * ang(rad(0),rad(0),rad(0)),animspd)
  862. lleg.Weld.C1 = clerp(lleg.Weld.C1, cf(0,1,0) * ang(rad(0),rad(0),rad(0)),animspd)
  863. if animstopr == false then
  864. rarm.Weld.C1 = clerp(rarm.Weld.C1, cf(.1,.6,.1) * ang(rad(-70)-sin(-sine/12)/13,rad(-15)+sin(-sine/18)/18,-rad(1)),animspd)
  865. end
  866. larm.Weld.C1 = clerp(larm.Weld.C1, cf(-.1,.6,.1) * ang(rad(-70)-sin(sine/12)/13,rad(15)+sin(sine/18)/18,-rad(0)),animspd)
  867. torso.Weld.C1 = clerp(torso.Weld.C1, cf(0,-1+cos(sine/10)/11,0),animspd)
  868. end
  869. end
  870. end
  871.  
  872. if animpose == "Walking" then
  873. if animstop == false then
  874. if melee == true or smelee == true then
  875. local animspd = .1
  876. rleg.Weld.C1 = clerp(rleg.Weld.C1, cf(0,1,0) * ang(-rad(1)+-sin(sine/6)/2.2,-sin(sine/6)/13,rad(1)),animspd)
  877. lleg.Weld.C1 = clerp(lleg.Weld.C1, cf(0,1,0) * ang(rad(1)-sin(-sine/6)/2.2,sin(-sine/6)/13,-rad(1)),animspd)
  878. if animstopr == false then
  879. rarm.Weld.C1 = clerp(rarm.Weld.C1, cf(0,0.5,0) * ang(rad(0)-sin(-sine/5),rad(0)+sin(-sine/18)/18,-rad(1)),animspd)
  880. end
  881. larm.Weld.C1 = clerp(larm.Weld.C1, cf(0,0.5,0) * ang(rad(0)-sin(sine/5),rad(0)+sin(sine/18)/18,-rad(1)),animspd)
  882. end
  883. end
  884. end
  885. if animpose == "Idle" then
  886. if animstop == false then
  887. if melee == true or smelee == true then
  888. local animspd = .1
  889. rleg.Weld.C1 = clerp(rleg.Weld.C1, cf(0,1,0) * ang(rad(0),rad(0),rad(0)),animspd)
  890. lleg.Weld.C1 = clerp(lleg.Weld.C1, cf(0,1,0) * ang(rad(0),rad(0),rad(0)),animspd)
  891. if animstopr == false then
  892. rarm.Weld.C1 = clerp(rarm.Weld.C1, cf(0,.5,0) * ang(rad(0)-sin(-sine/12)/13,rad(0)+sin(-sine/18)/18,-rad(1)),animspd)
  893. end
  894. larm.Weld.C1 = clerp(larm.Weld.C1, cf(0,.5,0) * ang(rad(0)-sin(sine/12)/13,rad(0)+sin(sine/18)/18,-rad(0)),animspd)
  895. torso.Weld.C1 = clerp(torso.Weld.C1, cf(0,-1+cos(sine/10)/11,0),animspd)
  896. end
  897. end
  898. end
  899. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement