Advertisement
astronaut32

bewk

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