Advertisement
ares200345

pen script

Sep 14th, 2012
2,677
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.68 KB | None | 0 0
  1. --MADE BY OneLegend (NOT THE SCRIPT) Thanks to TheRedAngel for letting me add. Feel free to take his model too. http://www.roblox.com/TheRedAngels-SB-Gift-NEW-SCRIPTS-item?id=88063410
  2. --LOCAL SCRIPT: JUST RUN!
  3.  
  4.  
  5. local players = game:GetService("Players")
  6.  
  7. local workspac = game:GetService("Workspace")
  8.  
  9. Me = players.LocalPlayer
  10.  
  11. char = Me.Character
  12.  
  13. name = Me.Name
  14.  
  15. local pg = Me.PlayerGui
  16.  
  17. local human = char.Humanoid
  18.  
  19. Torso = char.Torso
  20.  
  21. Rarm = char["Right Arm"]
  22.  
  23. Larm = char["Left Arm"]
  24.  
  25. Rleg = char["Right Leg"]
  26.  
  27. Lleg = char["Left Leg"]
  28.  
  29. local nummovs = 6
  30.  
  31. local mov = 1
  32.  
  33. local peno = false
  34.  
  35. local currmov = 1
  36.  
  37. local attakin = false
  38.  
  39. local asset = "http://roblox.com/asset/?id="
  40.  
  41. local sounds = {
  42.  
  43. Gun = "2760979",
  44.  
  45. Gun2 = "10209859",
  46.  
  47. Click = "12222076",
  48.  
  49. Imbue = "2785493",
  50.  
  51. Ele = "2800815",
  52.  
  53. Curse = "13775494",
  54.  
  55. Slash = "rbxasset://sounds/swordslash.wav",
  56.  
  57. Bow = "16211041"
  58.  
  59. }
  60.  
  61. function sound(id)
  62.  
  63. local sound = Instance.new("Sound", Torso)
  64.  
  65. sound.SoundId = id
  66.  
  67. sound.Volume = 0.5
  68.  
  69. sound:play()
  70.  
  71. sound:stop()
  72.  
  73. wait()
  74.  
  75. sound:play()
  76.  
  77. coroutine.resume(coroutine.create(function()
  78.  
  79. wait(1)
  80.  
  81. sound:remove()
  82.  
  83. end))
  84.  
  85. end
  86.  
  87. function create(prt, parent, siz, cf, can, col, anc, brea, tran, ref, form, weld, part1, cf2, mesh, sca, type, id, bckup)
  88.  
  89. part = Instance.new(prt)
  90.  
  91. part.formFactor = form
  92.  
  93. part.BrickColor = BrickColor.new(col)
  94.  
  95. part.Size = siz
  96.  
  97. part.Anchored = anc
  98.  
  99. part.Transparency = tran
  100.  
  101. part.Name = "ShipPart"
  102.  
  103. part.Reflectance = ref
  104.  
  105. part.CFrame = cf
  106.  
  107. part.CanCollide = can
  108.  
  109. part.TopSurface = "Smooth"
  110.  
  111. part.BottomSurface = "Smooth"
  112.  
  113. if brea == true then
  114.  
  115. part:BreakJoints()
  116.  
  117. end
  118.  
  119. if weld == true then
  120.  
  121. weld = Instance.new("Weld")
  122.  
  123. weld.Part0 = part
  124.  
  125. weld.Part1 = part1
  126.  
  127. weld.C1 = cf2
  128.  
  129. weld.Parent = part
  130.  
  131. end
  132.  
  133. if mesh ~= nil then
  134.  
  135. mesh = Instance.new(mesh)
  136.  
  137. mesh.Scale = sca
  138.  
  139. if bckup == true then
  140.  
  141. mesh.MeshType = "Sphere"
  142.  
  143. end
  144.  
  145. if mesh == "SpecialMesh" then
  146.  
  147. mesh.MeshType = type
  148.  
  149. pcall(function()
  150.  
  151. if type == "Wedge" then
  152.  
  153. mesh.MeshType = "Wedge"
  154.  
  155. end
  156.  
  157. if type == "FileMesh" then
  158.  
  159. mesh.MeshType = "FileMesh"
  160.  
  161. mesh.MeshId = id
  162.  
  163. end
  164.  
  165. end)
  166.  
  167. end
  168.  
  169. mesh.Parent = part
  170.  
  171. end
  172.  
  173. part.Parent = parent
  174.  
  175. return part,weld
  176.  
  177. end
  178.  
  179. pcall(function() char[":P"]:remove() end)
  180.  
  181. pcall(function() char["Pen"]:remove() end)
  182.  
  183. local Model = Instance.new("Model",char)
  184.  
  185. Model.Name = ":P"
  186.  
  187. local Model2 = Instance.new("Model",char)
  188.  
  189. Model2.Name = "Pen"
  190.  
  191. local Model3 = Instance.new("Model",Model2)
  192.  
  193. Model3.Name = "Staff"
  194.  
  195. local Model4 = Instance.new("Model",Model2)
  196.  
  197. Model4.Name = "Sword"
  198.  
  199. local Model5 = Instance.new("Model",Model2)
  200.  
  201. Model5.Name = "Bow"
  202.  
  203. local Model6 = Instance.new("Model",Model2)
  204.  
  205. Model6.Name = "Lantern"
  206.  
  207. local Model7 = Instance.new("Model",Model2)
  208.  
  209. Model7.Name = "Gun"
  210.  
  211. local RAB = Instance.new("Part") -- Right Arm Brick
  212.  
  213. RAB.formFactor = "Custom"
  214.  
  215. RAB.Size = Vector3.new(0.2, 0.2, 0.2)
  216.  
  217. RAB.Transparency = 1
  218.  
  219. RAB.Parent = Model
  220.  
  221. RAB:BreakJoints()
  222.  
  223. local RABW = Instance.new("Weld",RAB) -- Right Arm Brick Weld
  224.  
  225. RABW.Part0 = Torso
  226.  
  227. RABW.Part1 = RAB
  228.  
  229. RABW.C1 = CFrame.new(-1.5, -0.5, 0)
  230.  
  231. local LAB = Instance.new("Part") -- Right Arm Brick
  232.  
  233. LAB.formFactor = "Custom"
  234.  
  235. LAB.Size = Vector3.new(0.2, 0.2, 0.2)
  236.  
  237. LAB.Transparency = 1
  238.  
  239. LAB.Parent = Model
  240.  
  241. LAB:BreakJoints()
  242.  
  243. local LABW = Instance.new("Weld",LAB) -- Left Arm Brick Weld
  244.  
  245. LABW.Part0 = Torso
  246.  
  247. LABW.Part1 = LAB
  248.  
  249. LABW.C1 = CFrame.new(1.5, -0.5, 0)
  250.  
  251. local RAW = Instance.new("Weld",RAB) -- Right Arm Weld
  252.  
  253. RAW.Part0 = RAB
  254.  
  255. RAW.Part1 = nil
  256.  
  257. RAW.C1 = CFrame.new(0, 0.5, 0)
  258.  
  259. local LAW = Instance.new("Weld",LAB) -- Left Arm Weld
  260.  
  261. LAW.Part0 = LAB
  262.  
  263. LAW.Part1 = nil
  264.  
  265. LAW.C1 = CFrame.new(0, 0.5, 0)
  266.  
  267. --pen
  268.  
  269. local shaft = create("Part", Model2, Vector3.new(0.2, 1, 0.2), CFrame.new(0,0,0), false, "Dark stone grey", false, true, 0, 0, "Custom", true, Rarm, CFrame.new(0,-1,0)*CFrame.Angles(math.rad(90),0,0), "CylinderMesh", Vector3.new(0.5,1,0.5), derp, id, bckup)
  270.  
  271. local shaft2 = create("Part", Model2, Vector3.new(0.2, 0.25, 0.2), CFrame.new(0,0,0), false, "Black", false, true, 0, 0, "Custom", true, shaft, CFrame.new(0,-0.3749,0.05)*CFrame.Angles(math.rad(0),0,0), "BlockMesh", Vector3.new(0.25,1,0.25), derp, id, bckup)
  272.  
  273. local shaft3 = create("Part", Model2, Vector3.new(0.2, 0.2, 0.2), CFrame.new(0,0,0), false, "Black", false, true, 0, 0, "Custom", true, shaft, CFrame.new(0,-0.425,0)*CFrame.Angles(math.rad(0),0,0), "CylinderMesh", Vector3.new(0.3,1,0.3), derp, id, bckup)
  274.  
  275. local shaft4 = create("Part", Model2, Vector3.new(0.2, 0.2, 0.2), CFrame.new(0,0,0), false, "Black", false, true, 0, 0, "Custom", true, shaft, CFrame.new(0,0.55,0)*CFrame.Angles(math.rad(0),0,0), "SpecialMesh", Vector3.new(0.05,0.15,0.05), "FileMesh", "http://www.roblox.com/asset/?id=1033714", bckup)
  276.  
  277. shaft4.Mesh.MeshId = "http://www.roblox.com/asset/?id=1033714"
  278.  
  279. local led, ledw = create("Part", Model2, Vector3.new(0.2, 0.5, 0.2), CFrame.new(0,0,0), false, "Mid stone grey", false, true, 0, 0, "Custom", true, shaft, CFrame.new(0,0.375,0)*CFrame.Angles(math.rad(0),0,0), "CylinderMesh", Vector3.new(0.05,1,0.05), "FileMesh", "http://www.roblox.com/asset/?id=1033714", bckup)
  280.  
  281. --staff
  282.  
  283. local han = create("Part", Model3, Vector3.new(0.25, 1.5, 0.25), CFrame.new(0,0,0), false, "Reddish brown", false, true, 1, 0, "Custom", true, Rarm, CFrame.new(0,-1,0)*CFrame.Angles(math.rad(90),0,0), "CylinderMesh", Vector3.new(1,1,1), derp, id, bckup)
  284.  
  285. local han2 = create("Part", Model3, Vector3.new(0.5, 0.25, 0.5), CFrame.new(0,0,0), false, "Reddish brown", false, true, 1, 0, "Custom", true, han, CFrame.new(0,0.75,0)*CFrame.Angles(math.rad(0),0,0), "CylinderMesh", Vector3.new(1,1,1), derp, id, bckup)
  286.  
  287. local han3 = create("Part", Model3, Vector3.new(0.35, 1.5, 0.25), CFrame.new(0,0,0), false, "Reddish brown", false, true, 1, 0, "Custom", true, han, CFrame.new(0,1.5,0.05)*CFrame.Angles(math.rad(0),0,0), "SpecialMesh", Vector3.new(1,1,1), "Wedge", id, bckup)
  288.  
  289. han3.Mesh.MeshType = "Wedge"
  290.  
  291. local han4 = create("Part", Model3, Vector3.new(0.35, 1.5, 0.25), CFrame.new(0,0,0), false, "Reddish brown", false, true, 1, 0, "Custom", true, han, CFrame.new(0,1.5,-0.05)*CFrame.Angles(math.rad(0),math.rad(180),0), "SpecialMesh", Vector3.new(1,1,1), "Wedge", id, bckup)
  292.  
  293. han4.Mesh.MeshType = "Wedge"
  294.  
  295. local han5 = create("Part", Model3, Vector3.new(0.5, 0.25, 0.5), CFrame.new(0,0,0), false, "Reddish brown", false, true, 1, 0, "Custom", true, han, CFrame.new(0,-0.75,0)*CFrame.Angles(math.rad(0),0,0), "BlockMesh", Vector3.new(1,1,1), derp, id, bckup)
  296.  
  297. for i = 1, 6 do
  298.  
  299. local han6 = create("Part", Model3, Vector3.new(0.5, 0.25, 0.5), CFrame.new(0,0,0), false, "Reddish brown", false, true, 1, 0, "Custom", true, han, CFrame.new(0,-0.75-(0.25*i),0)*CFrame.Angles(math.rad(45*i),0,0), "BlockMesh", Vector3.new(1-(0.1*i),1,1), derp, id, bckup)
  300.  
  301. end
  302.  
  303. for i = 1, 6 do
  304.  
  305. local han6 = create("Part", Model3, Vector3.new(0.35, 0.1, 0.35), CFrame.new(0,0,0), false, "Black", false, true, 1, 0, "Custom", true, han, CFrame.new(0,-0.75+(0.25*i),0)*CFrame.Angles(0,0,0), "CylinderMesh", Vector3.new(1,0.5,1), derp, id, bckup)
  306.  
  307. end
  308.  
  309. for i = 1, 7 do
  310.  
  311. local han6 = create("Part", Model3, Vector3.new(0.26, 0.1, 0.26), CFrame.new(0,0,0), false, "Black", false, true, 1, 0, "Custom", true, han, CFrame.new(0,-0.6+(0.15*i),0)*CFrame.Angles(0,0,0), "CylinderMesh", Vector3.new(1,0.5,1), derp, id, bckup)
  312.  
  313. end
  314.  
  315. local han7 = create("Part", Model3, Vector3.new(0.5, 0.5, 0.5), CFrame.new(0,0,0), false, "Navy blue", false, true, 1, 0, "Custom", true, han, CFrame.new(0,-2.5,0)*CFrame.Angles(math.rad(0),0,0), "SpecialMesh", Vector3.new(1.5,2,1.5), derp, id, bckup)
  316.  
  317. han7.Mesh.MeshType = "Sphere"
  318.  
  319. han7.Name = "Orb"
  320.  
  321. --sword
  322.  
  323. local han = create("Part", Model4, Vector3.new(0.25, 1.5, 0.25), CFrame.new(0,0,0), false, "Reddish brown", false, true, 1, 0, "Custom", true, Rarm, CFrame.new(0,-1,0)*CFrame.Angles(math.rad(90),0,0), "CylinderMesh", Vector3.new(1,1,1), derp, id, bckup)
  324.  
  325. local han2 = create("Part", Model4, Vector3.new(0.5, 0.25, 0.5), CFrame.new(0,0,0), false, "Reddish brown", false, true, 1, 0, "Custom", true, han, CFrame.new(0,-0.85,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(90)), "SpecialMesh", Vector3.new(1,1,1), "Torso", id, bckup)
  326.  
  327. local han3 = create("Part", Model4, Vector3.new(0.5, 0.25, 0.25), CFrame.new(0,0,0), false, "Reddish brown", false, true, 1, 0, "Custom", true, han2, CFrame.new(0,0,0.25)*CFrame.Angles(math.rad(90),0,math.rad(-45)), "SpecialMesh", Vector3.new(1,1,1), "Torso", id, bckup)
  328.  
  329. han3.Mesh.MeshType = "Torso"
  330.  
  331. local han4 = create("Part", Model4, Vector3.new(0.5, 0.25, 0.25), CFrame.new(0,0,0), false, "Reddish brown", false, true, 1, 0, "Custom", true, han2, CFrame.new(0,0,-0.25)*CFrame.Angles(math.rad(90),0,math.rad(-135)), "SpecialMesh", Vector3.new(1,1,1), "Torso", id, bckup)
  332.  
  333. han4.Mesh.MeshType = "Torso"
  334.  
  335. local han5 = create("Part", Model4, Vector3.new(0.3, 3, 0.2), CFrame.new(0,0,0), false, "Mid stone grey", false, true, 1, 0, "Custom", true, han2, CFrame.new(-1.5,0,0)*CFrame.Angles(math.rad(90),math.rad(0),math.rad(90)), "SpecialMesh", Vector3.new(1,1,1), "Torso", id, bckup)
  336.  
  337. han5.Mesh.MeshType = "Torso"
  338.  
  339. han5.Name = "Blade"
  340.  
  341. local han7 = create("Part", Model4, Vector3.new(0.3, 0.275, 0.3), CFrame.new(0,0,0), false, "New Yeller", false, true, 1, 0, "Custom", true, han2, CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(0),0), "SpecialMesh", Vector3.new(1,1,1), "Torso", id, bckup)
  342.  
  343. --bow
  344.  
  345. local han = create("Part", Model5, Vector3.new(0.25, 1.5, 0.25), CFrame.new(0,0,0), false, "Reddish brown", false, true, 1, 0, "Custom", true, Rarm, CFrame.new(0,-1,0)*CFrame.Angles(math.rad(90),0,0), "CylinderMesh", Vector3.new(1,1,1), derp, id, bckup)
  346.  
  347. local han2 = create("Part", Model5, Vector3.new(0.25, 1.5, 0.25), CFrame.new(0,0,0), false, "Reddish brown", false, true, 1, 0, "Custom", true, han, CFrame.new(0,-1.2,-0.5)*CFrame.Angles(math.rad(45),0,0), "CylinderMesh", Vector3.new(1,1,1), derp, id, bckup)
  348.  
  349. local han3 = create("Part", Model5, Vector3.new(0.25, 1.5, 0.25), CFrame.new(0,0,0), false, "Reddish brown", false, true, 1, 0, "Custom", true, han, CFrame.new(0,1.2,-0.5)*CFrame.Angles(math.rad(-45),0,0), "CylinderMesh", Vector3.new(1,1,1), derp, id, bckup)
  350.  
  351. local han4 = create("Part", Model5, Vector3.new(0.2, 3.25, 0.2), CFrame.new(0,0,0), false, "White", false, true, 1, 0, "Custom", true, han, CFrame.new(0,0,-1)*CFrame.Angles(0,0,0), "CylinderMesh", Vector3.new(0.5,1,0.5), derp, id, bckup)
  352.  
  353. local han5 = create("Part", Model5, Vector3.new(0.26, 1, 0.26), CFrame.new(0,0,0), false, "Black", false, true, 1, 0, "Custom", true, han, CFrame.new(0,0,0)*CFrame.Angles(0, 0,0), "CylinderMesh", Vector3.new(1,1,1), derp, id, bckup)
  354.  
  355. --lantern
  356.  
  357. local han = create("Part", Model6, Vector3.new(0.5, 0.5, 0.5), CFrame.new(0,0,0), false, "Reddish brown", false, true, 1, 0, "Custom", true, Rarm, CFrame.new(0,-1,0)*CFrame.Angles(0,0,0), "CylinderMesh", Vector3.new(1,1,1), derp, id, bckup)
  358.  
  359. local han2 = create("Part", Model6, Vector3.new(0.75, 0.25, 0.75), CFrame.new(0,0,0), false, "Reddish brown", false, true, 1, 0, "Custom", true, han, CFrame.new(0,-0.25,0)*CFrame.Angles(0,0,0), "CylinderMesh", Vector3.new(1,1,1), derp, id, bckup)
  360.  
  361. local han3 = create("Part", Model6, Vector3.new(0.6, 1, 0.6), CFrame.new(0,0,0), false, "White", false, true, 1, 0, "Custom", true, han, CFrame.new(0,-0.65,0)*CFrame.Angles(0,0,0), "CylinderMesh", Vector3.new(1,1,1), derp, id, bckup)
  362.  
  363. han3.Name = "Glass"
  364.  
  365. local han4 = create("Part", Model6, Vector3.new(0.75, 0.25, 0.75), CFrame.new(0,0,0), false, "Reddish brown", false, true, 1, 0, "Custom", true, han3, CFrame.new(0,-0.5,0)*CFrame.Angles(0,0,0), "CylinderMesh", Vector3.new(1,1,1), derp, id, bckup)
  366.  
  367. local han5 = create("Part", Model6, Vector3.new(0.5, 0.25, 0.5), CFrame.new(0,0,0), false, "Reddish brown", false, true, 1, 0, "Custom", true, han4, CFrame.new(0,-0.25,0)*CFrame.Angles(0,0,0), "CylinderMesh", Vector3.new(1,1,1), derp, id, bckup)
  368.  
  369. local bill = Instance.new("BillboardGui", han3)
  370.  
  371. bill.Name = "Light"
  372.  
  373. bill.Size = UDim2.new(10, 0, 10, 0)
  374.  
  375. bill.Enabled = false
  376.  
  377. local l1 = Instance.new("ImageLabel", bill)
  378.  
  379. l1.Image = "http://www.roblox.com/asset/?id=42835416"
  380.  
  381. l1.Size = UDim2.new(2, 0, 2, 0)
  382.  
  383. l1.Position = UDim2.new(-0.5, 0, -0.5, 0)
  384.  
  385. l1.ZIndex = 0
  386.  
  387. l1.BackgroundTransparency = 1
  388.  
  389. --gun
  390.  
  391. local han = create("Part", Model7, Vector3.new(0.2, 0.3, 0.75), CFrame.new(0,0,0), false, "Dark stone grey", false, true, 1, 0, "Custom", true, Rarm, CFrame.new(0,-1.1,0)*CFrame.Angles(0,0,0), "BlockMesh", Vector3.new(1,1,1), derp, id, bckup)
  392.  
  393. local han2z = create("Part", Model7, Vector3.new(0.2, 1, 0.2), CFrame.new(0,0,0), false, "Dark stone grey", false, true, 1, 0, "Custom", true, han, CFrame.new(0,-0.5,-0.35)*CFrame.Angles(0,0,0), "CylinderMesh", Vector3.new(1,1,1), derp, id, bckup)
  394.  
  395. local han3 = create("Part", Model7, Vector3.new(0.2, 0.75, 0.2), CFrame.new(0,0,0), false, "Dark stone grey", false, true, 1, 0, "Custom", true, han, CFrame.new(0,-0.35,-0.25)*CFrame.Angles(0,0,0), "CylinderMesh", Vector3.new(0.75,1,0.75), derp, id, bckup)
  396.  
  397. local han4 = create("Part", Model7, Vector3.new(0.2, 0.2, 0.2), CFrame.new(0,0,0), false, "Dark stone grey", false, true, 1, 0, "Custom", true, han, CFrame.new(0,-0.15,-0.15)*CFrame.Angles(math.rad(-45),0,0), "BlockMesh", Vector3.new(0.25,1,0.15), derp, id, bckup)
  398.  
  399. local han5 = create("Part", Model7, Vector3.new(0.2, 0.25, 0.2), CFrame.new(0,0,0), false, "Dark stone grey", false, true, 1, 0, "Custom", true, han, CFrame.new(0,-0.225,0.025)*CFrame.Angles(math.rad(45),0,0), "BlockMesh", Vector3.new(0.25,1,0.15), derp, id, bckup)
  400.  
  401. local han6 = create("Part", Model7, Vector3.new(0.2, 0.2, 0.2), CFrame.new(0,0,0), false, "Dark stone grey", false, true, 1, 0, "Custom", true, han, CFrame.new(0,-0.31125,-0.15)*CFrame.Angles(math.rad(90),0,0), "BlockMesh", Vector3.new(0.25,1,0.15), derp, id, bckup)
  402.  
  403. local han7 = create("Part", Model7, Vector3.new(0.201, 0.275, 0.6), CFrame.new(0,0,0), false, "Black", false, true, 1, 0, "Custom", true, han, CFrame.new(0,0,0.05)*CFrame.Angles(0,0,0), "BlockMesh", Vector3.new(1,1,1), derp, id, bckup)
  404.  
  405.  
  406. function pen()
  407.  
  408. for _,v in pairs(Model3:children()) do
  409.  
  410. coroutine.resume(coroutine.create(function()
  411.  
  412. v.Transparency = 1
  413.  
  414. end))
  415.  
  416. end
  417.  
  418. for _,c in pairs(Model6:children()) do
  419.  
  420. pcall(function()
  421.  
  422. c.Transparency = 1
  423.  
  424. c.Light.Enabled = false
  425.  
  426. end)
  427.  
  428. end
  429.  
  430. for _,v in pairs(Model7:children()) do
  431.  
  432. coroutine.resume(coroutine.create(function()
  433.  
  434. v.Transparency = 1
  435.  
  436. end))
  437.  
  438. end
  439.  
  440. for _,v in pairs(Model4:children()) do
  441.  
  442. coroutine.resume(coroutine.create(function()
  443.  
  444. v.Transparency = 1
  445.  
  446. end))
  447.  
  448. end
  449.  
  450. for _,v in pairs(Model5:children()) do
  451.  
  452. coroutine.resume(coroutine.create(function()
  453.  
  454. v.Transparency = 1
  455.  
  456. end))
  457.  
  458. end
  459.  
  460. for _,c in pairs(Model2:children()) do
  461.  
  462. coroutine.resume(coroutine.create(function()
  463.  
  464. for i = 1, 10 do
  465.  
  466. c.Transparency = 1-(0.1*i)
  467.  
  468. wait()
  469.  
  470. end
  471.  
  472. end))
  473.  
  474. end
  475.  
  476. end
  477.  
  478. function staff()
  479.  
  480. for _,v in pairs(Model3:children()) do
  481.  
  482. coroutine.resume(coroutine.create(function()
  483.  
  484. for i = 1, 10 do
  485.  
  486. v.Transparency = 1-(0.1*i)
  487.  
  488. wait()
  489.  
  490. end
  491.  
  492. if v.Name == "Orb" then
  493.  
  494. v.Transparency = 0.5
  495.  
  496. end
  497.  
  498. end))
  499.  
  500. end
  501.  
  502. for _,v in pairs(Model5:children()) do
  503.  
  504. coroutine.resume(coroutine.create(function()
  505.  
  506. v.Transparency = 1
  507.  
  508. end))
  509.  
  510. end
  511.  
  512. for _,c in pairs(Model2:children()) do
  513.  
  514. coroutine.resume(coroutine.create(function()
  515.  
  516. c.Transparency = 1
  517.  
  518. end))
  519.  
  520. end
  521.  
  522. for _,c in pairs(Model6:children()) do
  523.  
  524. pcall(function()
  525.  
  526. c.Transparency = 1
  527.  
  528. c.Light.Enabled = false
  529.  
  530. end)
  531.  
  532. end
  533.  
  534. for _,v in pairs(Model7:children()) do
  535.  
  536. coroutine.resume(coroutine.create(function()
  537.  
  538. v.Transparency = 1
  539.  
  540. end))
  541.  
  542. end
  543.  
  544. for _,c in pairs(Model4:children()) do
  545.  
  546. pcall(function()
  547.  
  548. c.Transparency = 1
  549.  
  550. wait()
  551.  
  552. end)
  553.  
  554. end
  555.  
  556. end
  557.  
  558. function sword()
  559.  
  560. for _,v in pairs(Model4:children()) do
  561.  
  562. coroutine.resume(coroutine.create(function()
  563.  
  564. for i = 1, 10 do
  565.  
  566. v.Transparency = 1-(0.1*i)
  567.  
  568. wait()
  569.  
  570. end
  571.  
  572. end))
  573.  
  574. end
  575.  
  576. for _,c in pairs(Model2:children()) do
  577.  
  578. pcall(function()
  579.  
  580. c.Transparency = 1
  581.  
  582. end)
  583.  
  584. end
  585.  
  586. for _,v in pairs(Model5:children()) do
  587.  
  588. pcall(function()
  589.  
  590. v.Transparency = 1
  591.  
  592. end)
  593.  
  594. end
  595.  
  596. for _,c in pairs(Model6:children()) do
  597.  
  598. pcall(function()
  599.  
  600. c.Transparency = 1
  601.  
  602. c.Light.Enabled = false
  603.  
  604. end)
  605.  
  606. end
  607.  
  608. for _,v in pairs(Model7:children()) do
  609.  
  610. coroutine.resume(coroutine.create(function()
  611.  
  612. v.Transparency = 1
  613.  
  614. end))
  615.  
  616. end
  617.  
  618. for _,c in pairs(Model3:children()) do
  619.  
  620. pcall(function()
  621.  
  622. c.Transparency = 1
  623.  
  624. end)
  625.  
  626. end
  627.  
  628. end
  629.  
  630. function bow()
  631.  
  632. for _,v in pairs(Model5:children()) do
  633.  
  634. coroutine.resume(coroutine.create(function()
  635.  
  636. for i = 1, 10 do
  637.  
  638. v.Transparency = 1-(0.1*i)
  639.  
  640. wait()
  641.  
  642. end
  643.  
  644. end))
  645.  
  646. end
  647.  
  648. for _,c in pairs(Model2:children()) do
  649.  
  650. pcall(function()
  651.  
  652. c.Transparency = 1
  653.  
  654. end)
  655.  
  656. end
  657.  
  658. for _,c in pairs(Model6:children()) do
  659.  
  660. pcall(function()
  661.  
  662. c.Transparency = 1
  663.  
  664. c.Light.Enabled = false
  665.  
  666. end)
  667.  
  668. end
  669.  
  670. for _,v in pairs(Model7:children()) do
  671.  
  672. coroutine.resume(coroutine.create(function()
  673.  
  674. v.Transparency = 1
  675.  
  676. end))
  677.  
  678. end
  679.  
  680. for _,c in pairs(Model3:children()) do
  681.  
  682. pcall(function()
  683.  
  684. c.Transparency = 1
  685.  
  686. end)
  687.  
  688. end
  689.  
  690. for _,c in pairs(Model4:children()) do
  691.  
  692. pcall(function()
  693.  
  694. c.Transparency = 1
  695.  
  696. end)
  697.  
  698. end
  699.  
  700. end
  701.  
  702. function lamp()
  703.  
  704. for _,v in pairs(Model6:children()) do
  705.  
  706. coroutine.resume(coroutine.create(function()
  707.  
  708. for i = 1, 10 do
  709.  
  710. v.Transparency = 1-(0.1*i)
  711.  
  712. wait()
  713.  
  714. end
  715.  
  716. if v.Name == "Glass" then
  717.  
  718. v.Transparency = 0.5
  719.  
  720. v.Light.Enabled = true
  721.  
  722. end
  723.  
  724. end))
  725.  
  726. end
  727.  
  728. for _,v in pairs(Model7:children()) do
  729.  
  730. coroutine.resume(coroutine.create(function()
  731.  
  732. v.Transparency = 1
  733.  
  734. end))
  735.  
  736. end
  737.  
  738. for _,c in pairs(Model2:children()) do
  739.  
  740. pcall(function()
  741.  
  742. c.Transparency = 1
  743.  
  744. end)
  745.  
  746. end
  747.  
  748. for _,c in pairs(Model3:children()) do
  749.  
  750. pcall(function()
  751.  
  752. c.Transparency = 1
  753.  
  754. end)
  755.  
  756. end
  757.  
  758. for _,c in pairs(Model4:children()) do
  759.  
  760. pcall(function()
  761.  
  762. c.Transparency = 1
  763.  
  764. end)
  765.  
  766. end
  767.  
  768. for _,c in pairs(Model5:children()) do
  769.  
  770. pcall(function()
  771.  
  772. c.Transparency = 1
  773.  
  774. end)
  775.  
  776. end
  777.  
  778. end
  779.  
  780. function gun()
  781.  
  782. for _,v in pairs(Model7:children()) do
  783.  
  784. coroutine.resume(coroutine.create(function()
  785.  
  786. for i = 1, 10 do
  787.  
  788. v.Transparency = 1-(0.1*i)
  789.  
  790. wait()
  791.  
  792. end
  793.  
  794. end))
  795.  
  796. end
  797.  
  798. for _,v in pairs(Model6:children()) do
  799.  
  800. coroutine.resume(coroutine.create(function()
  801.  
  802. v.Transparency = 1
  803.  
  804. v.Light.Enabled = false
  805.  
  806. end))
  807.  
  808. end
  809.  
  810. for _,c in pairs(Model2:children()) do
  811.  
  812. pcall(function()
  813.  
  814. c.Transparency = 1
  815.  
  816. end)
  817.  
  818. end
  819.  
  820. for _,c in pairs(Model3:children()) do
  821.  
  822. pcall(function()
  823.  
  824. c.Transparency = 1
  825.  
  826. end)
  827.  
  828. end
  829.  
  830. for _,c in pairs(Model4:children()) do
  831.  
  832. pcall(function()
  833.  
  834. c.Transparency = 1
  835.  
  836. end)
  837.  
  838. end
  839.  
  840. for _,c in pairs(Model5:children()) do
  841.  
  842. pcall(function()
  843.  
  844. c.Transparency = 1
  845.  
  846. end)
  847.  
  848. end
  849.  
  850. end
  851.  
  852. coroutine.resume(coroutine.create(function()
  853.  
  854. while wait() do
  855.  
  856. pcall(function()
  857.  
  858. if mov ~= currmov then
  859.  
  860. currmov = mov
  861.  
  862. if mov == 1 then
  863.  
  864. pen()
  865.  
  866. elseif mov == 2 then
  867.  
  868. staff()
  869.  
  870. elseif mov == 3 then
  871.  
  872. sword()
  873.  
  874. elseif mov == 4 then
  875.  
  876. bow()
  877.  
  878. elseif mov == 5 then
  879.  
  880. lamp()
  881.  
  882. elseif mov == 6 then
  883.  
  884. gun()
  885.  
  886. end
  887.  
  888. end
  889.  
  890. end)
  891.  
  892. end
  893.  
  894. end))
  895.  
  896. function dmg(pos, mag, dmg)
  897.  
  898. for _,v in pairs(workspace:children()) do
  899.  
  900. pcall(function()
  901.  
  902. if (v.Torso.Position - pos).magnitude <= mag then
  903.  
  904. if v.Name ~= Me.Name then
  905.  
  906. v.Humanoid:TakeDamage(dmg)
  907.  
  908. end
  909.  
  910. end
  911.  
  912. end)
  913.  
  914. end
  915.  
  916. end
  917.  
  918. function shoot(targ)
  919.  
  920. sound(asset..sounds["Gun2"])
  921.  
  922. local ray = Instance.new("Part", workspace)
  923.  
  924. ray.Name = "Shot"
  925.  
  926. ray.BrickColor = BrickColor.new("New Yeller")
  927.  
  928. ray.formFactor = "Custom"
  929.  
  930. ray.Size = Vector3.new(0.2, 0.2, (targ - han2z.Position).magnitude)
  931.  
  932. ray.CanCollide = false
  933.  
  934. ray.Anchored = true
  935.  
  936. local cf = han2z.CFrame * CFrame.new(0, -0.5, 0)
  937.  
  938. ray.CFrame = CFrame.new((cf.p + targ) / 2, targ)
  939.  
  940. local raym = Instance.new("BlockMesh", ray)
  941.  
  942. raym.Scale = Vector3.new(0.5, 0.5, 1)
  943.  
  944. dmg(targ, 1, math.random(5,15))
  945.  
  946. coroutine.resume(coroutine.create(function()
  947.  
  948. wait(0.15)
  949.  
  950. ray:remove()
  951.  
  952. end))
  953.  
  954. end
  955.  
  956. function arrow(targ)
  957.  
  958. sound(asset..sounds["Bow"])
  959.  
  960. local ray = Instance.new("Part", workspace)
  961.  
  962. ray.Name = "Shot"
  963.  
  964. ray.BrickColor = BrickColor.new("White")
  965.  
  966. ray.formFactor = "Custom"
  967.  
  968. ray.Transparency = 0.5
  969.  
  970. ray.Size = Vector3.new(0.2, 0.2, (targ - Rarm.Position).magnitude)
  971.  
  972. ray.CanCollide = false
  973.  
  974. ray.Anchored = true
  975.  
  976. local cf = Rarm.CFrame * CFrame.new(0, -0.5, 0)
  977.  
  978. ray.CFrame = CFrame.new((cf.p + targ) / 2, targ)
  979.  
  980. local raym = Instance.new("BlockMesh", ray)
  981.  
  982. raym.Scale = Vector3.new(0.5, 0.5, 1)
  983.  
  984. dmg(targ, 1, math.random(7, 21))
  985.  
  986. coroutine.resume(coroutine.create(function()
  987.  
  988. wait(0.15)
  989.  
  990. ray:remove()
  991.  
  992. end))
  993.  
  994. end
  995.  
  996. function orb(pos)
  997.  
  998. sound(asset..sounds["Ele"])
  999.  
  1000. coroutine.resume(coroutine.create(function()
  1001.  
  1002. local ball = Instance.new("Part", workspace)
  1003.  
  1004. ball.formFactor = "Custom"
  1005.  
  1006. ball.BrickColor = BrickColor.new("Really red")
  1007.  
  1008. ball.Size = Vector3.new(1.5,1.5,1.5)
  1009.  
  1010. ball.Name = "Spell"
  1011.  
  1012. ball.CanCollide = true
  1013.  
  1014. ball.CFrame = Model3.Orb.CFrame
  1015.  
  1016. ball:BreakJoints()
  1017.  
  1018. local ballp = Instance.new("BodyPosition", ball)
  1019.  
  1020. ballp.position = pos
  1021.  
  1022. ballp.maxForce = Vector3.new(1000, 50000, 1000)
  1023.  
  1024. local ballm = Instance.new("SpecialMesh", ball)
  1025.  
  1026. ballm.MeshType = "Sphere"
  1027.  
  1028. ball.Touched:connect(function(hit)
  1029.  
  1030. if hit.Parent.Name ~= Me.Name and hit.Name ~= "Spell" and hit.Name ~= "Base" and hit.Parent.Name ~= Model2.Name and hit.Parent.Name ~= Model3.Name and hit.Parent.Name ~= Model4.Name and hit.Parent.Name ~= Model5.Name and hit.Parent.Name ~= Model6.Name and hit.Parent.Name ~= Model7.Name then
  1031.  
  1032. ball.Anchored = true
  1033.  
  1034. for i = 1, 10 do
  1035.  
  1036. ball.Transparency = 0.025*i
  1037.  
  1038. dmg(ball.Position, i, 0.5)
  1039.  
  1040. ballm.Scale = ballm.Scale + Vector3.new(0.5, 0.5, 0.5)
  1041.  
  1042. wait()
  1043.  
  1044. end
  1045.  
  1046. ball:remove()
  1047.  
  1048. end
  1049.  
  1050. end)
  1051.  
  1052. coroutine.resume(coroutine.create(function()
  1053.  
  1054. wait(2.5)
  1055.  
  1056. ball.Anchored = true
  1057.  
  1058. for i = 1, 10 do
  1059.  
  1060. dmg(ball.Position, i, math.random(2,6))
  1061.  
  1062. ball.Transparency = 0.025*i
  1063.  
  1064. ballm.Scale = ballm.Scale + Vector3.new(0.5, 0.5, 0.5)
  1065.  
  1066. wait()
  1067.  
  1068. end
  1069.  
  1070. ball:remove()
  1071.  
  1072. end))
  1073.  
  1074. while wait() do
  1075.  
  1076. if ball.Position == ballp.position then
  1077.  
  1078. ball.Anchored = true
  1079.  
  1080. for i = 1, 10 do
  1081.  
  1082. dmg(ball.Position, i, math.random(2,6))
  1083.  
  1084. ball.Transparency = 0.025*i
  1085.  
  1086. ballm.Scale = ballm.Scale + Vector3.new(0.5, 0.5, 0.5)
  1087.  
  1088. wait()
  1089.  
  1090. end
  1091.  
  1092. ball:remove()
  1093.  
  1094. break
  1095.  
  1096. end
  1097.  
  1098. end
  1099.  
  1100. end))
  1101.  
  1102. end
  1103.  
  1104. function slash()
  1105.  
  1106. local a = math.random(0, 45)
  1107.  
  1108. for i = 0, 1, 0.2 do
  1109.  
  1110. RAW.C0 = CFrame.new() * CFrame.Angles(math.rad(90+45*i),math.rad(a*i),0)
  1111.  
  1112. wait()
  1113.  
  1114. end
  1115.  
  1116. sound(sounds["Slash"])
  1117.  
  1118. for i = 0, 1, 0.1 do
  1119.  
  1120. RAW.C0 = CFrame.new() * CFrame.Angles(math.rad(135-135*i),math.rad(a+0*i),0)
  1121.  
  1122. wait()
  1123.  
  1124. end
  1125.  
  1126. dmg(Model4.Blade.Position, 3, math.random(10, 25))
  1127.  
  1128. for i = 0, 1, 0.1 do
  1129.  
  1130. RAW.C0 = CFrame.new() * CFrame.Angles(math.rad(0+90*i),math.rad(a-a*i),0)
  1131.  
  1132. wait()
  1133.  
  1134. end
  1135.  
  1136. end
  1137.  
  1138. if script.Parent.className ~= "HopperBin" then
  1139.  
  1140. local h = Instance.new("HopperBin", Me.Backpack)
  1141.  
  1142. h.Name = "Pen"
  1143.  
  1144. script.Parent = h
  1145.  
  1146. end
  1147.  
  1148. local bin = script.Parent
  1149.  
  1150. function onSelected(mouse)
  1151.  
  1152. RAW.Part1 = Rarm
  1153.  
  1154. for i = 0, 1, 0.1 do
  1155.  
  1156. RAW.C0 = CFrame.new(0,0,0) * CFrame.Angles(math.rad(90*i),0,0)
  1157.  
  1158. wait()
  1159.  
  1160. end
  1161.  
  1162. mouse.Button1Down:connect(function()
  1163.  
  1164. if mov == 1 then
  1165.  
  1166. sound(asset..sounds["Click"])
  1167.  
  1168. if peno == true then
  1169.  
  1170. peno = false
  1171.  
  1172. ledw.C0 = CFrame.new(0,0.25,0)
  1173.  
  1174. else
  1175.  
  1176. peno = true
  1177.  
  1178. ledw.C0 = CFrame.new(0,0,0)
  1179.  
  1180. end
  1181.  
  1182. elseif mov == 2 then
  1183.  
  1184. orb(mouse.hit.p)
  1185.  
  1186. elseif mov == 3 then
  1187.  
  1188. slash()
  1189.  
  1190. elseif mov == 4 then
  1191.  
  1192. arrow(mouse.hit.p)
  1193.  
  1194. elseif mov == 6 then
  1195.  
  1196. shoot(mouse.hit.p)
  1197.  
  1198. end
  1199.  
  1200. end)
  1201.  
  1202. mouse.KeyDown:connect(function(key)
  1203.  
  1204. if key == "e" then
  1205.  
  1206. if mov == nummovs then
  1207.  
  1208. mov = 1
  1209.  
  1210. else
  1211.  
  1212. mov = mov + 1
  1213.  
  1214. end
  1215.  
  1216. elseif key == "q" then
  1217.  
  1218. if mov == 1 then
  1219.  
  1220. mov = nummovs
  1221.  
  1222. else
  1223.  
  1224. mov = mov - 1
  1225.  
  1226. end
  1227.  
  1228. end
  1229.  
  1230. end)
  1231.  
  1232. mouse.KeyUp:connect(function(key)
  1233.  
  1234. end)
  1235.  
  1236. end
  1237.  
  1238. function onDesel(mouse)
  1239.  
  1240. for i = 0, 1, 0.1 do
  1241.  
  1242. RAW.C0 = CFrame.new() * CFrame.Angles(math.rad(90-90*i),0,0)
  1243.  
  1244. wait()
  1245.  
  1246. end
  1247.  
  1248. RAW.Part1 = nil
  1249.  
  1250. end
  1251.  
  1252. bin.Selected:connect(onSelected)
  1253.  
  1254. bin.Deselected:connect(onDesel)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement