carlosname

knife wip

Apr 29th, 2020
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if game:GetService("RunService"):IsClient()then error("Please run as a server script. Use h/ instead of hl/.")end;print("FE Compatibility: by WaverlyCole");InternalData = {}
  2. do
  3. script.Parent = owner.Character
  4. local Event = Instance.new("RemoteEvent");Event.Name = "UserInput"
  5. local function NewFakeEvent()
  6. local Bind = Instance.new("BindableEvent")
  7. local Fake;Fake = {Connections = {},
  8. fakeEvent=true;
  9. Connect=function(self,Func)
  10. Bind.Event:connect(Func)
  11. self.Connections[Bind] = true
  12. return setmetatable({Connected = true},{
  13. __index = function (self,Index)
  14. if Index:lower() == "disconnect" then
  15. return function() Fake.Connections[Bind] = false;self.Connected = false end
  16. end
  17. return Fake[Index]
  18. end;
  19. __tostring = function() return "Connection" end;
  20. })
  21. end}
  22. Fake.connect = Fake.Connect;return Fake;
  23. end
  24. local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
  25. local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
  26. local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
  27. self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
  28. end};ContextActionService.UnBindAction = ContextActionService.BindAction
  29. local function TriggerEvent(self,Event,...)
  30. local Trigger = Mouse[Event]
  31. if Trigger and Trigger.fakeEvent and Trigger.Connections then
  32. for Connection,Active in pairs(Trigger.Connections) do if Active then Connection:Fire(...) end end
  33. end
  34. end
  35. Mouse.TrigEvent = TriggerEvent;UserInputService.TrigEvent = TriggerEvent
  36. Event.OnServerEvent:Connect(function(FiredBy,Input)
  37. if FiredBy.Name ~= owner.Name then return end
  38. if Input.MouseEvent then
  39. Mouse.Target = Input.Target;Mouse.Hit = Input.Hit
  40. else
  41. local Begin = Input.UserInputState == Enum.UserInputState.Begin
  42. if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") end
  43. for _,Action in pairs(ContextActionService.Actions) do
  44. for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end
  45. end
  46. Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower())
  47. UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false)
  48. end
  49. end)
  50. InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService
  51. Event.Parent = NLS([[
  52. local Player = owner;local Event = script:WaitForChild("UserInput");local UserInputService = game:GetService("UserInputService");local Mouse = Player:GetMouse()
  53. local Input = function(Input,gameProcessedEvent)
  54. if gameProcessedEvent then return end
  55. Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
  56. end
  57. UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input)
  58. local Hit,Target
  59. while wait(1/30) do
  60. if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
  61. Hit,Target = Mouse.Hit,Mouse.Target;Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
  62. end
  63. end
  64. ]],owner.Character)
  65. end
  66. RealGame = game;game = setmetatable({},{
  67. __index = function (self,Index)
  68. local Sandbox = function (Thing)
  69. if Thing:IsA("Player") then
  70. local RealPlayer = Thing
  71. return setmetatable({},{
  72. __index = function (self,Index)
  73. local Type = type(RealPlayer[Index])
  74. if Type == "function" then
  75. if Index:lower() == "getmouse" or Index:lower() == "mouse" then
  76. return function (self)return InternalData["Mouse"] end
  77. end
  78. return function (self,...)return RealPlayer[Index](RealPlayer,...) end
  79. end
  80. return RealPlayer[Index]
  81. end;
  82. __tostring = function(self) return RealPlayer.Name end
  83. })
  84. end
  85. end
  86. if RealGame[Index] then
  87. local Type = type(RealGame[Index])
  88. if Type == "function" then
  89. if Index:lower() == "getservice" or Index:lower() == "service" then
  90. return function (self,Service)
  91. local FakeServices = {
  92. ["players"] = function()
  93. return setmetatable({},{
  94. __index = function (self2,Index2)
  95. local RealService = RealGame:GetService(Service)
  96. local Type2 = type(Index2)
  97. if Type2 == "function" then
  98. return function (self,...) return RealService[Index2](RealService,...)end
  99. else
  100. if Index2:lower() == "localplayer" then return Sandbox(owner) end
  101. return RealService[Index2]
  102. end
  103. end;
  104. __tostring = function(self) return RealGame:GetService(Service).Name end
  105. })
  106. end;
  107. ["contextactionservice"] = function() return InternalData["ContextActionService"] end;
  108. ["userinputservice"] = function() return InternalData["UserInputService"] end;
  109. ["runservice"] = function()
  110. return setmetatable({},{
  111. __index = function(self2,Index2)
  112. local RealService = RealGame:GetService(Service)
  113. local Type2 = type(Index2)
  114. if Type2 == "function" then
  115. return function (self,...) return RealService[Index2](RealService,...) end
  116. else
  117. local RunServices = {
  118. ["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return RealGame:GetService("RunService").Stepped:Connect(Function) end end;
  119. ["renderstepped"] = function() return RealService["Stepped"] end
  120. }
  121. if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end
  122. return RealService[Index2]
  123. end
  124. end
  125. })
  126. end
  127. }
  128. if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end
  129. return RealGame:GetService(Service)
  130. end
  131. end
  132. return function (self,...) return RealGame[Index](RealGame,...) end
  133. else
  134. if game:GetService(Index) then return game:GetService(Index) end
  135. return RealGame[Index]
  136. end
  137. end
  138. return nil
  139. end
  140. });Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("Complete! Running...")
  141.  
  142.  
  143. local p = game.Players.LocalPlayer
  144. local char = p.Character
  145. local hed = char.Head
  146. local LocalPlayer = p
  147.  
  148. local Player = game.Players.localPlayer
  149. local Character = p.Character
  150.  
  151. local LeftArm2 = Character["Left Arm"]
  152. local RightArm2 = Character["Right Arm"]
  153. local LeftLeg2 = Character["Left Leg"]
  154. local RightLeg2 = Character["Right Leg"]
  155. local Head2 = Character.Head
  156. local Torso2 = Character.Torso
  157.  
  158. local player = game.Players.LocalPlayer
  159.  
  160.  
  161.  
  162. cut = Instance.new("Sound", Character)
  163. cut.SoundId = "https://www.roblox.com/asset/?id=97095069"
  164. cut.Volume = 1.5
  165. thri = Instance.new("Sound", Character)
  166. thri.SoundId = "https://www.roblox.com/asset/?id=186311262"
  167. thri.Volume = 2.5
  168. WRY = Instance.new("Sound", Character)
  169. WRY.SoundId = "https://www.roblox.com/asset/?id=910713928"
  170. WRY.Volume = 5
  171.  
  172. ff = Instance.new("ForceField", game.Players.LocalPlayer.Character)
  173. ff.Visible = false
  174.  
  175. local Players=game:service'Players'
  176. local Player=Players.LocalPlayer
  177. local Mouse=Player:GetMouse''
  178. local RenderStepped=game:service'RunService'.RenderStepped
  179.  
  180. local MeshId='http://www.roblox.com/asset?id=202083123'
  181. local TextureId='http://www.roblox.com/asset/?id=189436355'
  182.  
  183. local KnifeSpeed= 120
  184.  
  185. Mouse.Button1Down:connect(function()
  186. cut:Play()
  187. if Mouse.Target then
  188. local Knife=Instance.new('Part',Player.Character)
  189. Knife.CanCollide=false
  190. Knife.Size=Vector3.new(2,2,2)
  191. Knife.CFrame=Player.Character.Torso.CFrame
  192. local KnifeMesh=Instance.new('SpecialMesh',Knife)
  193. KnifeMesh.MeshType='FileMesh'
  194. KnifeMesh.MeshId=MeshId
  195. KnifeMesh.TextureId=TextureId
  196. KnifeMesh.Scale=Vector3.new(1,1,1)
  197. local BodyVel=Instance.new('BodyVelocity',Knife)
  198. BodyVel.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  199. local BodyGyro=Instance.new('BodyGyro',Knife)
  200. BodyGyro.maxTorque=Vector3.new(math.huge,math.huge,math.huge)
  201. BodyGyro.P=2e4
  202. coroutine.wrap(function()
  203. RenderStepped:connect(function()
  204. BodyGyro.cframe=CFrame.new(Knife.Position,Mouse.Hit.p)
  205. BodyVel.velocity=Knife.CFrame.lookVector*KnifeSpeed
  206. end)
  207. end)()
  208. Knife.Touched:connect(function(p)
  209. if p.Parent~=Player.Character and p.Parent:FindFirstChild'Humanoid' then
  210. p.Parent:BreakJoints()
  211. Knife:Destroy''
  212. thri:Play()
  213. end
  214. end)
  215. end
  216. end)
  217.  
  218. mse = Player:GetMouse()
  219.  
  220. sound = Instance.new("Sound", Character)
  221. sound.SoundId = "https://www.roblox.com/asset/?id=840567549"
  222. sound.Volume = 2.5
  223. sound2 = Instance.new("Sound", Character)
  224. sound2.SoundId = "https://www.roblox.com/asset/?id=616594208"
  225. sound2.Volume = 2.5
  226. sound3 = Instance.new("Sound", Character)
  227. sound3.SoundId = "https://www.roblox.com/asset/?id=616576400"
  228. sound3.Volume = 1.8
  229. sound4 = Instance.new("Sound", Character)
  230. sound4.SoundId = "https://www.roblox.com/asset/?id=616576400"
  231. sound4.Volume = 2
  232. TSTheme = Instance.new("Sound", Character)
  233. TSTheme.SoundId = "https://www.roblox.com/asset/?id=910713928"
  234. TSTheme.Volume = 2
  235. canworld = true
  236. mse.KeyDown:connect(function(key)
  237. key = key:lower()
  238. if key == "t" then
  239. if canworld == false then return end
  240. if canworld then
  241. canworld = false
  242. sound3:Play()
  243. sound:Play()
  244. sound4:Play()
  245. TSTheme:Play()
  246.  
  247. local function spawnpart()
  248. sphere = Instance.new("Part")
  249. --game.Debris:AddItem(sphere,3)
  250. local sm = Instance.new("SpecialMesh", sphere)
  251. sm.MeshType = "Sphere"
  252. sphere.Transparency = 0.5
  253. sphere.Anchored = true
  254. sphere.CanCollide = false
  255. sphere.Material = "Neon"
  256. sphere.BrickColor = BrickColor.new("Black")
  257. end
  258.  
  259. local function weld(lol)
  260. local weld = Instance.new("Weld", Player.Character.Torso)
  261. weld.Part0 = Player.Character.Torso
  262. weld.Part1 = lol
  263. weld.C0 = Player.Character.Torso.CFrame:inverse()
  264. weld.C1 = lol.CFrame:inverse()
  265. end
  266. wait()
  267. spawnpart()
  268. for i, v in pairs(game.Players:GetChildren()) do
  269. t = v.Character:FindFirstChild("Torso")
  270. if t then
  271. t.Anchored = true
  272. Player.Character:FindFirstChild("Torso").Anchored = false
  273. end
  274. RA = v.Character:FindFirstChild("Right Arm")
  275. if RA then
  276. RA.Anchored = true
  277. Player.Character:FindFirstChild("Right Arm").Anchored = false
  278. end
  279. LA = v.Character:FindFirstChild("Left Arm")
  280. if LA then
  281. LA.Anchored = true
  282. Player.Character:FindFirstChild("Left Arm").Anchored = false
  283. end
  284. RL = v.Character:FindFirstChild("Right Leg")
  285. if RL then
  286. RL.Anchored = true
  287. Player.Character:FindFirstChild("Right Leg").Anchored = false
  288. end
  289. LL = v.Character:FindFirstChild("Left Leg")
  290. if LL then
  291. LL.Anchored = true
  292. Player.Character:FindFirstChild("Left Leg").Anchored = false
  293. end
  294. end
  295. weld(sphere)
  296.  
  297.  
  298. sphere.Parent = Character.Torso
  299. for i = 1,3 do
  300. sphere.Size = sphere.Size + Vector3.new(50,50,50)
  301. wait()
  302. end
  303. wait()
  304. sphere:Destroy()
  305. KnifeSpeed = 0
  306.  
  307. wait(0.3)
  308.  
  309. wait(0.3)
  310.  
  311. wait(0.2)
  312.  
  313. wait()
  314. end
  315. end
  316. end
  317. )
  318.  
  319. mse.KeyDown:connect(function(key)
  320. key = key:lower()
  321. if key == "h" then
  322. canworld = true
  323. sound2:Play()
  324. wait()
  325. KnifeSpeed = 1
  326.  
  327. wait(0.5)
  328. KnifeSpeed = 1.2
  329.  
  330. wait(0.5)
  331. KnifeSpeed = 1.4
  332.  
  333. wait(0.3)
  334. KnifeSpeed = 1.5
  335.  
  336. wait(0.2)
  337.  
  338.  
  339. for i, v in pairs(game.Players:GetChildren()) do
  340. t = v.Character:FindFirstChild("Torso")
  341. if t then
  342. t.Anchored = false
  343. end
  344. RA = v.Character:FindFirstChild("Right Arm")
  345. if RA then
  346. RA.Anchored = false
  347. end
  348. LA = v.Character:FindFirstChild("Left Arm")
  349. if LA then
  350. LA.Anchored = false
  351. end
  352. RL = v.Character:FindFirstChild("Right Leg")
  353. if RL then
  354. RL.Anchored = false
  355. end
  356. LL = v.Character:FindFirstChild("Left Leg")
  357. if LL then
  358. LL.Anchored = false
  359. end
  360. end
  361. KnifeSpeed = 120
  362. TSTheme:Stop()
  363. end
  364. end)
Advertisement
Add Comment
Please, Sign In to add comment