Advertisement
Roblox_Xploits

Mage Book

Aug 25th, 2016
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.35 KB | None | 0 0
  1. local plr = game.Players.LocalPlayer
  2. local name = "Book"
  3. if plr.Backpack:FindFirstChild(name) then plr.Backpack[Ancor]:Destroy() end
  4. local t = Instance.new("HopperBin",plr.Backpack)
  5. t.Name = name
  6. script.Parent = nil
  7. local char = plr.Character
  8. local anims = char:FindFirstChild("Animate")
  9. anims:Destroy()
  10. local mouse = nil
  11. local RA,LA = char["Right Arm"],char["Left Arm"]
  12. local rs,ls = char.Torso["Right Shoulder"],char.Torso["Left Shoulder"]
  13. local RS,LS = rs:Clone(),ls:Clone()
  14. RS.Part0 = nil
  15. RS.Part1 = nil
  16. LS.Part0 = nil
  17. LS.Part1 = nil
  18. RS.Parent = char.Torso
  19. LS.Parent = char.Torso
  20. RS.DesiredAngle = 0
  21. LS.DesiredAngle = 0
  22. local eDb = false
  23. local sDb = false
  24. local cS = 1
  25. function Weld2(p1,p2)
  26. local w = Instance.new("Weld")
  27. w.Part0 = p1
  28. w.Part1 = p2
  29. w.C0 = p1.CFrame:toObjectSpace(p2.CFrame)
  30. w.Parent = p1
  31. return w
  32. end
  33. function Weld(p1,p2)
  34. local w = Instance.new("Weld")
  35. w.Part0 = p1
  36. w.Part1 = p2
  37. w.Parent = p1
  38. return w
  39. end
  40. function createBook()
  41. if char:FindFirstChild("Book") then char.Book:Destroy() end
  42. if LA:FindFirstChild("grip") then La.grip:Destroy() end
  43. local width = .3 -- .3
  44. local height = 1.5 -- 1.5
  45. local length = 1 -- 1
  46. book = Instance.new("Model",char)
  47. book.Name = "Book"
  48. local base = Instance.new("Part",book)
  49. base.Material = "SmoothPlastic"
  50. Instance.new("BlockMesh",base)
  51. base.FormFactor = "Custom"
  52. base.BrickColor = BrickColor.new("Dark orange")
  53. base.Material = "SmoothPlastic"
  54. base.Size = Vector3.new(width,.2,height)
  55. base.Mesh.Scale = Vector3.new(1,.5,1)
  56. base:BreakJoints()
  57. base.TopSurface = "SmoothNoOutlines"
  58. base.BottomSurface = "SmoothNoOutlines"
  59. base.RightSurface = "SmoothNoOutlines"
  60. base.LeftSurface = "SmoothNoOutlines"
  61. local grip = Weld(LA,base)
  62. grip.Name = "grip"
  63. grip.C0 = CFrame.new(.3,-.9,0)
  64. local sid1 = base:Clone()
  65. sid1.Mesh.Scale = Vector3.new(.2,1,1)
  66. sid1.Parent = book
  67. sid1.Size = Vector3.new(.2,length,height)
  68. local sid2 = sid1:Clone()
  69. sid2.Parent = book
  70. local m = Instance.new("Motor6D")
  71. m.Parent = book
  72. m.Name = "open1"
  73. m.C0 = CFrame.new(-(width/2)+.02,0,0) * CFrame.Angles(0,0,0)
  74. m.C1 = CFrame.new(0,length/2,0)
  75. m.MaxVelocity = .2
  76. m.Part0 = base
  77. m.Part1 = sid1
  78. m.DesiredAngle = 0
  79. local m2 = m:Clone()
  80. m2.Name = "open2"
  81. m2.C0 = CFrame.new((width/2)-.02,0,0) * CFrame.Angles(0,math.pi,0)
  82. m2.C1 = CFrame.new(0,length/2,0)
  83. m2.Part0 = base
  84. m2.Part1 = sid2
  85. m2.Parent = book
  86. local p1 = sid1:Clone()
  87. p1.Parent = book
  88. p1.BrickColor = BrickColor.new("White")
  89. p1.Size = Vector3.new(width/2,length-.1,height-.4)
  90. p1.Mesh.Scale = Vector3.new(1,1,1)
  91. local p2 = p1:Clone()
  92. p2.Parent = book
  93. local w1 = Weld(sid1,p1)
  94. w1.C0 = CFrame.new(width/4+0.01,.05,0)
  95. local w2 = Weld(sid2,p2)
  96. w2.C0 = CFrame.new(width/4+0.01,.05,0)
  97. local p3 = p2:Clone()
  98. p3.Parent = book
  99. p3.Size = Vector3.new(width-.05,width/2,height-.4)
  100. local w3 = Weld(base,p3)
  101. w3.C0 = CFrame.new(0,-width/4,0)
  102. local cp1 = p1:Clone()
  103. cp1.Parent = book
  104. cp1.Mesh.Scale = Vector3.new(.25,1,1)
  105. cp1.Transparency = 1
  106. cp1.Name = "page"
  107. local cpmot1 = m:Clone()
  108. cpmot1.Part0 = base
  109. cpmot1.Part1 = cp1
  110. cpmot1.Name = "pageflip"
  111. cpmot1.C0 = CFrame.new(0,0,0)
  112. cpmot1.Parent = book
  113. base.Name = "base"
  114. end
  115. function getAniFrame(w1,w2,am,cur)
  116. local c0 = {w1.X,w1.Y,w1.Z,w1:toEulerAnglesXYZ()}
  117. local c1 = {w2.X,w2.Y,w2.Z,w2:toEulerAnglesXYZ()}
  118. local cf = {}
  119. for i,v in pairs(c0) do
  120. cf[i] = c1[i]-v
  121. end
  122. return CFrame.new(c0[1]+(cur/am)*cf[1], c0[2]+(cur/am)*cf[2], c0[3]+(cur/am)*cf[3])*CFrame.Angles(c0[4]+(cur/am)*cf[4],c0[5]+(cur/am)*cf[5],c0[6]+(cur/am)*cf[6])
  123. end
  124. function Init()
  125. createBook()
  126. end
  127. function dealDamage(hum,dmg)
  128. print("Damaged "..hum.Parent.Name.." for "..dmg)
  129. local hp = hum.Health
  130. if hp == 0 then return end
  131. hum:TakeDamage(dmg)
  132. if dmg > 0 and (hum.Health >= hp or hum.MaxHealth == 0 or hum.MaxHealth == math.huge) then dmg = "Resisted! ("..dmg..")" end
  133. if game.Players:GetPlayerFromCharacter(hum.Parent) == nil then return end
  134. local m = Instance.new("Model",workspace)
  135. m.Name = dmg < 0 and "+"..math.abs(dmg) or dmg
  136. local h = Instance.new("Humanoid",m)
  137. h.Name = "SHOWDATCOOKIE!"
  138. h.MaxHealth = 0
  139. local p = Instance.new("Part",m)
  140. p.Material = "SmoothPlastic"
  141. p.Name = "Head"
  142. p.FormFactor = "Custom"
  143. p.Size = Vector3.new(.2,.2,.2)
  144. p.Transparency = 0.97
  145. p.CanCollide = false
  146. p.Anchored = true
  147. p:BreakJoints()
  148. game.Debris:AddItem(p,5)
  149. pcall(function() p.CFrame = CFrame.new(hum.Parent.Torso.Position) * CFrame.new(math.random(-2,2),math.random(-1,1),math.random(-2,2)) end)
  150. local rAm = math.random(3,6)/100
  151. coroutine.resume(coroutine.create(function()
  152. for i=1,300 do
  153. p.CFrame = p.CFrame * CFrame.new(0,rAm,0)
  154. wait(1/60)
  155. end
  156. p:Destroy()
  157. end))
  158. end
  159. function changeSpell(spell)
  160. if cS == spell or sDb or eDb or spell == 0 then return end
  161. local nextPage = true
  162. if cS > spell then nextPage = false end
  163. cS = spell
  164. sDb = true
  165. eDb = true
  166. rs.Part0 = nil
  167. rs.Part1 = nil
  168. RS.CurrentAngle = rs.CurrentAngle
  169. RS.Part0 = char.Torso
  170. RS.Part1 = RA
  171. if nextPage then
  172. RS.DesiredAngle = math.rad(90)
  173. for i=1,15 do
  174. RS.C1 = RS.C1 * CFrame.Angles(math.rad(-2),0,0)
  175. LS.C1 = LS.C1 * CFrame.Angles(math.rad(-0.5),0,0)
  176. wait(1/60)
  177. end
  178. repeat wait() until math.abs(RS.DesiredAngle-RS.CurrentAngle) < .01
  179. for i=1,3 do
  180. RS.C1 = RS.C1 * CFrame.new(0,0.1,0)
  181. LS.C1 = LS.C1 * CFrame.Angles(math.rad(-2.5),0,0)
  182. wait(1/60)
  183. end
  184. book.pageflip.MaxVelocity = .3
  185. book.pageflip.CurrentAngle = -1.3
  186. book.pageflip.DesiredAngle = 1.3
  187. book.page.Transparency = 0
  188. for i=1,3 do
  189. RS.C1 = RS.C1 * CFrame.new(0,-0.1,0) * CFrame.Angles(math.rad(-3),0,0)
  190. wait(1/60)
  191. end
  192. for i=1,3 do
  193. LS.C1 = LS.C1 * CFrame.Angles(math.rad(5),0,0)
  194. RS.C1 = RS.C1 * CFrame.Angles(math.rad(3),0,0)
  195. wait(1/60)
  196. end
  197. RS.DesiredAngle = math.rad(0)
  198. for i=1,10 do
  199. RS.C1 = RS.C1 * CFrame.Angles(math.rad(3),0,0)
  200. wait(1/60)
  201. end
  202. repeat wait() until math.abs(RS.DesiredAngle-RS.CurrentAngle) < .01
  203. else -------------------------------------RAAAAAAAAAAAAAAAAAAaaa
  204. for i=1,3 do
  205. LS.C1 = LS.C1 * CFrame.Angles(math.rad(2),0,0)
  206. wait(1/60)
  207. end
  208. book.pageflip.MaxVelocity = .25
  209. book.pageflip.CurrentAngle = 1.3
  210. book.pageflip.DesiredAngle = -1.3
  211. book.page.Transparency = 0
  212. for i=1,3 do
  213. LS.C1 = LS.C1 * CFrame.Angles(math.rad(-2),0,0)
  214. wait(1/60)
  215. end
  216. repeat wait() until math.abs(book.pageflip.DesiredAngle-book.pageflip.CurrentAngle) < .01
  217. end
  218. book.page.Transparency = 1
  219. book.pageflip.MaxVelocity = .2
  220. RS.Part0 = nil
  221. RS.Part1 = nil
  222. rs.CurrentAngle = 0
  223. rs.Part0 = char.Torso
  224. rs.Part1 = RA
  225. RS.C0 = rs.C0
  226. RS.C1 = rs.C1
  227. RS.MaxVelocity = rs.MaxVelocity
  228. RS.DesiredAngle = 0
  229. RS.CurrentAngle = 0
  230. sDb = false
  231. eDb = false
  232. end
  233. function makeRPlate(color)
  234. local p = Instance.new("Part",book)
  235. p.Material = "SmoothPlastic"
  236. p.TopSurface = "SmoothNoOutlines"
  237. p.BottomSurface = "SmoothNoOutlines"
  238. p.RightSurface = "SmoothNoOutlines"
  239. p.LeftSurface = "SmoothNoOutlines"
  240. Instance.new("BlockMesh",p)
  241. p.FormFactor = "Custom"
  242. p.Size = Vector3.new(1,.2,1)
  243. p.Transparency = 0.4
  244. p.CanCollide = false
  245. p.BrickColor = BrickColor.new(color)
  246. p:BreakJoints()
  247. p.CFrame = RA.CFrame * CFrame.new(0,-1,0)
  248. Weld2(char.Torso,p).Parent = p
  249. return p
  250. end
  251. function M1Down()
  252. if eDb or sDb then return end
  253. sDb = true
  254. local spot = mouse.Hit.p
  255. rs.Part0 = nil
  256. rs.Part1 = nil
  257. RS.CurrentAngle = rs.CurrentAngle
  258. RS.Part0 = char.Torso
  259. RS.Part1 = RA
  260. if cS == 1 then
  261. char.Torso.Neck.DesiredAngle = .3
  262. wait(.3)
  263. RS.DesiredAngle = math.rad(90)
  264. repeat wait() until math.abs(RS.DesiredAngle-RS.CurrentAngle) < .01
  265. wait(.05)
  266. RS.C1 = RS.C1 * CFrame.new(0,.1,0)
  267. local p1 = makeRPlate("White")
  268. char.Torso.Neck.DesiredAngle = 0
  269. wait(.05)
  270. RS.C1 = RS.C1 * CFrame.new(0,-.1,0)
  271. char.Torso.Neck.DesiredAngle = 0.3
  272. RS.DesiredAngle = math.rad(140)
  273. repeat wait() until math.abs(RS.DesiredAngle-RS.CurrentAngle) < .01
  274. RS.C1 = RS.C1 * CFrame.new(0,.1,0)
  275. local p2 = makeRPlate("White")
  276. char.Torso.Neck.DesiredAngle = 0
  277. wait(.05)
  278. RS.C1 = RS.C1 * CFrame.new(0,-.1,0)
  279. RS.DesiredAngle = math.rad(90)
  280. repeat wait() until math.abs(RS.DesiredAngle-RS.CurrentAngle) < .01
  281. for i=1,10 do
  282. RS.C1 = RS.C1 * CFrame.Angles(math.rad(5),0,0)
  283. wait(1/60)
  284. end
  285. RS.C1 = RS.C1 * CFrame.new(0,.1,0)
  286. local p3 = makeRPlate("White")
  287. wait(.05)
  288. RS.C1 = RS.C1 * CFrame.new(0,-.1,0)
  289. for i=1,10 do
  290. RS.C1 = RS.C1 * CFrame.Angles(math.rad(-10),0,0)
  291. wait(1/60)
  292. end
  293. RS.C1 = RS.C1 * CFrame.new(0,.1,0)
  294. local p4 = makeRPlate("White")
  295. wait(.05)
  296. RS.C1 = RS.C1 * CFrame.new(0,-.1,0)
  297. for i=1,10 do
  298. RS.C1 = RS.C1 * CFrame.Angles(math.rad(5),0,0)
  299. wait(1/60)
  300. end
  301. RS.DesiredAngle = math.rad(40)
  302. repeat wait() until math.abs(RS.DesiredAngle-RS.CurrentAngle) < .01
  303. RS.C1 = RS.C1 * CFrame.new(0,.1,0)
  304. local p5 = makeRPlate("White")
  305. wait(.05)
  306. RS.C1 = RS.C1 * CFrame.new(0,-.1,0)
  307. char.Torso.Neck.DesiredAngle = 0
  308. RS.DesiredAngle = math.rad(90)
  309. repeat wait() until math.abs(RS.DesiredAngle-RS.CurrentAngle) < .01
  310. for i=1,30 do
  311. RS.C1 = RS.C1 * CFrame.new(0,-.02,0)
  312. p2.Weld.C0 = getAniFrame(p2.Weld.C0,p1.Weld.C0,55,i)
  313. p3.Weld.C0 = getAniFrame(p3.Weld.C0,p1.Weld.C0,55,i)
  314. p4.Weld.C0 = getAniFrame(p4.Weld.C0,p1.Weld.C0,55,i)
  315. p5.Weld.C0 = getAniFrame(p5.Weld.C0,p1.Weld.C0,55,i)
  316. wait(1/60)
  317. end
  318. wait(.05)
  319. for i=1,3 do
  320. RS.C1 = RS.C1 * CFrame.new(0,.2,0)
  321. wait(1/60)
  322. end
  323. p2:Destroy()
  324. p3:Destroy()
  325. p4:Destroy()
  326. p5:Destroy()
  327. p1.Transparency = 1
  328. local s = Instance.new("Sound",p1)
  329. s.Pitch = 2
  330. s.SoundId = "http://www.roblox.com/asset/?id=12222005"
  331. s:Play()
  332. game.Debris:AddItem(p1,1)
  333. local Hammer = Instance.new("Part")
  334. Hammer.Material = "SmoothPlastic"
  335. Hammer.TopSurface = "SmoothNoOutlines"
  336. Hammer.BottomSurface = "SmoothNoOutlines"
  337. Hammer.RightSurface = "SmoothNoOutlines"
  338. Hammer.LeftSurface = "SmoothNoOutlines"
  339. Hammer.CanCollide = false
  340. Hammer.Parent = workspace
  341. Hammer.FormFactor = "Symmetric"
  342. Hammer.Size = Vector3.new(1,4,2)
  343. Hammer.BrickColor = BrickColor.new("Light blue")
  344. Hammer.Reflectance = 0.4
  345. Hammer.Transparency = 0.5
  346. local FM = Instance.new("SpecialMesh",Hammer)
  347. FM.MeshType = "FileMesh"
  348. FM.MeshId = "http://www.roblox.com/asset/?id=1279013"
  349. FM.Scale = FM.Scale * 1.05
  350. local lh = 0
  351. Hammer.Touched:connect(function(hit) if tick()-lh < 0.05 then return end lh = tick() local hum = hit.Parent:FindFirstChild("Humanoid") if not hum then hum = hit.Parent.Parent:FindFirstChild("Humanoid") end if not hum then return end dealDamage(hum,math.random(35,40)) end)
  352. Hammer.CFrame = CFrame.new((p1.CFrame * CFrame.new(0,-4,0)).p,spot)
  353. Instance.new("BodyForce",Hammer).force = Vector3.new(0,Hammer:GetMass()*180,0)
  354. Hammer:BreakJoints()
  355. --Hammer.Velocity = (spot-Hammer.Position).unit*300
  356. Hammer.Velocity = char.Torso.CFrame.lookVector*300
  357. Hammer.RotVelocity = Vector3.new(900,0,0)
  358. game.Debris:AddItem(Hammer,5)
  359. RS.MaxVelocity = 0.15
  360. RS.DesiredAngle = 0
  361. repeat wait() until math.abs(RS.DesiredAngle-RS.CurrentAngle) < .01
  362. end
  363. if cS == 2 then
  364. local Plates = {}
  365. char.Torso.Neck.DesiredAngle = 0.3
  366. wait(.2)
  367. for i=1,30 do
  368. RS.C1 = RS.C1 * CFrame.Angles(0,0,math.rad(-140/30))
  369. wait(1/60)
  370. end
  371. RS.C1 = RS.C1 * CFrame.new(-.1,0,0)
  372. table.insert(Plates,makeRPlate("Bright green"))
  373. wait(.05)
  374. RS.C1 = RS.C1 * CFrame.new(.1,0,0)
  375. char.Torso.Neck.DesiredAngle = 0
  376. wait(.3)
  377. char.Torso.Neck.DesiredAngle = 0.3
  378. wait(.3)
  379. char.Torso.Neck.DesiredAngle = 0
  380. wait(.5)
  381. for i=1,5 do
  382. RS.C1 = RS.C1 * CFrame.Angles(0,0,math.rad(50/5))
  383. wait(1/60)
  384. end
  385. RS.C1 = RS.C1 * CFrame.new(-.1,0,0)
  386. local p = makeRPlate("Bright green")
  387. wait(.05)
  388. RS.C1 = RS.C1 * CFrame.new(.1,0,0)
  389. for i=1,5 do
  390. RS.C1 = RS.C1 * CFrame.Angles(0,0,math.rad(50/5))
  391. wait(1/60)
  392. end
  393. RS.C1 = RS.C1 * CFrame.new(-.1,0,0)
  394. table.insert(Plates,makeRPlate("Bright green"))
  395. wait(.05)
  396. RS.C1 = RS.C1 * CFrame.new(.1,0,0)
  397. for i=1,10 do
  398. RS.C1 = RS.C1 * CFrame.Angles(math.rad(6),0,0)
  399. wait(1/60)
  400. end
  401. RS.C1 = RS.C1 * CFrame.new(-.1,0,0)
  402. table.insert(Plates,makeRPlate("Bright green"))
  403. wait(.05)
  404. RS.C1 = RS.C1 * CFrame.new(.1,0,0)
  405. for i=1,10 do
  406. RS.C1 = RS.C1 * CFrame.Angles(math.rad(-6),0,0)
  407. wait(1/60)
  408. end
  409. for i=1,10 do
  410. RS.C1 = RS.C1 * CFrame.Angles(0,0,math.rad(-40/10))
  411. wait(1/60)
  412. end
  413. wait(.5)
  414. for i=1,30 do
  415. RS.C1 = RS.C1 * CFrame.new(.02,0,0)
  416. for i,v in pairs(Plates) do
  417. v.Weld.C0 = getAniFrame(v.Weld.C0,p.Weld.C0,40,i)
  418. end
  419. wait(1/60)
  420. end
  421. wait(.05)
  422. for i=1,3 do
  423. RS.C1 = RS.C1 * CFrame.new(-.2,0,0)
  424. wait(1/60)
  425. end
  426. for i,v in pairs(Plates) do
  427. v:Destroy()
  428. end
  429. p.Transparency = 1
  430. local s = Instance.new("Sound",p)
  431. s.Pitch = 2
  432. s.SoundId = "http://www.roblox.com/asset/?id=12222005"
  433. s:Play()
  434. for i,v in pairs(game.Players:GetPlayers()) do
  435. if v:DistanceFromCharacter(p.Position) < 15 then
  436. pcall(function()
  437. dealDamage(v.Character.Humanoid,-80)
  438. end)
  439. coroutine.resume(coroutine.create(function()
  440. local tar = v.Character.Torso
  441. local p1 = Instance.new("Part",workspace)
  442. p1.Material = "SmoothPlastic"
  443. p1.BrickColor = BrickColor.new("White")
  444. p1.FormFactor = "Custom"
  445. p1.Reflectance = .1
  446. p1.CanCollide = false
  447. Instance.new("BlockMesh",p1)
  448. p1.Size = Vector3.new(1,1,1)
  449. p1:BreakJoints()
  450. p1.Transparency = .5
  451. local p2 = p1:Clone()
  452. p2.Parent = workspace
  453. p2:BreakJoints()
  454. p2.BrickColor = BrickColor.new("Dark green")
  455. p2.Transparency = .6
  456. local w1 = Weld(tar,p1)
  457. local w2 = Weld(tar,p2)
  458. for i=1,45 do
  459. w1.C1 = w1.C1 * CFrame.Angles(math.random()-.5,math.random()-.5,math.random()-.5)
  460. w2.C1 = w2.C1 * CFrame.Angles(math.random()-.5,math.random()-.5,math.random()-.5)
  461. p1.Mesh.Scale = p1.Mesh.Scale * 1.02
  462. p2.Mesh.Scale = p2.Mesh.Scale * 1.02
  463. wait()
  464. end
  465. for i=1,30 do
  466. w1.C1 = w1.C1 * CFrame.Angles(math.random()-.5,math.random()-.5,math.random()-.5)
  467. w2.C1 = w2.C1 * CFrame.Angles(math.random()-.5,math.random()-.5,math.random()-.5)
  468. p1.Transparency = .5+.5/30*i
  469. p2.Transparency = .6+.4/30*i
  470. wait()
  471. end
  472. p1:Destroy()
  473. p2:Destroy()
  474. end))
  475. end end
  476. wait(1)
  477. end
  478. if cS == 3 then
  479. local Plates = {}
  480. char.Torso.Neck.DesiredAngle = 0.3
  481. wait(1)
  482. char.Torso.Neck.DesiredAngle = 0
  483. wait(.2)
  484. local temp = RS.C1
  485. for i=1,15 do
  486. RS.C1 = getAniFrame(temp,temp*CFrame.Angles(0,0,math.rad(-90)),15,i)
  487. wait(1/60)
  488. end
  489. RS.C1 = RS.C1 * CFrame.new(-.1,0,0)
  490. local p = makeRPlate("Reddish brown")
  491. wait(.05)
  492. RS.C1 = RS.C1 * CFrame.new(.1,0,0)
  493. local temp2 = RS.C1
  494. for i=1,10 do
  495. RS.C1 = getAniFrame(temp2,temp*CFrame.Angles(math.rad(50),0,math.rad(-40)),10,i)
  496. wait(1/60)
  497. end
  498. RS.C1 = RS.C1 * CFrame.new(-.1,0,0)
  499. table.insert(Plates,makeRPlate("Reddish brown"))
  500. wait(.05)
  501. RS.C1 = RS.C1 * CFrame.new(.1,0,0)
  502. temp2 = RS.C1
  503. local temp2 = RS.C1
  504. for i=1,10 do
  505. RS.C1 = getAniFrame(temp2,temp*CFrame.Angles(math.rad(-50),0,math.rad(-40)),10,i)
  506. wait(1/60)
  507. end
  508. RS.C1 = RS.C1 * CFrame.new(-.1,0,0)
  509. table.insert(Plates,makeRPlate("Reddish brown"))
  510. wait(.05)
  511. RS.C1 = RS.C1 * CFrame.new(.1,0,0)
  512. local temp2 = RS.C1
  513. for i=1,10 do
  514. RS.C1 = getAniFrame(temp2,temp*CFrame.Angles(math.rad(0),0,math.rad(-140)),10,i)
  515. wait(1/60)
  516. end
  517. RS.C1 = RS.C1 * CFrame.new(-.1,0,0)
  518. table.insert(Plates,makeRPlate("Reddish brown"))
  519. wait(.05)
  520. RS.C1 = RS.C1 * CFrame.new(.1,0,0)
  521. local temp2 = RS.C1
  522. for i=1,10 do
  523. RS.C1 = getAniFrame(temp2,temp*CFrame.Angles(math.rad(0),0,math.rad(-90)),10,i)
  524. wait(1/60)
  525. end
  526. wait(.05)
  527. for i=1,30 do
  528. RS.C1 = RS.C1 * CFrame.new(.02,0,0)
  529. for i,v in pairs(Plates) do
  530. v.Weld.C0 = getAniFrame(v.Weld.C0,p.Weld.C0,31,i)
  531. end
  532. wait(1/60)
  533. end
  534. wait(.05)
  535. for i=1,3 do
  536. RS.C1 = RS.C1 * CFrame.new(-.2,0,0)
  537. wait(1/60)
  538. end
  539. for i,v in pairs(Plates) do
  540. v:Destroy()
  541. end
  542. p.Transparency = 1
  543. local s = Instance.new("Sound",p)
  544. s.Pitch = 2
  545. s.SoundId = "http://www.roblox.com/asset/?id=12222005"
  546. s:Play()
  547. local nlist = ""
  548. for i=1,10 do
  549. local pa = Instance.new("Part",workspace)
  550. pa.Material = "SmoothPlastic"
  551. pa.Anchored = true
  552. Instance.new("BlockMesh",pa)
  553. pa.BrickColor = BrickColor.new("Reddish brown")
  554. pa.Size = Vector3.new(5,8,5)
  555. pa:BreakJoints()
  556. pa.CFrame = CFrame.new(char.Torso.Position) * CFrame.Angles(math.random()-.5,math.random()-.5,math.random()-.5) + Vector3.new(0,-8,0) + char.Torso.CFrame.lookVector*(i+1)*3.5
  557. local on = true
  558. local con = pa.Touched:connect(function(hit)
  559. pcall(function()
  560. local hum = hit.Parent:FindFirstChild("Humanoid")
  561. if not hum then hum = hit.Parent.Parent:FindFirstChild("Humanoid") end
  562. if not hum or game.Players:GetPlayerFromCharacter(hum.Parent) == nil or nlist:lower():find("|"..hum.Parent.Name:lower().."|") or hum.Parent == char then return end
  563. hum.Sit = true
  564. hum.Parent.Torso.Velocity = hum.Parent.Torso.Velocity + Vector3.new(math.random()-.5,8,math.random()-.5)
  565. nlist = nlist.."|"..hum.Parent.Name.."|"
  566. dealDamage(hum,math.random(32,38))
  567. end)
  568. end)
  569. coroutine.resume(coroutine.create(function()
  570. wait(i*0.1)
  571. for i=1,math.random(4,6) do
  572. pa.CFrame = pa.CFrame + Vector3.new(0,1,0)
  573. wait(1/60)
  574. end
  575. wait(.5)
  576. con:disconnect()
  577. for i=0,1,.05 do
  578. pa.Transparency = i
  579. wait(1/60)
  580. end
  581. pa:Destroy()
  582. end))
  583. end
  584. end
  585. RS.Part0 = nil
  586. RS.Part1 = nil
  587. rs.CurrentAngle = 0
  588. rs.Part0 = char.Torso
  589. rs.Part1 = RA
  590. RS.C0 = rs.C0
  591. RS.C1 = rs.C1
  592. RS.MaxVelocity = rs.MaxVelocity
  593. RS.DesiredAngle = 0
  594. RS.CurrentAngle = 0
  595. sDb = false
  596. end
  597. function KDown(key)
  598. if key == "q" then
  599. changeSpell(cS-1)
  600. elseif key == "e" then
  601. changeSpell(cS+1)
  602. end
  603. end
  604. function Select(m)
  605. mouse = m
  606. if eDb == true then repeat wait() until eDb == false if not t.Active then return end end
  607. mouse.Button1Down:connect(M1Down)
  608. mouse.KeyDown:connect(KDown)
  609. eDb = true
  610. ls.Part0 = nil
  611. ls.Part1 = nil
  612. LS.CurrentAngle = ls.CurrentAngle
  613. LS.Part0 = char.Torso
  614. LS.Part1 = LA
  615. LS.MaxVelocity = .2
  616. LS.DesiredAngle = math.rad(-90)
  617. repeat wait() until math.abs(LS.DesiredAngle-LS.CurrentAngle) < .05
  618. for i=1,20 do
  619. LS.C1 = LS.C1 * CFrame.Angles(math.rad(-1),math.rad(-1),0)
  620. wait(1/60)
  621. end
  622. book.open1.DesiredAngle = -1.3
  623. book.open2.DesiredAngle = -1.3
  624. char.Torso.Neck.DesiredAngle = .3
  625. for i=1,10 do
  626. LA.grip.C1 = LA.grip.C1 * CFrame.new(.01,0.02,0) * CFrame.Angles(0,0,math.rad(-10))
  627. wait(1/60)
  628. end
  629. eDb = false
  630. wait(.2)
  631. char.Torso.Neck.DesiredAngle = 0
  632. end
  633. function Deselect()
  634. repeat wait() until not eDb and not sDb
  635. eDb = true
  636. book.open1.DesiredAngle = 0
  637. book.open2.DesiredAngle = 0
  638. for i=1,10 do
  639. LA.grip.C1 = LA.grip.C1 * CFrame.new(-.01,-0.02,0) * CFrame.Angles(0,0,math.rad(10))
  640. wait(1/60)
  641. end
  642. for i=1,20 do
  643. LS.C1 = LS.C1 * CFrame.Angles(math.rad(1),math.rad(1),0)
  644. wait(1/60)
  645. end
  646. LS.DesiredAngle = 0
  647. repeat wait() until math.abs(LS.DesiredAngle-LS.CurrentAngle) < .05
  648. LS.Part0 = nil
  649. LS.Part1 = nil
  650. ls.CurrentAngle = 0
  651. ls.Part0 = char.Torso
  652. ls.Part1 = LA
  653. LS.C0 = ls.C0
  654. LS.C1 = ls.C1
  655. LS.MaxVelocity = ls.MaxVelocity
  656. LS.DesiredAngle = 0
  657. LS.CurrentAngle = 0
  658. createBook()
  659. eDb = false
  660. end
  661. Init()
  662. t.Selected:connect(Select)
  663. t.Deselected:connect(Deselect)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement