Advertisement
Script4Roblox

Pen

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