Advertisement
DaOMEGAa32

fe v3

Oct 11th, 2019
277
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.81 KB | None | 0 0
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,game,owner = owner,game
  4. local RealPlayer = Player
  5. do
  6. print("FE Compatibility code V2 by Mokiros")
  7. local RealPlayer = RealPlayer
  8. script.Parent = RealPlayer.Character
  9.  
  10. --Fake event to make stuff like Mouse.KeyDown work
  11. local Disconnect_Function = function(this)
  12. this[1].Functions[this[2]] = nil
  13. end
  14. local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
  15. local FakeEvent_Metatable = {__index={
  16. Connect = function(this,f)
  17. local i = tostring(math.random(0,10000))
  18. while this.Functions[i] do
  19. i = tostring(math.random(0,10000))
  20. end
  21. this.Functions[i] = f
  22. return setmetatable({this,i},Disconnect_Metatable)
  23. end
  24. }}
  25. FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
  26. local function fakeEvent()
  27. return setmetatable({Functions={}},FakeEvent_Metatable)
  28. end
  29.  
  30. --Creating fake input objects with fake variables
  31. local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  32. FakeMouse.keyUp = FakeMouse.KeyUp
  33. FakeMouse.keyDown = FakeMouse.KeyDown
  34. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  35. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  36. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  37. end}
  38. --Merged 2 functions into one by checking amount of arguments
  39. CAS.UnbindAction = CAS.BindAction
  40.  
  41. --This function will trigger the events that have been :Connect()'ed
  42. local function TriggerEvent(self,ev,...)
  43. for _,f in pairs(self[ev].Functions) do
  44. f(...)
  45. end
  46. end
  47. FakeMouse.TriggerEvent = TriggerEvent
  48. UIS.TriggerEvent = TriggerEvent
  49.  
  50. --Client communication
  51. local Event = Instance.new("RemoteEvent")
  52. Event.Name = "UserInput_Event"
  53. Event.OnServerEvent:Connect(function(plr,io)
  54. if plr~=RealPlayer then return end
  55. FakeMouse.Target = io.Target
  56. FakeMouse.Hit = io.Hit
  57. if not io.isMouse then
  58. local b = io.UserInputState == Enum.UserInputState.Begin
  59. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  60. return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
  61. end
  62. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  63. return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
  64. end
  65. for _,t in pairs(CAS.Actions) do
  66. for _,k in pairs(t.Keys) do
  67. if k==io.KeyCode then
  68. t.Function(t.Name,io.UserInputState,io)
  69. end
  70. end
  71. end
  72. FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  73. UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
  74. end
  75. end)
  76. Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
  77. local Mouse = owner:GetMouse()
  78. local UIS = game:GetService("UserInputService")
  79. local input = function(io,RobloxHandled)
  80. if RobloxHandled then return end
  81. --Since InputObject is a client-side instance, we create and pass table instead
  82. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  83. end
  84. UIS.InputBegan:Connect(input)
  85. UIS.InputEnded:Connect(input)
  86.  
  87. local h,t
  88. --Give the server mouse data every second frame, but only if the values changed
  89. --If player is not moving their mouse, client won't fire events
  90. local HB = game:GetService("RunService").Heartbeat
  91. while true do
  92. if h~=Mouse.Hit or t~=Mouse.Target then
  93. h,t=Mouse.Hit,Mouse.Target
  94. Event:FireServer({isMouse=true,Target=t,Hit=h})
  95. end
  96. --Wait 2 frames
  97. for i=1,2 do
  98. HB:Wait()
  99. end
  100. end]==],script)
  101.  
  102. ----Sandboxed game object that allows the usage of client-side methods and services
  103. --Real game object
  104. local RealGame = game
  105.  
  106. --Metatable for fake service
  107. local FakeService_Metatable = {
  108. __index = function(self,k)
  109. local s = rawget(self,"_RealService")
  110. if s then
  111. return typeof(s[k])=="function"
  112. and function(_,...)return s[k](s,...)end or s[k]
  113. end
  114. end,
  115. __newindex = function(self,k,v)
  116. local s = rawget(self,"_RealService")
  117. if s then s[k]=v end
  118. end
  119. }
  120. local function FakeService(t,RealService)
  121. t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
  122. return setmetatable(t,FakeService_Metatable)
  123. end
  124.  
  125. --Fake game object
  126. local FakeGame = {
  127. GetService = function(self,s)
  128. return rawget(self,s) or RealGame:GetService(s)
  129. end,
  130. Players = FakeService({
  131. LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
  132. },"Players"),
  133. UserInputService = FakeService(UIS,"UserInputService"),
  134. ContextActionService = FakeService(CAS,"ContextActionService"),
  135. RunService = FakeService({
  136. _btrs = {},
  137. RenderStepped = RealGame:GetService("RunService").Heartbeat,
  138. BindToRenderStep = function(self,name,_,fun)
  139. self._btrs[name] = self.Heartbeat:Connect(fun)
  140. end,
  141. UnbindFromRenderStep = function(self,name)
  142. self._btrs[name]:Disconnect()
  143. end,
  144. },"RunService")
  145. }
  146. rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
  147. FakeGame.service = FakeGame.GetService
  148. FakeService(FakeGame,game)
  149. --Changing owner to fake player object to support owner:GetMouse()
  150. game,owner = FakeGame,FakeGame.Players.LocalPlayer
  151. end
  152.  
  153. -----gimmie veggies
  154. print ("Made by DaOMEGAa32")
  155. local s = Instance.new("Sound")
  156.  
  157. s.Name = "theme"
  158. s.SoundId = "rbxassetid://3395159863"
  159. s.Volume = 4
  160. s.Looped = true
  161. s.archivable = false
  162.  
  163. s.Parent = game.Workspace
  164.  
  165. wait(0.2)
  166.  
  167. s:play()
  168. local pchar = game.Players.LocalPlayer.Character -- Can change player here --
  169.  
  170. for i,v in pairs(pchar.Torso:GetChildren()) do
  171. if v.ClassName == 'Decal' then
  172. v:Destroy()
  173. end
  174. end
  175. for i,v in pairs(pchar:GetChildren()) do
  176. if v.ClassName == 'Hat' then
  177. v:Destroy()
  178. end
  179. end
  180.  
  181. for i,v in pairs(pchar.Head:GetChildren()) do
  182. if v.ClassName == 'Decal' then
  183. v:Destroy()
  184. end
  185. end
  186.  
  187. local duck = Instance.new('SpecialMesh', pchar.Torso)
  188. duck.MeshType = 'FileMesh'
  189. duck.MeshId = 'rbxassetid://1719079794'
  190. duck.TextureId = 'rbxassetid://1719079844'
  191. duck.Scale = Vector3.new(0.1, 0.1, 0.1)
  192. pchar.Head.Transparency = 1
  193. pchar['Left Arm'].Transparency = 1
  194. pchar['Right Arm'].Transparency = 1
  195. pchar['Left Leg'].Transparency = 1
  196. pchar['Right Leg'].Transparency = 1
  197. CV="White"
  198.  
  199. p = game.Players.LocalPlayer
  200. char = p.Character
  201. local txt = Instance.new("BillboardGui", char)
  202. txt.Adornee = char .Head
  203. txt.Name = "_status"
  204. txt.Size = UDim2.new(2, 0, 1.2, 0)
  205. txt.StudsOffset = Vector3.new(-9, 8, 0)
  206. local text = Instance.new("TextLabel", txt)
  207. text.Size = UDim2.new(10, 0, 7, 0)
  208. text.FontSize = "Size24"
  209. text.TextScaled = true
  210. text.TextTransparency = 0
  211. text.BackgroundTransparency = 1
  212. text.TextTransparency = 0
  213. text.TextStrokeTransparency = 1
  214. text.Font = "Code"
  215. text.TextStrokeColor3 = Color3.fromRGB(255,0,0)
  216.  
  217. v=Instance.new("Part")
  218. v.Name = "ColorBrick"
  219. v.Parent=p.Character
  220. v.FormFactor="Symmetric"
  221. v.Anchored=true
  222. v.CanCollide=false
  223. v.BottomSurface="Smooth"
  224. v.TopSurface="Smooth"
  225. v.Size=Vector3.new(10,5,3)
  226. v.Transparency=1
  227. v.CFrame=char.Torso.CFrame
  228. v.BrickColor=BrickColor.new(CV)
  229. v.Transparency=1
  230. text.TextColor3 = Color3.fromRGB(255,192,203)
  231. v.Shape="Block"
  232. text.Text = "Guinea pig"
  233.  
  234. --Converted with ttyyuu12345's model to script plugin v4
  235. function sandbox(var,func)
  236. local env = getfenv(func)
  237. local newenv = setmetatable({},{
  238. __index = function(self,k)
  239. if k=="script" then
  240. return var
  241. else
  242. return env[k]
  243. end
  244. end,
  245. })
  246. setfenv(func,newenv)
  247. return func
  248. end
  249. cors = {}
  250. mas = Instance.new("Model",game:GetService("Lighting"))
  251. Tool0 = Instance.new("Tool")
  252. Part1 = Instance.new("Part")
  253. SpecialMesh2 = Instance.new("SpecialMesh")
  254. Sound3 = Instance.new("Sound")
  255. Script4 = Instance.new("Script")
  256. Sound5 = Instance.new("Sound")
  257. Script6 = Instance.new("Script")
  258. Tool7 = Instance.new("Tool")
  259. Part8 = Instance.new("Part")
  260. Sound9 = Instance.new("Sound")
  261. Sound10 = Instance.new("Sound")
  262. Sound11 = Instance.new("Sound")
  263. Script12 = Instance.new("Script")
  264. LocalScript13 = Instance.new("LocalScript")
  265. Camera14 = Instance.new("Camera")
  266. Tool15 = Instance.new("Tool")
  267. Sound16 = Instance.new("Sound")
  268. Script17 = Instance.new("Script")
  269. Tool0.Name = "poo"
  270. Tool0.Parent = mas
  271. Tool0.TextureId = "http://www.roblox.com/asset/?id=28937264"
  272. Tool0.Grip = CFrame.new(0, 0.100000001, 0, 0, -0, 1, 0, 1, 0, -1, 0, 0)
  273. Tool0.GripForward = Vector3.new(-1, -0, -0)
  274. Tool0.GripPos = Vector3.new(0, 0.100000001, 0)
  275. Tool0.GripRight = Vector3.new(0, 0, -1)
  276. Part1.Name = "Handle"
  277. Part1.Parent = Tool0
  278. Part1.CFrame = CFrame.new(13.8183784, 1.00001204, 31.0377197, 1, -1.49596917e-18, -8.62736868e-19, 1.49596917e-18, 1, -2.2265894e-08, 8.62736868e-19, 2.2265894e-08, 1)
  279. Part1.Position = Vector3.new(13.8183784, 1.00001204, 31.0377197)
  280. Part1.Color = Color3.new(0.666667, 0.333333, 0)
  281. Part1.Size = Vector3.new(1, 2, 1)
  282. Part1.BottomSurface = Enum.SurfaceType.Smooth
  283. Part1.BrickColor = BrickColor.new("CGA brown")
  284. Part1.TopSurface = Enum.SurfaceType.Smooth
  285. Part1.brickColor = BrickColor.new("CGA brown")
  286. SpecialMesh2.Parent = Part1
  287. SpecialMesh2.MeshId = "rbxassetid://491491086"
  288. SpecialMesh2.Scale = Vector3.new(0.100000001, 0.100000001, 0.100000001)
  289. SpecialMesh2.MeshType = Enum.MeshType.FileMesh
  290. Sound3.Parent = Part1
  291. Sound3.SoundId = "http://www.roblox.com/asset/?id=28940430"
  292. Script4.Name = "PlantBomb"
  293. Script4.Parent = Tool0
  294. table.insert(cors,sandbox(Script4,function()
  295. Tool = script.Parent
  296. local bomb = nil
  297. local debris = game:GetService("Debris")
  298.  
  299. function plant(pos)
  300.  
  301. Tool.Handle.Sound:Play()
  302.  
  303. local vCharacter = Tool.Parent
  304. local vPlayer = game.Players:playerFromCharacter(vCharacter)
  305.  
  306. local spawnPos = vCharacter.PrimaryPart.Position
  307.  
  308. bomb = Instance.new("Part")
  309. bomb.Locked = true
  310. bomb.Size = Vector3.new(1,2,1)
  311. bomb.Name = "BananaPeel"
  312. bomb.Position = pos
  313.  
  314. local mesh = Tool.Handle.Mesh:clone()
  315. mesh.Parent = bomb
  316.  
  317. local creator_tag = Instance.new("ObjectValue")
  318. creator_tag.Value = vPlayer
  319. creator_tag.Name = "creator"
  320. creator_tag.Parent = bomb
  321.  
  322. local slip = Tool.SlipSound:clone()
  323. slip.Parent = bomb
  324. slip.Name = "SlipSound"
  325.  
  326. local script = Tool.BananaScript:clone()
  327. script.Parent = bomb
  328. script.Disabled = false
  329.  
  330. bomb.Parent = game.Workspace
  331.  
  332. debris:AddItem(bomb, 120)
  333.  
  334. end
  335.  
  336. Tool.Enabled = true
  337. function onActivated()
  338.  
  339. if not Tool.Enabled then
  340. return
  341. end
  342.  
  343. Tool.Enabled = false
  344.  
  345. local character = Tool.Parent;
  346. local humanoid = character.Humanoid
  347. if humanoid == nil then
  348. print("Humanoid not found")
  349. return
  350. end
  351.  
  352. local targetPos = humanoid.TargetPoint
  353.  
  354. Tool.Handle.Transparency = 1
  355. plant(Tool.Handle.Position)
  356.  
  357. wait(0.2)
  358.  
  359. Tool.Handle.Transparency = 0
  360. Tool.Enabled = true
  361. end
  362.  
  363.  
  364. script.Parent.Activated:connect(onActivated)
  365. end))
  366. Sound5.Name = "SlipSound"
  367. Sound5.Parent = Tool0
  368. Sound5.SoundId = "rbxassetid://251309043"
  369. Sound5.Volume = 10
  370. Script6.Name = "BananaScript"
  371. Script6.Parent = Tool0
  372. table.insert(cors,sandbox(Script6,function()
  373. wait(0.5)
  374.  
  375. local banana = script.Parent
  376.  
  377. local touched = false
  378.  
  379. function onTouched(part)
  380.  
  381. if touched then
  382. return
  383. end
  384.  
  385. touched = true
  386.  
  387. local humanoid = part.Parent:FindFirstChild("Humanoid")
  388. if humanoid ~= nil then
  389.  
  390. banana.SlipSound:Play()
  391. humanoid.Jump = true
  392. humanoid.Sit = true
  393. wait(0.9)
  394. humanoid.Sit = false
  395.  
  396. end
  397.  
  398. touched = false
  399.  
  400. end
  401.  
  402. banana.Touched:connect(onTouched)
  403.  
  404. end))
  405. Script6.Disabled = true
  406. Tool7.Name = "bite"
  407. Tool7.Parent = mas
  408. Tool7.TextureId = "rbxasset://Textures/Sword128.png"
  409. Tool7.Grip = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
  410. Tool7.GripForward = Vector3.new(-1, -0, -0)
  411. Tool7.GripPos = Vector3.new(0, 0, -1.5)
  412. Tool7.GripRight = Vector3.new(0, 1, 0)
  413. Tool7.GripUp = Vector3.new(0, 0, 1)
  414. Part8.Name = "Handle"
  415. Part8.Parent = Tool7
  416. Part8.CFrame = CFrame.new(27.2814255, 1.88732195, 4.34302521, 0.0910440385, -0.881099463, 0.464084357, 0.537011683, 0.435894847, 0.722229123, -0.838648558, 0.183463722, 0.512845576)
  417. Part8.Orientation = Vector3.new(-46.2400017, 42.1399994, 50.9300003)
  418. Part8.Position = Vector3.new(27.2814255, 1.88732195, 4.34302521)
  419. Part8.Rotation = Vector3.new(-54.6199989, 27.6499996, 84.0999985)
  420. Part8.Color = Color3.new(0.388235, 0.372549, 0.384314)
  421. Part8.Transparency = 234
  422. Part8.Size = Vector3.new(1, 0.800000012, 4)
  423. Part8.BottomSurface = Enum.SurfaceType.Smooth
  424. Part8.BrickColor = BrickColor.new("Dark stone grey")
  425. Part8.Locked = true
  426. Part8.Reflectance = 0.40000000596046
  427. Part8.TopSurface = Enum.SurfaceType.Smooth
  428. Part8.brickColor = BrickColor.new("Dark stone grey")
  429. Part8.FormFactor = Enum.FormFactor.Plate
  430. Part8.formFactor = Enum.FormFactor.Plate
  431. Sound9.Name = "SwordSlash"
  432. Sound9.Parent = Part8
  433. Sound9.SoundId = "rbxassetid://618667795"
  434. Sound9.Volume = 0.69999998807907
  435. Sound10.Name = "SwordLunge"
  436. Sound10.Parent = Part8
  437. Sound10.SoundId = "rbxassetid://618667795"
  438. Sound10.Volume = 0.60000002384186
  439. Sound11.Name = "Unsheath"
  440. Sound11.Parent = Part8
  441. Sound11.SoundId = "rbxassetid://618667795"
  442. Sound11.Volume = 1
  443. Script12.Name = "SwordScript"
  444. Script12.Parent = Tool7
  445. table.insert(cors,sandbox(Script12,function()
  446. --Rescripted by Luckymaxer
  447. --EUROCOW WAS HERE BECAUSE I MADE THE PARTICLES AND THEREFORE THIS ENTIRE SWORD PRETTY AND LOOK PRETTY WORDS AND I'D LIKE TO DEDICATE THIS TO MY FRIENDS AND HI LUCKYMAXER PLS FIX SFOTH SWORDS TY LOVE Y'ALl
  448. --Updated for R15 avatars by StarWars
  449. --Re-updated by TakeoHonorable
  450.  
  451. Tool = script.Parent
  452. Handle = Tool:WaitForChild("Handle")
  453.  
  454. function Create(ty)
  455. return function(data)
  456. local obj = Instance.new(ty)
  457. for k, v in pairs(data) do
  458. if type(k) == 'number' then
  459. v.Parent = obj
  460. else
  461. obj[k] = v
  462. end
  463. end
  464. return obj
  465. end
  466. end
  467.  
  468. local BaseUrl = "rbxassetid://"
  469.  
  470. Players = game:GetService("Players")
  471. Debris = game:GetService("Debris")
  472. RunService = game:GetService("RunService")
  473.  
  474. DamageValues = {
  475. BaseDamage = 5,
  476. SlashDamage = 10,
  477. LungeDamage = 30
  478. }
  479.  
  480. --For R15 avatars
  481. Animations = {
  482. R15Slash = 522635514,
  483. R15Lunge = 522638767
  484. }
  485.  
  486. Damage = DamageValues.BaseDamage
  487.  
  488. Grips = {
  489. Up = CFrame.new(0, 0, -1.70000005, 0, 0, 1, 1, 0, 0, 0, 1, 0),
  490. Out = CFrame.new(0, 0, -1.70000005, 0, 1, 0, 1, -0, 0, 0, 0, -1)
  491. }
  492.  
  493. Sounds = {
  494. Slash = Handle:WaitForChild("SwordSlash"),
  495. Lunge = Handle:WaitForChild("SwordLunge"),
  496. Unsheath = Handle:WaitForChild("Unsheath")
  497. }
  498.  
  499. ToolEquipped = false
  500.  
  501. --For Omega Rainbow Katana thumbnail to display a lot of particles.
  502. for i, v in pairs(Handle:GetChildren()) do
  503. if v:IsA("ParticleEmitter") then
  504. v.Rate = 20
  505. end
  506. end
  507.  
  508. Tool.Grip = Grips.Up
  509. Tool.Enabled = true
  510.  
  511. function IsTeamMate(Player1, Player2)
  512. return (Player1 and Player2 and not Player1.Neutral and not Player2.Neutral and Player1.TeamColor == Player2.TeamColor)
  513. end
  514.  
  515. function TagHumanoid(humanoid, player)
  516. local Creator_Tag = Instance.new("ObjectValue")
  517. Creator_Tag.Name = "creator"
  518. Creator_Tag.Value = player
  519. Debris:AddItem(Creator_Tag, 2)
  520. Creator_Tag.Parent = humanoid
  521. end
  522.  
  523. function UntagHumanoid(humanoid)
  524. for i, v in pairs(humanoid:GetChildren()) do
  525. if v:IsA("ObjectValue") and v.Name == "creator" then
  526. v:Destroy()
  527. end
  528. end
  529. end
  530.  
  531. function Blow(Hit)
  532. if not Hit or not Hit.Parent or not CheckIfAlive() or not ToolEquipped then
  533. return
  534. end
  535. local RightArm = Character:FindFirstChild("Right Arm") or Character:FindFirstChild("RightHand")
  536. if not RightArm then
  537. return
  538. end
  539. local RightGrip = RightArm:FindFirstChild("RightGrip")
  540. if not RightGrip or (RightGrip.Part0 ~= Handle and RightGrip.Part1 ~= Handle) then
  541. return
  542. end
  543. local character = Hit.Parent
  544. if character == Character then
  545. return
  546. end
  547. local humanoid = character:FindFirstChildOfClass("Humanoid")
  548. if not humanoid or humanoid.Health == 0 then
  549. return
  550. end
  551. local player = Players:GetPlayerFromCharacter(character)
  552. if player and (player == Player or IsTeamMate(Player, player)) then
  553. return
  554. end
  555. UntagHumanoid(humanoid)
  556. TagHumanoid(humanoid, Player)
  557. humanoid:TakeDamage(Damage)
  558. end
  559.  
  560.  
  561. function Attack()
  562. Damage = DamageValues.SlashDamage
  563. Sounds.Slash:Play()
  564.  
  565. if Humanoid then
  566. if Humanoid.RigType == Enum.HumanoidRigType.R6 then
  567. local Anim = Instance.new("StringValue")
  568. Anim.Name = "toolanim"
  569. Anim.Value = "Slash"
  570. Anim.Parent = Tool
  571. elseif Humanoid.RigType == Enum.HumanoidRigType.R15 then
  572. local Anim = Tool:FindFirstChild("R15Slash")
  573. if Anim then
  574. local Track = Humanoid:LoadAnimation(Anim)
  575. Track:Play(0)
  576. end
  577. end
  578. end
  579. end
  580.  
  581. function Lunge()
  582. Damage = DamageValues.LungeDamage
  583.  
  584. Sounds.Lunge:Play()
  585.  
  586. if Humanoid then
  587. if Humanoid.RigType == Enum.HumanoidRigType.R6 then
  588. local Anim = Instance.new("StringValue")
  589. Anim.Name = "toolanim"
  590. Anim.Value = "Lunge"
  591. Anim.Parent = Tool
  592. elseif Humanoid.RigType == Enum.HumanoidRigType.R15 then
  593. local Anim = Tool:FindFirstChild("R15Lunge")
  594. if Anim then
  595. local Track = Humanoid:LoadAnimation(Anim)
  596. Track:Play(0)
  597. end
  598. end
  599. end
  600. --[[
  601. if CheckIfAlive() then
  602. local Force = Instance.new("BodyVelocity")
  603. Force.velocity = Vector3.new(0, 10, 0)
  604. Force.maxForce = Vector3.new(0, 4000, 0)
  605. Debris:AddItem(Force, 0.4)
  606. Force.Parent = Torso
  607. end
  608. ]]
  609.  
  610. wait(0.2)
  611. Tool.Grip = Grips.Out
  612. wait(0.6)
  613. Tool.Grip = Grips.Up
  614.  
  615. Damage = DamageValues.SlashDamage
  616. end
  617.  
  618. Tool.Enabled = true
  619. LastAttack = 0
  620.  
  621. function Activated()
  622. if not Tool.Enabled or not ToolEquipped or not CheckIfAlive() then
  623. return
  624. end
  625. Tool.Enabled = false
  626. local Tick = RunService.Stepped:wait()
  627. if (Tick - LastAttack < 0.2) then
  628. Lunge()
  629. else
  630. Attack()
  631. end
  632. LastAttack = Tick
  633. --wait(0.5)
  634. Damage = DamageValues.BaseDamage
  635. local SlashAnim = (Tool:FindFirstChild("R15Slash") or Create("Animation"){
  636. Name = "R15Slash",
  637. AnimationId = BaseUrl .. Animations.R15Slash,
  638. Parent = Tool
  639. })
  640.  
  641. local LungeAnim = (Tool:FindFirstChild("R15Lunge") or Create("Animation"){
  642. Name = "R15Lunge",
  643. AnimationId = BaseUrl .. Animations.R15Lunge,
  644. Parent = Tool
  645. })
  646. Tool.Enabled = true
  647. end
  648.  
  649. function CheckIfAlive()
  650. return (((Player and Player.Parent and Character and Character.Parent and Humanoid and Humanoid.Parent and Humanoid.Health > 0 and Torso and Torso.Parent) and true) or false)
  651. end
  652.  
  653. function Equipped()
  654. Character = Tool.Parent
  655. Player = Players:GetPlayerFromCharacter(Character)
  656. Humanoid = Character:FindFirstChildOfClass("Humanoid")
  657. Torso = Character:FindFirstChild("Torso") or Character:FindFirstChild("HumanoidRootPart")
  658. if not CheckIfAlive() then
  659. return
  660. end
  661. ToolEquipped = true
  662. Sounds.Unsheath:Play()
  663. end
  664.  
  665. function Unequipped()
  666. Tool.Grip = Grips.Up
  667. ToolEquipped = false
  668. end
  669.  
  670. Tool.Activated:Connect(Activated)
  671. Tool.Equipped:Connect(Equipped)
  672. Tool.Unequipped:Connect(Unequipped)
  673.  
  674. Connection = Handle.Touched:Connect(Blow)
  675. end))
  676. LocalScript13.Name = "MouseIcon"
  677. LocalScript13.Parent = Tool7
  678. table.insert(cors,sandbox(LocalScript13,function()
  679. --Made by Luckymaxer
  680.  
  681. Mouse_Icon = "rbxasset://textures/GunCursor.png"
  682. Reloading_Icon = "rbxasset://textures/GunWaitCursor.png"
  683.  
  684. Tool = script.Parent
  685.  
  686. Mouse = nil
  687.  
  688. function UpdateIcon()
  689. if Mouse then
  690. Mouse.Icon = Tool.Enabled and Mouse_Icon or Reloading_Icon
  691. end
  692. end
  693.  
  694. function OnEquipped(ToolMouse)
  695. Mouse = ToolMouse
  696. UpdateIcon()
  697. end
  698.  
  699. function OnChanged(Property)
  700. if Property == "Enabled" then
  701. UpdateIcon()
  702. end
  703. end
  704.  
  705. Tool.Equipped:Connect(OnEquipped)
  706. Tool.Changed:Connect(OnChanged)
  707.  
  708. end))
  709. Camera14.Name = "ThumbnailCamera"
  710. Camera14.Parent = Tool7
  711. Camera14.CFrame = CFrame.new(-5.67428207, 2.83736515, 3.79184556, 0.289030313, 0.416664183, -0.861888885, -0, 0.900314331, 0.435240269, 0.957319915, -0.125797629, 0.260218143)
  712. Camera14.CoordinateFrame = CFrame.new(-5.67428207, 2.83736515, 3.79184556, 0.289030313, 0.416664183, -0.861888885, -0, 0.900314331, 0.435240269, 0.957319915, -0.125797629, 0.260218143)
  713. Camera14.Focus = CFrame.new(-3.9505043, 1.96688461, 3.27140927, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  714. Camera14.focus = CFrame.new(-3.9505043, 1.96688461, 3.27140927, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  715. Tool15.Name = "Sound Tool"
  716. Tool15.Parent = mas
  717. Tool15.TextureId = "rbxassetid://1059047363"
  718. Tool15.RequiresHandle = false
  719. Sound16.Name = "Sound_Needs_ID"
  720. Sound16.Parent = Tool15
  721. Sound16.SoundId = "rbxassetid://2568843432"
  722. Sound16.Volume = 10
  723. Script17.Parent = Tool15
  724. table.insert(cors,sandbox(Script17,function()
  725. function onActivated()
  726. script.Parent.Sound_Needs_ID:Play()
  727. end
  728.  
  729. script.Parent.Activated:Connect(onActivated)
  730. end))
  731. for i,v in pairs(mas:GetChildren()) do
  732. v.Parent = game:GetService("Players").LocalPlayer.Backpack
  733. pcall(function() v:MakeJoints() end)
  734. end
  735. mas:Destroy()
  736. for i,v in pairs(cors) do
  737. spawn(function()
  738. pcall(v)
  739. end)
  740. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement