Advertisement
ERROR_CODE

Untitled

Nov 22nd, 2023
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.38 KB | None | 0 0
  1. --Converted with ttyyuu12345's model to script plugin v4
  2. function sandbox(var,func)
  3. local env = getfenv(func)
  4. local newenv = setmetatable({},{
  5. __index = function(self,k)
  6. if k=="script" then
  7. return var
  8. else
  9. return env[k]
  10. end
  11. end,
  12. })
  13. setfenv(func,newenv)
  14. return func
  15. end
  16. cors = {}
  17. mas = Instance.new("Model",game:GetService("Lighting"))
  18. Tool0 = Instance.new("Tool")
  19. Folder1 = Instance.new("Folder")
  20. Folder2 = Instance.new("Folder")
  21. Animation3 = Instance.new("Animation")
  22. Animation4 = Instance.new("Animation")
  23. Animation5 = Instance.new("Animation")
  24. Folder6 = Instance.new("Folder")
  25. Animation7 = Instance.new("Animation")
  26. Animation8 = Instance.new("Animation")
  27. Animation9 = Instance.new("Animation")
  28. Folder10 = Instance.new("Folder")
  29. RemoteFunction11 = Instance.new("RemoteFunction")
  30. RemoteFunction12 = Instance.new("RemoteFunction")
  31. Script13 = Instance.new("Script")
  32. Script14 = Instance.new("Script")
  33. Vector3Value15 = Instance.new("Vector3Value")
  34. Vector3Value16 = Instance.new("Vector3Value")
  35. ParticleEmitter17 = Instance.new("ParticleEmitter")
  36. LocalScript18 = Instance.new("LocalScript")
  37. LocalScript19 = Instance.new("LocalScript")
  38. UnionOperation20 = Instance.new("UnionOperation")
  39. Sound21 = Instance.new("Sound")
  40. Sound22 = Instance.new("Sound")
  41. Sound23 = Instance.new("Sound")
  42. Tool0.Name = "scythe"
  43. Tool0.Parent = game.Players.LocalPlayer.Backpack
  44. Tool0.Grip = CFrame.new(1.87299991, -0.0239256583, 0.853458941, -0.0171679258, -0.889447689, -0.456714541, 0.999802232, -0.010684371, -0.0167748928, 0.0100407004, -0.45691219, 0.88945514)
  45. Tool0.GripForward = Vector3.new(0.456714541, 0.0167748928, -0.88945514)
  46. Tool0.GripPos = Vector3.new(1.87299991, -0.0239256583, 0.853458941)
  47. Tool0.GripRight = Vector3.new(-0.0171679258, 0.999802232, 0.0100407004)
  48. Tool0.GripUp = Vector3.new(-0.889447689, -0.010684371, -0.45691219)
  49. Folder1.Name = "Animations"
  50. Folder1.Parent = Tool0
  51. Folder2.Name = "R15"
  52. Folder2.Parent = Folder1
  53. Animation3.Name = "LeftSlash"
  54. Animation3.Parent = Folder2
  55. Animation3.AnimationId = "rbxassetid://567480700"
  56. Animation4.Name = "RightSlash"
  57. Animation4.Parent = Folder2
  58. Animation4.AnimationId = "rbxassetid://567480369"
  59. Animation5.Name = "SideSwipe"
  60. Animation5.Parent = Folder2
  61. Animation5.AnimationId = "rbxassetid://567479941"
  62. Folder6.Name = "R6"
  63. Folder6.Parent = Folder1
  64. Animation7.Name = "LeftSlash"
  65. Animation7.Parent = Folder6
  66. Animation7.AnimationId = "http://www.roblox.com/asset/?id=74894663"
  67. Animation8.Name = "RightSlash"
  68. Animation8.Parent = Folder6
  69. Animation8.AnimationId = "http://www.roblox.com/asset/?id=74813494"
  70. Animation9.Name = "SideSwipe"
  71. Animation9.Parent = Folder6
  72. Animation9.AnimationId = "http://www.roblox.com/asset/?id=186934658"
  73. Folder10.Name = "Remotes"
  74. Folder10.Parent = Tool0
  75. RemoteFunction11.Name = "ServerControl"
  76. RemoteFunction11.Parent = Folder10
  77. RemoteFunction12.Name = "ClientControl"
  78. RemoteFunction12.Parent = Folder10
  79. Script13.Parent = Tool0
  80. table.insert(cors,sandbox(Script13,function()
  81. --Made by Luckymaxer
  82.  
  83. Tool = script.Parent
  84. Handle = Tool:WaitForChild("Handle")
  85.  
  86. Players = game:GetService("Players")
  87. Debris = game:GetService("Debris")
  88. RunService = game:GetService("RunService")
  89.  
  90. RbxUtility = LoadLibrary("RbxUtility")
  91. Create = RbxUtility.Create
  92.  
  93. DamageValues = {
  94. BaseDamage = 0,
  95. SlashDamage = 30,
  96. }
  97.  
  98. Damage = DamageValues.BaseDamage
  99.  
  100. BaseUrl = "http://www.roblox.com/asset/?id="
  101.  
  102. BasePart = Instance.new("Part")
  103. BasePart.Shape = Enum.PartType.Block
  104. BasePart.Material = Enum.Material.Plastic
  105. BasePart.TopSurface = Enum.SurfaceType.Smooth
  106. BasePart.BottomSurface = Enum.SurfaceType.Smooth
  107. BasePart.FormFactor = Enum.FormFactor.Custom
  108. BasePart.Size = Vector3.new(0.2, 0.2, 0.2)
  109. BasePart.CanCollide = true
  110. BasePart.Locked = true
  111. BasePart.Anchored = false
  112.  
  113. Rate = (1 / 60)
  114.  
  115. AnimationsBin = Tool:WaitForChild("Animations")
  116. R6Anims = AnimationsBin:WaitForChild("R6")
  117. R15Anims = AnimationsBin:WaitForChild("R15")
  118.  
  119. Animations = {
  120. R6LeftSlash = {Animation = R6Anims:WaitForChild("LeftSlash"), FadeTime = nil, Weight = nil, Speed = 1.5, Duration = 0.5},
  121. R6RightSlash = {Animation = R6Anims:WaitForChild("RightSlash"), FadeTime = nil, Weight = nil, Speed = 1.5, Duration = 0.5},
  122. R6SideSwipe = {Animation = R6Anims:WaitForChild("SideSwipe"), FadeTime = nil, Weight = nil, Speed = 0.8, Duration = 0.5},
  123. R15LeftSlash = {Animation = R15Anims:WaitForChild("LeftSlash"), FadeTime = nil, Weight = nil, Speed = 1.5, Duration = 0.5},
  124. R15RightSlash = {Animation = R15Anims:WaitForChild("RightSlash"), FadeTime = nil, Weight = nil, Speed = 1.5, Duration = 0.5},
  125. R15SideSwipe = {Animation = R15Anims:WaitForChild("SideSwipe"), FadeTime = nil, Weight = nil, Speed = 0.8, Duration = 0.5},
  126.  
  127. }
  128.  
  129. Sounds = {
  130. Unsheath = Handle:WaitForChild("Unsheath"),
  131. Slash = Handle:WaitForChild("Slash"),
  132. Lunge = Handle:WaitForChild("Lunge"),
  133. }
  134.  
  135. ToolEquipped = false
  136.  
  137. Remotes = (Tool:FindFirstChild("Remotes") or Create("Folder"){
  138. Name = "Remotes",
  139. Parent = Tool,
  140. })
  141. ServerControl = (Remotes:FindFirstChild("ServerControl") or Create("RemoteFunction"){
  142. Name = "ServerControl",
  143. Parent = Remotes,
  144. })
  145. ClientControl = (Remotes:FindFirstChild("ClientControl") or Create("RemoteFunction"){
  146. Name = "ClientControl",
  147. Parent = Remotes,
  148. })
  149.  
  150. Handle.Transparency = 0
  151. Tool.Enabled = true
  152.  
  153. function IsTeamMate(Player1, Player2)
  154. return (Player1 and Player2 and not Player1.Neutral and not Player2.Neutral and Player1.TeamColor == Player2.TeamColor)
  155. end
  156.  
  157. function TagHumanoid(humanoid, player)
  158. local Creator_Tag = Create("ObjectValue"){
  159. Name = "creator",
  160. Value = player,
  161. }
  162. Debris:AddItem(Creator_Tag, 2)
  163. Creator_Tag.Parent = humanoid
  164. end
  165.  
  166. function UntagHumanoid(humanoid)
  167. for i, v in pairs(humanoid:GetChildren()) do
  168. if v:IsA("ObjectValue") and v.Name == "creator" then
  169. v:Destroy()
  170. end
  171. end
  172. end
  173.  
  174. function CheckTableForInstance(Table, Instance)
  175. for i, v in pairs(Table) do
  176. if v == Instance then
  177. return true
  178. end
  179. end
  180. return false
  181. end
  182.  
  183. function DealDamage(character, damage)
  184. if not CheckIfAlive() or not character then
  185. return
  186. end
  187. local damage = (damage or 0)
  188. local humanoid = character:FindFirstChild("Humanoid")
  189. local rootpart = character:FindFirstChild("HumanoidRootPart") or character:FindFirstChild("Torso")
  190. if not humanoid or humanoid.Health == 0 or not rootpart then
  191. return
  192. end
  193. UntagHumanoid(humanoid)
  194. TagHumanoid(humanoid, Player)
  195. humanoid:TakeDamage(damage)
  196. end
  197.  
  198. function CheckIfAlive()
  199. return (((Character and Character.Parent and Humanoid and Humanoid.Parent and Humanoid.Health > 0) and true) or false)
  200. end
  201.  
  202. function Blow(Part)
  203. local PartTouched
  204. local HitDelay = false
  205. PartTouched = Part.Touched:connect(function(Hit)
  206. if not Hit or not Hit.Parent or not CheckIfAlive() or not ToolEquipped or HitDelay then
  207. return
  208. end
  209. local RightArm = (Character:FindFirstChild("Right Arm") or Character:FindFirstChild("RightHand"))
  210. if not RightArm then
  211. return
  212. end
  213. local RightGrip = RightArm:FindFirstChild("RightGrip")
  214. if not RightGrip or (RightGrip.Part0 ~= Handle and RightGrip.Part1 ~= Handle) then
  215. return
  216. end
  217. local character = Hit.Parent
  218. if character == Character then
  219. return
  220. end
  221. local humanoid = character:FindFirstChild("Humanoid")
  222. if not humanoid or humanoid.Health == 0 then
  223. return
  224. end
  225. local player = Players:GetPlayerFromCharacter(character)
  226. if player and (player == Player or IsTeamMate(Player, player)) then
  227. return
  228. end
  229. HitDelay = true
  230. local TotalDamage = Damage
  231. DealDamage(character, TotalDamage)
  232. local Now = tick()
  233. wait(0.05)
  234. HitDelay = false
  235. end)
  236. end
  237.  
  238. function Attack()
  239. Damage = DamageValues.SlashDamage
  240. Sounds.Slash:Play()
  241. --[[local Anim = Create("StringValue"){
  242. Name = "toolanim",
  243. Value = "Slash",
  244. }
  245. Debris:AddItem(Anim, 2)
  246. Anim.Parent = Tool]]
  247. local SwingAnimations = ((Humanoid.RigType == Enum.HumanoidRigType.R6 and {Animations.R6LeftSlash, Animations.R6RightSlash, Animations.R6SideSwipe})
  248. or (Humanoid.RigType == Enum.HumanoidRigType.R15 and {Animations.R15LeftSlash, --[[Animations.R15RightSlash,]] Animations.R15SideSwipe}))
  249. local Animation = SwingAnimations[math.random(1, #SwingAnimations)]
  250. Spawn(function()
  251. InvokeClient("PlayAnimation", Animation)
  252. end)
  253. wait(Animation.Duration)
  254. end
  255.  
  256. function Activated()
  257. if not Tool.Enabled or not ToolEquipped or not CheckIfAlive() then
  258. return
  259. end
  260. Tool.Enabled = false
  261. Attack()
  262. Damage = DamageValues.BaseDamage
  263. Tool.Enabled = true
  264. end
  265.  
  266. function CheckIfAlive()
  267. return (((Player and Player.Parent and Character and Character.Parent and Humanoid and Humanoid.Parent and Humanoid.Health > 0 and RootPart and RootPart.Parent) and true) or false)
  268. end
  269.  
  270. function Equipped()
  271. Character = Tool.Parent
  272. Player = Players:GetPlayerFromCharacter(Character)
  273. Humanoid = Character:FindFirstChild("Humanoid")
  274. RootPart = Character:FindFirstChild("HumanoidRootPart")
  275. if not CheckIfAlive() then
  276. return
  277. end
  278. Humanoid.WalkSpeed = (50 * 1)
  279. Sounds.Unsheath:Play()
  280. ToolEquipped = true
  281. end
  282.  
  283. function Unequipped()
  284. if CheckIfAlive() then
  285. Humanoid.WalkSpeed = 16
  286. end
  287. ToolEquipped = false
  288. end
  289.  
  290. function OnServerInvoke(player, mode, value)
  291. if player ~= Player or not ToolEquipped or not value or not CheckIfAlive() then
  292. return
  293. end
  294. end
  295.  
  296. function InvokeClient(Mode, Value)
  297. local ClientReturn = nil
  298. pcall(function()
  299. ClientReturn = ClientControl:InvokeClient(Player, Mode, Value)
  300. end)
  301. return ClientReturn
  302. end
  303.  
  304. ServerControl.OnServerInvoke = OnServerInvoke
  305.  
  306. Tool.Activated:connect(Activated)
  307. Tool.Equipped:connect(Equipped)
  308. Tool.Unequipped:connect(Unequipped)
  309.  
  310. Blow(Handle)
  311. end))
  312. Script14.Name = "DeathEffect"
  313. Script14.Parent = Script13
  314. table.insert(cors,sandbox(Script14,function()
  315. --Made by Luckymaxer
  316.  
  317. Character = script.Parent
  318. Humanoid = Character:FindFirstChild("Humanoid")
  319.  
  320. Debris = game:GetService("Debris")
  321.  
  322. WindDirection = script:FindFirstChild("WindDirection")
  323. Force = script:FindFirstChild("Force")
  324.  
  325. Parts = {}
  326.  
  327. BaseColor = BrickColor.new("Lime green")
  328. Color = BaseColor.Color
  329.  
  330. Gravity = 196.20
  331.  
  332. Duration =0
  333.  
  334. Classes = {
  335. BasePart = {
  336. BrickColor = BaseColor,
  337. Material = Enum.Material.Plastic,
  338. Reflectance = 0,
  339. Transparency = 0.75,
  340. },
  341. FileMesh = {
  342. TextureId = "",
  343. },
  344. DataModelMesh = {
  345. VertexColor = Vector3.new(Color.r, Color.g, Color.b),
  346. },
  347. CharacterMesh = {
  348. BaseTextureId = 0,
  349. OverlayTextureId = 0,
  350. },
  351. Shirt = {
  352. ShirtTemplate = "",
  353. },
  354. Pants = {
  355. PantsTemplate = "",
  356. },
  357. FaceInstance = {
  358. Texture = "",
  359. },
  360. Sparkles = {
  361. SparkleColor = Color,
  362. Enabled = false,
  363. },
  364. Fire = {
  365. Color = Color,
  366. SecondaryColor = Color,
  367. Enabled = false,
  368. },
  369. Smoke = {
  370. Color = Color,
  371. Enabled = false,
  372. },
  373. Light = {
  374. Color = Color,
  375. Enabled = false,
  376. },
  377. ParticleEmitter = {
  378. Color = ColorSequence.new(Color, Color),
  379. Enabled = false,
  380. }
  381. }
  382.  
  383. Fire = script:FindFirstChild("Fire")
  384.  
  385. Objects = {}
  386. RemovedObjects = {}
  387. FakeParts = {}
  388. Hats = {}
  389. Tools = {}
  390. Particles = {}
  391.  
  392. function DestroyScript()
  393. Debris:AddItem(script, 0.5)
  394. end
  395.  
  396. function TweenNumber(Start, Goal, Time)
  397. return ((Goal - Start) / Time)
  398. end
  399.  
  400. function Decorate(Object)
  401. local ObjectData = {
  402. Object = nil,
  403. Properties = {},
  404. }
  405. for i, v in pairs(Classes) do
  406. if Object:IsA(i) then
  407. if Object:IsA("CharacterMesh") then
  408. local Mesh = Instance.new("SpecialMesh")
  409. Mesh.MeshType = Enum.MeshType.FileMesh
  410. Mesh.MeshId = ("http://www.roblox.com/asset/?id=" .. Object.MeshId)
  411. for ii, vv in pairs(Character:GetChildren()) do
  412. if vv:IsA("BasePart") and Object.BodyPart.Name == string.gsub(vv.Name, " ", "") then
  413. Mesh.Parent = vv
  414. table.insert(RemovedObjects, {Object = Object, NewObject = Mesh, Parent = Object.Parent})
  415. Object.Parent = nil
  416. end
  417. end
  418. elseif Object:IsA("BasePart") and Object.Transparency >= 1 then
  419. else
  420. ObjectData.Object = Object
  421. for ii, vv in pairs(v) do
  422. local PropertyValue = nil
  423. local PropertyValueSet = false
  424. pcall(function()
  425. PropertyValue = Object[ii]
  426. PropertyValueSet = true
  427. Object[ii] = vv
  428. end)
  429. if PropertyValueSet then
  430. ObjectData.Properties[ii] = PropertyValue
  431. end
  432. end
  433. end
  434. end
  435. end
  436. table.insert(Objects, ObjectData)
  437. end
  438.  
  439. function Redesign(Parent)
  440. for i, v in pairs(Parent:GetChildren()) do
  441. if v ~= script then
  442. Decorate(v)
  443. Redesign(v)
  444. end
  445. end
  446. end
  447.  
  448. if not Humanoid or not WindDirection then
  449. DestroyScript()
  450. return
  451. end
  452.  
  453. for i, v in pairs(Character:GetChildren()) do
  454. if v:IsA("Accoutrement") or v:IsA("Tool") then
  455. local FakeObject = v:Clone()
  456. Decorate(FakeObject)
  457. table.insert(((v:IsA("Accoutrement") and Hats) or Tools), v)
  458. for ii, vv in pairs(FakeObject:GetChildren()) do
  459. if vv:IsA("BasePart") then
  460. local FakePart = vv:Clone()
  461. FakePart.Name = v.Name
  462. for iii, vvv in pairs(FakePart:GetChildren()) do
  463. if vvv:IsA("JointInstance") then
  464. vvv:Destroy()
  465. end
  466. end
  467. table.insert(FakeParts, FakePart)
  468. FakePart.Parent = Character
  469. FakePart.CFrame = vv.CFrame
  470. end
  471. end
  472. end
  473. end
  474.  
  475. Humanoid:UnequipTools()
  476.  
  477. for i, v in pairs({Hats, Tools}) do
  478. for ii, vv in pairs(v) do
  479. vv.Parent = nil
  480. end
  481. end
  482.  
  483. Redesign(Character)
  484.  
  485. local GhostModel = Instance.new("Model")
  486. GhostModel.Name = "GhostModel"
  487.  
  488. for i, v in pairs(Character:GetChildren()) do
  489. if v:IsA("BasePart") then
  490. if v.Name ~= "HumanoidRootPart" then
  491. local FakePart = v:Clone()
  492. FakePart.Name = "Part"
  493. FakePart.CanCollide = false
  494. for ii, vv in pairs(FakePart:GetChildren()) do
  495. if not vv:IsA("DataModelMesh") then
  496. vv:Destroy()
  497. end
  498. end
  499. table.insert(FakeParts, FakePart)
  500. local Mass = (v:GetMass() * Gravity ^ 2)
  501. local BodyVelocity = Instance.new("BodyVelocity")
  502. BodyVelocity.maxForce = Vector3.new(Mass, Mass, Mass)
  503. BodyVelocity.velocity = (WindDirection.Value * Force.Value)
  504. BodyVelocity.Parent = FakePart
  505. FakePart.Parent = GhostModel
  506. local FireParticle = Fire:Clone()
  507. FireParticle.Color = ColorSequence.new(Color, Color)
  508. FireParticle.Enabled = true
  509. table.insert(Particles, FireParticle)
  510. FireParticle.Parent = FakePart
  511. end
  512. v:Destroy()
  513. end
  514. end
  515.  
  516. Spawn(function()
  517. local Start = Classes.BasePart.Transparency
  518. local End = 1
  519. local Time = 0.4
  520. local Rate = (1 / 30)
  521. local Frames = (Time / Rate)
  522. for i = 1, Frames do
  523. local Transparency = (Start + TweenNumber(Start, End, (Frames / (i + 1))))
  524. for ii, vv in pairs(FakeParts) do
  525. if vv and vv.Parent then
  526. vv.Transparency = Transparency
  527. end
  528. end
  529. wait(Rate)
  530. end
  531. for i, v in pairs(Particles) do
  532. v.Enabled = false
  533. end
  534. end)
  535.  
  536. Debris:AddItem(GhostModel, 5)
  537. GhostModel.Parent = game:GetService("Workspace")
  538. end))
  539. Script14.Disabled = true
  540. Vector3Value15.Name = "WindDirection"
  541. Vector3Value15.Parent = Script14
  542. Vector3Value16.Name = "Force"
  543. Vector3Value16.Parent = Script14
  544. ParticleEmitter17.Name = "Fire"
  545. ParticleEmitter17.Parent = Script14
  546. ParticleEmitter17.Speed = NumberRange.new(-0.25, -0.25)
  547. ParticleEmitter17.Rotation = NumberRange.new(0, 5)
  548. ParticleEmitter17.Color = ColorSequence.new(Color3.new(1, 0, 0),Color3.new(0.666667, 0, 0))
  549. ParticleEmitter17.Enabled = false
  550. ParticleEmitter17.LightEmission = 1
  551. ParticleEmitter17.Texture = "rbxasset://textures/particles/fire_main.dds"
  552. ParticleEmitter17.Transparency = NumberSequence.new(0.60000002384186,0.60000002384186)
  553. ParticleEmitter17.Size = NumberSequence.new(0.31999999284744,1.1799999475479,1.25)
  554. ParticleEmitter17.Acceleration = Vector3.new(0, 10, 0)
  555. ParticleEmitter17.Lifetime = NumberRange.new(0.20000000298023, 0.30000001192093)
  556. ParticleEmitter17.Rate = 1000
  557. ParticleEmitter17.RotSpeed = NumberRange.new(15, 25)
  558. LocalScript18.Parent = Tool0
  559. table.insert(cors,sandbox(LocalScript18,function()
  560. --Made by Luckymaxer
  561.  
  562. Tool = script.Parent
  563. Handle = Tool:WaitForChild("Handle")
  564.  
  565. Players = game:GetService("Players")
  566. RunService = game:GetService("RunService")
  567.  
  568. Animations = {}
  569.  
  570. Remotes = Tool:WaitForChild("Remotes")
  571. ServerControl = Remotes:WaitForChild("ServerControl")
  572. ClientControl = Remotes:WaitForChild("ClientControl")
  573.  
  574. Rate = (1 / 60)
  575.  
  576. ToolEquipped = false
  577.  
  578. function SetAnimation(mode, value)
  579. if mode == "PlayAnimation" and value and ToolEquipped and Humanoid then
  580. for i, v in pairs(Animations) do
  581. if v.Animation == value.Animation then
  582. v.AnimationTrack:Stop()
  583. table.remove(Animations, i)
  584. end
  585. end
  586. local AnimationTrack = Humanoid:LoadAnimation(value.Animation)
  587. table.insert(Animations, {Animation = value.Animation, AnimationTrack = AnimationTrack})
  588. AnimationTrack:Play(value.FadeTime, value.Weight, value.Speed)
  589. elseif mode == "StopAnimation" and value then
  590. for i, v in pairs(Animations) do
  591. if v.Animation == value.Animation then
  592. v.AnimationTrack:Stop(value.FadeTime)
  593. table.remove(Animations, i)
  594. end
  595. end
  596. end
  597. end
  598.  
  599. function KeyPressed(Key, Down)
  600. InvokeServer("KeyPressed", {Key = Key, Down = Down})
  601. end
  602.  
  603. function CheckIfAlive()
  604. return (((Character and Character.Parent and Humanoid and Humanoid.Parent and Humanoid.Health > 0 and Player and Player.Parent) and true) or false)
  605. end
  606.  
  607. function Equipped(Mouse)
  608. Character = Tool.Parent
  609. Player = Players:GetPlayerFromCharacter(Character)
  610. Humanoid = Character:FindFirstChild("Humanoid")
  611. ToolEquipped = true
  612. if not CheckIfAlive() then
  613. return
  614. end
  615. PlayerMouse = Mouse
  616. PlayerMouse.KeyDown:connect(function(Key)
  617. KeyPressed(Key, true)
  618. end)
  619. PlayerMouse.KeyUp:connect(function(Key)
  620. KeyPressed(Key, false)
  621. end)
  622. end
  623.  
  624. function Unequipped()
  625. for i, v in pairs(Animations) do
  626. if v and v.AnimationTrack then
  627. v.AnimationTrack:Stop()
  628. end
  629. end
  630. Animations = {}
  631. ToolEquipped = false
  632. end
  633.  
  634. function InvokeServer(mode, value)
  635. local ServerReturn
  636. pcall(function()
  637. ServerReturn = ServerControl:InvokeServer(mode, value)
  638. end)
  639. return ServerReturn
  640. end
  641.  
  642. function OnClientInvoke(mode, value)
  643. if mode == "PlayAnimation" and value and ToolEquipped and Humanoid then
  644. SetAnimation("PlayAnimation", value)
  645. elseif mode == "StopAnimation" and value then
  646. SetAnimation("StopAnimation", value)
  647. elseif mode == "PlaySound" and value then
  648. value:Play()
  649. elseif mode == "StopSound" and value then
  650. value:Stop()
  651. elseif mode == "MouseData" then
  652. return ((PlayerMouse and {Position = PlayerMouse.Hit.p, Target = PlayerMouse.Target}) or nil)
  653. end
  654. end
  655.  
  656. ClientControl.OnClientInvoke = OnClientInvoke
  657. Tool.Equipped:connect(Equipped)
  658. Tool.Unequipped:connect(Unequipped)
  659. end))
  660. LocalScript19.Name = "MouseIcon"
  661. LocalScript19.Parent = Tool0
  662. table.insert(cors,sandbox(LocalScript19,function()
  663. --Made by Luckymaxer
  664.  
  665. Mouse_Icon = "rbxasset://textures/GunCursor.png"
  666. Reloading_Icon = "rbxasset://textures/GunWaitCursor.png"
  667.  
  668. Tool = script.Parent
  669.  
  670. Mouse = nil
  671.  
  672. function UpdateIcon()
  673. if Mouse then
  674. Mouse.Icon = Tool.Enabled and Mouse_Icon or Reloading_Icon
  675. end
  676. end
  677.  
  678. function OnEquipped(ToolMouse)
  679. Mouse = ToolMouse
  680. UpdateIcon()
  681. end
  682.  
  683. function OnChanged(Property)
  684. if Property == "Enabled" then
  685. UpdateIcon()
  686. end
  687. end
  688.  
  689. Tool.Equipped:connect(OnEquipped)
  690. Tool.Changed:connect(OnChanged)
  691. end))
  692. UnionOperation20.Name = "Handle"
  693. UnionOperation20.Parent = Tool0
  694. UnionOperation20.CFrame = CFrame.new(-21.1333771, 11.3700027, -208.260681, 1.96695328e-05, -1, -7.39097595e-06, -0.752348065, -1.96695328e-05, 0.658765852, -0.658765852, -7.39097595e-06, -0.752347946)
  695. UnionOperation20.Orientation = Vector3.new(-41.2099991, -180, -90)
  696. UnionOperation20.Position = Vector3.new(-21.1333771, 11.3700027, -208.260681)
  697. UnionOperation20.Rotation = Vector3.new(-138.789993, 0, 90)
  698. UnionOperation20.Color = Color3.new(0.247059, 0.494118, 0.247059)
  699. UnionOperation20.Size = Vector3.new(6.24427032, 0.575328827, 4.86837769)
  700. UnionOperation20.BrickColor = BrickColor.new("Sea green")
  701. UnionOperation20.CanCollide = false
  702. UnionOperation20.brickColor = BrickColor.new("Sea green")
  703. Sound21.Name = "Unsheath"
  704. Sound21.Parent = UnionOperation20
  705. Sound21.SoundId = "rbxassetid://2544975373"
  706. Sound21.Volume = 10
  707. Sound22.Name = "Slash"
  708. Sound22.Parent = UnionOperation20
  709. Sound22.SoundId = "rbxassetid://2545012765"
  710. Sound22.Volume = 10
  711. Sound23.Name = "Lunge"
  712. Sound23.Parent = UnionOperation20
  713. Sound23.Pitch = 1.25
  714. Sound23.PlaybackSpeed = 1.25
  715. Sound23.SoundId = "http://www.roblox.com/asset/?id=12222208"
  716. for i,v in pairs(mas:GetChildren()) do
  717. v.Parent = script
  718. pcall(function() v:MakeJoints() end)
  719. end
  720. mas:Destroy()
  721. for i,v in pairs(cors) do
  722. spawn(function()
  723. pcall(v)
  724. end)
  725. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement