vibrantsinger423

wdwdw

Jun 21st, 2019
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 34.21 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. wait(0.5)
  3. if script.Parent.className ~= "HopperBin" then
  4. local h = Instance.new("HopperBin")
  5. local admin = game.Players.LocalPlayer
  6. h.Name = "stick magic"
  7. script.Parent = h
  8. h.Parent = admin.Backpack
  9. end
  10. local bin = script.Parent
  11. player = bin.Parent.Parent.Character
  12. rarm = player["Right Arm"]
  13. larm = player["Left Arm"]
  14. player.Humanoid.MaxHealth = 200
  15. local visible = true
  16. parts = {}
  17.  
  18. function Check(pos)
  19. local hurt = false
  20. local players = game.Players:GetChildren()
  21. for i = 1, #players do
  22. if players[i].Character and hurt == false then
  23. local parts = players[i].Character:GetChildren()
  24. for q = 1, #parts do
  25. if parts[q].className == "Part" and hurt == false then
  26. local range = math.sqrt(math.pow(parts[q].Size.Z, 2) + math.sqrt(math.pow(parts[q].Size.X, 2) + math.pow(parts[q].Size.Y, 2)))
  27. if (found - parts[q].Position).magnitude <= range then
  28. hurt = true
  29. character = parts[q].Parent
  30. humanoid = character.Humanoid
  31. character.Torso.CFrame = character.Torso.CFrame*CFrame.Angles(2,2,2)
  32. humanoid:TakeDamage(50)
  33. humanoid.Sit = true
  34. end
  35. end
  36. end
  37. end
  38. end
  39. end
  40.  
  41. function clean(min,thing2)
  42. while min.Humanoid.Health ~= 0 do
  43. local a = game.Players:GetChildren()
  44. for i = 1, #a do
  45. wait()
  46. if (a[i].Character.Torso.Position - thing2.Position).magnitude < 5 then
  47. a[i].Character.Humanoid:TakeDamage(5)
  48. end
  49. end
  50. wait()
  51. end
  52. min:remove()
  53. end
  54.  
  55. function fire(v)
  56. local spawnPos = (tip2.CFrame * CFrame.new(0, 1, 0)).p
  57. local HitSpot = RayCast(spawnPos, v)
  58. local distance = (HitSpot - spawnPos).magnitude
  59. start = nil
  60. finish = nil
  61. local num = math.random(3, 10)
  62. for i = distance / num, distance, distance / num do
  63. if start == nil then
  64. start = tip2.CFrame.p
  65. elseif start ~= nil then
  66. start = finish
  67. end
  68. finish = CFrame.new(spawnPos, HitSpot)
  69. if i ~= distance then
  70. finish = (finish * CFrame.new(math.random(-5, 5), math.random(-1, 1), -i)).p
  71. else
  72. finish = HitSpot
  73. end
  74. local P = Instance.new("Part")
  75. P.Name = "Magic"
  76. P.formFactor = 0
  77. P.Size = Vector3.new(1, 1, (start - finish).magnitude)
  78. P.Parent = game.workspace
  79. P.BrickColor = BrickColor.new(1006)
  80. P.Anchored = true
  81. P.CanCollide = false
  82. P.TopSurface = "Smooth"
  83. P.BottomSurface = "Smooth"
  84. P.Transparency = 0
  85. m = Instance.new("BlockMesh")
  86. m.Scale = Vector3.new(.25, .25, 1)
  87. m.Offset = Vector3.new(0, -1000, 0)
  88. m.VertexColor = Vector3.new(math.huge, math.huge, math.huge)
  89. m.Parent = P
  90. P.CFrame = CFrame.new(start, finish)
  91. P.CFrame = P.CFrame * CFrame.new(0, 1000, P.Size.Z / -2)
  92. table.insert(parts, P)
  93. game:GetService("Debris"):AddItem(P, 2.5)
  94. end
  95. end
  96.  
  97. function RayCast(start, v)
  98.  
  99. local ray = Instance.new("Part")
  100. ray.Parent = game.workspace
  101. ray.Anchored = true
  102. ray.CFrame = CFrame.new(start)
  103. ray.Size = Vector3.new(1,1,1)
  104. ray.Shape = 0
  105. ray.BottomSurface = 0
  106. ray.TopSurface = 0
  107. ray.Name = "Magic"
  108. ray.Elasticity = 0
  109. ray.Reflectance = 0
  110. ray.Friction = 0
  111. ray.Transparency = 0
  112.  
  113. local finding = true
  114. far = 1000
  115.  
  116. while finding do
  117. far = far - 1
  118. if far > 0 then
  119. local see = ray.Position + v
  120. ray.Position = ray.Position + v
  121. if ray.Position ~= see then
  122. finding = false
  123. found = see
  124. end
  125. else
  126. finding = false
  127. found = ray.Position
  128. end
  129. end
  130.  
  131. ray:remove()
  132. Check(found)
  133. return found
  134. end
  135.  
  136. function kill(tar)
  137. while tar.Parent.Humanoid.Health ~= 0 do
  138. tar.Parent.Humanoid.Health = tar.Parent.Humanoid.Health -1
  139. wait()
  140. end
  141. end
  142.  
  143. bin.Selected:connect(function(mouse)
  144. if player.Torso:findFirstChild("Right Shoulder") ~= nil then
  145. rs = player.Torso["Right Shoulder"]
  146. rs.Part1 = nil
  147. end
  148. if player.Torso:findFirstChild("Left Shoulder") ~= nil then
  149. ls = player.Torso["Left Shoulder"]
  150. ls.Part1 = nil
  151. end
  152. if player:FindFirstChild("check") == nil then
  153. rns = Instance.new("Weld")
  154. rns.Parent = player.Torso
  155. rns.Part0 = rns.Parent
  156. rns.Part1 = player["Right Arm"]
  157. rns.C1 = CFrame.new(-1.51,.1,-.05)*CFrame.Angles((math.pi*-.0),(math.pi*0),(math.pi*-.05))
  158. lns = Instance.new("Weld")
  159. lns.Parent = player.Torso
  160. lns.Part0 = lns.Parent
  161. lns.Part1 = player["Left Arm"]
  162. lns.C1 = CFrame.new(1.51,.1,-.05)*CFrame.Angles((math.pi*-.0),(math.pi*0),(math.pi*.05))
  163. rblade = Instance.new("Part")
  164. rblade.BrickColor = BrickColor.new(1003)
  165. rblade.Name ="check"
  166. rblade.Parent = player
  167. rblade.CanCollide = false
  168. rblade.Size = Vector3.new(1,8,1)
  169. rblade.formFactor = "Symmetric"
  170. rblade.TopSurface = 0
  171. rblade.BottomSurface = 0
  172. rbm = Instance.new("BlockMesh")
  173. rbm.Parent = rblade
  174. rbm.Scale = Vector3.new(.4,1,.4)
  175. rbw = Instance.new("Weld")
  176. rbw.Parent = rblade
  177. rbw.Part0 = rarm
  178. rbw.Part1 = rblade
  179. rbw.C1 = CFrame.new(0,0,1) *CFrame.Angles((math.pi*.5),(math.pi*0),(math.pi*0))
  180. tip = Instance.new("Part")
  181. tip.CanCollide = false
  182. tip.TopSurface = 0
  183. tip.BottomSurface = 0
  184. tip.Parent = rblade
  185. tip.Size = Vector3.new(1,1,1)
  186. tip.formFactor = "Symmetric"
  187. tip.BrickColor = BrickColor.new(1004)
  188. tipm = Instance.new("BlockMesh")
  189. tipm.Scale = Vector3.new(.41,.2,.41)
  190. tipm.Parent = tip
  191. tipw = Instance.new("Weld")
  192. tipw.Parent = rblade
  193. tipw.Part0 = rblade
  194. tipw.Part1 = tip
  195. tipw.C1 = CFrame.new(0,3.5,0)
  196. tip2 = Instance.new("Part")
  197. tip2.CanCollide = false
  198. tip2.TopSurface = 0
  199. tip2.BottomSurface = 0
  200. tip2.Parent = rblade
  201. tip2.Size = Vector3.new(1,1,1)
  202. tip2.formFactor = "Symmetric"
  203. tip2.BrickColor = BrickColor.new(1004)
  204. tip2m = Instance.new("BlockMesh")
  205. tip2m.Scale = Vector3.new(.41,.2,.41)
  206. tip2m.Parent = tip2
  207. tip2w = Instance.new("Weld")
  208. tip2w.Parent = rblade
  209. tip2w.Part0 = rblade
  210. tip2w.Part1 = tip2
  211. tip2w.C1 = CFrame.new(0,-3.5,0)
  212. tip3 = Instance.new("Part")
  213. tip3.CanCollide = false
  214. tip3.TopSurface = 0
  215. tip3.BottomSurface = 0
  216. tip3.Parent = rblade
  217. tip3.Size = Vector3.new(1,1,1)
  218. tip3.formFactor = "Symmetric"
  219. tip3.BrickColor = BrickColor.new(1004)
  220. tip3m = Instance.new("BlockMesh")
  221. tip3m.Scale = Vector3.new(.41,.2,.41)
  222. tip3m.Parent = tip3
  223. tip3w = Instance.new("Weld")
  224. tip3w.Parent = rblade
  225. tip3w.Part0 = rblade
  226. tip3w.Part1 = tip3
  227. tip3w.C1 = CFrame.new(0,-.5,0)
  228. tip4 = Instance.new("Part")
  229. tip4.CanCollide = false
  230. tip4.TopSurface = 0
  231. tip4.BottomSurface = 0
  232. tip4.Parent = rblade
  233. tip4.Size = Vector3.new(1,1,1)
  234. tip4.formFactor = "Symmetric"
  235. tip4.BrickColor = BrickColor.new(1004)
  236. tip4m = Instance.new("BlockMesh")
  237. tip4m.Scale = Vector3.new(.41,.2,.41)
  238. tip4m.Parent = tip4
  239. tip4w = Instance.new("Weld")
  240. tip4w.Parent = rblade
  241. tip4w.Part0 = rblade
  242. tip4w.Part1 = tip4
  243. tip4w.C1 = CFrame.new(0,.5,0)
  244. tip5 = Instance.new("Part")
  245. tip5.CanCollide = false
  246. tip5.TopSurface = 0
  247. tip5.BottomSurface = 0
  248. tip5.Parent = rblade
  249. tip5.Size = Vector3.new(1,1,1)
  250. tip5.formFactor = "Symmetric"
  251. tip5.BrickColor = BrickColor.new(1004)
  252. tip5m = Instance.new("BlockMesh")
  253. tip5m.Scale = Vector3.new(.41,.2,.41)
  254. tip5m.Parent = tip5
  255. tip5w = Instance.new("Weld")
  256. tip5w.Parent = rblade
  257. tip5w.Part0 = rblade
  258. tip5w.Part1 = tip5
  259. tip5w.C1 = CFrame.new(0,0,0)
  260. tip6 = Instance.new("Part")
  261. tip6.CanCollide = false
  262. tip6.TopSurface = 0
  263. tip6.BottomSurface = 0
  264. tip6.Parent = rblade
  265. tip6.Size = Vector3.new(1,1,1)
  266. tip6.formFactor = "Symmetric"
  267. tip6.BrickColor = BrickColor.new(1004)
  268. tip6m = Instance.new("BlockMesh")
  269. tip6m.Scale = Vector3.new(.05,.6,.41)
  270. tip6m.Parent = tip6
  271. tip6w = Instance.new("Weld")
  272. tip6w.Parent = rblade
  273. tip6w.Part0 = rblade
  274. tip6w.Part1 = tip6
  275. tip6w.C1 = CFrame.new(0,-3,0)
  276. tip7 = Instance.new("Part")
  277. tip7.CanCollide = false
  278. tip7.TopSurface = 0
  279. tip7.BottomSurface = 0
  280. tip7.Parent = rblade
  281. tip7.Size = Vector3.new(1,1,1)
  282. tip7.formFactor = "Symmetric"
  283. tip7.BrickColor = BrickColor.new(1004)
  284. tip7m = Instance.new("BlockMesh")
  285. tip7m.Scale = Vector3.new(.41,.6,.05)
  286. tip7m.Parent = tip7
  287. tip7w = Instance.new("Weld")
  288. tip7w.Parent = rblade
  289. tip7w.Part0 = rblade
  290. tip7w.Part1 = tip7
  291. tip7w.C1 = CFrame.new(0,-3,0)
  292. tip6a = Instance.new("Part")
  293. tip6a.CanCollide = false
  294. tip6a.TopSurface = 0
  295. tip6a.BottomSurface = 0
  296. tip6a.Parent = rblade
  297. tip6a.Size = Vector3.new(1,1,1)
  298. tip6a.formFactor = "Symmetric"
  299. tip6a.BrickColor = BrickColor.new(1004)
  300. tip6am = Instance.new("BlockMesh")
  301. tip6am.Scale = Vector3.new(.15,.6,.41)
  302. tip6am.Parent = tip6a
  303. tip6aw = Instance.new("Weld")
  304. tip6aw.Parent = rblade
  305. tip6aw.Part0 = rblade
  306. tip6aw.Part1 = tip6a
  307. tip6aw.C1 = CFrame.new(0,-2.5,0)
  308. tip7a = Instance.new("Part")
  309. tip7a.CanCollide = false
  310. tip7a.TopSurface = 0
  311. tip7a.BottomSurface = 0
  312. tip7a.Parent = rblade
  313. tip7a.Size = Vector3.new(1,1,1)
  314. tip7a.formFactor = "Symmetric"
  315. tip7a.BrickColor = BrickColor.new(1004)
  316. tip7am = Instance.new("BlockMesh")
  317. tip7am.Scale = Vector3.new(.41,.6,.15)
  318. tip7am.Parent = tip7a
  319. tip7aw = Instance.new("Weld")
  320. tip7aw.Parent = rblade
  321. tip7aw.Part0 = rblade
  322. tip7aw.Part1 = tip7a
  323. tip7aw.C1 = CFrame.new(0,-2.5,0)
  324. tip6b = Instance.new("Part")
  325. tip6b.CanCollide = false
  326. tip6b.TopSurface = 0
  327. tip6b.BottomSurface = 0
  328. tip6b.Parent = rblade
  329. tip6b.Size = Vector3.new(1,1,1)
  330. tip6b.formFactor = "Symmetric"
  331. tip6b.BrickColor = BrickColor.new(1004)
  332. tip6bm = Instance.new("BlockMesh")
  333. tip6bm.Scale = Vector3.new(.05,.6,.41)
  334. tip6bm.Parent = tip6b
  335. tip6bw = Instance.new("Weld")
  336. tip6bw.Parent = rblade
  337. tip6bw.Part0 = rblade
  338. tip6bw.Part1 = tip6b
  339. tip6bw.C1 = CFrame.new(0,-2,0)
  340. tip7b = Instance.new("Part")
  341. tip7b.CanCollide = false
  342. tip7b.TopSurface = 0
  343. tip7b.BottomSurface = 0
  344. tip7b.Parent = rblade
  345. tip7b.Size = Vector3.new(1,1,1)
  346. tip7b.formFactor = "Symmetric"
  347. tip7b.BrickColor = BrickColor.new(1004)
  348. tip7bm = Instance.new("BlockMesh")
  349. tip7bm.Scale = Vector3.new(.41,.6,.05)
  350. tip7bm.Parent = tip7b
  351. tip7bw = Instance.new("Weld")
  352. tip7bw.Parent = rblade
  353. tip7bw.Part0 = rblade
  354. tip7bw.Part1 = tip7b
  355. tip7bw.C1 = CFrame.new(0,-2,0)
  356.  
  357. --[[
  358. rblade.Touched:connect(function(hit)
  359. if hit.Parent:findFirstChild("Humanoid") ~= nil then
  360. if hit.Parent.Name ~= player.Name then
  361. if hit.Parent.Humanoid.MaxHealth > 100 then
  362. hit.Parent.Humanoid.MaxHealth = 100
  363. end
  364. hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health - math.random(5,15)
  365. hit.Parent.Humanoid.Sit = true
  366. for i = 1, (math.random(1,3)) do
  367. wait()
  368. local bleed = Instance.new("Part")
  369. bleed.formFactor = "Symmetric"
  370. bleed.Size = Vector3.new(1,1,1)
  371. bleed.BrickColor = BrickColor.new(1004)
  372. bleed.TopSurface = 0
  373. bleed.BottomSurface = 0
  374. bleed.Reflectance = .1
  375. bleed.Transparency = 0
  376. bleed.Parent = workspace
  377. bleed.Position = rblade.Position
  378. local bleedm = Instance.new("SpecialMesh")
  379. bleedm.MeshType = "Sphere"
  380. bleedm.Scale = Vector3.new(.5,.5,.5)
  381. bleedm.Parent = bleed
  382. game:GetService("Debris"):AddItem(bleed, 5)
  383. end
  384. end
  385. end
  386. end)
  387. ]]--
  388. end
  389. -- animations--
  390. right = rns
  391. staff = rblade
  392. left = lns
  393. up = "right.C1 = CFrame.new(-1.51,.1,-.05)*CFrame.Angles((math.pi*-.0),(math.pi*0),(math.pi*-.05))wait()right.C1 = CFrame.new(-1.51,.1,-.05)*CFrame.Angles((math.pi*-.1),(math.pi*0),(math.pi*-.05))wait()right.C1 = CFrame.new(-1.47,.2,-.1)*CFrame.Angles((math.pi*-.2),(math.pi*0),(math.pi*-.1))wait()right.C1 = CFrame.new(-1.43,.3,-.15)*CFrame.Angles((math.pi*-.3),(math.pi*0),(math.pi*-.15))wait()right.C1 = CFrame.new(-1.39,.4,-.2)*CFrame.Angles((math.pi*-.4),(math.pi*0),(math.pi*-.2))wait()right.C1 = CFrame.new(-1.35,.5,-.25)*CFrame.Angles((math.pi*-.5),(math.pi*0),(math.pi*-.25))"
  394. down = "right.C1 = CFrame.new(-1.39,.4,-.2)*CFrame.Angles((math.pi*-.4),(math.pi*0),(math.pi*-.2))wait()right.C1 = CFrame.new(-1.43,.3,-.15)*CFrame.Angles((math.pi*-.3),(math.pi*0),(math.pi*-.15))wait()right.C1 = CFrame.new(-1.47,.2,-.1)*CFrame.Angles((math.pi*-.2),(math.pi*0),(math.pi*-.1))wait()right.C1 = CFrame.new(-1.51,.1,-.05)*CFrame.Angles((math.pi*-.1),(math.pi*0),(math.pi*-.05))wait()right.C1 = CFrame.new(-1.51,.1,-.05)*CFrame.Angles((math.pi*-.0),(math.pi*0),(math.pi*-.05))"
  395. -- end of staff
  396. mouse.KeyDown:connect(function(key)
  397. -- moves
  398. if key == "z" then
  399. if rbw.Part0 == rarm then
  400. rbw.Part0 = larm
  401. end
  402. end
  403. if key == "x" then
  404. if rbw.Part0 == larm then
  405. rbw.Part0 = rarm
  406. end
  407. end
  408. --[[
  409. if key == "e" then
  410. right.C1 = CFrame.new(-1.51,.1,-.05)*CFrame.Angles((math.pi*-.0),(math.pi*0),(math.pi*-.05))
  411. wait()
  412. right.C1 = CFrame.new(-1.51,.1,-.05)*CFrame.Angles((math.pi*-.1),(math.pi*0),(math.pi*-.05))
  413. wait()
  414. right.C1 = CFrame.new(-1.47,.2,-.1)*CFrame.Angles((math.pi*-.2),(math.pi*0),(math.pi*-.1))
  415. wait()
  416. right.C1 = CFrame.new(-1.43,.3,-.15)*CFrame.Angles((math.pi*-.3),(math.pi*0),(math.pi*-.15))
  417. wait()
  418. right.C1 = CFrame.new(-1.39,.4,-.2)*CFrame.Angles((math.pi*-.4),(math.pi*0),(math.pi*-.2))
  419. wait()
  420. right.C1 = CFrame.new(-1.35,.5,-.25)*CFrame.Angles((math.pi*-.5),(math.pi*0),(math.pi*-.25))
  421. wait(.5)
  422. right.C1 = CFrame.new(-1.39,.4,-.2)*CFrame.Angles((math.pi*-.4),(math.pi*0),(math.pi*-.2))
  423. wait()
  424. right.C1 = CFrame.new(-1.43,.3,-.15)*CFrame.Angles((math.pi*-.3),(math.pi*0),(math.pi*-.15))
  425. wait()
  426. right.C1 = CFrame.new(-1.47,.2,-.1)*CFrame.Angles((math.pi*-.2),(math.pi*0),(math.pi*-.1))
  427. wait()
  428. right.C1 = CFrame.new(-1.51,.1,-.05)*CFrame.Angles((math.pi*-.1),(math.pi*0),(math.pi*-.05))
  429. wait()
  430. right.C1 = CFrame.new(-1.51,.1,-.05)*CFrame.Angles((math.pi*-.0),(math.pi*0),(math.pi*-.05))
  431. elseif key == "q" then
  432. left.C1 = CFrame.new(1.51,.1,-.05)*CFrame.Angles((math.pi*-.0),(math.pi*0),(math.pi*.05))
  433. wait()
  434. left.C1 = CFrame.new(1.51,.1,-.05)*CFrame.Angles((math.pi*-.1),(math.pi*0),(math.pi*.05))
  435. wait()
  436. left.C1 = CFrame.new(1.47,.2,-.1)*CFrame.Angles((math.pi*-.2),(math.pi*0),(math.pi*.1))
  437. wait()
  438. left.C1 = CFrame.new(1.43,.3,-.15)*CFrame.Angles((math.pi*-.3),(math.pi*0),(math.pi*.15))
  439. wait()
  440. left.C1 = CFrame.new(1.39,.4,-.2)*CFrame.Angles((math.pi*-.4),(math.pi*0),(math.pi*.2))
  441. wait()
  442. left.C1 = CFrame.new(1.35,.5,-.25)*CFrame.Angles((math.pi*-.5),(math.pi*0),(math.pi*.25))
  443. wait(.5)
  444. left.C1 = CFrame.new(1.39,.4,-.2)*CFrame.Angles((math.pi*-.4),(math.pi*0),(math.pi*.2))
  445. wait()
  446. left.C1 = CFrame.new(1.43,.3,-.15)*CFrame.Angles((math.pi*-.3),(math.pi*0),(math.pi*.15))
  447. wait()
  448. left.C1 = CFrame.new(1.47,.2,-.1)*CFrame.Angles((math.pi*-.2),(math.pi*0),(math.pi*.1))
  449. wait()
  450. left.C1 = CFrame.new(1.51,.1,-.05)*CFrame.Angles((math.pi*-.1),(math.pi*0),(math.pi*.05))
  451. wait()
  452. left.C1 = CFrame.new(1.51,.1,-.05)*CFrame.Angles((math.pi*-.0),(math.pi*0),(math.pi*.05))
  453. elseif key == "r" then
  454. left.C1 = CFrame.new(1.51,.1,-.05)*CFrame.Angles((math.pi*-.0),(math.pi*0),(math.pi*.05))
  455. wait()
  456. left.C1 = CFrame.new(1.42,0.62,0)*CFrame.Angles((math.pi*0),(math.pi*0),(math.pi*.3))
  457. wait()
  458. left.C1 = CFrame.new(1.29,0.84,0)*CFrame.Angles((math.pi*0),(math.pi*0),(math.pi*.35))
  459. wait()
  460. left.C1 = CFrame.new(1.16,1.06,0)*CFrame.Angles((math.pi*0),(math.pi*0),(math.pi*.4))
  461. wait()
  462. left.C1 = CFrame.new(1.03,1.28,0)*CFrame.Angles((math.pi*0),(math.pi*0),(math.pi*.45))
  463. wait()
  464. left.C1 = CFrame.new(0.9,1.5,0)*CFrame.Angles((math.pi*0),(math.pi*0),(math.pi*.5))
  465. wait(.2)
  466. left.C1 = CFrame.new(0.9,1.5,-0.15)*CFrame.Angles((math.pi*-.15),(math.pi*0),(math.pi*.5))
  467. wait()
  468. left.C1 = CFrame.new(0.9,1.5,-0.30)*CFrame.Angles((math.pi*-.30),(math.pi*0),(math.pi*.5))
  469. wait()
  470. left.C1 = CFrame.new(0.9,1.5,-0.45)*CFrame.Angles((math.pi*-.45),(math.pi*0),(math.pi*.5))
  471. wait()
  472. left.C1 = CFrame.new(0.9,1.5,-0.60)*CFrame.Angles((math.pi*-.60),(math.pi*0),(math.pi*.5))
  473. wait()
  474. left.C1 = CFrame.new(0.9,1.5,-0.75)*CFrame.Angles((math.pi*-.75),(math.pi*0),(math.pi*.5))
  475. wait(.1)
  476. left.C1 = CFrame.new(1.03,1.28,0)*CFrame.Angles((math.pi*-.60),(math.pi*0),(math.pi*.45))
  477. wait()
  478. left.C1 = CFrame.new(1.16,1.06,0)*CFrame.Angles((math.pi*-.45),(math.pi*0),(math.pi*.4))
  479. wait()
  480. left.C1 = CFrame.new(1.29,0.84,0)*CFrame.Angles((math.pi*-.30),(math.pi*0),(math.pi*.35))
  481. wait()
  482. left.C1 = CFrame.new(1.42,0.62,0)*CFrame.Angles((math.pi*-.15),(math.pi*0),(math.pi*.3))
  483. wait()
  484. left.C1 = CFrame.new(1.51,.1,-.05)*CFrame.Angles((math.pi*-.0),(math.pi*0),(math.pi*.05))
  485. elseif key == "t" then
  486. right.C1 = CFrame.new(-1.51,.1,-.05)*CFrame.Angles((math.pi*-.0),(math.pi*0),(math.pi*-.05))
  487. wait()
  488. right.C1 = CFrame.new(-1.42,0.62,0)*CFrame.Angles((math.pi*0),(math.pi*0),(math.pi*-.3))
  489. wait()
  490. right.C1 = CFrame.new(-1.29,0.84,0)*CFrame.Angles((math.pi*0),(math.pi*0),(math.pi*-.35))
  491. wait()
  492. right.C1 = CFrame.new(-1.16,1.06,0)*CFrame.Angles((math.pi*0),(math.pi*0),(math.pi*-.4))
  493. wait()
  494. right.C1 = CFrame.new(-1.03,1.28,0)*CFrame.Angles((math.pi*0),(math.pi*0),(math.pi*-.45))
  495. wait()
  496. right.C1 = CFrame.new(-0.9,1.5,0)*CFrame.Angles((math.pi*0),(math.pi*0),(math.pi*-.5))
  497. wait(.2)
  498. right.C1 = CFrame.new(-0.9,1.5,-0.15)*CFrame.Angles((math.pi*-.15),(math.pi*0),(math.pi*-.5))
  499. wait()
  500. right.C1 = CFrame.new(-0.9,1.5,-0.30)*CFrame.Angles((math.pi*-.30),(math.pi*0),(math.pi*-.5))
  501. wait()
  502. right.C1 = CFrame.new(-0.9,1.5,-0.45)*CFrame.Angles((math.pi*-.45),(math.pi*0),(math.pi*-.5))
  503. wait()
  504. right.C1 = CFrame.new(-0.9,1.5,-0.60)*CFrame.Angles((math.pi*-.60),(math.pi*0),(math.pi*-.5))
  505. wait()
  506. right.C1 = CFrame.new(-0.9,1.5,-0.75)*CFrame.Angles((math.pi*-.75),(math.pi*0),(math.pi*-.5))
  507. wait(.1)
  508. right.C1 = CFrame.new(-1.03,1.28,0)*CFrame.Angles((math.pi*-.60),(math.pi*0),(math.pi*-.45))
  509. wait()
  510. right.C1 = CFrame.new(-1.16,1.06,0)*CFrame.Angles((math.pi*-.45),(math.pi*0),(math.pi*-.4))
  511. wait()
  512. right.C1 = CFrame.new(-1.29,0.84,0)*CFrame.Angles((math.pi*-.30),(math.pi*0),(math.pi*-.35))
  513. wait()
  514. right.C1 = CFrame.new(-1.42,0.62,0)*CFrame.Angles((math.pi*-.15),(math.pi*0),(math.pi*-.3))
  515. wait()
  516. right.C1 = CFrame.new(-1.51,.1,-.05)*CFrame.Angles((math.pi*-.0),(math.pi*0),(math.pi*-.05))
  517. end
  518. ]]--
  519. -- spells-------------------------------------------------------------------------------------
  520. if key == "g" then -- keep
  521. if mouse.Target then
  522. if mouse.Target.Parent:findFirstChild("Humanoid") ~= nil then
  523. local tar = mouse.Target
  524. local spark = Instance.new("Explosion")
  525. spark.BlastRadius = 4
  526. spark.BlastPressure = 0
  527. spark.Parent = workspace
  528. spark.Position = tip2.Position
  529. local ptar = tar.Parent
  530. local mis = Instance.new("Part")
  531. mis.formFactor = "Symmetric"
  532. mis.Shape = "Ball"
  533. mis.BrickColor = BrickColor.new(1006)
  534. mis.Transparency = .5
  535. mis.Size = Vector3.new(1,1,1)
  536. mis.Parent = workspace
  537. mis.CFrame = staff.CFrame * CFrame.new(0,0,-15)
  538. local misv = Instance.new("BodyVelocity")
  539. misv.Parent = mis
  540. misv.maxForce = Vector3.new(math.huge,math.huge,math.huge)
  541. misv.velocity = mis.CFrame.lookVector * 50
  542. local misg = Instance.new("BodyGyro")
  543. misg.maxTorque = Vector3.new(math.huge,math.huge,math.huge)
  544. misg.Parent = mis
  545. misg.cframe = CFrame.new(tar.Position, mis.Position)
  546. mis.Touched:connect(function(hit)
  547. if hit.Name == tar.Name then
  548. local ex = Instance.new("Explosion")
  549. ex.Parent = workspace
  550. ex.Position = mis.Position
  551. mis:remove()
  552. end
  553. end)
  554. wait(.5)
  555. while mis.Parent == workspace and tar:IsDescendantOf(workspace) do
  556. wait()
  557. misg.cframe = CFrame.new(tar.Position, mis.Position)
  558. local fire = Instance.new("Explosion")
  559. fire.Parent = workspace
  560. fire.Position = mis.Position
  561. fire.BlastRadius = 2
  562. misv.velocity = mis.CFrame.lookVector * -18
  563. end
  564. mis:remove()
  565. end
  566. end
  567. end
  568. if key == "q" then -- keep
  569. for i = 1,100 do
  570. wait()
  571. local p = Instance.new("Part")
  572. p.BrickColor = BrickColor.new(1006)
  573. p.Name ="check"
  574. p.Parent = workspace
  575. p.CanCollide = false
  576. p.Size = Vector3.new(1,3,1)
  577. p.CFrame = player.Torso.CFrame + Vector3.new(math.random(-5,5),math.random(-2,4),math.random(-5,5))
  578. p.formFactor = "Symmetric"
  579. p.TopSurface = 0
  580. p.BottomSurface = 0
  581. p.Transparency = .5
  582. local pm = Instance.new("SpecialMesh")
  583. pm.Parent = p
  584. pm.MeshType = "Sphere"
  585. pm.Scale = Vector3.new((.2+(.05*i)),(.2+(.05*i)),(.2+(.05*i)))
  586. local pbv = Instance.new("BodyVelocity")
  587. pbv.Parent = p
  588. pbv.velocity = Vector3.new(0,10,0)
  589. game:GetService("Debris"):AddItem(p, .2)
  590. player.Humanoid.Health = player.Humanoid.Health +2
  591. end
  592. player.Torso.CFrame = mouse.Hit + Vector3.new(0,4,0)
  593. wait(.5)
  594. end
  595. if key == "e" then -- keep ish
  596. local tar = mouse.Target
  597. if tar ~= nil then
  598. if (tip6a.Position - tar.Position).magnitude < 100 then
  599. local shot = Instance.new("Part")
  600. shot.Parent = workspace
  601. shot.BrickColor = BrickColor.new("Cyan")
  602. shot.formFactor = "Symmetric"
  603. shot.Size = Vector3.new(1,1,1)
  604. shot.Anchored = true
  605. local shotm = Instance.new("BlockMesh")
  606. shotm.Scale = Vector3.new(.2,.2,(tip6a.Position - mouse.Hit.p).magnitude)
  607. shot.CFrame = CFrame.new(((tip6a.Position + mouse.Hit.p)/2),mouse.Hit.p)
  608. shotm.Parent = shot
  609. if tar.Parent:findFirstChild("Humanoid") ~= nil then
  610. local ice = Instance.new("Part")
  611. ice.Position = tar.Parent.Torso.Position
  612. ice.Anchored = true
  613. tar.Parent.Torso.Anchored = true
  614. ice.BrickColor = BrickColor.new("Cyan")
  615. ice.Size = Vector3.new(4,6,4)
  616. ice.Reflectance = .2
  617. ice.TopSurface = 0
  618. ice.BottomSurface = 0
  619. ice.Transparency = .5
  620. ice.Parent = tar.Parent
  621. coroutine.resume(coroutine.create(function() kill(tar) end))
  622. end
  623. wait(.1)
  624. shot:remove()
  625. end
  626. wait(.5)
  627. end
  628. end
  629. vt=Vector3.new
  630. cf=CFrame.new
  631. euler=CFrame.fromEulerAnglesXYZ
  632. angles=CFrame.Angles
  633. function swait(num)
  634. if num==0 or num==nil then
  635. game:service'RunService'.Heartbeat:wait(0)
  636. else
  637. for i=0,num do
  638. game:service'RunService'.Heartbeat:wait(0)
  639. end
  640. end
  641. end
  642. function nooutline(part)
  643. part.TopSurface,part.BottomSurface,part.LeftSurface,part.RightSurface,part.FrontSurface,part.BackSurface = 10,10,10,10,10,10
  644. end
  645.  
  646. function part(formfactor,parent,material,reflectance,transparency,brickcolor,name,size)
  647. local fp=Instance.new("Part")
  648. fp.formFactor=formfactor
  649. fp.Parent=parent
  650. fp.Reflectance=reflectance
  651. fp.Transparency=transparency
  652. fp.CanCollide=false
  653. fp.Locked=true
  654. fp.BrickColor=BrickColor.new(tostring(brickcolor))
  655. fp.Name=name
  656. fp.Size=size
  657. fp.Position=tip6a.Position
  658. nooutline(fp)
  659. fp.Material=material
  660. fp:BreakJoints()
  661. return fp
  662. end
  663. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  664. local mesh=Instance.new(Mesh)
  665. mesh.Parent=part
  666. if Mesh=="SpecialMesh" then
  667. mesh.MeshType=meshtype
  668. mesh.MeshId=meshid
  669. end
  670. mesh.Offset=offset
  671. mesh.Scale=scale
  672. return mesh
  673. end
  674. function rayCast(Pos, Dir, Max, Ignore)
  675. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  676. end
  677. function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  678. local prt=part(3,workspace,"Neon",0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  679. prt.Anchored=true
  680. prt.CFrame=cframe
  681. prt.CanCollide = false
  682. msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
  683. game:GetService("Debris"):AddItem(prt,2)
  684. coroutine.resume(coroutine.create(function(Part,Mesh)
  685. for i=0,1,delay do
  686. swait()
  687. Part.CFrame=Part.CFrame
  688. Part.Transparency=i
  689. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  690. end
  691. Part.Parent=nil
  692. end),prt,msh)
  693. end
  694. function MagicCylinder(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  695. local prt=part(3,workspace,"Neon",0,0,brickcolor,"Effect",vt(0.2,0.2,0.2))
  696. prt.Anchored=true
  697. prt.CFrame=cframe
  698. msh=mesh("SpecialMesh",prt,"Head","",vt(0,0,0),vt(x1,y1,z1))
  699. game:GetService("Debris"):AddItem(prt,2)
  700. coroutine.resume(coroutine.create(function(Part,Mesh)
  701. for i=0,1,delay do
  702. swait()
  703. Part.CFrame=Part.CFrame
  704. Part.Transparency=i
  705. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  706. end
  707. Part.Parent=nil
  708. end),prt,msh)
  709. end
  710.  
  711. function MagicRing(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  712. local prt=part(3,workspace,"Neon",0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  713. prt.Anchored=true
  714. prt.CFrame=cframe
  715. msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(x1,y1,z1))
  716. game:GetService("Debris"):AddItem(prt,2)
  717. coroutine.resume(coroutine.create(function(Part,Mesh,num)
  718. for i=0,1,delay do
  719. swait()
  720. Part.Transparency=i
  721. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  722. end
  723. Part.Parent=nil
  724. end),prt,msh,(math.random(0,1)+math.random())/5)
  725. end
  726.  
  727. function Machinegun(Prt,Parent)
  728. --attack=true
  729. local efprt=part(3,Parent,"Neon",0,0.5,BrickColor.new("Bright green"),"Effect",vt(0.2,0.2,0.2))
  730. efprt.Anchored=true
  731. local efmsh=mesh("CylinderMesh",efprt,"","",vt(0,0,0),vt(1,1,1))
  732. local spread=vt((math.random(-1,0)+math.random())*7,(math.random(-1,0)+math.random())*7,(math.random(-1,0)+math.random())*7)*(Prt.Position-mouse.Hit.p).magnitude/40
  733. coroutine.resume(coroutine.create(function(Part,Mesh,Spreaded)
  734. game:GetService("Debris"):AddItem(Part,6)
  735. local TheHit=mouse.Hit.p
  736. local MouseLook=cf((Prt.Position+TheHit)/2,TheHit+Spreaded/170)
  737. local hit,pos = rayCast(Prt.Position,MouseLook.lookVector,1000,Parent)
  738. --local pos=rayCast(P.Parent.Position,Player:GetMouse().Hit.p).lookVector
  739. local tefprt=part(3,workspace,"Neon",0,1,BrickColor.new("Black"),"Effect",vt(0.2,0.2,0.5))
  740. tefprt.CFrame=cf(pos)
  741. MagicCircle(BrickColor.new("Light blue"),cf(pos),0,0.5,0.5,0.5,0.5,0.5,0.02)
  742. game:GetService("Debris"):AddItem(tefprt,3)
  743. Part.CFrame=CFrame.new((Prt.Position+pos)/2,pos)*angles(1.57,0,0)
  744. if(hit.Parent:FindFirstChild("Humanoid")~= nil)then
  745. if hit.Parent:FindFirstChild("Humanoid") ~= nil and hit.Name ~= "Base" and hit.Parent.Name ~= player.Name then
  746. hit:BreakJoints()
  747. end
  748. end
  749. local mag=(Prt.Position-pos).magnitude
  750.  
  751. for i=1,3 do
  752. MagicRing(BrickColor.new("Dark blue"),cf(pos)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),3,3,3,1,1,1,0.02)
  753. end
  754. for i=1,8 do
  755. local tehcf=CFrame.new((Part.Position+pos)/2,pos)*euler(1.57,0,0)*cf(0,(mag/5)*(i/2),0)
  756. MagicRing(BrickColor.new("Really black"),tehcf*euler(1.57,0,0),1,1,1,0.5,0.5,0.5,0.02)
  757. end
  758. --[[
  759. for i=0,5 do
  760. local tehcf=CFrame.new((Part.Position+pos)/2,pos)*euler(1.57,0,0)*cf(0,(-mag/5)*(i/2),0)
  761. MagicRing(BrickColor.new("Neon orange"),tehcf*euler(1.57,0,0),1,1,1,0.5,0.5,0.5,0.01)
  762. end
  763. ]]-- --
  764. MagicCylinder(BrickColor.new("Light blue"),Part.CFrame,1,mag*5,0.5,2.15,0,0.5,0.02)
  765. local particleemitter = Instance.new("ParticleEmitter", hit)
  766. particleemitter.Texture = "http://www.roblox.com/asset/?id=321556991"
  767. --particleemitter.ZOffset = Vector3.new(1,1,10)
  768. --particleemitter.EmissionDirection = "Front"
  769. particleemitter.VelocitySpread = 360
  770. particleemitter.LockedToPart = true
  771. particleemitter.Lifetime = NumberRange.new(0.65)
  772. particleemitter.Speed = NumberRange.new(40)
  773. particleemitter.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, 1), NumberSequenceKeypoint.new(1, 5.563)})
  774. particleemitter.RotSpeed = NumberRange.new(-180, 180)
  775. particleemitter.Rate = 1000
  776. particleemitter.Rotation = NumberRange.new(-45, 45)
  777. particleemitter.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 0), NumberSequenceKeypoint.new(0.701, 0), NumberSequenceKeypoint.new(1, 1)})
  778. particleemitter.LightEmission = 0
  779. particleemitter.Color = ColorSequence.new(Color3.new(0, 0, 0), Color3.new(0, 0, 0))
  780. wait(0.1)
  781. particleemitter.Rate = 0
  782. Part.Parent=nil
  783. end),efprt,efmsh,spread)
  784. end
  785. if key == "r" then
  786. Machinegun(tip6a)--fire1
  787. local moosick2 = Instance.new("Sound",tip6a)
  788. moosick2.SoundId = "rbxassetid://1624609598"
  789. --142653441, 175067863, 177058852
  790. moosick2.Looped = false
  791. moosick2.Pitch = 1
  792. moosick2.Volume = 5
  793. moosick2:Play()
  794. end
  795. if key == "f" then -- keep
  796. local tar = mouse.Target
  797. if tar ~= nil then
  798. if (tip6a.Position - tar.Position).magnitude < 100 then
  799. right.C1 = CFrame.new(-1.35,.5,-.25)*CFrame.Angles((math.pi*-.5),(math.pi*0),(math.pi*-.25))
  800. local shot = Instance.new("Part")
  801. shot.Parent = workspace
  802. shot.BrickColor = BrickColor.new("Royal purple")
  803. shot.formFactor = "Symmetric"
  804. shot.Size = Vector3.new(1,1,1)
  805. shot.Anchored = true
  806. local shotm = Instance.new("BlockMesh")
  807. shotm.Scale = Vector3.new(.2,.2,(tip6a.Position - mouse.Hit.p).magnitude)
  808. shot.CFrame = CFrame.new(((tip6a.Position + mouse.Hit.p)/2),mouse.Hit.p)
  809. shotm.Parent = shot
  810. if tar.className == "Part" then
  811. local ice = Instance.new("Part")
  812. ice.CFrame = tar.CFrame
  813. ice.Size = tar.Size + Vector3.new(1,1,1)
  814. ice.Anchored = true
  815. tar.Anchored = true
  816. ice.BrickColor = BrickColor.new("Cyan")
  817. ice.Reflectance = .2
  818. ice.TopSurface = 0
  819. ice.BottomSurface = 0
  820. ice.Transparency = .5
  821. ice.Parent = tar
  822. ice.Friction = 0
  823. game:GetService("Debris"):AddItem(ice, 10)
  824. wait(.1)
  825. shot:remove()
  826. wait(.5)
  827. end
  828. end
  829. end
  830. right.C1 = CFrame.new(-1.51,.1,-.05)*CFrame.Angles((math.pi*-.0),(math.pi*0),(math.pi*-.05))
  831. end
  832. if key == "h" then
  833. local cf = CFrame.new(tip2.Position, mouse.Hit.p)
  834. local v = cf.lookVector
  835. local dx = (math.random() - .5) * .02
  836. local dy = (math.random() - .5) * .02
  837. local dz = (math.random() - .5) * .02
  838. parts = {}
  839. local f = coroutine.create(function() fire(Vector3.new(v.x + dx, v.y + dy, v.z + dz)) end)
  840. coroutine.resume(f)
  841. wait(.5)
  842. end
  843. if key == "y" then
  844. right.C1 = CFrame.new(-1.51,.1,-.05)*CFrame.Angles((math.pi*-.0),(math.pi*0),(math.pi*-.05))
  845. wait()
  846. right.C1 = CFrame.new(-1.51,.1,-.05)*CFrame.Angles((math.pi*-.1),(math.pi*0),(math.pi*-.05))
  847. wait()
  848. right.C1 = CFrame.new(-1.47,.2,-.1)*CFrame.Angles((math.pi*-.2),(math.pi*0),(math.pi*-.1))
  849. wait()
  850. right.C1 = CFrame.new(-1.43,.3,-.15)*CFrame.Angles((math.pi*-.3),(math.pi*0),(math.pi*-.15))
  851. wait()
  852. right.C1 = CFrame.new(-1.39,.4,-.2)*CFrame.Angles((math.pi*-.4),(math.pi*0),(math.pi*-.2))
  853. wait()
  854. right.C1 = CFrame.new(-1.35,.5,-.25)*CFrame.Angles((math.pi*-.5),(math.pi*0),(math.pi*-.25))
  855. for i = 2,101 do
  856. wait()
  857. local boulder = Instance.new("Part")
  858. boulder.TopSurface = 0
  859. boulder.BottomSurface = 0
  860. boulder.Anchored = true
  861. boulder.BrickColor = BrickColor.new("Dark stone grey")
  862. boulder.Size = Vector3.new((i+math.random(-1,1)),(i+math.random(-1,1)),2)
  863. boulder.CFrame = tip.CFrame * CFrame.new(0,0,-2*i)
  864. boulder.Velocity = boulder.CFrame.lookVector * 500
  865. boulder.Material = "Slate"
  866. boulder.Parent = workspace
  867. boulder.Touched:connect(function(hit)
  868. if hit.Parent:findFirstChild("Humanoid") ~= nil then
  869. hit.Parent.humanoid.Sit = true
  870. end
  871. end)
  872. game:GetService("Debris"):AddItem(boulder, .8)
  873. end
  874. right.C1 = CFrame.new(-1.39,.4,-.2)*CFrame.Angles((math.pi*-.4),(math.pi*0),(math.pi*-.2))
  875. wait()
  876. right.C1 = CFrame.new(-1.43,.3,-.15)*CFrame.Angles((math.pi*-.3),(math.pi*0),(math.pi*-.15))
  877. wait()
  878. right.C1 = CFrame.new(-1.47,.2,-.1)*CFrame.Angles((math.pi*-.2),(math.pi*0),(math.pi*-.1))
  879. wait()
  880. right.C1 = CFrame.new(-1.51,.1,-.05)*CFrame.Angles((math.pi*-.1),(math.pi*0),(math.pi*-.05))
  881. wait()
  882. right.C1 = CFrame.new(-1.51,.1,-.05)*CFrame.Angles((math.pi*-.0),(math.pi*0),(math.pi*-.05))
  883. end
  884. if key == "n" then
  885. local tar = mouse.Target
  886. if tar~= nil then
  887. if tar.Parent:findFirstChild("Humanoid") ~= nil then
  888. if tar.Parent:findFirstChild("Torso") ~= nil then
  889. for i = 1,100 do
  890. wait()
  891. local p = Instance.new("Part")
  892. p.BrickColor = BrickColor.new(1006)
  893. p.Name ="check"
  894. p.Parent = workspace
  895. p.CanCollide = false
  896. p.Size = Vector3.new(1,3,1)
  897. p.CFrame = tar.Parent.Torso.CFrame + Vector3.new(math.random(-5,5),math.random(-2,4),math.random(-5,5))
  898. p.formFactor = "Symmetric"
  899. p.TopSurface = 0
  900. p.BottomSurface = 0
  901. p.Transparency = .5
  902. local pm = Instance.new("SpecialMesh")
  903. pm.Parent = p
  904. pm.MeshType = "Sphere"
  905. pm.Scale = Vector3.new((.2+(.05*i)),(.2+(.05*i)),(.2+(.05*i)))
  906. local pbv = Instance.new("BodyVelocity")
  907. pbv.Parent = p
  908. pbv.velocity = Vector3.new(0,10,0)
  909. game:GetService("Debris"):AddItem(p, .2)
  910. tar.Parent.Humanoid.Health = tar.Parent.Humanoid.Health +2
  911. end
  912. tar.Parent.Torso.CFrame = mouse.Hit + Vector3.new(0,4,0)
  913. wait(.5)
  914. end
  915. end
  916. end
  917. end
  918. if key == "z" then
  919. local start = Instance.new("Part")
  920. start.Parent = workspace
  921. start.Position = mouse.Hit.p + Vector3.new(0,18,0)
  922. start.Anchored = true
  923. start.Size = Vector3.new(1,1,1)
  924. start.Transparency = 1
  925. for i = 1,36 do
  926. start.CFrame = start.CFrame * CFrame.Angles(math.rad(0),math.rad(5),math.rad(0))
  927. local wall1 = Instance.new("Part")
  928. wall1.Parent = workspace
  929. wall1.BrickColor = BrickColor.new("Really black")
  930. wall1.Size = Vector3.new(1,10,1)
  931. wall1.Anchored = true
  932. wall1.TopSurface = 0
  933. wall1.CFrame = start.CFrame * CFrame.new(10,-15,0)
  934. local wall2 = Instance.new("Part")
  935. wall2.Parent = workspace
  936. wall2.BrickColor = BrickColor.new("Really black")
  937. wall2.Size = Vector3.new(1,10,1)
  938. wall2.Anchored = true
  939. wall2.TopSurface = 0
  940. wall2.CFrame = start.CFrame * CFrame.new(10,-15,0)
  941. local wall1a = Instance.new("Part")
  942. wall1a.Parent = workspace
  943. wall1a.BrickColor = BrickColor.new("Really black")
  944. wall1a.Size = Vector3.new(1,10,1)
  945. wall1a.Anchored = true
  946. wall1a.TopSurface = 0
  947. wall1a.CFrame = start.CFrame * CFrame.new(-10,-15,0)
  948. local wall2a = Instance.new("Part")
  949. wall2a.Parent = workspace
  950. wall2a.BrickColor = BrickColor.new("Really black")
  951. wall2a.Size = Vector3.new(1,0,1)
  952. wall2a.Anchored = true
  953. wall2a.TopSurface = 0
  954. wall2a.CFrame = start.CFrame * CFrame.new(-10,-15,0)
  955. local roof = Instance.new("Part")
  956. roof.Parent = workspace
  957. roof.Size = Vector3.new(0,1,1)
  958. roof.BrickColor = BrickColor.new("Really black")
  959. roof.Anchored = true
  960. roof.CFrame = start.CFrame * CFrame.new(0,-10,0)
  961. roof.TopSurface = 0
  962. local roof2 = Instance.new("Part")
  963. roof2.Parent = workspace
  964. roof2.Size = Vector3.new(1,1,20)
  965. roof2.BrickColor = BrickColor.new("Really black")
  966. roof2.Anchored = true
  967. roof2.CFrame = start.CFrame * CFrame.new(0,-10,0)
  968. roof2.TopSurface = 0
  969. local roofa = Instance.new("Part")
  970. roofa.Parent = workspace
  971. roofa.Size = Vector3.new(20,1,1)
  972. roofa.BrickColor = BrickColor.new("Really black")
  973. roofa.Anchored = true
  974. roofa.CFrame = start.CFrame * CFrame.new(0,-20,0)
  975. roofa.TopSurface = 0
  976. local roof2a = Instance.new("Part")
  977. roof2a.Parent = workspace
  978. roof2a.Size = Vector3.new(1,1,20)
  979. roof2a.BrickColor = BrickColor.new("Really black")
  980. roof2a.Anchored = true
  981. roof2a.CFrame = start.CFrame * CFrame.new(0,-20,0)
  982. roof2a.TopSurface = 0
  983. game:GetService("Debris"):AddItem(roof, 15)
  984. game:GetService("Debris"):AddItem(wall1, 15)
  985. game:GetService("Debris"):AddItem(wall2, 15)
  986. game:GetService("Debris"):AddItem(roof2, 15)
  987. game:GetService("Debris"):AddItem(wall1a, 15)
  988. game:GetService("Debris"):AddItem(wall2a, 15)
  989. game:GetService("Debris"):AddItem(roofa, 15)
  990. game:GetService("Debris"):AddItem(roof2a, 15)
  991. wait()
  992. end
  993. start:remove()
  994. wait(.5)
  995. end
  996. --end of keys
  997. end)
  998. --end of script
  999. end)
  1000.  
  1001. bin.Deselected:connect(function()
  1002. staff:remove()
  1003. rs.Part1 = rarm
  1004. ls.Part1 = larm
  1005. right:remove()
  1006. left:remove()
  1007. --game.Players.LocalPlayer.Character.Torso.Sound:Destroy()
  1008. end)
Advertisement
Add Comment
Please, Sign In to add comment