Advertisement
samuelrichter66

redcliff

May 29th, 2019
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.11 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.  
  154. Me = game.Players.LocalPlayer
  155. Char = Me.Character
  156. Selected = false
  157. Attack = 1
  158. Attacking = false
  159. Hurt = false
  160. Deb = true
  161. Effect = false
  162. DMG = 35
  163. BlockAnim = false
  164. Rotation = 0
  165. RotationOn = false
  166.  
  167. CamStyles = {"Attach", "Custom", "Fixed", "Follow"}
  168. Where = 2
  169. Style = CamStyles[Where]
  170.  
  171. Asset = "http://www.roblox.com/asset/?id="
  172.  
  173. CA = CFrame.Angles
  174. CN = CFrame.new
  175. V3 = Vector3.new
  176. MR = math.rad
  177. MP = math.pi
  178. MRA = math.random
  179. MH = math.huge
  180.  
  181. Add = {
  182. Mesh = function(P, Id, Id2, scale)
  183. local m = Instance.new("SpecialMesh", P)
  184. m.Scale = scale
  185. m.MeshId = Id
  186. m.TextureId = Id2
  187. end
  188. }
  189.  
  190. Sounds = {
  191. Hit = {"http://www.roblox.com/asset/?id=10209590", 0.8, 1},
  192. Block = {"rbxasset://sounds\\metal.ogg", 1.3, 1},
  193. Slash = {"rbxasset://sounds\\swordslash.wav", 1.6, 1},
  194. }
  195.  
  196. Meshes = {
  197. Coif = {Asset..(81724611), Asset..(73791519)},
  198. Torso = {Asset..(71440926), Asset..(71440868)},
  199. Rarm = {Asset..(71440926), Asset..(71440800)},
  200. Larm = {Asset..(71440926), Asset..(71440752)},
  201. Rleg = {Asset..(71440926), Asset..(71440824)},
  202. Lleg = {Asset..(71440926), Asset..(71440777)},
  203. Sword = {Asset..(11442524), Asset..(11442510)},
  204. Shield = {Asset..(49759449), Asset..(0)},
  205. }
  206.  
  207. function waitChild(p, n)
  208. local child = p:findFirstChild(n)
  209. if child then return child end
  210. while true do
  211. child = p.ChildAdded:wait()
  212. if child.Name == n then return child end
  213. end
  214. end
  215.  
  216. function Part(P, Anch, Coll, Tran, Ref, Col, Size)
  217. local p = Instance.new("Part")
  218. p.TopSurface = 0
  219. p.BottomSurface = 0
  220. p.Transparency = Tran
  221. p.Reflectance = Ref
  222. p.CanCollide = Coll
  223. p.Anchored = Anch
  224. p.BrickColor = BrickColor.new(Col)
  225. p.formFactor = "Custom"
  226. p.Size = Size
  227. p.Parent = P
  228. p.Locked = true
  229. p:BreakJoints()
  230. return p
  231. end
  232.  
  233. function Weld(P0, P1, C0, C1)
  234. local w = Instance.new("Weld")
  235. w.Part0 = P0
  236. w.Part1 = P1
  237. w.C0 = C0
  238. w.C1 = C1
  239. w.Parent = P0
  240. return w
  241. end
  242.  
  243. for i,v in pairs(Char:children()) do
  244. if v.Name == "Icy" then v:remove() end
  245. end
  246.  
  247. Mod = Instance.new("Model")
  248. Mod.Name = "Icy"
  249.  
  250. Rarm = waitChild(Char, "Right Arm")
  251. Larm = waitChild(Char, "Left Arm")
  252. Rleg = waitChild(Char, "Right Leg")
  253. Lleg = waitChild(Char, "Left Leg")
  254. Torso = waitChild(Char, "Torso")
  255. Hum = waitChild(Char, "Humanoid")
  256. Neck = waitChild(Torso, "Neck")
  257.  
  258. RH = waitChild(Torso, "Right Hip")
  259. LH = waitChild(Torso, "Left Hip")
  260.  
  261. function Play(Sound)
  262. local s = Instance.new("Sound")
  263. s.SoundId = Sound[1]
  264. s.Pitch = Sound[2]
  265. s.Volume = Sound[3]
  266. s.PlayOnRemove = true
  267. s.Parent = Torso
  268. game.Debris:AddItem(s, 0.0001)
  269. end
  270.  
  271. for _,v in pairs(Char:children()) do
  272. if v:IsA("Shirt") or v:IsA("Pants") or v:IsA("Hat") or v:IsA("CharacterMesh") or v:IsA("BodyColors") then
  273. v:remove()
  274. elseif v:IsA("BoolValue") and v.Name == "Block" then
  275. v:remove()
  276. end
  277. end
  278.  
  279. for _,v in pairs(Torso:children()) do
  280. if v:IsA("Decal") or v:IsA("Texture") then v:remove() end
  281. end
  282.  
  283. CamBlock = Part(Mod, true, false, 1, 0, "White", V3(0.4, 0.4, 0.4))
  284. Cam = workspace.CurrentCamera
  285.  
  286. local Blocking = Instance.new("BoolValue")
  287. Blocking.Value = false
  288. Blocking.Name = "Block"
  289. Blocking.Parent = Char
  290.  
  291. Torso.Transparency = 1
  292.  
  293. Faketorso = Part(Mod, false, false, 0, 0, Torso.BrickColor.Name, V3(1.98, 1.98, 0.98))
  294. FW = Weld(Torso, Faketorso, CN(), CN())
  295.  
  296. Hat = Instance.new("Hat", Char)
  297. Hat.Name = "Epoc."
  298.  
  299. HatHandle = Part(Hat, false, false, 0, 0, "White", V3(1.5, 1.8, 1.4))
  300. HatHandle.Name = "Handle"
  301. Hat.AttachmentPos = V3(0, 0.3, 0.1)
  302. Add.Mesh(HatHandle, Meshes.Coif[2], Meshes.Coif[1], V3(1.8,1.8,2.2))
  303.  
  304. for _,v in pairs({{Rarm, Meshes.Rarm}, {Larm, Meshes.Larm}, {Rleg, Meshes.Rleg}, {Lleg, Meshes.Lleg}, {Faketorso, Meshes.Torso}}) do
  305. for _,v in pairs(v[1]:children()) do
  306. if v:IsA("SpecialMesh") then
  307. v:remove()
  308. end
  309. end
  310. local mes = Add.Mesh(v[1], v[2][2], v[2][1], V3(1,1,1))
  311. end
  312.  
  313. Sword = Part(Mod, false, false, 0, 0, "White", V3(0.8, 0.4, 4.5))
  314. Add.Mesh(Sword, Meshes.Sword[2], Meshes.Sword[1], V3(2.1, 2.5, 2.15))
  315.  
  316. Shield = Part(Mod, false, false, 0, 0, "White", V3(2.3, 0.6, 3))
  317. Add.Mesh(Shield, Meshes.Shield[2], Meshes.Shield[1], V3(1.5, 1.6, 1.3))
  318.  
  319. RABrick = Part(Mod, false, false, 1, 0, "White", V3(0.1, 0.1, 0.1))
  320. LABrick = Part(Mod, false, false, 1, 0, "White", V3(0.1, 0.1, 0.1))
  321. RLBrick = Part(Mod, false, false, 1, 0, "White", V3(0.1, 0.1, 0.1))
  322. LLBrick = Part(Mod, false, false, 1, 0, "White", V3(0.1, 0.1, 0.1))
  323.  
  324. RABW = Weld(Torso, RABrick, CN(), CN(-1.5, -0.5, 0))
  325. LABW = Weld(Torso, LABrick, CN(), CN(1.5, -0.5, 0))
  326. RLBW = Weld(Torso, RLBrick, CN(), CN(-0.5, 1.2, 0))
  327. LLBW = Weld(Torso, LLBrick, CN(), CN(0.5, 1.2, 0))
  328.  
  329. function Atch(p)
  330. RABW.Part0 = p
  331. LABW.Part0 = p
  332. RLBW.Part0 = p
  333. LLBW.Part0 = p
  334. RH.Part0 = p
  335. LH.Part0 = p
  336. end
  337.  
  338. RAW = Weld(RABrick, nil, CN(), CN(0, 0.5, 0))
  339. LAW = Weld(LABrick, nil, CN(), CN(0, 0.5, 0))
  340. RLW = Weld(RLBrick, nil, CN(), CN(0, 0.8, 0))
  341. LLW = Weld(LLBrick, nil, CN(), CN(0, 0.8, 0))
  342.  
  343. HB = Part(Mod, false, false, 1, 0, "White", V3(0.1, 0.1, 0.1))
  344. HBW = Weld(Rarm, HB, CN(0, -1, 0), CN())
  345. HW = Weld(HB, nil, CN(), CN(0, 0, -2) * CA(MP, 0, MR(90)))
  346.  
  347. SW = Weld(Larm, Shield, CA(MR(-90), 0, MR(90)), CN(0, 0.4, 0.2) * CA(MR(160), 0, 0))
  348. TW = Weld(Torso, Sword, CA(MR(90), MR(-40), 0), CN(0, -0.7, 0))
  349.  
  350. function Normal()
  351. SW.C1 = CN(0, 0.4, 0.2) * CA(MR(160), 0, 0)
  352. HW.C0 = CN()
  353. RAW.C0 = CN(-0.3, 0.2, -0.4) * CA(MR(70), MR(40), MR(-30))
  354. LAW.C0 = CN(0.3, 0, -0.5) * CA(MR(45), MR(-35), MR(20))
  355. HW.C1 = CN(0, 0, -2) * CA(MP, 0, MR(-90))
  356. FW.C0 = CN()
  357. end
  358.  
  359. Mod.Parent = Char
  360.  
  361. if script.Parent.className ~= "HopperBin" then
  362. h = Instance.new("HopperBin",Me.Backpack)
  363. h.Name = "Redcliff"
  364. script.Parent = h
  365. end
  366.  
  367. Bin = script.Parent
  368.  
  369. function getStat(c)
  370. local blo = false
  371. local h
  372. for _,v in pairs(c:children()) do
  373. if v:IsA("Humanoid") then
  374. if v.Health > 0 then
  375. h = v
  376. end
  377. elseif v:IsA("BoolValue") then
  378. if v.Name == "Block" then
  379. blo = v.Value
  380. end
  381. end
  382. end
  383. return h, blo
  384. end
  385.  
  386. function Damage(h, dmg)
  387. h.Health = h.Health - dmg
  388. end
  389.  
  390. function SwordDmg(hit)
  391. local h, b = getStat(hit.Parent)
  392. if h then
  393. if Hurt and Deb and b == false then
  394. Damage(h, MRA(5+(DMG/3), DMG+5))
  395. Play(Sounds.Hit)
  396. elseif Hurt and Deb and b then
  397. Play(Sounds.Block)
  398. end
  399. Deb = false
  400. end
  401. end
  402.  
  403. Sword.Touched:connect(SwordDmg)
  404.  
  405. function SE(part, cf)
  406. coroutine.resume(coroutine.create(function()
  407. Effect = true
  408. local lastP = (part.CFrame * cf).p
  409. while Effect do
  410. wait()
  411. local p = Part(Mod, true, false, 0, 0, "Medium stone grey", V3(0.2, 0.2, 0.2))
  412. local posnow = (part.CFrame * cf).p
  413. local magn = (lastP - posnow).magnitude
  414. local cc = CN(lastP, posnow) * CA(MR(-90), 0, 0) * CN(0, magn/2, 0)
  415. local m = Instance.new("SpecialMesh", p)
  416. m.MeshType = "Head"
  417. m.Scale = V3(0.9, magn*5+0.45, 0.9)
  418. p.CFrame = cc
  419. coroutine.resume(coroutine.create(function()
  420. for i = 0, 1, 0.15 do
  421. wait()
  422. m.Scale = V3(0.9-0.9*i, magn*5+0.45-0.45*i, 0.9-0.9*i)
  423. p.Transparency = -0.2+1.2*i
  424. end
  425. p:remove()
  426. end))
  427. lastP = (part.CFrame * cf).p
  428. end
  429. end))
  430. end
  431.  
  432. function EE()
  433. Effect = false
  434. end
  435.  
  436. function SetAtk(S, E)
  437. coroutine.resume(coroutine.create(function()
  438. Attack = E
  439. wait(0.25)
  440. Attack = S
  441. end))
  442. end
  443.  
  444. Combo = {
  445. function()
  446. Attack = 1
  447. Atch(Faketorso)
  448. Attacking = true
  449. for i = 0.15, 1, 0.15 do
  450. FW.C0 = CA(0, MR(-35*i), 0)
  451. RAW.C0 = CN(-0.3, 0.2, -0.4) * CA(MR(70+90*i), MR(40-20*i), MR(-30+30*i))
  452. HW.C0 = CA(MR(20*i), 0, MR(-10*i))
  453. LAW.C0 = CN(0.3, 0, -0.5) * CA(MR(45+10*i), MR(-35+20*i), MR(20))
  454. wait()
  455. end
  456. Play(Sounds.Slash)
  457. for i = 0.33, 1, 0.33 do
  458. FW.C0 = CA(0, MR(-35-10*i), 0)
  459. RAW.C0 = CN(-0.3, 0.2, -0.4) * CA(MR(160+10*i), MR(20-5*i), MR(10*i))
  460. HW.C0 = CA(MR(20+5*i), 0, MR(-10))
  461. LAW.C0 = CN(0.3, 0, -0.5) * CA(MR(55+5*i), MR(-15+5*i), MR(20))
  462. wait()
  463. end
  464. SE(Sword, CN(0, 0, 2.2))
  465. Hurt = true
  466. Deb = true
  467. for i = 0.16, 1, 0.16 do
  468. FW.C0 = CA(0, MR(-45+60*i), 0)
  469. RAW.C0 = CN(-0.3, 0.2, -0.4) * CA(MR(170-140*i), MR(15+10*i), MR(10-20*i))
  470. HW.C0 = CA(MR(25-75*i), 0, MR(-10))
  471. LAW.C0 = CN(0.3, 0, -0.5+0.8*i) * CA(MR(60-90*i), MR(-10+20*i), MR(20-30*i))
  472. wait()
  473. end
  474. Hurt = false
  475. for i = 0.25, 1, 0.25 do
  476. FW.C0 = CA(0, MR(15+10*i), 0)
  477. RAW.C0 = CN(-0.3, 0.2, -0.4) * CA(MR(30-10*i), MR(25+5*i), MR(-10-5*i))
  478. HW.C0 = CA(MR(-50-5*i), 0, MR(-10))
  479. LAW.C0 = CN(0.3, 0, 0.3+0.1*i) * CA(MR(-30-10*i), MR(10+5*i), MR(-10-5*i))
  480. wait()
  481. end
  482. EE()
  483. SetAtk(1, 2)
  484. Attacking = false
  485. wait(0.08)
  486. for i = 0.2, 1, 0.2 do
  487. if Attacking then return end
  488. FW.C0 = CA(0, MR(25-25*i), 0)
  489. RAW.C0 = CN(-0.3, 0.2, -0.4) * CA(MR(20+40*i), MR(30+8*i), MR(-15-10*i))
  490. HW.C0 = CA(MR(-55+45*i), 0, MR(-10+10*i))
  491. LAW.C0 = CN(0.3, 0, 0.4-0.8*i) * CA(MR(-40+75*i), MR(15-45*i), MR(-15+30*i))
  492. wait()
  493. end
  494. for i = 0.33, 1, 0.33 do
  495. if Attacking then return end
  496. FW.C0 = CA(0, 0, 0)
  497. RAW.C0 = CN(-0.3, 0.2, -0.4) * CA(MR(60+10*i), MR(38+2*i), MR(-25-5*i))
  498. HW.C0 = CA(MR(-10+10*i), 0, 0)
  499. LAW.C0 = CN(0.3, 0, -0.4-0.1*i) * CA(MR(35+10*i), MR(-30-5*i), MR(15+5*i))
  500. wait()
  501. end
  502. Attack = 1
  503. Attacking = false
  504. FW.C0 = CN()
  505. RAW.C0 = CN(-0.3, 0.2, -0.4) * CA(MR(70), MR(40), MR(-30))
  506. HW.C0 = CN()
  507. Atch(Torso)
  508. end,
  509. function()
  510. Attack = 2
  511. Attacking = true
  512. for i = 0.1, 1, 0.1 do
  513. FW.C0 = CA(0, MR(25+15*i), 0)
  514. RAW.C0 = CN(-0.3, 0.2, -0.4) * CA(MR(20+65*i), MR(30-30*i), MR(-15-35*i))
  515. LAW.C0 = CN(0.3+0.3*i, 0, 0.2) * CA(MR(-40-10*i), MR(15), MR(-15))
  516. HW.C0 = CA(MR(-55+45*i), MR(80*i), MR(-10+10*i))
  517. wait()
  518. end
  519. Play(Sounds.Slash)
  520. for i = 0.25, 1, 0.25 do
  521. FW.C0 = CA(0, MR(40+5*i), 0)
  522. RAW.C0 = CN(-0.3, 0.2, -0.4) * CA(MR(85+5*i), 0, MR(-50-5*i))
  523. LAW.C0 = CN(0.6, 0, 0.2) * CA(MR(-50-5*i), MR(15), MR(-15))
  524. HW.C0 = CA(MR(-10+10*i), MR(80+10*i), 0)
  525. wait()
  526. end
  527. SE(Sword, CN(0, 0, 2.2))
  528. Hurt = true
  529. Deb = true
  530. for i = 0.16, 1, 0.16 do
  531. FW.C0 = CA(0, MR(45-80*i), 0)
  532. RAW.C0 = CN(-0.3+0.3*i, 0.2, -0.4) * CA(MR(90), 0, MR(-55+95*i))
  533. LAW.C0 = CN(0.6-0.3*i, 0, 0.2-0.8*i) * CA(MR(-55+130*i), MR(15-15*i), MR(-15+50*i))
  534. HW.C0 = CA(0, MR(90), 0)
  535. HW.C1 = CN(0, 0, -2) * CA(MP, MR(-40*i), MR(-90))
  536. wait()
  537. end
  538. Hurt = false
  539. for i = 0.25, 1, 0.25 do
  540. FW.C0 = CA(0, MR(-35-10*i), 0)
  541. RAW.C0 = CN(0.1*i, 0.2, -0.4) * CA(MR(90), 0, MR(40+10*i))
  542. LAW.C0 = CN(0.3, 0, -0.6+0.1*i) * CA(MR(75+10*i), 0, MR(35+10*i))
  543. HW.C0 = CA(0, MR(90), 0)
  544. HW.C1 = CN(0, 0, -2) * CA(MP, MR(-40-5*i), MR(-90))
  545. wait()
  546. end
  547. EE()
  548. SetAtk(1, 3)
  549. Attacking = false
  550. wait(0.08)
  551. for i = 0.16, 1, 0.16 do
  552. if Attacking then return end
  553. FW.C0 = CA(0, MR(-45+35*i), 0)
  554. RAW.C0 = CN(0.1-0.4*i, 0.2, -0.4) * CA(MR(90-15*i), MR(35*i), MR(50-70*i))
  555. LAW.C0 = CN(0.3, 0, -0.6+0.1*i) * CA(MR(85-30*i), MR(-30*i), MR(45-20*i))
  556. HW.C0 = CA(0, MR(90-80*i), 0)
  557. HW.C1 = CN(0, 0, -2) * CA(MP, MR(-45+40*i), MR(-90))
  558. wait()
  559. end
  560. for i = 0.25, 1, 0.25 do
  561. if Attacking then return end
  562. FW.C0 = CA(0, MR(-10+10*i), 0)
  563. RAW.C0 = CN(-0.3, 0.2, -0.4) * CA(MR(75-5*i), MR(35+5*i), MR(-20-10*i))
  564. LAW.C0 = CN(0.3, 0, -0.6+0.1*i) * CA(MR(55-10*i), MR(-30-5*i), MR(25-5*i))
  565. HW.C0 = CA(0, MR(10-10*i), 0)
  566. HW.C1 = CN(0, 0, -2) * CA(MP, MR(-5+5*i), MR(-90))
  567. wait()
  568. end
  569. Normal()
  570. Atch(Torso)
  571. end,
  572. function()
  573. Attack = 3
  574. Attacking = true
  575. for i = 0.15, 1, 0.15 do
  576. FW.C0 = CA(0, MR(-45+35*i), 0)
  577. RAW.C0 = CN(0.1-0.2*i, 0.2-0.2*i, -0.4) * CA(MR(90+30*i), 0, MR(50-70*i)) * CN(0, -0.5*i, 0)
  578. LAW.C0 = CN(0.3-0.2*i, 0, -0.5) * CA(MR(85+35*i), 0, MR(45-25*i)) * CN(0, -0.5*i, 0)
  579. HW.C0 = CA(0, MR(90-70*i), MR(-45*i))
  580. HW.C1 = CN(0, 0, -2) * CA(MP, MR(-45+45*i), MR(-90))
  581. wait()
  582. end
  583. for i = 0.18, 1, 0.18 do
  584. FW.C0 = CA(0, MR(-10+10*i), 0)
  585. RAW.C0 = CN(-0.1, 0, -0.4) * CA(MR(120+80*i), 0, MR(-20-15*i)) * CN(0, -0.5-0.1*i, 0)
  586. LAW.C0 = CN(0.1, 0, -0.5) * CA(MR(120+80*i), 0, MR(20+15*i)) * CN(0, -0.5-0.1*i, 0)
  587. HW.C0 = CA(0, MR(20-20*i), MR(-45-10*i))
  588. HW.C1 = CN(0, 0, -2) * CA(MP, 0, MR(-90))
  589. wait()
  590. end
  591. Play(Sounds.Slash)
  592. for i = 0.25, 1, 0.25 do
  593. FW.C0 = CA(0, 0, 0)
  594. RAW.C0 = CN(-0.1, 0, -0.4) * CA(MR(200+10*i), 0, MR(-35-5*i)) * CN(0, -0.6, 0)
  595. LAW.C0 = CN(0.1, 0, -0.5) * CA(MR(200+10*i), 0, MR(35+5*i)) * CN(0, -0.6, 0)
  596. HW.C0 = CA(0, 0, MR(-55+5*i))
  597. wait()
  598. end
  599. SE(Sword, CN(0, 0, 2.2))
  600. Hurt = true
  601. Deb = true
  602. for i = 0.14, 1, 0.14 do
  603. RAW.C0 = CN(-0.1, 0, -0.4) * CA(MR(210-180*i), 0, MR(-40)) * CN(0, -0.6-0.25*i, 0)
  604. LAW.C0 = CN(0.1, 0, -0.5) * CA(MR(210-180*i), 0, MR(40)) * CN(0, -0.6-0.25*i, 0)
  605. HW.C0 = CA(MR(-55*i), MR(-30*i), MR(-50))
  606. wait()
  607. end
  608. Hurt = false
  609. EE()
  610. Play(Sounds.Block)
  611. for i = 0.33, 1, 0.33 do
  612. RAW.C0 = CN(-0.1, 0, -0.4) * CA(MR(30+5*i), 0, MR(-40)) * CN(0, -0.85+0.4*i, 0)
  613. LAW.C0 = CN(0.1, 0, -0.5) * CA(MR(30+5*i), 0, MR(40)) * CN(0, -0.85+0.4*i, 0)
  614. HW.C0 = CA(MR(-55+5*i), MR(-30), MR(-50))
  615. wait()
  616. end
  617. for i = 0.16, 1, 0.16 do
  618. RAW.C0 = CN(-0.1-0.2*i, 0.2*i, -0.4) * CA(MR(35+25*i), MR(30*i), MR(-40+7*i)) * CN(0, -0.45+0.3*i, 0)
  619. LAW.C0 = CN(0.1+0.2*i, 0, -0.5) * CA(MR(35+5*i), MR(-30*i), MR(40-15*i)) * CN(0, -0.45+0.3*i, 0)
  620. HW.C0 = CA(MR(-50+40*i), MR(-30+25*i), MR(-50+45*i))
  621. wait()
  622. end
  623. for i = 0.25, 1, 0.25 do
  624. RAW.C0 = CN(-0.3, 0.2, -0.4) * CA(MR(60+10*i), MR(30+10*i), MR(-33+3*i)) * CN(0, -0.15+0.15*i, 0)
  625. LAW.C0 = CN(0.3, 0, -0.5) * CA(MR(40+5*i), MR(-30-5*i), MR(25-5*i)) * CN(0, -0.15+0.15*i, 0)
  626. HW.C0 = CA(MR(-10+10*i), MR(-5+5*i), MR(-5+5*i))
  627. wait()
  628. end
  629. Attack = 1
  630. Atch(Torso)
  631. Attacking = false
  632. Normal()
  633. end
  634. }
  635.  
  636. function onButtonDown()
  637. if Attacking == false and BlockAnim == false and Blocking.Value == false then
  638. Combo[Attack]()
  639. end
  640. end
  641.  
  642. function Block()
  643. coroutine.resume(coroutine.create(function()
  644. Blocking.Value = true
  645. BlockAnim = trueCN
  646. for i = 0.15, 1, 0.15 do
  647. LAW.C0 = CN(0.3+0.4*i, 0, -0.5-0.4*i) * CA(MR(45+35*i), MR(-35+30*i), MR(20+50*i))
  648. RAW.C0 = CN(-0.3-0.1*i, 0.2, -0.4) * CA(MR(70+15*i), MR(40-30*i), MR(-30-30*i))
  649. SW.C1 = CN(0, 0.4, 0.2) * CA(MR(160+15*i), MR(-75*i), 0)
  650. wait()
  651. end
  652. Play(Sounds.Block)
  653. for i = 0.33, 1, 0.33 do
  654. LAW.C0 = CN(0.7+0.1*i, 0, -0.9-0.1*i) * CA(MR(80+5*i), MR(-5+5*i), MR(70+10*i))
  655. RAW.C0 = CN(-0.4, 0.2, -0.4) * CA(MR(85+5*i), MR(10-10*i), MR(-60-5*i))
  656. SW.C1 = CN(0, 0.4, 0.2) * CA(MR(175+5*i), MR(-75-15*i), 0)
  657. wait()
  658. end
  659. LAW.C0 = CN(0.8, 0, -1) * CA(MR(85), 0, MR(80))
  660. repeat wait() until Blocking.Value == false
  661. for i = 0.14, 1, 0.14 do
  662. LAW.C0 = CN(0.8-0.5*i, 0, -1+0.5*i) * CA(MR(85-40*i), MR(-35*i), MR(80-60*i))
  663. RAW.C0 = CN(-0.4+0.1*i, 0.2, -0.4) * CA(MR(90-20*i), MR(40*i), MR(-65+35*i))
  664. SW.C1 = CN(0, 0.4, 0.2) * CA(MR(180-20*i), MR(-90+90*i), 0)
  665. wait()
  666. end
  667. BlockAnim = false
  668. Normal()
  669. end))
  670. end
  671.  
  672. function SelectAnim()
  673. RAW.Part1 = Rarm
  674. for i = 0.14, 1, 0.14 do
  675. RAW.C0 = CA(MR(205*i), MR(30*i), MR(-10*i))
  676. wait()
  677. end
  678. for i = 0.33, 1, 0.33 do
  679. RAW.C0 = CA(MR(205+15*i), MR(30), MR(-10))
  680. wait()
  681. end
  682. HW.C0 = CA(MR(40), MR(30), MR(120))* CN(0, 0, 0.15)
  683. HW.Part1 = Sword
  684. TW.Part1 = nil
  685. for i = 0.18, 1, 0.18 do
  686. RAW.C0 = CA(MR(220-80*i), MR(30-50*i), MR(-10+30*i))
  687. HW.C0 = CA(MR(40-40*i), MR(30-30*i), MR(120-120*i))* CN(0, 0, 0.15-0.15*i)
  688. wait()
  689. end
  690. for i = 0.33, 1, 0.33 do
  691. RAW.C0 = CA(MR(140-15*i), MR(-20-5*i), MR(20+5*i))
  692. HW.C0 = CA(MR(-10*i), 0, 0)
  693. wait()
  694. end
  695. LAW.Part1 = Larm
  696. for i = 0.18, 1, 0.18 do
  697. RAW.C0 = CN(-0.3*i, 0.2*i, -0.4*i) * CA(MR(125-45*i), MR(-25+60*i), MR(25-50*i))
  698. LAW.C0 = CN(0.3*i, 0, -0.5*i) * CA(MR(40*i), MR(-30*i), MR(15*i))
  699. HW.C0 = CA(MR(-10+10*i), 0, 0)
  700. wait()
  701. end
  702. HW.C0 = CN()
  703. for i = 0.33, 1, 0.33 do
  704. RAW.C0 = CN(-0.3, 0.2, -0.4) * CA(MR(80-10*i), MR(35+5*i), MR(-25-5*i))
  705. LAW.C0 = CN(0.3, 0, -0.5) * CA(MR(40+5*i), MR(-30-5*i), MR(15+5*i))
  706. wait()
  707. end
  708. Normal()
  709. end
  710.  
  711. function DeselectAnim()
  712. for i = 0.14, 1, 0.14 do
  713. RAW.C0 = CN(-0.3+0.3*i, 0.2-0.2*i, -0.4+0.4*i) * CA(MR(70+80*i), MR(40-60*i), MR(-30+20*i))
  714. LAW.C0 = CN(0.3-0.3*i, 0, -0.5+0.5*i) * CA(MR(45-35*i), MR(-35+25*i), MR(20-15*i))
  715. wait()
  716. end
  717. for i = 0.33, 1, 0.33 do
  718. RAW.C0 = CA(MR(150+10*i), MR(-20-5*i), MR(-10+5*i))
  719. LAW.C0 = CA(MR(10-10*i), MR(-10+10*i), MR(5-5*i))
  720. wait()
  721. end
  722. LAW.Part1 = nil
  723. for i = 0.18, 1, 0.18 do
  724. RAW.C0 = CA(MR(160+50*i), MR(-25+50*i), MR(-5-5*i))
  725. HW.C0 = CA(MR(30*i), MR(25*i), MR(110*i))* CN(0, 0, 0.15*i)
  726. wait()
  727. end
  728. for i = 0.33, 1, 0.33 do
  729. RAW.C0 = CA(MR(210+10*i), MR(25+5*i), MR(-10))
  730. HW.C0 = CA(MR(30+10*i), MR(25+5*i), MR(110+10*i))* CN(0, 0, 0.15)
  731. wait()
  732. end
  733. HW.Part1 = nil
  734. TW.Part1 = Sword
  735. for i = 0.2, 1, 0.2 do
  736. RAW.C0 = CA(MR(220-200*i), MR(30-20*i), MR(-10+10*i))
  737. wait()
  738. end
  739. for i = 0.33, 1, 0.33 do
  740. RAW.C0 = CA(MR(20-20*i), MR(10-10*i), 0)
  741. wait()
  742. end
  743. RAW.Part1 = nil
  744. end
  745.  
  746. function onSelected(mouse)
  747. SelectAnim()
  748. Selected = true
  749. mouse.KeyDown:connect(function(key)
  750. key = key:lower()
  751. if key == "f" and Blocking.Value == false and BlockAnim == false and Attacking == false then
  752. Block()
  753. local k
  754. repeat k = mouse.KeyUp:wait() until k == "f"
  755. Blocking.Value = false
  756. elseif key == "q" then
  757. Where = Where - 1
  758. elseif key == "e" then
  759. Where = Where + 1
  760. elseif key == "z" then
  761. local h = nil
  762. local t = mouse.Target
  763. if t then
  764. h = getStat(t.Parent)
  765. if h == nil and t.Parent.Parent ~= game and t.Parent.Parent ~= nil then
  766. h = getStat(t.Parent.Parent)
  767. end
  768. end
  769. if h == nil then
  770. CamBlock.CFrame = CFrame.new(mouse.Hit.p)
  771. Cam.CameraSubject = CamBlock
  772. Cam.CameraType = Enum.CameraType[CamStyles[Where] ]
  773. else
  774. Cam.CameraSubject = h
  775. end
  776. elseif key == "x" then
  777. Cam.CameraSubject = Hum
  778. elseif key == "r" then
  779. RotationOn = not RotationOn
  780. elseif key == "t" then
  781. local k
  782. coroutine.resume(coroutine.create(function()
  783. repeat
  784. wait()
  785. Rotation = Rotation - 0.05
  786. until k == "t"
  787. end))
  788. repeat k = mouse.KeyUp:wait() until k == "t"
  789. elseif key == "y" then
  790. local k
  791. coroutine.resume(coroutine.create(function()
  792. repeat
  793. wait()
  794. Rotation = Rotation + 0.05
  795. until k == "y"
  796. end))
  797. repeat k = mouse.KeyUp:wait() until k == "y"
  798. end
  799. if Where > #CamStyles then Where = 1 elseif Where < 1 then Where = #CamStyles end
  800. Cam.CameraType = Enum.CameraType[CamStyles[Where] ]
  801. end)
  802. mouse.Button1Down:connect(function()
  803. onButtonDown()
  804. end)
  805. end
  806.  
  807. function onDeselected(mouse)
  808. Selected = false
  809. DeselectAnim()
  810. end
  811.  
  812. Bin.Selected:connect(onSelected)
  813. Bin.Deselected:connect(onDeselected)
  814.  
  815. while true do
  816. wait()
  817. if RotationOn then
  818. Cam.CoordinateFrame = Cam.CoordinateFrame * CN(Rotation, 0, 0)
  819. end
  820. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement