Advertisement
Animescapetower

SWORDAA

Mar 30th, 2018
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.08 KB | None | 0 0
  1.  
  2. --Converted with ttyyuu12345's model to script plugin v4
  3. function sandbox(var,func)
  4. local env = getfenv(func)
  5. local newenv = setmetatable({},{
  6. __index = function(self,k)
  7. if k=="script" then
  8. return var
  9. else
  10. return env[k]
  11. end
  12. end,
  13. })
  14. setfenv(func,newenv)
  15. return func
  16. end
  17. cors = {}
  18. mas = Instance.new("Model",game:GetService("Lighting"))
  19. Tool0 = Instance.new("Tool")
  20. Part1 = Instance.new("Part")
  21. SpecialMesh2 = Instance.new("SpecialMesh")
  22. Sound3 = Instance.new("Sound")
  23. Sparkles4 = Instance.new("Sparkles")
  24. Sound5 = Instance.new("Sound")
  25. Sparkles6 = Instance.new("Sparkles")
  26. Sound7 = Instance.new("Sound")
  27. Sound8 = Instance.new("Sound")
  28. Sound9 = Instance.new("Sound")
  29. PointLight10 = Instance.new("PointLight")
  30. Animation11 = Instance.new("Animation")
  31. Animation12 = Instance.new("Animation")
  32. Animation13 = Instance.new("Animation")
  33. Animation14 = Instance.new("Animation")
  34. Script15 = Instance.new("Script")
  35. RemoteEvent16 = Instance.new("RemoteEvent")
  36. LocalScript17 = Instance.new("LocalScript")
  37. Tool0.Name = "Midnight Sword"
  38. Tool0.Parent = mas
  39. Tool0.TextureId = "http://www.roblox.com/asset/?id=159721549"
  40. Tool0.GripForward = Vector3.new(-0.0220167451, -0.998353601, -0.0529657044)
  41. Tool0.GripPos = Vector3.new(0, -0.5, 1)
  42. Tool0.GripRight = Vector3.new(0.999757648, -0.0219858252, -0.00116641517)
  43. Tool0.GripUp = Vector3.new(-0, 0.0529785454, -0.998595655)
  44. Tool0.ToolTip = "Midnight Sword"
  45. Part1.Name = "Handle"
  46. Part1.Parent = Tool0
  47. Part1.Material = Enum.Material.Metal
  48. Part1.BrickColor = BrickColor.new("Dark stone grey")
  49. Part1.Reflectance = 0.40000000596046
  50. Part1.Rotation = Vector3.new(85.9899979, -0.0700000003, 1.25999999)
  51. Part1.CanCollide = false
  52. Part1.Locked = true
  53. Part1.FormFactor = Enum.FormFactor.Custom
  54. Part1.Size = Vector3.new(0.350000024, 1.79999995, 3.98999977)
  55. Part1.CFrame = CFrame.new(1.49017406, 4.50711441, -1.07097614, 0.999757648, -0.0219858252, -0.00116641517, 0.000372388487, 0.0698570013, -0.997556925, 0.0220135953, 0.997314692, 0.0698482543)
  56. Part1.BottomSurface = Enum.SurfaceType.Smooth
  57. Part1.TopSurface = Enum.SurfaceType.Smooth
  58. Part1.Color = Color3.new(0.388235, 0.372549, 0.384314)
  59. Part1.Position = Vector3.new(1.49017406, 4.50711441, -1.07097614)
  60. Part1.Orientation = Vector3.new(85.9899979, -0.959999979, 0.310000002)
  61. Part1.Color = Color3.new(0.388235, 0.372549, 0.384314)
  62. SpecialMesh2.Parent = Part1
  63. SpecialMesh2.MeshId = "http://www.roblox.com/asset/?id=159721498 "
  64. SpecialMesh2.Scale = Vector3.new(2, 2, 2)
  65. SpecialMesh2.TextureId = "http://www.roblox.com/asset/?id=159721532 "
  66. SpecialMesh2.MeshType = Enum.MeshType.FileMesh
  67. SpecialMesh2.Scale = Vector3.new(2, 2, 2)
  68. Sound3.Name = "Slash"
  69. Sound3.Parent = Part1
  70. Sound3.Pitch = 0.85000002384186
  71. Sound3.SoundId = "http://www.roblox.com/asset/?id=45885030"
  72. Sound3.Volume = 0.25
  73. Sparkles4.Parent = Part1
  74. Sparkles4.Color = Color3.new(0.361111, 6.4, 1)
  75. Sparkles4.Enabled = false
  76. Sparkles4.SparkleColor = Color3.new(0.203922, 0.627451, 1)
  77. Sparkles4.Color = Color3.new(0.361111, 6.4, 1)
  78. Sound5.Name = "Lightning"
  79. Sound5.Parent = Part1
  80. Sound5.SoundId = "http://www.roblox.com/asset/?id=131300621"
  81. Sound5.Volume = 1
  82. Sparkles6.Name = "Charged"
  83. Sparkles6.Parent = Part1
  84. Sparkles6.Color = Color3.new(1.77083, 9.88, 0)
  85. Sparkles6.Enabled = false
  86. Sparkles6.SparkleColor = Color3.new(1, 0.968628, 0)
  87. Sparkles6.Color = Color3.new(1.77083, 9.88, 0)
  88. Sound7.Name = "Charging"
  89. Sound7.Parent = Part1
  90. Sound7.Pitch = 0.5
  91. Sound7.SoundId = "http://www.roblox.com/asset/?id=75421988"
  92. Sound7.Volume = 1
  93. Sound7.Looped = true
  94. Sound8.Name = "ChargeReady"
  95. Sound8.Parent = Part1
  96. Sound8.Pitch = 1.2000000476837
  97. Sound8.SoundId = "http://www.roblox.com/asset/?id=127416781"
  98. Sound8.Volume = 1
  99. Sound9.Name = "Equip"
  100. Sound9.Parent = Part1
  101. Sound9.Pitch = 1.0049999952316
  102. Sound9.SoundId = "http://www.roblox.com/asset/?id=12222225"
  103. Sound9.Volume = 0.25
  104. PointLight10.Parent = Part1
  105. PointLight10.Color = Color3.new(0.917647, 1, 0)
  106. PointLight10.Enabled = false
  107. PointLight10.Brightness = 10
  108. PointLight10.Color = Color3.new(0.917647, 1, 0)
  109. Animation11.Name = "Charge"
  110. Animation11.Parent = Tool0
  111. Animation11.AnimationId = "http://www.roblox.com/Asset?ID=74909500"
  112. Animation12.Name = "Equip"
  113. Animation12.Parent = Tool0
  114. Animation12.AnimationId = "http://www.roblox.com/Asset?ID=94160581"
  115. Animation13.Name = "LeftSlash"
  116. Animation13.Parent = Tool0
  117. Animation13.AnimationId = "http://www.roblox.com/Asset?ID=74894663"
  118. Animation14.Name = "RightSlash"
  119. Animation14.Parent = Tool0
  120. Animation14.AnimationId = "http://www.roblox.com/Asset?ID=74813494"
  121. Script15.Parent = Tool0
  122. table.insert(cors,sandbox(Script15,function()
  123. --[[ alexnewtron 2014 ]]--
  124. script.Parent:WaitForChild("Handle");
  125. local gearConfig = {
  126. gear = script.Parent,
  127. equipped = false,
  128. check = true,
  129. gearTitle = "ToD-11571622",
  130. slashAnim = nil,
  131. slashSound = script.Parent.Handle:WaitForChild("Slash"),
  132. thunderSound = script.Parent.Handle:WaitForChild("Lightning"),
  133. chargeSound = script.Parent.Handle:WaitForChild("Charging"),
  134. completedSound = script.Parent.Handle:WaitForChild("ChargeReady"),
  135. debris = game:GetService("Debris"),
  136. isCharging = false,
  137. isSwinging = false,
  138. chargingAnim = false,
  139. allowCharge = true,
  140. fullyCharged = false,
  141. good = false,
  142. attackDeb = true,
  143. animSpeed = 1,
  144. mesh = script.Parent.Handle:WaitForChild("Mesh"),
  145. sparkles = script.Parent.Handle:WaitForChild("Sparkles"),
  146. chargedSparkles = script.Parent.Handle:WaitForChild("Charged"),
  147. equipAnim = script.Parent:WaitForChild("Equip"),
  148. equipSound = script.Parent.Handle:WaitForChild("Equip"),
  149. light = script.Parent.Handle:WaitForChild("PointLight"),
  150. knownHuman = nil,
  151. pCamera = workspace.CurrentCamera,
  152. pFoV = 70,
  153. deb = 0.5,
  154. battleDeb = 0.5,
  155. TimeOfDay = nil,
  156. time = {},
  157. anims = {
  158. script.Parent:WaitForChild("LeftSlash"),
  159. script.Parent:WaitForChild("RightSlash")
  160. },
  161. chargeAnim = nil,
  162. readyAnims = {},
  163. damage = 10,
  164. tween = require(script:WaitForChild("b")),
  165. easing = require(script:WaitForChild("e")),
  166. player = nil,
  167. };
  168.  
  169. gearConfig.gear.Unequipped:connect(function()
  170. gearConfig.equipped = false;
  171. gearConfig.isCharging = false;
  172. gearConfig.fullyCharged = false;
  173. gearConfig.pCamera.FieldOfView = gearConfig.pFoV;
  174. gearConfig.light.Enabled = false;
  175. gearConfig.chargedSparkles.Enabled = false;
  176. gearConfig.deb = 0.5;
  177. gearConfig.battleDeb = 0.5;
  178. gearConfig.damage = 10;
  179. gearConfig.sparkles.Enabled = false;
  180. gearConfig.chargeSound:Stop();
  181. gearConfig.equipSound:Stop();
  182. if (gearConfig.chargeAnim ~= nil) then
  183. gearConfig.chargeAnim:Stop();
  184. end
  185. gearConfig.slashSound.Pitch = 0.85;
  186. gearConfig.damage = 10;
  187. if (gearConfig.knownHuman ~= nil) then
  188. gearConfig.knownHuman.WalkSpeed = 16;
  189. end
  190. if (gearConfig.good) then
  191. game.Lighting.TimeOfDay = gearConfig.originalToD;
  192. gearConfig.good = false;
  193. end
  194. end);
  195.  
  196. gearConfig.mesh.VertexColor = Vector3.new(1,1,1);
  197. gearConfig.chargedSparkles.Enabled = false;
  198. gearConfig.sparkles.Enabled = false;
  199.  
  200. if (game.Lighting:findFirstChild(gearConfig.gearTitle)) then
  201. gearConfig.originalToD = game.Lighting[gearConfig.gearTitle].Value;
  202. else
  203. local t = Instance.new("StringValue");
  204. t.Name = gearConfig.gearTitle;
  205. t.Value = game.Lighting.TimeOfDay;
  206. t.Parent = game.Lighting;
  207. gearConfig.originalToD = t.Value;
  208. end
  209.  
  210. script.Parent.Handle.Touched:connect(function(hit)
  211. if hit.Parent~=gearConfig.player.Character and hit.Name~="Handle" and hit.Name~="Effect" and gearConfig.isSwinging and gearConfig.attackDeb then
  212. local h=hit.Parent:FindFirstChild("Humanoid");
  213. local t=hit.Parent:FindFirstChild("Torso");
  214. if h~=nil and t~=nil and h.Health>0 then
  215. gearConfig.attackDeb = false;
  216. for i,v in ipairs(h:GetChildren()) do
  217. if v.Name=="creator" then
  218. v:remove();
  219. end
  220. end
  221. local c = Instance.new("ObjectValue", h);
  222. c.Name = "creator";
  223. c.Value = gearConfig.player;
  224. h:TakeDamage(gearConfig.damage);
  225. wait(gearConfig.battleDeb);
  226. gearConfig.attackDeb = true;
  227. end
  228. end
  229. end);
  230.  
  231. local inputcon
  232. gearConfig.gear.Equipped:connect(function()
  233. if inputcon then inputcon:disconnect() inputcon = nil end
  234. gearConfig.player = game:GetService'Players':GetPlayerFromCharacter(gearConfig.gear.Parent)
  235. if not gearConfig.player then return end
  236. gearConfig.equipped = true;
  237. gearConfig.isCharging = false;
  238. gearConfig.fullyCharged = false;
  239. gearConfig.pCamera.FieldOfView = gearConfig.pFoV;
  240. gearConfig.mesh.VertexColor = Vector3.new(1,1,1);
  241. local human=script.Parent.Parent:findFirstChild("Humanoid");
  242. gearConfig.knownHuman = human;
  243. local eq = human:LoadAnimation(gearConfig.equipAnim);
  244. for i=1, #gearConfig.anims do
  245. table.insert(gearConfig.readyAnims, human:LoadAnimation(gearConfig.anims[i]));
  246. end
  247. gearConfig.chargeAnim = human:LoadAnimation(script.Parent:WaitForChild("Charge"));
  248. eq:Play();
  249. gearConfig.equipSound:Play();
  250.  
  251. inputcon = script.Parent.Input.OnServerEvent:connect(function(client, input, ...) print(gearConfig.player, client, input, ...)
  252. if client == gearConfig.player then
  253. if input == 'Mouse1Down' then
  254. if (gearConfig.check and human.Health > 0 and gearConfig.allowCharge and not gearConfig.isCharging) then
  255. gearConfig.isCharging = true;
  256. wait(0.5);
  257. if gearConfig.isCharging then
  258. gearConfig.chargeAnim:Play();
  259. gearConfig.chargeSound.Pitch = 1;
  260. gearConfig.chargeSound:Play();
  261. gearConfig.chargingAnim = true;
  262. Spawn(function()
  263. local ts = gearConfig.tween("forward");
  264. ts.add(2, {x = gearConfig.pFoV, y = 1, z = 16, n = 1}, gearConfig.easing.inOutQuad); ts.add(2, {x = 55, y = 0.5, z = 0, n = 0.2}, gearConfig.easing.inOutQuad);
  265. for x=1, 200 do
  266. local p = ts.getCurrentProperties();
  267. gearConfig.pCamera.FieldOfView = p.x;
  268. gearConfig.mesh.VertexColor = Vector3.new(p.n, p.n, p.n);
  269. gearConfig.chargeSound.Pitch = p.y;
  270. human.WalkSpeed = p.z;
  271. ts.update(0.025); wait(0.025);
  272. if not gearConfig.isCharging then gearConfig.pCamera.FieldOfView = gearConfig.pFoV; break; end
  273. if human.Health <= 0 then gearConfig.pCamera.FieldOfView = gearConfig.pFoV; gearConfig.isCharging = false; end
  274. if (p.x <= 55) then gearConfig.fullyCharged = true; gearConfig.sparkles.Enabled = true; gearConfig.completedSound:Play(); break; end
  275. end
  276. end);
  277. end
  278. end
  279. elseif input == 'Mouse1Up' then
  280. if (gearConfig.check and human.Health > 0) then
  281. human.WalkSpeed = 16;
  282. if gearConfig.fullyCharged then
  283.  
  284. local lightning = Instance.new("Part");
  285. lightning.Transparency = 1;
  286. lightning.Size = Vector3.new(4,0.2,4);
  287. lightning.BrickColor = BrickColor.new("New Yeller");
  288. lightning.Position = script.Parent.Parent:findFirstChild("Head").Position + Vector3.new(0,25,0);
  289. lightning.Anchored = true;
  290.  
  291. gearConfig.debris:AddItem(ll, 15);
  292.  
  293. local m = Instance.new("CylinderMesh", lightning);
  294. m.Scale = Vector3.new(1,500,1);
  295.  
  296. gearConfig.debris:AddItem(lightning, 10);
  297. lightning.Parent = script.Parent.Parent;
  298.  
  299. gearConfig.thunderSound:Play();
  300.  
  301. Spawn(function()
  302. local ts = gearConfig.tween("forward");
  303. ts.add(1, {x = 0.1, y = 0}, gearConfig.easing.inOutQuad); ts.add(1, {x = 10, y = 1}, gearConfig.easing.outBack);
  304. for x=1, 200 do
  305. local p = ts.getCurrentProperties();
  306. lightning.Size = Vector3.new(p.x,0.2,p.x);
  307. lightning.Transparency = p.y;
  308. if (script.Parent.Parent:findFirstChild("Head")) then
  309. lightning.Position = script.Parent.Parent:findFirstChild("Head").Position + Vector3.new(0,25,0);
  310. end
  311. ts.update(0.025); wait(0.025);
  312. if (p.x >= 10) then break; end
  313. end
  314. lightning:Destroy();
  315. end);
  316.  
  317. Spawn(function()gearConfig.TimeOfDay=game.Lighting.TimeOfDay;for a in string.gmatch(game.Lighting.TimeOfDay,"%d+")do gearConfig.time[#gearConfig.time+1]=a end;local b=gearConfig.time[1]local c=gearConfig.time[2]local d=0;local e=0;local f=d-b/10;local g=e-c/10;for h=1,10 do b=b+f;c=c+g;if b>0 then game.Lighting.TimeOfDay=b..":"..c..":".."00"end;wait(0.1)end end)
  318.  
  319. gearConfig.chargeAnim:Stop();
  320. gearConfig.mesh.VertexColor = Vector3.new(1,1,0.5);
  321. gearConfig.chargedSparkles.Enabled = true;
  322. gearConfig.sparkles.Enabled = false;
  323. gearConfig.deb = 0.01;
  324. gearConfig.battleDeb = 0.01;
  325. gearConfig.animSpeed = 2;
  326. gearConfig.slashSound.Pitch = 1;
  327. gearConfig.allowCharge = false;
  328. gearConfig.fullyCharged = false;
  329. gearConfig.damage = 40;
  330. gearConfig.good = true;
  331. gearConfig.light.Enabled = true;
  332. local moon = nil;
  333.  
  334. if (script.Parent.Parent:findFirstChild("Head")) then
  335. moon = Instance.new("BillboardGui");
  336. moon.Size = UDim2.new(10,0,10,0);
  337. moon.StudsOffset = Vector3.new(0,8,0);
  338. local m1 = Instance.new("ImageLabel", moon);
  339. m1.Name = "moon";
  340. m1.Image = "rbxassetid://160011283";
  341. m1.Size = UDim2.new(1,0,1,0);
  342. m1.BackgroundTransparency = 1;
  343. moon.Parent = script.Parent.Parent;
  344. moon.Adornee = script.Parent.Parent:findFirstChild("Head");
  345. end
  346.  
  347. Spawn(function()local a=gearConfig.tween("forward")a.add(3,{x=gearConfig.pFoV,y=human.WalkSpeed},gearConfig.easing.inOutQuad)a.add(3,{x=120,y=human.WalkSpeed+15},gearConfig.easing.inOutQuad)for x=1,200 do local b=a.getCurrentProperties()gearConfig.pCamera.FieldOfView=b.x;human.WalkSpeed=b.y;a.update(0.025)wait(0.025)if b.x>=120 then break end end end)
  348. gearConfig.chargeSound:Stop();
  349. local t = 0;
  350. repeat wait(1) t = t + 1; until t >= 10 or human.Health <= 0 or gearConfig.equipped == false
  351. gearConfig.damage = 10;
  352. gearConfig.mesh.VertexColor = Vector3.new(1,1,1);
  353. gearConfig.chargedSparkles.Enabled = false;
  354. gearConfig.deb = 0.5;
  355. gearConfig.battleDeb = 0.5;
  356. gearConfig.animSpeed = 1;
  357. gearConfig.good = false;
  358. gearConfig.slashSound.Pitch = 0.85;
  359. gearConfig.allowCharge = true;
  360. gearConfig.fullyCharged = false;
  361. gearConfig.check = false;
  362. gearConfig.light.Enabled = false;
  363. game.Lighting.TimeOfDay = gearConfig.originalToD;
  364. if moon~=nil then Spawn(function()for a=1,50 do moon["moon"].ImageTransparency=moon["moon"].ImageTransparency+0.05;wait(0.05)if moon["moon"].ImageTransparency>=1 then break end end;moon:Destroy()end)end
  365. Spawn(function()local a=gearConfig.tween("forward")a.add(2,{x=120,y=human.WalkSpeed},gearConfig.easing.inOutQuad)a.add(2,{x=70,y=16},gearConfig.easing.inOutQuad)for x=1,200 do local b=a.getCurrentProperties()gearConfig.pCamera.FieldOfView=b.x;human.WalkSpeed=b.y;a.update(0.025)wait(0.025)if b.x<=gearConfig.pFoV then gearConfig.check=true;break end end end)
  366. else
  367. gearConfig.sparkles.Enabled = false;
  368. if (gearConfig.allowCharge) then
  369. gearConfig.mesh.VertexColor = Vector3.new(1,1,1);
  370. end
  371. gearConfig.slashAnim = gearConfig.readyAnims[math.random(1, #gearConfig.readyAnims)];
  372. gearConfig.check = false;
  373. gearConfig.isCharging = false;
  374. gearConfig.slashAnim:Play();
  375. gearConfig.slashAnim:AdjustSpeed(gearConfig.animSpeed);
  376. gearConfig.slashSound:Play();
  377. gearConfig.chargeSound:Stop();
  378. gearConfig.chargeAnim:Stop();
  379. gearConfig.isSwinging = true;
  380. end
  381. wait(gearConfig.deb);
  382. gearConfig.check = true;
  383. gearConfig.isSwinging = false;
  384. end
  385. end
  386. end
  387. end)
  388. end);
  389.  
  390. gearConfig.gear.Unequipped:connect(function()
  391. if inputcon then inputcon:disconnect() inputcon = nil end
  392. end)
  393. end))
  394. RemoteEvent16.Name = "Input"
  395. RemoteEvent16.Parent = Tool0
  396. LocalScript17.Parent = Tool0
  397. table.insert(cors,sandbox(LocalScript17,function()
  398. script.Parent.Equipped:connect(function(mouse)
  399. mouse.Button1Down:connect(function()
  400. script.Parent.Input:FireServer('Mouse1Down')
  401. end)
  402. mouse.Button1Up:connect(function()
  403. script.Parent.Input:FireServer('Mouse1Up')
  404. end)
  405. end)
  406. end))
  407. for i,v in pairs(mas:GetChildren()) do
  408. v.Parent = game:GetService("Players").LocalPlayer.Backpack
  409. pcall(function() v:MakeJoints() end)
  410. end
  411. mas:Destroy()
  412. for i,v in pairs(cors) do
  413. spawn(function()
  414. pcall(v)
  415. end)
  416. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement