BINO2002

Untitled

Jan 13th, 2016
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.02 KB | None | 0 0
  1. -- Book Of Wisdom --
  2. -- Local Script --
  3.  
  4. for i, v in pairs(game:service("Players").LocalPlayer.Backpack:children()) do
  5.  
  6. if v.className == "HopperBin" and v.Name == "Book" then
  7.  
  8. v:remove()
  9.  
  10. end
  11.  
  12. end
  13.  
  14. for i, v in pairs(game:service("Players").LocalPlayer.Character.Head:children()) do
  15.  
  16. if v.Name == "PTS" and v.className == "Sound" then
  17.  
  18. v:remove()
  19.  
  20. end
  21.  
  22. end
  23.  
  24. wait(0.3)
  25.  
  26. bin = Instance.new("HopperBin")
  27.  
  28. bin.Name = "Book"
  29.  
  30. bin.Parent = game.Players.LocalPlayer.Backpack
  31.  
  32.  
  33.  
  34.  
  35. local player = game:service("Players").LocalPlayer
  36.  
  37. local char = player.Character
  38.  
  39. local Torsoz = char:findFirstChild("Torso")
  40.  
  41. local RA = char:findFirstChild("Right Arm")
  42.  
  43. local LA = char:findFirstChild("Left Arm")
  44.  
  45. local RL = char:findFirstChild("Right Leg")
  46.  
  47. local LL = char:findFirstChild("Left Leg")
  48.  
  49. local H = char:findFirstChild("Head")
  50.  
  51. local RS = Torsoz:findFirstChild("Right Shoulder")
  52.  
  53. local LS = Torsoz:findFirstChild("Left Shoulder")
  54.  
  55. local RH = Torsoz:findFirstChild("Right Hip")
  56.  
  57. local LH = Torsoz:findFirstChild("Left Hip")
  58.  
  59. local N = Torsoz:findFirstChild("Neck")
  60.  
  61. local Main
  62.  
  63. local Page = 1
  64.  
  65. local Glows = {}
  66.  
  67. local RiseEffects = {}
  68.  
  69. local GroundSymbols = {}
  70.  
  71. local prevpage = 0
  72.  
  73. local Joint
  74.  
  75. local Animating = false
  76.  
  77. local Casting = false
  78.  
  79. local PTS = Instance.new("Sound", H)
  80.  
  81. PTS.Name = "PTS"
  82.  
  83. PTS.SoundId = "http://www.roblox.com/asset/?id=3931318"
  84.  
  85. PTS.Pitch = 1.1
  86.  
  87. PTS.Volume = 0.25
  88.  
  89.  
  90.  
  91.  
  92. local s = 1
  93.  
  94. local numofpages = 10
  95.  
  96. local spellids = {"78036587", "132611096", "12579755","116835157","127817360","112716066","112670381","112671903","112724208"}
  97.  
  98.  
  99.  
  100.  
  101. local P = Instance.new("Part")
  102.  
  103. P.Anchored = false
  104.  
  105. P.CanCollide = false
  106.  
  107. P.Name = "Part"
  108.  
  109. P.formFactor = "Custom"
  110.  
  111. P.BrickColor = BrickColor.new("Brick yellow")
  112.  
  113. P.Size = Vector3.new(0.5,0.5,0.5)
  114.  
  115. P.Locked = true
  116.  
  117. P.TopSurface = 0
  118.  
  119. P.BottomSurface = 0
  120.  
  121.  
  122.  
  123.  
  124. function Build()
  125.  
  126. for i, v in pairs(char:children()) do
  127.  
  128. if v.className == "Model" and v.Name == "Book" then
  129.  
  130. v:remove()
  131.  
  132. end
  133.  
  134. end
  135.  
  136. local mdl = Instance.new("Model", char)
  137.  
  138. mdl.Name = "Book"
  139.  
  140.  
  141.  
  142.  
  143. local h = P:Clone()
  144.  
  145. h.Parent = mdl
  146.  
  147. h.Transparency = 1
  148.  
  149. local mesh = Instance.new("SpecialMesh", h)
  150.  
  151. mesh.MeshType = "Brick"
  152.  
  153. mesh.Scale = Vector3.new(3*s,4*s,1.4*s)
  154.  
  155. local w = Instance.new("Motor", h)
  156.  
  157. w.Part0 = Torsoz
  158.  
  159. w.Part1 = h
  160.  
  161. w.C0 = CFrame.new(1,-1,0*s) * CFrame.Angles(-3.5,4.5,0.5)
  162.  
  163. Main = w
  164.  
  165.  
  166.  
  167.  
  168. ---- Book ----------
  169.  
  170.  
  171.  
  172.  
  173. local c = P:Clone()
  174.  
  175. c.Parent = mdl
  176.  
  177. c.BrickColor = BrickColor.new("Navy blue")
  178.  
  179. local mesh = Instance.new("BlockMesh", c)
  180.  
  181. mesh.Scale = Vector3.new(0.3*s,4*s,1.6*s)
  182.  
  183. local w = Instance.new("Motor", c)
  184.  
  185. w.Part0 = h
  186.  
  187. w.Part1 = c
  188.  
  189. w.C0 = CFrame.new(-0.75*s,0,0)
  190.  
  191. local W = P:Clone()
  192.  
  193. W.Parent = mdl
  194.  
  195. local mesh = Instance.new("BlockMesh", W)
  196.  
  197. mesh.Scale = Vector3.new(0.25*s,3.6*s,1.5*s)
  198.  
  199. local w = Instance.new("Motor", W)
  200.  
  201. w.Part0 = c
  202.  
  203. w.Part1 = W
  204.  
  205. w.C0 = CFrame.new(0.07*s,0,0)
  206.  
  207.  
  208.  
  209.  
  210. pages = {}
  211.  
  212. for i = 1, numofpages do
  213.  
  214. local p = P:Clone()
  215.  
  216. p.Parent = mdl
  217.  
  218. p.Name = "Page"..i
  219.  
  220. local mesh = Instance.new("BlockMesh", p)
  221.  
  222. mesh.Scale = Vector3.new(2.8*s, 3.6*s, (1.3/numofpages)*s)
  223.  
  224. local w = Instance.new("Motor", p)
  225.  
  226. w.Name = "PageW"..i
  227.  
  228. w.Part0 = c
  229.  
  230. w.Part1 = p
  231.  
  232. w.C0 = CFrame.new(0,0,(0.4*s)-(((0.7*s)/numofpages)*i)) * CFrame.Angles(math.pi/2,0,0)
  233.  
  234. w.C1 = CFrame.new(-0.7*s,0,0) * CFrame.Angles(math.pi/2,0,0)
  235.  
  236. w.MaxVelocity = 0.03
  237.  
  238. table.insert(pages, w)
  239.  
  240. local b = P:Clone()
  241.  
  242. b.Parent = mdl
  243.  
  244. b.Name = "PageSymbol"..i
  245.  
  246. b.Transparency = 1
  247.  
  248. local mesh = Instance.new("SpecialMesh", b)
  249.  
  250. mesh.MeshType = "Brick"
  251.  
  252. mesh.Scale = Vector3.new(2.2*s,2.2*s,((1.3/numofpages)+0.05)*s)
  253.  
  254. local w = Instance.new("Motor", b)
  255.  
  256. w.Part0 = p
  257.  
  258. w.Part1 = b
  259.  
  260. w.C0 = CFrame.new(0.05*s,0,0)
  261.  
  262. local d = Instance.new("Decal", b)
  263.  
  264. d.Face = "Front"
  265.  
  266. if spellids[i] ~= nil then
  267.  
  268. d.Texture = "http://www.roblox.com/asset/?id="..spellids[i]
  269.  
  270. end
  271.  
  272. if i > 1 and spellids[i-1] ~= nil then
  273.  
  274. local d = Instance.new("Decal", b)
  275.  
  276. d.Face = "Back"
  277.  
  278. d.Texture = "http://www.roblox.com/asset/?id="..spellids[i-1]
  279.  
  280. end
  281.  
  282. end
  283.  
  284.  
  285.  
  286.  
  287. local c1 = P:Clone()
  288.  
  289. c1.Parent = mdl
  290.  
  291. c1.Name = "Cover"
  292.  
  293. c1.BrickColor = BrickColor.new("Navy blue")
  294.  
  295. local mesh = Instance.new("BlockMesh", c1)
  296.  
  297. mesh.Scale = Vector3.new(3*s, 4*s, 0.24*s)
  298.  
  299. local w = Instance.new("Motor", c1)
  300.  
  301. w.Part0 = c
  302.  
  303. w.Part1 = c1
  304.  
  305. w.C0 = CFrame.new(0,0,0.4*s) * CFrame.Angles(math.pi/2,0,0)
  306.  
  307. w.C1 = CFrame.new(-0.75*s,0,0) * CFrame.Angles(math.pi/2,0,0)
  308.  
  309. w.MaxVelocity = 0.03
  310.  
  311. Cover1 = w
  312.  
  313. local c2 = P:Clone()
  314.  
  315. c2.Parent = mdl
  316.  
  317. c2.Name = "Cover"
  318.  
  319. c2.BrickColor = BrickColor.new("Navy blue")
  320.  
  321. local mesh = Instance.new("BlockMesh", c2)
  322.  
  323. mesh.Scale = Vector3.new(3*s, 4*s, 0.24*s)
  324.  
  325. local w = Instance.new("Motor", c2)
  326.  
  327. w.Part0 = c
  328.  
  329. w.Part1 = c2
  330.  
  331. w.C0 = CFrame.new(0,0,-0.4*s) * CFrame.Angles(math.pi/2,0,0)
  332.  
  333. w.C1 = CFrame.new(-0.75*s,0,0) * CFrame.Angles(math.pi/2,0,0)
  334.  
  335. w.MaxVelocity = 0.03
  336.  
  337. Cover2 = w
  338.  
  339.  
  340.  
  341.  
  342. local e = P:Clone()
  343.  
  344. e.Parent = mdl
  345.  
  346. e.BrickColor = BrickColor.new("Black")
  347.  
  348. local mesh = Instance.new("CylinderMesh", e)
  349.  
  350. mesh.Scale = Vector3.new(0.3*s,3.98*s,0.3*s)
  351.  
  352. local e2 = e:Clone()
  353.  
  354. e2.Parent = mdl
  355.  
  356. e2.BrickColor = BrickColor.new("Really black")
  357.  
  358. e2.Reflectance = 0.32
  359.  
  360. e2.Transparency = 0.22
  361.  
  362. e2.Mesh.Scale = Vector3.new(0.31*s,2*s,0.31*s)
  363.  
  364. local w = Instance.new("Motor", e)
  365.  
  366. w.Part0 = c
  367.  
  368. w.Part1 = e
  369.  
  370. w.C0 = CFrame.new(0,0,0.4*s)
  371.  
  372. local w = Instance.new("Motor", e)
  373.  
  374. w.Part0 = c
  375.  
  376. w.Part1 = e2
  377.  
  378. w.C0 = CFrame.new(0,0,0.4*s)
  379.  
  380. local e = P:Clone()
  381.  
  382. e.Parent = mdl
  383.  
  384. e.BrickColor = BrickColor.new("Black")
  385.  
  386. local mesh = Instance.new("CylinderMesh", e)
  387.  
  388. mesh.Scale = Vector3.new(0.3*s,3.98*s,0.3*s)
  389.  
  390. local e2 = e:Clone()
  391.  
  392. e2.Parent = mdl
  393.  
  394. e2.BrickColor = BrickColor.new("Really black")
  395.  
  396. e2.Reflectance = 0.32
  397.  
  398. e2.Transparency = 0.22
  399.  
  400. e2.Mesh.Scale = Vector3.new(0.31*s,2*s,0.31*s)
  401.  
  402. local w = Instance.new("Motor", e)
  403.  
  404. w.Part0 = c
  405.  
  406. w.Part1 = e
  407.  
  408. w.C0 = CFrame.new(0,0,-0.4*s)
  409.  
  410. local w = Instance.new("Motor", e2)
  411.  
  412. w.Part0 = c
  413.  
  414. w.Part1 = e2
  415.  
  416. w.C0 = CFrame.new(0,0,-0.4*s)
  417.  
  418.  
  419.  
  420.  
  421. Glows = {}
  422.  
  423. for i = 1, 9 do
  424.  
  425. local p = P:Clone()
  426.  
  427. p.Parent = mdl
  428.  
  429. p.Name = "DesignPart"
  430.  
  431. p.BrickColor = BrickColor.new("Black")
  432.  
  433. local w = Instance.new("Motor", p)
  434.  
  435. w.Part0 = c1
  436.  
  437. w.Part1 = p
  438.  
  439. w.C0 = CFrame.new(0,0,0.06*s)
  440.  
  441. local p2 = P:Clone()
  442.  
  443. p2.Parent = mdl
  444.  
  445. p2.Name = "DesignPart2"
  446.  
  447. p2.BrickColor = BrickColor.new("White")
  448.  
  449. local w2 = Instance.new("Motor", p2)
  450.  
  451. w2.Part0 = c1
  452.  
  453. w2.Part1 = p2
  454.  
  455. w2.C0 = CFrame.new(0,0,0.06*s)
  456.  
  457. table.insert(Glows, p2)
  458.  
  459. if i == 1 then
  460.  
  461. local mesh = Instance.new("CylinderMesh",p)
  462.  
  463. mesh.Scale = Vector3.new(0.6*s,0.1*s,0.6*s)
  464.  
  465. w.C0 = w.C0 * CFrame.Angles(math.pi/2,0,0)
  466.  
  467. local mesh = Instance.new("CylinderMesh",p2)
  468.  
  469. mesh.Scale = Vector3.new(0.2*s,0.11*s,0.2*s)
  470.  
  471. w2.C0 = w2.C0 * CFrame.Angles(math.pi/2,0,0)
  472.  
  473. else
  474.  
  475. local mesh = Instance.new("BlockMesh", p)
  476.  
  477. mesh.Scale = Vector3.new(0.3*s,1.2*s,0.1*s)
  478.  
  479. w.C1 = CFrame.new(0.4*s,0,0) * CFrame.Angles(0,0,(math.pi*2/8)*i)
  480.  
  481. local mesh = Instance.new("BlockMesh", p2)
  482.  
  483. mesh.Scale = Vector3.new(0.09*s,0.7*s,0.11*s)
  484.  
  485. w2.C1 = CFrame.new(0.4*s,0,0) * CFrame.Angles(0,0,(math.pi*2/8)*i)
  486.  
  487. end
  488.  
  489. end
  490.  
  491.  
  492.  
  493.  
  494. end
  495.  
  496. Build()
  497.  
  498.  
  499.  
  500.  
  501. function TurnToPage(page)
  502.  
  503. if Casting == false and Animating == false then
  504.  
  505. if (page == 1 and prevpage == 2) or (page == numofpages-2 and prevpage == numofpages-1) or (page ~= 0 and page ~= 1 and prevpage ~= numofpages-1) then
  506.  
  507. PTS:Play()
  508.  
  509. end
  510.  
  511. for i, v in pairs(pages) do
  512.  
  513. if page == 0 then
  514.  
  515. v.MaxVelocity = 0.08
  516.  
  517. v.DesiredAngle = 0
  518.  
  519. else
  520.  
  521. if i > page then
  522.  
  523. v.MaxVelocity = 0.1
  524.  
  525. v.DesiredAngle = -math.pi/4.6
  526.  
  527. else
  528.  
  529. v.MaxVelocity = 0.1
  530.  
  531. v.DesiredAngle = math.pi/4.6
  532.  
  533. end
  534.  
  535. end
  536.  
  537. end
  538.  
  539. if page == 0 then
  540.  
  541. Cover1.MaxVelocity = 0.08
  542.  
  543. Cover1.DesiredAngle = 0
  544.  
  545. Cover2.MaxVelocity = 0.08
  546.  
  547. Cover2.DesiredAngle = 0
  548.  
  549. if prevpage == 1 then
  550.  
  551. Unequip(true)
  552.  
  553. end
  554.  
  555. else
  556.  
  557. Cover1.MaxVelocity = 0.1
  558.  
  559. Cover1.DesiredAngle = math.pi/4.6
  560.  
  561. Cover2.MaxVelocity = 0.1
  562.  
  563. Cover2.DesiredAngle = -math.pi/4.6
  564.  
  565. if prevpage == 0 then
  566.  
  567. Equip(true)
  568.  
  569. end
  570.  
  571. end
  572.  
  573. prevpage = page
  574.  
  575. end
  576.  
  577. end
  578.  
  579.  
  580.  
  581.  
  582. function CastHeal()
  583.  
  584. Casting = true
  585.  
  586. local nmdl = Instance.new("Model", char)
  587.  
  588. nmdl.Name = "HeallSpellEffects"
  589.  
  590. local p = P:Clone()
  591.  
  592. p.Parent = nmdl
  593.  
  594. p.Anchored = true
  595.  
  596. p.Transparency = 1
  597.  
  598. p.CFrame = CFrame.new(Torsoz.Position+Vector3.new(0,-3,0))
  599.  
  600. local mesh = Instance.new("SpecialMesh", p)
  601.  
  602. mesh.MeshType = "Brick"
  603.  
  604. mesh.Scale = Vector3.new(28,0.6,28)
  605.  
  606. local de = Instance.new("Decal", p)
  607.  
  608. de.Name = "Symbol"
  609.  
  610. de.Face = "Top"
  611.  
  612. de.Transparency = 1
  613.  
  614. de.Texture = "http://www.roblox.com/asset/?id="..spellids[Page]
  615.  
  616. table.insert(GroundSymbols, p)
  617.  
  618. wait(0.2)
  619.  
  620. local loopnum = 0
  621.  
  622. local makeeffect = true
  623.  
  624. local Cont = true
  625.  
  626.  
  627.  
  628.  
  629. while Cont == true do
  630.  
  631. loopnum = loopnum + 1
  632.  
  633. if makeeffect == true and loopnum%3 == 0 then
  634.  
  635. local g = P:Clone()
  636.  
  637. g.Parent = nmdl
  638.  
  639. g.Name = "RiseEffect"
  640.  
  641. g.BrickColor = BrickColor.new("White")
  642.  
  643. local W = Instance.new("Motor", g)
  644.  
  645. W.Part0 = Torsoz
  646.  
  647. W.Part1 = g
  648.  
  649. W.C1 = CFrame.new(0,0,math.random(20, 80)/10)
  650.  
  651. W.C0 = CFrame.new(0,-4,0) * CFrame.Angles(0,(math.pi*2/100)*math.random(0, 100),0)
  652.  
  653. local meshz = Instance.new("SpecialMesh", g)
  654.  
  655. local ran = math.random(1, 3)
  656.  
  657. meshz.Scale = Vector3.new(math.random(15, 34)/10,math.random(15, 34)/10,math.random(15, 34)/10)
  658.  
  659. if ran == 1 then
  660.  
  661. meshz.MeshType = "Sphere"
  662.  
  663. elseif ran == 2 then
  664.  
  665. meshz.MeshId = "http://www.roblox.com/asset/?id=9756362"
  666.  
  667. meshz.Scale = Vector3.new(math.random(12, 30)/15,math.random(12, 30)/15,math.random(12, 30)/15)
  668.  
  669. elseif ran == 3 then
  670.  
  671. meshz.MeshType = "Head"
  672.  
  673. end
  674.  
  675. table.insert(RiseEffects, {W, math.random(10,130)/1000})
  676.  
  677. if #RiseEffects > 15 then
  678.  
  679. print("Stopped making effects")
  680.  
  681. makeeffect = false
  682.  
  683. end
  684.  
  685. end
  686.  
  687.  
  688.  
  689.  
  690. for i, v in pairs(RiseEffects) do
  691.  
  692. v[1].Parent.Transparency = v[1].Parent.Transparency + 0.016
  693.  
  694. v[1].C0 = v[1].C0 * CFrame.new(0,0.12,0) * CFrame.Angles(0,v[2],0)
  695.  
  696. v[1].C1 = v[1].C1 * CFrame.new(0,0,v[2]/3)
  697.  
  698. if v[1].Parent.Transparency > 0.9 then
  699.  
  700. v[1].Parent:remove()
  701.  
  702. table.remove(RiseEffects,i)
  703.  
  704. end
  705.  
  706. end
  707.  
  708.  
  709.  
  710.  
  711. if loopnum > 4 then
  712.  
  713. if #RiseEffects == 0 then
  714.  
  715. print("Stopped loop")
  716.  
  717. Cont = false
  718.  
  719. end
  720.  
  721. end
  722.  
  723.  
  724.  
  725.  
  726. wait(0.03)
  727.  
  728. end
  729.  
  730. nmdl:remove()
  731.  
  732. Casting = false
  733.  
  734. end
  735.  
  736. function CastAttack()
  737.  
  738. Casting2 = true
  739.  
  740. local mndl = Instance.new("Model", char)
  741.  
  742. mndl.Name = "AttackSpellEffects"
  743.  
  744. local d = P:Clone()
  745.  
  746. d.Parent = mndl
  747.  
  748. d.Anchored = true
  749.  
  750. d.Transparency = 1
  751.  
  752. d.CFrame = CFrame.new(Torsoz.Position+Vector3.new(0,-3,0))
  753.  
  754. local mesh2 = Instance.new("SpecialMesh", d)
  755.  
  756. mesh2.MeshType = "Brick"
  757.  
  758. mesh2.Scale = Vector3.new(28,0.6,28)
  759.  
  760. local df = Instance.new("Decal", d)
  761.  
  762. df.Name = "Symbol2"
  763.  
  764. df.Face = "Top"
  765.  
  766. df.Transparency = 1
  767.  
  768. df.Texture = "http://www.roblox.com/asset/?id="..spellids[Page]
  769.  
  770. table.insert(GroundSymbols, d)
  771.  
  772. wait(0.2)
  773.  
  774. local loopnum2 = 0
  775.  
  776. local makeeffect2 = true
  777.  
  778. local Cont2 = true
  779.  
  780.  
  781.  
  782.  
  783. while Cont2 == true do
  784.  
  785. loopnum2 = loopnum2 + 1
  786.  
  787. if makeeffect2 == true and loopnum2%3 == 0 then
  788.  
  789. local g = P:Clone()
  790.  
  791. k.Parent = mndl
  792.  
  793. k.Name = "RiseEffect2"
  794.  
  795. k.BrickColor = BrickColor.new("White")
  796.  
  797. local L = Instance.new("Motor", k)
  798.  
  799. L.Part0 = Torsoz
  800.  
  801. L.Part1 = k
  802.  
  803. L.C1 = CFrame.new(0,0,math.random(20, 80)/10)
  804.  
  805. L.C0 = CFrame.new(0,-4,0) * CFrame.Angles(0,(math.pi*2/100)*math.random(0, 100),0)
  806.  
  807. local meshx = Instance.new("SpecialMesh", k)
  808.  
  809. local ran2 = math.random(4, 6)
  810.  
  811. meshx.Scale = Vector3.new(math.random(15, 34)/10,math.random(15, 34)/10,math.random(15, 34)/10)
  812.  
  813. if ran2 == 4 then
  814.  
  815. meshx.MeshType = "Sphere"
  816.  
  817. elseif ran2 == 5 then
  818.  
  819. meshx.MeshId = "http://www.roblox.com/asset/?id=9756362"
  820.  
  821. meshx.Scale = Vector3.new(math.random(12, 30)/15,math.random(12, 30)/15,math.random(12, 30)/15)
  822.  
  823. elseif ran2 == 6 then
  824.  
  825. meshx.MeshType = "Cylinder"
  826.  
  827. end
  828.  
  829. table.insert(RiseEffects2, {L, math.random(10,130)/1000})
  830.  
  831. if #RiseEffects2 > 15 then
  832.  
  833. print("Stopped making effects")
  834.  
  835. makeeffect2 = false
  836.  
  837. end
  838.  
  839. end
  840.  
  841.  
  842.  
  843.  
  844. for i, v in pairs(RiseEffects2) do
  845.  
  846. v[1].Parent.Transparency = v[1].Parent.Transparency + 0.016
  847.  
  848. v[1].C0 = v[1].C0 * CFrame.new(0,0.12,0) * CFrame.Angles(0,v[2],0)
  849.  
  850. v[1].C1 = v[1].C1 * CFrame.new(0,0,v[2]/3)
  851.  
  852. if v[1].Parent.Transparency > 0.9 then
  853.  
  854. v[1].Parent:remove()
  855.  
  856. table.remove(RiseEffects2,i)
  857.  
  858. end
  859.  
  860. end
  861.  
  862.  
  863.  
  864.  
  865. if loopnum2 > 4 then
  866.  
  867. if #RiseEffects2 == 0 then
  868.  
  869. print("Stopped loop")
  870.  
  871. Cont2 = false
  872.  
  873. end
  874.  
  875. end
  876.  
  877.  
  878.  
  879.  
  880. wait(0.03)
  881.  
  882. end
  883.  
  884. mndl:remove()
  885.  
  886. Casting2 = false
  887.  
  888. end
  889.  
  890.  
  891. function onButton1Down(mouse)
  892.  
  893. print("Trying to cast page: "..Page)--IT WORKED :D
  894. if Casting == false then
  895.  
  896. if Page == 1 then
  897.  
  898. CastHeal()
  899.  
  900. end
  901.  
  902. if Casting == false then
  903.  
  904. if Page == 3 then
  905. print("Casting:"..Page)
  906. CastAttack()
  907.  
  908. end
  909.  
  910. end
  911.  
  912. end
  913.  
  914. end
  915.  
  916.  
  917.  
  918.  
  919. function onKeyDown(key, mouse)
  920.  
  921. if key ~= nil then
  922.  
  923. key:lower()
  924.  
  925. if Casting == false and Animating == false then
  926.  
  927. if key == "e" then
  928.  
  929. if Page ~= numofpages-1 then
  930.  
  931. Page = Page + 1
  932.  
  933. end
  934.  
  935. TurnToPage(Page)
  936.  
  937. elseif key == "q" then
  938.  
  939. if Page ~= 0 then
  940.  
  941. Page = Page - 1
  942.  
  943. end
  944.  
  945. TurnToPage(Page)
  946.  
  947. end
  948.  
  949. end --- animating = false end
  950.  
  951. end
  952.  
  953. end
  954.  
  955.  
  956.  
  957.  
  958. function Equip(anim)
  959.  
  960. if anim == true then
  961.  
  962. Animating = true
  963.  
  964. local joint = Instance.new("Motor", Torsoz)
  965.  
  966. joint.Part0 = Torsoz
  967.  
  968. joint.Part1 = RA
  969.  
  970. joint.C0 = CFrame.new(1.5,0.5,0) * CFrame.Angles(0,math.pi/2,0)
  971.  
  972. joint.C1 = CFrame.new(0,0.5,0) * CFrame.Angles(0,math.pi/2,-1)
  973.  
  974. joint.MaxVelocity = 0.06
  975.  
  976. joint.DesiredAngle = math.pi/3
  977.  
  978. Joint = joint
  979.  
  980. Main.Part0 = RA
  981.  
  982. Main.C0 = CFrame.new(0,-1.5*s,0) * CFrame.Angles(0,math.pi/2,-math.pi/2)
  983.  
  984. for i = 1, 16 do
  985.  
  986. Main.C0 = CFrame.new((-1*s/16)*i,(-1.5*s)+((0.25*s/16)*i),(-0.65*s/16)*i) * CFrame.Angles((math.pi/16)*i,(math.pi/2)-((math.pi/16)*i),-math.pi/2)
  987.  
  988. wait(0.02)
  989.  
  990. end
  991.  
  992. Animating = false
  993.  
  994. else
  995.  
  996. Main.Part0 = RA
  997.  
  998. Main.C0 = CFrame.new(0,-1.5*s,0) * CFrame.Angles(0,math.pi/2,-math.pi/2)
  999.  
  1000. end
  1001.  
  1002. end
  1003.  
  1004.  
  1005.  
  1006.  
  1007. function Unequip(anim)
  1008.  
  1009. if anim == true then
  1010.  
  1011. Animating = true
  1012.  
  1013. local joint = Joint
  1014.  
  1015. joint.MaxVelocity = 0.06
  1016.  
  1017. joint.DesiredAngle = 0
  1018.  
  1019. for i = 1, 16 do
  1020.  
  1021. Main.C0 = CFrame.new((-1*s)+((1*s/16)*i),(-1.25*s)-((0.25*s/16)*i),(-0.65*s)+((0.65*s/16)*i)) * CFrame.Angles(math.pi-((math.pi/16)*i),(-math.pi/2)+((math.pi/16)*i),-math.pi/2)
  1022.  
  1023. wait(0.02)
  1024.  
  1025. end
  1026.  
  1027. Animating = false
  1028.  
  1029. end
  1030.  
  1031. for i, v in pairs(Torsoz:children()) do
  1032.  
  1033. if v.className == "Motor" then
  1034.  
  1035. v:remove()
  1036.  
  1037. end
  1038.  
  1039. end
  1040.  
  1041. RS.Parent = Torsoz
  1042.  
  1043. RS.Part0 = Torsoz
  1044.  
  1045. RS.Part1 = RA
  1046.  
  1047. end
  1048.  
  1049.  
  1050.  
  1051.  
  1052. bin.Selected:connect(function(mouse)
  1053.  
  1054. mouse.Icon = "rbxasset://textures\\GunCursor.png"
  1055.  
  1056. mouse.Button1Down:connect(function() onButton1Down(mouse) end)
  1057.  
  1058. mouse.KeyDown:connect(function(key) onKeyDown(key, mouse) end)
  1059.  
  1060. Page = 0
  1061.  
  1062. prevpage = 0
  1063.  
  1064. Equip(false)
  1065.  
  1066. end)
  1067.  
  1068.  
  1069.  
  1070.  
  1071. bin.Deselected:connect(function()
  1072.  
  1073. Unequip(false)
  1074.  
  1075. Build()
  1076.  
  1077. end)
  1078.  
  1079.  
  1080.  
  1081.  
  1082. local num = 0
  1083.  
  1084. local plus = true
  1085.  
  1086. local trans = 0
  1087.  
  1088. while bin.Parent == player.Backpack do
  1089.  
  1090. num = num + 1
  1091.  
  1092.  
  1093.  
  1094.  
  1095. if #Glows == 0 then
  1096.  
  1097. trans = 0
  1098.  
  1099. else
  1100.  
  1101. for i, v in pairs(Glows) do
  1102.  
  1103. v.Transparency = trans
  1104.  
  1105. end
  1106.  
  1107. if plus == true then
  1108.  
  1109. trans = trans + 0.032
  1110.  
  1111. elseif plus == false then
  1112.  
  1113. trans = trans - 0.032
  1114.  
  1115. end
  1116.  
  1117. if trans > 0.65 then
  1118.  
  1119. plus = false
  1120.  
  1121. elseif trans < 0.06 then
  1122.  
  1123. plus = true
  1124.  
  1125. end
  1126.  
  1127. end
  1128.  
  1129.  
  1130.  
  1131.  
  1132. for i, v in pairs(GroundSymbols) do
  1133.  
  1134. if v.Parent == nil then
  1135.  
  1136. table.remove(GroundSymbols, i)
  1137.  
  1138. break
  1139.  
  1140. else
  1141.  
  1142. v.CFrame = v.CFrame * CFrame.Angles(0,0.02,0)
  1143.  
  1144. v.CFrame = v.CFrame - v.Position + (Torsoz.Position-Vector3.new(0,3,0))
  1145.  
  1146. if plus == true then
  1147.  
  1148. v.Mesh.Scale = v.Mesh.Scale + Vector3.new(0.2,0,0.2)
  1149.  
  1150. else
  1151.  
  1152. v.Mesh.Scale = v.Mesh.Scale - Vector3.new(0.2,0,0.2)
  1153.  
  1154. end
  1155.  
  1156. if v.Symbol.Transparency > 0.1 then
  1157.  
  1158. v.Symbol.Transparency = v.Symbol.Transparency - 0.008
  1159.  
  1160. end
  1161.  
  1162. end
  1163.  
  1164. end
  1165.  
  1166.  
  1167.  
  1168.  
  1169. wait(0.03)
  1170.  
  1171. end
  1172.  
  1173.  
  1174.  
  1175.  
  1176. --mediafire gtfo password[
Add Comment
Please, Sign In to add comment