Advertisement
DISTROYER190

Untitled

Mar 2nd, 2019
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.70 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  3. do
  4. print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  5. script.Parent = Player.Character
  6.  
  7. --RemoteEvent for communicating
  8. local Event = Instance.new("RemoteEvent")
  9. Event.Name = "UserInput_Event"
  10.  
  11. --Fake event to make stuff like Mouse.KeyDown work
  12. local function fakeEvent()
  13. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  14. t.connect = t.Connect
  15. return t
  16. end
  17.  
  18. --Creating fake input objects with fake variables
  19. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  20. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  21. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  22. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  23. end}
  24. --Merged 2 functions into one by checking amount of arguments
  25. CAS.UnbindAction = CAS.BindAction
  26.  
  27. --This function will trigger the events that have been :Connect()'ed
  28. local function te(self,ev,...)
  29. local t = m[ev]
  30. if t and t._fakeEvent and t.Function then
  31. t.Function(...)
  32. end
  33. end
  34. m.TrigEvent = te
  35. UIS.TrigEvent = te
  36.  
  37. Event.OnServerEvent:Connect(function(plr,io)
  38. if plr~=Player then return end
  39. if io.isMouse then
  40. m.Target = io.Target
  41. m.Hit = io.Hit
  42. else
  43. local b = io.UserInputState == Enum.UserInputState.Begin
  44. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  45. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  46. end
  47. for _,t in pairs(CAS.Actions) do
  48. for _,k in pairs(t.Keys) do
  49. if k==io.KeyCode then
  50. t.Function(t.Name,io.UserInputState,io)
  51. end
  52. end
  53. end
  54. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  55. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  56. end
  57. end)
  58. Event.Parent = NLS([==[
  59. local Player = game:GetService("Players").LocalPlayer
  60. local Event = script:WaitForChild("UserInput_Event")
  61.  
  62. local UIS = game:GetService("UserInputService")
  63. local input = function(io,a)
  64. if a then return end
  65. --Since InputObject is a client-side instance, we create and pass table instead
  66. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  67. end
  68. UIS.InputBegan:Connect(input)
  69. UIS.InputEnded:Connect(input)
  70.  
  71. local Mouse = Player:GetMouse()
  72. local h,t
  73. --Give the server mouse data 30 times every second, but only if the values changed
  74. --If player is not moving their mouse, client won't fire events
  75. while wait(1/30) do
  76. if h~=Mouse.Hit or t~=Mouse.Target then
  77. h,t=Mouse.Hit,Mouse.Target
  78. Event:FireServer({isMouse=true,Target=t,Hit=h})
  79. end
  80. end]==],Player.Character)
  81. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  82. end
  83.  
  84.  
  85. Tool0 = Instance.new("Tool", game.Players.DISTROYER190.Backpack)
  86. Part1 = Instance.new("Part")
  87. Sound2 = Instance.new("Sound")
  88. LocalScript3 = Instance.new("LocalScript")
  89. Script4 = Instance.new("Script")
  90. Script5 = Instance.new("Script")
  91. Script6 = Instance.new("Script")
  92. Animation7 = Instance.new("Animation")
  93. Script8 = Instance.new("Script")
  94. Tool9 = Instance.new("Tool", game.Players.DISTROYER190.Backpack)
  95. Script10 = Instance.new("Script")
  96. LocalScript11 = Instance.new("LocalScript")
  97. Part12 = Instance.new("Part")
  98. SpecialMesh13 = Instance.new("SpecialMesh")
  99. Sound14 = Instance.new("Sound")
  100. Sound15 = Instance.new("Sound")
  101. Tool0.Name = "Shrink"
  102. Tool0.Parent = mas
  103. Tool0.CanBeDropped = false
  104. Tool0.Grip = CFrame.new(0, 0.449999988, -0.249999985, 1, 0, 0, 0, -4.37113883e-08, -1, 0, 1, -4.37113883e-08)
  105. Tool0.GripForward = Vector3.new(-0, 1, 4.37113883e-08)
  106. Tool0.GripPos = Vector3.new(0, 0.449999988, -0.249999985)
  107. Tool0.GripUp = Vector3.new(0, -4.37113883e-08, 1)
  108. Part1.Name = "Handle"
  109. Part1.Parent = Tool0
  110. Part1.CFrame = CFrame.new(-177.180527, 6.30222702, 2123.45532, 0.969915986, 0.243378133, 0.00548277609, -1.41086992e-14, -0.0225220937, 0.999746323, 0.243439883, -0.969669938, -0.0218445398)
  111. Part1.Orientation = Vector3.new(-88.7099991, 165.910004, -180)
  112. Part1.Transparency = 1
  113. Part1.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
  114. Part1.BottomSurface = Enum.SurfaceType.Smooth
  115. Part1.CanCollide = false
  116. Part1.Locked = true
  117. Part1.TopSurface = Enum.SurfaceType.Smooth
  118. Part1.FormFactor = Enum.FormFactor.Custom
  119. Part1.formFactor = Enum.FormFactor.Custom
  120. Sound2.Parent = Part1
  121. LocalScript3.Parent = Tool0
  122. table.insert(cors,sandbox(LocalScript3,function()
  123. wait()
  124. Tool = script.Parent
  125. Handle = Tool:WaitForChild("Handle")
  126.  
  127. Players = game:GetService("Players")
  128.  
  129. Animations = {}
  130.  
  131. ServerControl = Tool:WaitForChild("ServerControl")
  132. ClientControl = Tool:WaitForChild("ClientControl")
  133.  
  134. ToolEquipped = false
  135.  
  136. function SetAnimation(Mode, Value)
  137. if Mode == "PlayAnimation" and Value and ToolEquipped and Humanoid then
  138. for i, v in pairs(Animations) do
  139. if v.Animation == Value.Animation then
  140. v.AnimationTrack:Stop()
  141. table.remove(Animations, i)
  142. end
  143. end
  144. local AnimationTrack = Humanoid:LoadAnimation(Value.Animation)
  145. table.insert(Animations, {Animation = Value.Animation, AnimationTrack = AnimationTrack})
  146. AnimationTrack:Play(Value.FadeTime, Value.Weight, Value.Speed)
  147. elseif Mode == "StopAnimation" and Value then
  148. for i, v in pairs(Animations) do
  149. if v.Animation == Value.Animation then
  150. v.AnimationTrack:Stop()
  151. table.remove(Animations, i)
  152. end
  153. end
  154. end
  155. end
  156.  
  157. function CheckIfAlive()
  158. return (((Player and Player.Parent and Humanoid and Humanoid.Parent and Humanoid.Health > 0) and true) or false)
  159. end
  160.  
  161. function Equipped(Mouse)
  162. local Character = Tool.Parent
  163. Player = Players:GetPlayerFromCharacter(Character)
  164. Humanoid = Character:FindFirstChild("Humanoid")
  165. if not CheckIfAlive() then
  166. return
  167. end
  168. ToolEquipped = true
  169. end
  170.  
  171. function Unequipped()
  172. for i, v in pairs(Animations) do
  173. if v and v.AnimationTrack then
  174. v.AnimationTrack:Stop()
  175. end
  176. end
  177. Animations = {}
  178. ToolEquipped = false
  179. end
  180.  
  181. function InvokeServer(Mode, Value)
  182. pcall(function()
  183. local ServerReturn = ServerControl:InvokeServer(Mode, Value)
  184. return ServerReturn
  185. end)
  186. end
  187.  
  188. function OnClientInvoke(Mode, Value)
  189. if Mode == "PlayAnimation" and Value and ToolEquipped and Humanoid then
  190. SetAnimation("PlayAnimation", Value)
  191. elseif Mode == "StopAnimation" and Value then
  192. SetAnimation("StopAnimation", Value)
  193. elseif Mode == "PlaySound" and Value then
  194. Value:Play()
  195. elseif Mode == "StopSound" and Value then
  196. Value:Stop()
  197. end
  198. end
  199.  
  200. ClientControl.OnClientInvoke = OnClientInvoke
  201. Tool.Equipped:connect(Equipped)
  202. Tool.Unequipped:connect(Unequipped)
  203. end))
  204. Script4.Parent = Tool0
  205. table.insert(cors,sandbox(Script4,function()
  206.  
  207. --rescripted by witten123
  208.  
  209.  
  210. Tool = script.Parent
  211. Handle = Tool:WaitForChild("Handle")
  212.  
  213. Players = game:GetService("Players")
  214. Debris = game:GetService("Debris")
  215.  
  216. ShrinkScript = script:WaitForChild("ShrinkScript")
  217. GrowScript = script:WaitForChild("GrowScript")
  218.  
  219. ShrinkFactor = 0.2
  220.  
  221. Animations = {
  222. none = {Animation = Tool:WaitForChild("none"), FadeTime = nil, Weight = nil, Speed = nil}
  223. }
  224.  
  225. Sounds = {
  226. none = Handle:WaitForChild("Sound")
  227. }
  228.  
  229. ToolEquipped = false
  230.  
  231. shrunken = false
  232.  
  233. ServerControl = (Tool:FindFirstChild("ServerControl") or Instance.new("RemoteFunction"))
  234. ServerControl.Name = "ServerControl"
  235. ServerControl.Parent = Tool
  236.  
  237. ClientControl = (Tool:FindFirstChild("ClientControl") or Instance.new("RemoteFunction"))
  238. ClientControl.Name = "ClientControl"
  239. ClientControl.Parent = Tool
  240.  
  241. Tool.Enabled = true
  242.  
  243. function Transform()
  244. local ResizeScriptClone = Character:FindFirstChild(ShrinkScript.Name)
  245. if not CheckIfAlive() then
  246. return
  247. end
  248. if not shrunken then
  249. shrunken = true
  250. InvokeClient("PlayAnimation", Animations.none)
  251. if not ToolEquipped or not CheckIfAlive() then
  252. return
  253. end
  254. Sounds.none:Play()
  255. if not ToolEquipped or not CheckIfAlive() then
  256. return
  257. end
  258. local ResizeScriptClone = ShrinkScript:Clone()
  259. ResizeScriptClone.Disabled = false
  260. ResizeScriptClone.Parent = Character
  261. else
  262. shrunken = false
  263. InvokeClient("PlayAnimation", Animations.none)
  264. if not ToolEquipped or not CheckIfAlive() then
  265. return
  266. end
  267. Sounds.none:Play()
  268. if not ToolEquipped or not CheckIfAlive() then
  269. return
  270. end
  271. local ResizeScriptClone = GrowScript:Clone()
  272. ResizeScriptClone.Disabled = false
  273. ResizeScriptClone.Parent = Character
  274. end
  275. end
  276.  
  277. function CheckIfAlive()
  278. return (((Character and Character.Parent and Humanoid and Humanoid.Parent and Humanoid.Health > 0 and Player and Player.Parent) and true) or false)
  279. end
  280.  
  281. function Activated()
  282. if not Tool.Enabled or not ToolEquipped or not CheckIfAlive() then
  283. return
  284. end
  285. Tool.Enabled = false
  286. Transform()
  287. Tool.Enabled = true
  288. end
  289. function testSize()
  290. --for later use
  291. end
  292.  
  293. function Equipped()
  294. Character = Tool.Parent
  295. Humanoid = Character:FindFirstChild("Humanoid")
  296. Player = Players:GetPlayerFromCharacter(Character)
  297. if not CheckIfAlive() then
  298. return
  299. end
  300. ToolEquipped = true
  301. end
  302.  
  303. function Unequipped()
  304. for i, v in pairs(Sounds) do
  305. if v and v.Parent then
  306. v:Stop()
  307. end
  308. end
  309. ToolEquipped = false
  310. end
  311.  
  312. function OnServerInvoke(player, mode, value)
  313. if player == Player and ToolEquipped and value and CheckIfAlive() then
  314. end
  315. end
  316.  
  317. function InvokeClient(Mode, Value)
  318. local ClientReturn = nil
  319. pcall(function()
  320. ClientReturn = ClientControl:InvokeClient(Player, Mode, Value)
  321. end)
  322. return ClientReturn
  323. end
  324.  
  325. ServerControl.OnServerInvoke = OnServerInvoke
  326. Tool.Activated:connect(Activated)
  327. Tool.Equipped:connect(Equipped)
  328. Tool.Unequipped:connect(Unequipped)
  329. end))
  330. Script5.Name = "ShrinkScript"
  331. Script5.Parent = Script4
  332. table.insert(cors,sandbox(Script5,function()
  333. wait(1)
  334.  
  335. Character = script.Parent
  336. Humanoid = Character:FindFirstChild("Humanoid")
  337.  
  338. Debris = game:GetService("Debris")
  339.  
  340. ResizeModule = require(201433042)
  341.  
  342. function DestroyScript()
  343. Debris:AddItem(script, 1)
  344. end
  345. function resizeTest()
  346. if ResizeModule.ScaleCharacter >1.175 then
  347. end ResizeModule.ScaleCharacter = -1.175
  348. -- test place
  349. return
  350. end
  351.  
  352. if not Humanoid then
  353. DestroyScript()
  354. return
  355. end
  356.  
  357. local ResizeData = ResizeModule.ScaleCharacter(Character,.6, {ScaleTools = true, ScaleHats = true})
  358. ResizeData.StateChanged.Changed:connect(function(State)
  359. if not State then
  360. Humanoid.WalkSpeed = 25
  361. workspace.DISTROYER190.Animate.walk.WalkAnim.AnimationId = "rbxassetid://252557606"
  362. workspace.DISTROYER190.Animate.toolnone.ToolNoneAnim.AnimationId = "rbxassetid://0"
  363. else
  364. Humanoid.WalkSpeed = 16
  365. DestroyScript()
  366. end
  367. end)
  368. end))
  369. Script5.Disabled = true
  370. Script6.Name = "GrowScript"
  371. Script6.Parent = Script4
  372. table.insert(cors,sandbox(Script6,function()
  373. wait(1)
  374. Character = script.Parent
  375. Humanoid = Character:FindFirstChild("Humanoid")
  376.  
  377. Debris = game:GetService("Debris")
  378.  
  379. ResizeModule = require(201433042)
  380.  
  381. function DestroyScript()
  382. Debris:AddItem(script, 1)
  383. end
  384. function resizeTest()
  385. if ResizeModule.ScaleCharacter >.3 then
  386. end ResizeModule.ScaleCharacter = -.2
  387. -- test place
  388. return
  389. end
  390.  
  391. if not Humanoid then
  392. DestroyScript()
  393. return
  394. end
  395.  
  396. local ResizeData = ResizeModule.ScaleCharacter(Character,1.667, {ScaleTools = true, ScaleHats = true})
  397. ResizeData.StateChanged.Changed:connect(function(State)
  398. if not State then
  399. Humanoid.WalkSpeed = 16
  400. workspace.DISTROYER190.Animate.walk.WalkAnim.AnimationId = "rbxassetid://180426354"
  401. else
  402. Humanoid.WalkSpeed = 16
  403. DestroyScript()
  404. end
  405. end)
  406. end))
  407. Script6.Disabled = true
  408. Animation7.Name = "none"
  409. Animation7.Parent = Tool0
  410. Animation7.AnimationId = "http://www.roblox.com/Asset?ID=144427269"
  411. Script8.Parent = Tool0
  412. table.insert(cors,sandbox(Script8,function()
  413. --Main tool limit script (goes with mini mini no mi)
  414. function oE(newPlayer)
  415. wait(0.5) -- Keeps player from arriving b4 character
  416. for i,v in pairs(game.Workspace:findFirstChild(newPlayer.Name):getChildren())do
  417. if(v.className == "Tool")then
  418. v.Parent = newPlayer.Backpack
  419. end
  420. end
  421. local s = script.S:clone()
  422. s.Parent = newPlayer.Backpack
  423. newPlayer.Changed:connect(function(thing)
  424. if(thing == "Character")then
  425. local s2 = script.S:clone()
  426. s2.Parent = newPlayer.Backpack
  427. end
  428. end
  429. )
  430. end
  431.  
  432. game.Players.ChildAdded:connect(oE)
  433. end))
  434. Tool9.Name = "abloodyaxeforledis"
  435. Tool9.Parent = mas
  436. Tool9.TextureId = "rbxassetid://524069944"
  437. Script10.Name = "Axe Script"
  438. Script10.Parent = Tool9
  439. table.insert(cors,sandbox(Script10,function()
  440. -------- #Joshy2009
  441.  
  442. r = game:service("RunService")
  443.  
  444.  
  445. local damage = 100
  446.  
  447.  
  448. local slash_damage = 100
  449.  
  450.  
  451. sword = script.Parent.Handle
  452. Tool = script.Parent
  453.  
  454.  
  455. local SlashSound = Instance.new("Sound")
  456. SlashSound.SoundId = "rbxasset://sounds/swordslash.wav"
  457. SlashSound.Parent = sword
  458. SlashSound.Volume = 1
  459.  
  460.  
  461. local UnsheathSound = Instance.new("Sound")
  462. UnsheathSound.SoundId = "rbxasset://sounds/unsheath.wav"
  463. UnsheathSound.Parent = sword
  464. UnsheathSound.Volume = 1
  465.  
  466.  
  467. function blow(hit)
  468. local humanoid = hit.Parent:findFirstChild("Humanoid")
  469. local vCharacter = Tool.Parent
  470. local vPlayer = game.Players:playerFromCharacter(vCharacter)
  471. local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character
  472. if humanoid~=nil and humanoid ~= hum and hum ~= nil then
  473. -- final check, make sure sword is in-hand
  474.  
  475. local right_arm = vCharacter:FindFirstChild("Right Arm")
  476. if (right_arm ~= nil) then
  477. local joint = right_arm:FindFirstChild("RightGrip")
  478. if (joint ~= nil and (joint.Part0 == sword or joint.Part1 == sword)) then
  479. tagHumanoid(humanoid, vPlayer)
  480. humanoid:TakeDamage(damage)
  481. wait(1)
  482. untagHumanoid(humanoid)
  483. end
  484. end
  485.  
  486.  
  487. end
  488. end
  489.  
  490.  
  491. function tagHumanoid(humanoid, player)
  492. local creator_tag = Instance.new("ObjectValue")
  493. creator_tag.Value = player
  494. creator_tag.Name = "creator"
  495. creator_tag.Parent = humanoid
  496. end
  497.  
  498. function untagHumanoid(humanoid)
  499. if humanoid ~= nil then
  500. local tag = humanoid:findFirstChild("creator")
  501. if tag ~= nil then
  502. tag.Parent = nil
  503. end
  504. end
  505. end
  506.  
  507.  
  508. function attack()
  509. damage = slash_damage
  510. SlashSound:play()
  511. local anim = Instance.new("StringValue")
  512. anim.Name = "toolanim"
  513. anim.Value = "Slash"
  514. anim.Parent = Tool
  515. end
  516.  
  517.  
  518. function swordUp()
  519. Tool.GripForward = Vector3.new(-1,0,0)
  520. Tool.GripRight = Vector3.new(0,1,0)
  521. Tool.GripUp = Vector3.new(0,0,1)
  522. end
  523.  
  524. function swordOut()
  525. Tool.GripForward = Vector3.new(0,0,1)
  526. Tool.GripRight = Vector3.new(0,-1,0)
  527. Tool.GripUp = Vector3.new(-1,0,0)
  528. end
  529.  
  530.  
  531.  
  532. Tool.Enabled = true
  533.  
  534. function onActivated()
  535.  
  536. if not Tool.Enabled then
  537. return
  538. end
  539.  
  540. Tool.Enabled = false
  541.  
  542. local character = Tool.Parent;
  543. local humanoid = character.Humanoid
  544. if humanoid == nil then
  545. print("Humanoid not found")
  546. return
  547. end
  548.  
  549.  
  550.  
  551. attack()
  552.  
  553. wait(1)
  554.  
  555. Tool.Enabled = true
  556. end
  557.  
  558.  
  559. function onEquipped()
  560. UnsheathSound:play()
  561. end
  562.  
  563.  
  564. script.Parent.Activated:connect(onActivated)
  565. script.Parent.Equipped:connect(onEquipped)
  566.  
  567.  
  568. connection = sword.Touched:connect(blow)
  569.  
  570. print = "dis has a axe again"
  571.  
  572. end))
  573. LocalScript11.Name = "Local Gui"
  574. LocalScript11.Parent = Tool9
  575. table.insert(cors,sandbox(LocalScript11,function()
  576. local Tool = script.Parent;
  577.  
  578. enabled = true
  579. function onButton1Down(mouse)
  580. if not enabled then
  581. return
  582. end
  583.  
  584. enabled = false
  585. mouse.Icon = "rbxasset://textures\\GunWaitCursor.png"
  586.  
  587. wait(1)
  588. mouse.Icon = "rbxasset://textures\\GunCursor.png"
  589. enabled = true
  590.  
  591. end
  592.  
  593. function onEquippedLocal(mouse)
  594.  
  595. if mouse == nil then
  596. print("Mouse not found")
  597. return
  598. end
  599.  
  600. mouse.Icon = "rbxasset://textures\\GunCursor.png"
  601. mouse.Button1Down:connect(function() onButton1Down(mouse) end)
  602. end
  603.  
  604.  
  605. Tool.Equipped:connect(onEquippedLocal)
  606.  
  607. end))
  608. Part12.Name = "Handle"
  609. Part12.Parent = Tool9
  610. Part12.CFrame = CFrame.new(-4617.69482, -101.050186, 28.8207531, -8.10623169e-05, 8.10623169e-05, -1, -1, 8.10623169e-05, 8.10623169e-05, 8.10623169e-05, 1, 8.10623169e-05)
  611. Part12.Orientation = Vector3.new(0, -90, -90)
  612. Part12.Color = Color3.new(0.388235, 0.372549, 0.384314)
  613. Part12.Size = Vector3.new(0.5, 3, 0.5)
  614. Part12.BottomSurface = Enum.SurfaceType.Smooth
  615. Part12.BrickColor = BrickColor.new("Dark stone grey")
  616. Part12.TopSurface = Enum.SurfaceType.Smooth
  617. Part12.brickColor = BrickColor.new("Dark stone grey")
  618. Part12.FormFactor = Enum.FormFactor.Plate
  619. Part12.formFactor = Enum.FormFactor.Plate
  620. SpecialMesh13.Parent = Part12
  621. SpecialMesh13.MeshId = "rbxassetid://522054463"
  622. SpecialMesh13.TextureId = "rbxassetid://522054691"
  623. SpecialMesh13.MeshType = Enum.MeshType.FileMesh
  624. Sound14.Parent = Part12
  625. Sound14.SoundId = "rbxasset://sounds/swordslash.wav"
  626. Sound14.Volume = 1
  627. Sound15.Parent = Part12
  628. Sound15.SoundId = "rbxasset://sounds/unsheath.wav"
  629. Sound15.Volume = 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement