Advertisement
RoDelicia

Untitled

Dec 7th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.46 KB | None | 0 0
  1. -- This script has been converted to FE by iPxter
  2.  
  3.  
  4. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  5. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  6. do
  7. print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  8. script.Parent = Player.Character
  9.  
  10. --RemoteEvent for communicating
  11. local Event = Instance.new("RemoteEvent")
  12. Event.Name = "UserInput_Event"
  13.  
  14. --Fake event to make stuff like Mouse.KeyDown work
  15. local function fakeEvent()
  16. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  17. t.connect = t.Connect
  18. return t
  19. end
  20.  
  21. --Creating fake input objects with fake variables
  22. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  23. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  24. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  25. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  26. end}
  27. --Merged 2 functions into one by checking amount of arguments
  28. CAS.UnbindAction = CAS.BindAction
  29.  
  30. --This function will trigger the events that have been :Connect()'ed
  31. local function te(self,ev,...)
  32. local t = m[ev]
  33. if t and t._fakeEvent and t.Function then
  34. t.Function(...)
  35. end
  36. end
  37. m.TrigEvent = te
  38. UIS.TrigEvent = te
  39.  
  40. Event.OnServerEvent:Connect(function(plr,io)
  41. if plr~=Player then return end
  42. if io.isMouse then
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. else
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. for _,t in pairs(CAS.Actions) do
  51. for _,k in pairs(t.Keys) do
  52. if k==io.KeyCode then
  53. t.Function(t.Name,io.UserInputState,io)
  54. end
  55. end
  56. end
  57. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59. end
  60. end)
  61. Event.Parent = NLS([==[
  62. local Player = game:GetService("Players").LocalPlayer
  63. local Event = script:WaitForChild("UserInput_Event")
  64.  
  65. local UIS = game:GetService("UserInputService")
  66. local input = function(io,a)
  67. if a then return end
  68. --Since InputObject is a client-side instance, we create and pass table instead
  69. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  70. end
  71. UIS.InputBegan:Connect(input)
  72. UIS.InputEnded:Connect(input)
  73.  
  74. local Mouse = Player:GetMouse()
  75. local h,t
  76. --Give the server mouse data 30 times every second, but only if the values changed
  77. --If player is not moving their mouse, client won't fire events
  78. while wait(1/30) do
  79. if h~=Mouse.Hit or t~=Mouse.Target then
  80. h,t=Mouse.Hit,Mouse.Target
  81. Event:FireServer({isMouse=true,Target=t,Hit=h})
  82. end
  83. end]==],Player.Character)
  84. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  85. end
  86.  
  87. --BeatsByDrDre101 rocks these scripting worlds Woot
  88.  
  89. c,d=pcall(function()
  90. ply = owner
  91. char = ply.Character
  92. torso = char.Torso
  93. head = char.Torso
  94. track = false --- for tracking function
  95. char.Humanoid.MaxHealth,char.Humanoid.Health,char.Humanoid.WalkSpeed = 9000,9000,30
  96. dmg = 20
  97.  
  98. Bo = {["T"] = char["Torso"], ["H"] = char.Head}
  99. Bo.Arms = {["R"] = char["Right Arm"], ["L"] = char["Left Arm"]}
  100. Bo.Legs = {["L"] = char["Left Leg"], ["R"] = char["Right Leg"]}
  101. Bo.Shls = {["R"] = torso["Right Shoulder"], ["L"] = torso["Left Shoulder"]}
  102.  
  103.  
  104. rarm = char["Right Arm"]
  105. rw,lw = Instance.new("Weld"),Instance.new("Weld")
  106. normpos = Bo.Shls.R.C0
  107.  
  108. function lock(a) ---- updating this for 2 hands
  109. if a == 1 then
  110.  
  111. ---RIGHT---
  112. rw.Parent = torso
  113. rw.C0,rw.C1 = Bo.Shls.R.C0 ,Bo.Shls.R.C1
  114. rw.Part0,rw.Part1 = Bo.Shls.R.Part0 ,Bo.Shls.R.Part1
  115. Bo.Shls.R.Parent = nil
  116.  
  117. ---LEFT---
  118. lw.Parent = torso
  119. lw.Part0,lw.Part1 = Bo.Shls.L.Part0 ,Bo.Shls.L.Part1
  120. lw.C0,lw.C1 = Bo.Shls.L.C0 ,Bo.Shls.L.C1
  121.  
  122.  
  123. elseif a == 0 then
  124. Bo.Shls.R.Parent = torso
  125. rw.Parent = nil
  126. Bo.Shls.L.Parent = torso
  127. lw.Parent = nil
  128.  
  129. end
  130. end
  131.  
  132. cfn,ang = CFrame.new,CFrame.Angles
  133. v3n = Vector3.new
  134.  
  135. attacks = {
  136. ["slash"] = CFrame.Angles(1,2,3)
  137. }
  138.  
  139.  
  140.  
  141. sword = Instance.new("Model",char)
  142.  
  143. meshids = {["blast"] = 20329976, ["penguin"] = 15853464, ["ring"] = 3270017,
  144. ["spike"] = 1033714,["cone"] = 1082802,["crown"] = 20329976,["crossbow"] = 15886761,
  145. ["cloud"] = 1095708,["mjolnir"] = 1279013,["diamond"] = 9756362, ["hand"] = 37241605,
  146. ["fist"] = 65322375,["skull"] = 36869983,["totem"] = 35624068,["spikeb"] = 9982590,["dragon"] = 58430372}---some meshids
  147.  
  148.  
  149. ------TOOOOOLS------
  150. T = {["P"] = function(x,y,z,color,transparency,cancollide,anchored)
  151. c = Instance.new("Part",sword)
  152. c.TopSurface,c.BottomSurface = 0,0
  153. c.formFactor = "Custom"
  154. c.Size = Vector3.new(x,y,z)
  155. c.BrickColor = BrickColor.new(color)
  156. c.Transparency = transparency
  157. c.CanCollide = cancollide
  158. if anchored ~= nil then c.Anchored = anchored end
  159. return c
  160. end
  161. ,
  162. ["C"] = function(func) coroutine.resume(coroutine.create(func)) end
  163. ,
  164. ["W"] = function(part0,part1,x,y,z,rx,ry,rz)
  165. w = Instance.new("Weld",sword)
  166. w.Part0,w.Part1 = part0,part1
  167. w.C1 = CFrame.new(x,y,z) * CFrame.Angles(rx,ry,rz)
  168. return w
  169. end
  170. ,
  171. ["BG"] = function(parent)
  172. local c = Instance.new("BodyGyro",parent)
  173. c.P = 20e+003
  174. c.cframe = parent.CFrame
  175. c.maxTorque = Vector3.new(c.P,c.P,c.P)
  176. return c
  177. end
  178. ,
  179. ["BP"] = function(parent,position)
  180. local bp = Instance.new("BodyPosition",parent)
  181. bp.maxForce = Vector3.new()*math.huge
  182. bp.position = position
  183. return bp
  184. end
  185. ,
  186. ["F"] = function(parent,size,heat,color,secondcolor)
  187. f = Instance.new("Fire",parent)
  188. f.Size = size
  189. f.Heat = heat
  190. if color ~= nil then f.Color = BrickColor.new(color).Color end
  191. if secondcolor ~= nil then f.SecondaryColor = BrickColor.new(secondcolor).Color end
  192. return f
  193. end
  194. ,
  195. ["Track"] = function(obj,s,t,lt)
  196. coroutine.resume(coroutine.create(function()
  197. while track do
  198. old = obj.Position
  199. wait()
  200. new = obj.Position
  201.  
  202. mag = (old-new).magnitude
  203. dist = (old+new)/2
  204.  
  205. ray = T.P(s,mag+.2,s,obj.Color,t,false,true)
  206. Instance.new("CylinderMesh",ray)
  207. ray.CFrame = CFrame.new(dist,old)*ang(math.pi/2,0,0)
  208. game:GetService("Debris"):AddItem(ray,lt)
  209.  
  210. end
  211. end)) end,
  212. ["D"] = function(hit) if hit.Parent:findFirstChild("Humanoid") then h=hit.Parent.Humanoid h.Health = h.Health -dmg end end
  213. ,
  214. ["FM"] = function(parent,meshid,x,y,z,meshtexture)
  215. if meshid == "cylinder" then
  216. mesh = Instance.new("CylinderMesh",parent)
  217. mesh.Scale = Vector3.new(x,y,z)
  218. return mesh
  219. else
  220. mesh = Instance.new("SpecialMesh",parent)
  221. if meshid ~= "sphere" then
  222. mesh.MeshId = "rbxassetid://"..meshids[meshid]
  223. else mesh.MeshType = 3 end
  224. mesh.Scale = Vector3.new(x,y,z)
  225. if meshtexture ~= nil then
  226. mesh.TextureId = "rbxassetid://"..textureids[meshtexture]
  227. end
  228. return mesh
  229. end
  230. end
  231. }
  232. --------------------------------------------------
  233. ---MATH SHORTENINGS---
  234. M = {["R"] = function(a,b) return math.random(a,b) end,
  235. ["Cos"] = function(a) return math.cos(a) end,
  236. ["Sin"] = function(a) return math.sin(a) end,
  237. ["D"] = function(a) return math.rad(a) end
  238. }
  239. ---------------------------
  240.  
  241. --[[tutorial to using shortenings
  242. T.P(sizex,sizey,sizez,brickcolor,transparency,cancollide,anchored)
  243. T.W(part0,part1,x,y,z,rx,ry,rz)
  244. T.F(parent,size,heat,color,secondarycolor)
  245. T.FM(parent,meshid(see the list),scalex,scaley,scalez,textureid(optional) ) --- most usefull
  246.  
  247. M.R(a,b) creates a randomvalue beetwen a and b
  248. ]]--
  249.  
  250. p = T.P(.7,2,.7,"Bright blue",.5,false,false) --- The handle in 1 line O_O
  251. p.Name = "Handle"
  252. p.Position = torso.Position --p.CFrame = p.CFrame * CFrame.new(torso.X, torso.Y, torso.Z)
  253. T.FM(p,"cylinder",1,1,1) --- cylindermesh
  254. hw = T.W(p,torso,0,0,1,0,0,M.D(-45))
  255. holdpos = cfn(0,-1.5,0)*ang(math.pi/2,0,0)
  256. torsopos = cfn(0,0,1)*ang(0,0,M.D(-45))
  257.  
  258. crystal = T.P(1,1,1,"Bright red",.5,false,false)
  259. T.W(crystal,p,0,1,0,0,0,0)
  260. T.FM(crystal,"diamond",.5,1,.5)
  261.  
  262. p.Touched:connect(function(h)
  263. T.D(h)
  264. end)
  265.  
  266. c=nil
  267. mainweld = nil
  268. radius = 1
  269.  
  270. main = T.P(1,1,1,"White",1,false,false)
  271. mainweld = T.W(main,p,0,-1.5,0,0,0,0)
  272.  
  273.  
  274. ----SHIELD----
  275. sp = T.P(2,4,.5,"Magenta",.5,false,false)
  276. sp2 = T.P(1,4,.5,"Magenta",.5,false,false)
  277. sp3 = T.P(1,4,.5,"Magenta",.5,false,false)
  278. --sp,sp2,sp3.Transparency = 0.5,0.5,0.5
  279. T.W(sp2,sp,-1.4,0,.15,0,M.D(20),0)
  280. T.W(sp3,sp,1.4,0,.15,0,M.D(-20),0)
  281.  
  282. mw = T.W(sp,Bo.Arms.L,-.5,0,0,0,math.pi/2,0,0)
  283. ----------------------------------------
  284.  
  285. for i = 1,360,60 do --- I weld diamonds to part at bottom of handle
  286. c = T.P(1,1,1,"White",.5,false,false)
  287. T.FM(c,"diamond",.5,1.4,.5)
  288.  
  289. T.W(c,main,M.Cos(M.D(i))*radius,0,M.Sin(M.D(i))*radius,0,0,0)
  290. end
  291.  
  292. T.C(function() -- ROTATE
  293. while true do
  294. wait()
  295. mainweld.C1 = mainweld.C1 * ang(0,M.D(10),0)
  296. end
  297. end)
  298.  
  299.  
  300. T.C(function()
  301. while wait(0.1) do
  302. for i = 0,1,0.1 do
  303. p.Transparency = i
  304. wait()
  305. end
  306.  
  307. for i = 1,0,0.1 do
  308. p.Transparency = i
  309. wait()
  310. end
  311.  
  312. end
  313. end) -- Same as coroutine.create
  314.  
  315. p2 = p:Clone()
  316. p2.Parent = sword
  317. p2.Size = Vector3.new(1,6,1)
  318. p2.Touched:connect(function(hit) T.D(hit,5) end)
  319.  
  320. p3 = T.P(1,3,1,"Black",.5,false,false)
  321. T.FM(p3,"spike",1,3,1)
  322. T.W(p3,p2,0,-4,0,math.pi,0,0)
  323. Instance.new("Sparkles",p)
  324. w=Instance.new("Weld",p)
  325. w.Part0 = p
  326. w.Part1 = p2
  327. w.C1 = cfn(0,4,0)
  328. end)
  329. if c == true then
  330. print("Sucsess loading")
  331. else
  332. print(d)
  333. end
  334.  
  335. bg = nil
  336. bp = nil
  337. ---------ANIMATIONS--------------
  338.  
  339.  
  340.  
  341. function BBGui(Text,Adornee,Par)
  342. b=Instance.new("BillboardGui",Par)
  343. b.Adornee = Adornee
  344. f=Instance.new("Frame",b)
  345. f.BackgroundTransparency = 1
  346. t=Instance.new("TextLabel",b)
  347. t.Text = Text
  348. t.TextColor3 = Color3.new(1,0,1)
  349. return b
  350. end
  351.  
  352.  
  353.  
  354.  
  355. anims = {}
  356.  
  357. anims.Twirl = function()
  358. rw.C0 = rw.C0 * ang(-math.pi/2,0,0)
  359. hw.C0 = hw.C0 * ang(math.pi/2,0,0)
  360.  
  361. bg = T.BG(head)
  362. for i = 1,360*5,20 do
  363. bg.cframe = bg.cframe * ang(0,math.rad(20),0) --rw.C0 = rw.C0 * ang(i)
  364. local ball = T.P(2,2,2,"Lime green",.5,false,false)
  365. ball.Position = (p3.CFrame * cfn(0,p3.Size.y/2,0)).p
  366. bv = Instance.new("BodyVelocity",ball)
  367. bv.maxForce = Vector3.new()*math.huge
  368. bv.velocity = cfn(torso.Position,p3.Position).lookVector * 300
  369. delay(.1,function()
  370. local pos = cfn(ball.Position)
  371. T.C(function()
  372. local pa = T.P(1,1,1,"White",0,false,true)
  373. pa.CFrame = pos
  374. msh = T.FM(pa,"sphere",1,1,1)
  375.  
  376. for i = 1,30 do
  377. wait()
  378. pa.Size = v3n(i,i,i)
  379. pa.CFrame = pos
  380. pa.Transparency = i/30
  381. end
  382. pa:Remove()
  383. end)
  384. ball:Remove()
  385. end)
  386. wait()
  387. end
  388. bg:Remove()
  389. rw.C0 = rw.C0 * ang(math.pi/2,0,0)
  390. hw.C0 = hw.C0 * ang(-math.pi/2,0,0)
  391. end
  392.  
  393. anims.Fire = function()
  394. local f=Instance.new("Fire",p3)
  395. dmg = 40
  396. delay(20,function()
  397. f:remove()
  398. dmg = 20
  399. end)
  400. end
  401.  
  402. anims.ShieldUp = function()
  403. for i = 1,50,20 do
  404. wait()
  405. lw.C0 = lw.C0 * ang(0,0,M.D(-20))
  406. end
  407. for i = 1,50,20 do
  408. wait()
  409. lw.C0 = lw.C0 * ang(M.D(20),0,0)
  410. end
  411. end
  412.  
  413. anims.ShieldDown = function()
  414. for i = 1,50,20 do
  415. wait()
  416. lw.C0 = lw.C0 * ang(M.D(-20),0,0)
  417. end
  418. for i = 1,50,20 do
  419. wait()
  420. lw.C0 = lw.C0 * ang(0,0,M.D(20))
  421. end
  422.  
  423. end
  424.  
  425.  
  426. anims.Equip = function()
  427. for i = 1,220,20 do
  428. wait()
  429. rw.C0 = rw.C0 * ang(0,0,M.D(20))
  430. end
  431. hw.Part1,hw.C1 = Bo.Arms.R,holdpos
  432. for i = 1,220-90,20 do
  433. wait()
  434. rw.C0 = rw.C0 * ang(0,0,M.D(-20))
  435. end
  436. rw.C0 = normpos*ang(0,0,math.pi/2)
  437. end
  438.  
  439. anims.UnEquip = function()
  440. for i = 1,180,20 do
  441. wait()
  442. rw.C0 = rw.C0 * ang(0,0,M.D(20))
  443. end
  444. hw.Part1,hw.C1 = torso,torsopos
  445. for i = 1,220,20 do
  446. wait()
  447. rw.C0 = rw.C0 * ang(0,0,M.D(-20))
  448. end
  449. end
  450.  
  451. anims.Equip2 = function()
  452. for i = 1,90,5 do
  453. wait()
  454. rw.C0 = rw.C0 * ang(0,0,M.D(5))
  455. end rw.C0 = normpos * ang(0,0,M.D(90)) end
  456.  
  457. anims.UnEquip2 = function()
  458. for i = 90,0,-20 do
  459. wait()
  460. rw.C0 = rw.C0 * ang(0,0,M.D(-20))
  461. end
  462. end
  463.  
  464. anims.Slash = function()
  465. for i = 1,90,20 do
  466. rw.C0 = rw.C0 * ang(0,M.D(20),0)
  467. wait()
  468. end
  469.  
  470. for i = 90,1,-20 do
  471. rw.C0 = rw.C0 * ang(0,0,M.D(-20))
  472. wait()
  473. end
  474. for i = 90,1,-20 do
  475. rw.C0 = rw.C0 * ang(0,0,M.D(20))
  476. wait()
  477. end
  478.  
  479. for i = 1,90,20 do
  480. rw.C0 = rw.C0 * ang(0,M.D(-20),0)
  481. wait()
  482. end
  483. end
  484.  
  485. anims.Fist = function(mouse)
  486. pa = T.P(1,1,1,"Black",.5,false,false)
  487.  
  488. --[[p=Instance.new("Part",Workspace)
  489. p.Anchored = true --flying fist? ya]]--
  490.  
  491. T.FM(p,"fist",1,1,1)
  492. T.W(p,Bo.Arms.L,0,-2,0,0,0,0)
  493.  
  494. end
  495.  
  496. anims.dragon = function(mouse)
  497. local endpos = mouse.hit.p
  498. for i = 1,90,20 do
  499. lw.C0 = lw.C0 * ang(0,0,M.D(-20))
  500. end
  501.  
  502. for i = 1,50,10 do
  503. lw.C0 = lw.C0 * ang(M.D(-10),0,0)
  504. end
  505.  
  506. local ray = T.P(5,1,5,"Bright red",.5,false,true)
  507. startpos = sp.CFrame * cfn(0,0,-1)
  508. T.FM(ray,"cylinder",1,1,1)
  509.  
  510. ray.CFrame = startpos
  511.  
  512.  
  513.  
  514. mag = (startpos.p-endpos).magnitude
  515.  
  516. local head = T.P(1,1,1,"Bright red",.5,false,true)
  517. T.FM(head,"dragon",4,4,4)
  518.  
  519. for i = 1,mag do
  520. wait()
  521. startpos = sp.CFrame * cfn(0,0,-1)
  522. ray.Size = v3n(5,i,5)
  523. ray.CFrame = (cfn(startpos.p,endpos)*cfn(0,0,-ray.Size.y/2))*ang(math.pi/2,0,0)
  524. head.CFrame = ray.CFrame * cfn(0,-ray.Size.y/2,0) * ang(-math.pi/2,0,0)
  525. end
  526.  
  527. for i = 1,50,10 do
  528. lw.C0 = lw.C0 * ang(M.D(10),0,0)
  529. end
  530.  
  531. for i = 1,90,20 do
  532. lw.C0 = lw.C0 * ang(0,0,M.D(20))
  533. end
  534.  
  535. ray:Remove() head:Remove()
  536. end
  537.  
  538.  
  539. swirling = false
  540. anims.Swirl = function(mouse)
  541. if swirling == false and mouse.Target ~= nil then
  542. swirling = true
  543. eff = function(a)
  544. T.C(function()
  545. wait()
  546. local p = T.P(1,1,1,"Black",.5,false,true)
  547. p.CFrame = a
  548. local msh = T.FM(p,"blast",1,1,1)
  549. for i = 1,30 do
  550. wait()
  551. msh.Scale = Vector3.new(i,i/2,i)
  552. p.Transparency = i/30
  553. end
  554. p:Remove()
  555. end)
  556. end
  557.  
  558. rw.C0 = normpos * ang(0,0,math.pi)
  559. hw.C0 = hw.C0 * ang(math.pi/2,0,0)
  560. bg = T.BG(torso)
  561. local original = bg.cframe
  562. --T.C(function() while swirling do wait() bg.cframe = bg.cframe * ang(0,M.D(100),0) end end)
  563. eff(torso.CFrame *cfn(0,-3,0))
  564. bp = T.BP(torso,torso.Position + v3n(0,70,0))
  565. while (bp.position-torso.Position).magnitude > 3 do wait() end --- waits
  566.  
  567. if mouse.Target ~= nil then
  568. bg.cframe = cfn(torso.Position,mouse.hit.p) * ang(-math.pi/2,0,0)
  569. bp.position = (mouse.hit.p + v3n(0,3,0))
  570.  
  571. eff(bg.cframe * ang(math.pi,0,0))
  572.  
  573. while (bp.position-torso.Position).magnitude > 5 do wait() end --- waits
  574.  
  575. bg.cframe = original bp:Remove()
  576. game:GetService("Debris"):AddItem(bg,.5)
  577.  
  578. rw.C0 = normpos * ang(0,0,math.pi/2)
  579. hw.C0 = hw.C0 * ang(-math.pi/2,0,0)
  580. swirling = false
  581. end
  582.  
  583. else
  584. bp:Remove() bg:Remove() rw.C0 = normpos * ang(0,0,math.pi/2)
  585. hw.C0 = hw.C0 * ang(-math.pi/2,0,0)
  586.  
  587. end
  588. end
  589.  
  590. radi = 5
  591. atk = {"Twirl","Fire","Swirl","Dragon","Slash","Fist","ShieldUp"}
  592.  
  593.  
  594. function createhumanoid(name,part,parent)
  595. mo = Instance.new("Model",parent)
  596. mo.Name = name
  597. part.Name = "Head"
  598. part.Parent = mo
  599. tor = T.P(.1,.1,.1,"White",1,false,false)
  600. tor.Name = "Torso"
  601. tor.Parent = mo
  602. T.W(tor,part,0,0,0,0,0,0)
  603. hum = Instance.new("Humanoid",mo)
  604. hum.Health = 0
  605. hum.MaxHealth = 0
  606. end
  607. ---------------------------------
  608. tab = nil
  609.  
  610. scrbox = nil
  611. current = 1
  612.  
  613. function scroll(direction)
  614. if scrbox ~= nil then
  615. current = current+(direction)
  616.  
  617. if current > #atk then current = 1
  618. elseif current < 1 then current = #atk
  619. end
  620.  
  621. scrbox.Adornee = tab:GetChildren()[current]
  622. end
  623.  
  624. end
  625.  
  626.  
  627. ply.Chatted:connect(function(msg)
  628.  
  629. if msg == "#accept" and mod ~= nil then
  630. anims[atk[current]]()
  631. end
  632.  
  633. end)
  634.  
  635. function showtablets()
  636. if tab == nil then
  637.  
  638. tab = Instance.new("Model",sword)
  639.  
  640. for i,v in pairs(atk) do
  641. tp = T.P(2,1.5,2,"Black",.5,false,false)
  642. tp.Parent = tab
  643. createhumanoid(v,tp,tab)
  644.  
  645. local bp = T.BP(tp,torso.Position)
  646.  
  647. T.C(function()
  648. while true do
  649. wait()
  650. o = 360/#atk*i
  651. bp.position = torso.Position + v3n(M.Cos(M.D(o))*radi,0,M.Sin(M.D(o))*radi)
  652. end
  653. end)
  654.  
  655. end
  656.  
  657. scrbox = Instance.new("SelectionBox",Workspace)
  658. scrbox.Adornee = tab:GetChildren()[current]
  659.  
  660. elseif tab ~= nil then tab:Remove() tab = nil
  661. end
  662. end
  663.  
  664. -------------------------------------
  665.  
  666. hopper = Instance.new("HopperBin",ply.Backpack)
  667. hopper.Name = "Crystal Lance"
  668.  
  669. hopper.Deselected:connect(function()
  670. anims.UnEquip()
  671. lock(0) track = false
  672. end)
  673.  
  674.  
  675. hopper.Selected:connect(function(mouse)
  676. lock(1)
  677. anims.Equip()
  678. track = true
  679. T.Track(p2,.3,.5,1)
  680.  
  681. mouse.KeyUp:connect(function(key)
  682. if key == string.char(48) then anims.ShieldDown()
  683. end end)
  684.  
  685. mouse.KeyDown:connect(function(key)
  686. k=key:lower()
  687. if k == "f" then anims.Slash()
  688. elseif k == "q" then anims.UnEquip2() wait(1) anims.Equip2()
  689. elseif k == "t" then anims.Twirl()
  690. elseif key == "r" then anims.Swirl(mouse)
  691. elseif key == "k" then anims.Fire()
  692. elseif key == string.char(48) then anims.ShieldUp()
  693. elseif key == "j" then anims.Fist(mouse)
  694. elseif key == "g" then anims.dragon(mouse)
  695.  
  696. elseif key == "x" then showtablets()
  697. elseif key == "z" then scroll(-1) elseif key == "c" then scroll(1)
  698. elseif key == "v" then if scrbox ~= nil then anims[scrbox.Adornee.Name](mouse) end
  699.  
  700. end
  701. end)
  702.  
  703. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement