Advertisement
The_God_M8

wa wa is that

May 11th, 2019
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.24 KB | None | 0 0
  1. --]]
  2. --//====================================================\\--
  3. --|| CREATED BY SHACKLUSTER
  4. --\\====================================================//--
  5. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  6. local Player,game,owner = owner,game
  7. local RealPlayer = Player
  8. do
  9. print("FE Compatibility code by Mokiros")
  10. local rp = RealPlayer
  11. script.Parent = rp.Character
  12.  
  13. --RemoteEvent for communicating
  14. local Event = Instance.new("RemoteEvent")
  15. Event.Name = "UserInput_Event"
  16.  
  17. --Fake event to make stuff like Mouse.KeyDown work
  18. local function fakeEvent()
  19. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  20. t.connect = t.Connect
  21. return t
  22. end
  23.  
  24. --Creating fake input objects with fake variables
  25. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  26. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  27. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  28. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  29. end}
  30. --Merged 2 functions into one by checking amount of arguments
  31. CAS.UnbindAction = CAS.BindAction
  32.  
  33. --This function will trigger the events that have been :Connect()'ed
  34. local function te(self,ev,...)
  35. local t = m[ev]
  36. if t and t._fakeEvent then
  37. for _,f in pairs(t.Functions) do
  38. f(...)
  39. end
  40. end
  41. end
  42. m.TrigEvent = te
  43. UIS.TrigEvent = te
  44.  
  45. Event.OnServerEvent:Connect(function(plr,io)
  46. if plr~=rp then return end
  47. m.Target = io.Target
  48. m.Hit = io.Hit
  49. if not io.isMouse then
  50. local b = io.UserInputState == Enum.UserInputState.Begin
  51. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  52. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  53. end
  54. for _,t in pairs(CAS.Actions) do
  55. for _,k in pairs(t.Keys) do
  56. if k==io.KeyCode then
  57. t.Function(t.Name,io.UserInputState,io)
  58. end
  59. end
  60. end
  61. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  62. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  63. end
  64. end)
  65. Event.Parent = NLS([==[
  66. local Player = game:GetService("Players").LocalPlayer
  67. local Event = script:WaitForChild("UserInput_Event")
  68.  
  69. local Mouse = Player:GetMouse()
  70. local UIS = game:GetService("UserInputService")
  71. local input = function(io,a)
  72. if a then return end
  73. --Since InputObject is a client-side instance, we create and pass table instead
  74. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  75. end
  76. UIS.InputBegan:Connect(input)
  77. UIS.InputEnded:Connect(input)
  78.  
  79. local h,t
  80. --Give the server mouse data 30 times every second, but only if the values changed
  81. --If player is not moving their mouse, client won't fire events
  82. while wait(1/30) do
  83. if h~=Mouse.Hit or t~=Mouse.Target then
  84. h,t=Mouse.Hit,Mouse.Target
  85. Event:FireServer({isMouse=true,Target=t,Hit=h})
  86. end
  87. end]==],Player.Character)
  88.  
  89. ----Sandboxed game object that allows the usage of client-side methods and services
  90. --Real game object
  91. local _rg = game
  92.  
  93. --Metatable for fake service
  94. local fsmt = {
  95. __index = function(self,k)
  96. local s = rawget(self,"_RealService")
  97. if s then return s[k] end
  98. end,
  99. __newindex = function(self,k,v)
  100. local s = rawget(self,"_RealService")
  101. if s then s[k]=v end
  102. end,
  103. __call = function(self,...)
  104. local s = rawget(self,"_RealService")
  105. if s then return s(...) end
  106. end
  107. }
  108. local function FakeService(t,RealService)
  109. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  110. return setmetatable(t,fsmt)
  111. end
  112.  
  113. --Fake game object
  114. local g = {
  115. GetService = function(self,s)
  116. return self[s]
  117. end,
  118. Players = FakeService({
  119. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  120. },"Players"),
  121. UserInputService = FakeService(UIS,"UserInputService"),
  122. ContextActionService = FakeService(CAS,"ContextActionService"),
  123. }
  124. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  125. g.service = g.GetService
  126.  
  127. g.RunService = FakeService({
  128. RenderStepped = _rg:GetService("RunService").Heartbeat,
  129. BindToRenderStep = function(self,name,_,fun)
  130.  
  131. end,
  132. UnbindFromRenderStep = function(self,name)
  133. self._btrs[name]:Disconnect()
  134. end,
  135. },"RunService")
  136.  
  137. setmetatable(g,{
  138. __index=function(self,s)
  139. return _rg:GetService(s) or typeof(_rg[s])=="function"
  140. and function(_,...)return _rg[s](_rg,...)end or _rg[s]
  141. end,
  142. __newindex = fsmt.__newindex,
  143. __call = fsmt.__call
  144. })
  145. --Changing owner to fake player object to support owner:GetMouse()
  146. game,owner = g,g.Players.LocalPlayer
  147. end
  148.  
  149. wait(1) --For running in rbx studio
  150. mee = owner
  151. pistol = Instance.new("Tool", mee.Backpack)
  152. pistol.GripForward = Vector3.new(-0.149, 0.984, -0.099)
  153. pistol.GripPos = Vector3.new(0.1, -0.55, -0.2)
  154. pistol.GripRight = Vector3.new(0.989, 0.148, -0.015)
  155. pistol.GripUp = Vector3.new(0, 0.1, 0.995)
  156. pistol.ToolTip = "Hmm? Mitu is kinda lazy"
  157. pistol.Name = "Pistol"
  158. pistolpart = Instance.new("Part", pistol)
  159. pistolpart.Name = "Handle"
  160. pistolpart.BrickColor = BrickColor.new("Black")
  161. pistolpart.Material = "SmoothPlastic"
  162. pistolpart.Orientation = Vector3.new(-88.99, 152.78, 135.7)
  163. pistolpart.Size = Vector3.new(0.2, 1.12, 0.6)
  164. pistolmesh = Instance.new("SpecialMesh", pistolpart)
  165. pistolmesh.MeshId = "rbxassetid://430060386"
  166. pistolmesh.Scale = Vector3.new(2, 2, 2)
  167. pistolmesh.TextureId = "rbxassetid://430060404"
  168. pistolmesh.VertexColor = Vector3.new(2, 2, 2)
  169. gunshotsound = Instance.new("Sound", pistolpart)
  170. gunshotsound.SoundId = "rbxassetid://213603013"
  171.  
  172.  
  173. pistol.Equipped:connect(function(mouse)
  174. local torso = mee.Character.HumanoidRootPart
  175. local mouseturning = owner:GetMouse()
  176.  
  177. end)
  178. local mouse = owner:GetMouse()
  179. mouse.Button1Down:connect(function()
  180. gunshotsound:Play()
  181. MakeShell()
  182. local ray = Ray.new(pistol.Handle.CFrame.p, (mouse.Hit.p - pistol.Handle.CFrame.p).unit * 300)
  183. local part, position = workspace:FindPartOnRay(ray, mee.Character, false, true)
  184.  
  185. local beam = Instance.new("Part", workspace)
  186. beam.BrickColor = BrickColor.new("White")
  187. beam.FormFactor = "Custom"
  188. beam.Material = "Neon"
  189. beam.Transparency = 0.7
  190. beam.Anchored = true
  191. beam.Locked = true
  192. beam.CanCollide = false
  193.  
  194. local distance = (pistol.Handle.CFrame.p - position).magnitude
  195. beam.Size = Vector3.new(0.3, 0.3, distance)
  196. beam.CFrame = CFrame.new(pistol.Handle.CFrame.p, position) * CFrame.new(0, 0, -distance / 2)
  197.  
  198. game:GetService("Debris"):AddItem(beam, 0.1)
  199.  
  200. if part then
  201. local humanoid = part.Parent:FindFirstChild("Humanoid")
  202.  
  203. if not humanoid then
  204. humanoid = part.Parent.Parent:FindFirstChild("Humanoid")
  205. end
  206.  
  207. if humanoid then
  208. plrmodel = humanoid.Parent
  209. if plrmodel.Humanoid.Health ~= 0 then
  210. --blood
  211. plrmodel.Archivable = true
  212. local Char = plrmodel
  213. local Tor = Char:FindFirstChild("Torso") or Char:FindFirstChild("UpperTorso")
  214. local Hum = Char:FindFirstChild("Humanoid")
  215. local Health = Hum.Health
  216.  
  217. Hum.Changed:connect(function()
  218. if Hum.Health < Health then
  219. local reeee = coroutine.wrap(function()
  220. local thing = Instance.new('Part',game.Workspace)
  221. thing.Size = Vector3.new(0.2,0.2,0.2)
  222. thing.CFrame = Hum.CFrame
  223. thing.Shape = Enum.PartType.Ball
  224. thing.CFrame = Hum.CFrame
  225. thing.Transparency = 1
  226. thing.BrickColor = BrickColor.new('Maroon')
  227. thing.Material = Enum.Material.SmoothPlastic
  228. thing.Name = "Blood"
  229. thing.CanCollide =false
  230. local coru = coroutine.wrap(function()
  231. wait(0.01)
  232. end)
  233. coru()
  234. local ree = Instance.new('ParticleEmitter',thing)
  235. ree.Color = ColorSequence.new({ColorSequenceKeypoint.new(0,Color3.fromRGB(50,0,0)),ColorSequenceKeypoint.new(1,Color3.fromRGB(50,0,0))})
  236. ree.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,0.1),NumberSequenceKeypoint.new(1,0.1)})
  237. ree.Texture = 'rbxassetid://867743272'
  238. ree.Lifetime = NumberRange.new(0.4)
  239. ree.Rate = 70
  240. ree.LockedToPart = true
  241. ree.Speed = NumberRange.new(0, 3)
  242.  
  243. thing:connect(function(tou)
  244. if tou.Name == "BloodPuddle" then
  245. local reee = tou.CFrame
  246. if tou.Transparency > -0.2 then
  247. tou.Transparency = tou.Transparency -0.1
  248. end
  249. if tou.Size.X < 10 then
  250. tou.Size = tou.Size+Vector3.new(0.1,0,0.1)
  251. tou.CFrame = reee
  252. end
  253. else
  254. local bloodlol = Instance.new('Part',workspace)
  255. bloodlol.Size=Vector3.new(1,0.2,1)
  256. bloodlol.Name = "BloodPuddle"
  257. bloodlol.Anchored = true
  258. bloodlol.CanCollide = false
  259. bloodlol.Material = Enum.Material.Granite
  260. bloodlol.BrickColor = BrickColor.new('Crimson')
  261. local cyl = Instance.new('CylinderMesh',bloodlol)
  262. cyl.Scale = Vector3.new(1,0.1,1)
  263. local pos = Vector3.new(thing.Position.X,(tou.Position.Y+(tou.Size.Y/2))+0.02,thing.Position.Z)
  264. bloodlol.CFrame = CFrame.new(pos)
  265. local coru=coroutine.wrap(function()
  266. while bloodlol.Parent ~= nil do
  267. if bloodlol.Transparency < 1 then
  268. bloodlol.Transparency = bloodlol.Transparency+0.01
  269. else
  270. bloodlol:Destroy()
  271. end
  272. wait(0.1)
  273. end
  274. end)
  275. coru()
  276. end
  277. end)
  278. local coru = coroutine.wrap(function()
  279. wait(1)
  280. thing:Destroy()
  281. end)
  282. coru()
  283. end)
  284. reeee()
  285. wait()
  286. end
  287. end)
  288.  
  289.  
  290. --Ragdoll
  291. wait()
  292. function getAttachment0(attachmentName)
  293. for _,child in next,plrmodel:GetChildren() do
  294. local attachment = child:FindFirstChild(attachmentName)
  295. if attachment then
  296. return attachment
  297. end
  298. end
  299. end
  300. plrmodel.Humanoid.Died:Connect(function(var)
  301. local removeHRP = true
  302. local head = plrmodel["Head"]
  303. local leftarm = plrmodel["Left Arm"]
  304. local leftleg = plrmodel["Left Leg"]
  305. local rightleg = plrmodel["Right Leg"]
  306. local rightarm = plrmodel["Right Arm"]
  307. local torso = plrmodel.Torso
  308. local root = plrmodel.HumanoidRootPart
  309. if removeHRP == true then
  310. root:Destroy()
  311. end
  312. local rootA =Instance.new("Attachment")
  313. local HeadA = Instance.new("Attachment")
  314. local LeftArmA = Instance.new("Attachment")
  315. local LeftLegA = Instance.new("Attachment")
  316. local RightArmA = Instance.new("Attachment")
  317. local RightLegA = Instance.new("Attachment")
  318. local TorsoA = Instance.new("Attachment")
  319. local TorsoA1 = Instance.new("Attachment")
  320. local TorsoA2 = Instance.new("Attachment")
  321. local TorsoA3 = Instance.new("Attachment")
  322. local TorsoA4 = Instance.new("Attachment")
  323. local TorsoA5 = Instance.new("Attachment")
  324. local function set1()
  325. HeadA.Name = "HeadA"
  326. HeadA.Parent = head
  327. HeadA.Position = Vector3.new(0, -0.5, 0)
  328. HeadA.Rotation = Vector3.new(0, 0, 0)
  329. HeadA.Axis = Vector3.new(1, 0, 0)
  330. HeadA.SecondaryAxis = Vector3.new(0, 1, 0)
  331. LeftArmA.Name = "LeftArmA"
  332. LeftArmA.Parent = leftarm
  333. LeftArmA.Position = Vector3.new(0.5, 1, 0)
  334. LeftArmA.Rotation = Vector3.new(0, 0, 0)
  335. LeftArmA.Axis = Vector3.new(1, 0, 0)
  336. LeftArmA.SecondaryAxis = Vector3.new(0, 1, 0)
  337. LeftLegA.Name = "LeftLegA"
  338. LeftLegA.Parent = leftleg
  339. LeftLegA.Position = Vector3.new(0, 1, 0)
  340. LeftLegA.Rotation = Vector3.new(0, 0, 0)
  341. LeftLegA.Axis = Vector3.new(1, 0, 0)
  342. LeftLegA.SecondaryAxis = Vector3.new(0, 1, 0)
  343. RightArmA.Name = "RightArmA"
  344. RightArmA.Parent = rightarm
  345. RightArmA.Position = Vector3.new(-0.5, 1, 0)
  346. RightArmA.Rotation = Vector3.new(0, 0, 0)
  347. RightArmA.Axis = Vector3.new(1, 0, 0)
  348. RightArmA.SecondaryAxis = Vector3.new(0, 1, 0)
  349. RightLegA.Name = "RightLegA"
  350. RightLegA.Parent = rightleg
  351. RightLegA.Position = Vector3.new(0, 1, 0)
  352. RightLegA.Rotation = Vector3.new(0, 0, 0)
  353. RightLegA.Axis = Vector3.new(1, 0, 0)
  354. RightLegA.SecondaryAxis = Vector3.new(0, 1, 0)
  355. rootA.Name= "rootA"
  356. rootA.Parent = root
  357. rootA.Position = Vector3.new(0, 0, 0)
  358. rootA.Rotation = Vector3.new(0, 90, 0)
  359. rootA.Axis = Vector3.new(0, 0, -1)
  360. rootA.SecondaryAxis = Vector3.new(0, 1, 0)
  361. end
  362. local function set2()
  363. TorsoA.Name = "TorsoA"
  364. TorsoA.Parent = torso
  365. TorsoA.Position = Vector3.new(0.5, -1, 0)
  366. TorsoA.Rotation = Vector3.new(0, 0, 0)
  367. TorsoA.Axis = Vector3.new(1, 0, 0)
  368. TorsoA.SecondaryAxis = Vector3.new(0, 1, 0)
  369. TorsoA1.Name = "TorsoA1"
  370. TorsoA1.Parent = torso
  371. TorsoA1.Position = Vector3.new(-0.5, -1, 0)
  372. TorsoA1.Rotation = Vector3.new(0, 0, 0)
  373. TorsoA1.Axis = Vector3.new(1, 0, 0)
  374. TorsoA1.SecondaryAxis = Vector3.new(0, 1, 0)
  375. TorsoA2.Name = "TorsoA2"
  376. TorsoA2.Parent = torso
  377. TorsoA2.Position = Vector3.new(-1, 1, 0)
  378. TorsoA2.Rotation = Vector3.new(0, 0, 0)
  379. TorsoA2.Axis = Vector3.new(1, 0, 0)
  380. TorsoA2.SecondaryAxis = Vector3.new(0, 1, 0)
  381. TorsoA3.Name = "TorsoA3"
  382. TorsoA3.Parent = torso
  383. TorsoA3.Position = Vector3.new(1, 1, 0)
  384. TorsoA3.Rotation = Vector3.new(0, 0, 0)
  385. TorsoA3.Axis = Vector3.new(1, 0, 0)
  386. TorsoA3.SecondaryAxis = Vector3.new(0, 1, 0)
  387. TorsoA4.Name = "TorsoA4"
  388. TorsoA4.Parent = torso
  389. TorsoA4.Position = Vector3.new(0, 1, 0)
  390. TorsoA4.Rotation = Vector3.new(0, 0, 0)
  391. TorsoA4.Axis = Vector3.new(1, 0, 0)
  392. TorsoA4.SecondaryAxis = Vector3.new(0, 1, 0)
  393. TorsoA5.Name = "TorsoA5"
  394. TorsoA5.Parent = torso
  395. TorsoA5.Position = Vector3.new(0, 0, 0)
  396. TorsoA5.Rotation = Vector3.new(0, 90, 0)
  397. TorsoA5.Axis = Vector3.new(0, 0, -1)
  398. TorsoA5.SecondaryAxis = Vector3.new(0, 1, 0)
  399. end
  400. local function set3()
  401. end
  402. spawn(set1);
  403. spawn(set2);
  404. local HA = Instance.new("HingeConstraint")
  405. HA.Parent = head
  406. HA.Attachment0 = HeadA
  407. HA.Attachment1 = TorsoA4
  408. HA.Enabled = true
  409. HA.LimitsEnabled=true
  410. HA.LowerAngle=0
  411. HA.UpperAngle=0
  412. local LAT = Instance.new("BallSocketConstraint")
  413. LAT.Parent = leftarm
  414. LAT.Attachment0 = LeftArmA
  415. LAT.Attachment1 = TorsoA2
  416. LAT.Enabled = true
  417. LAT.LimitsEnabled=true
  418. LAT.UpperAngle=90
  419. local RAT = Instance.new("BallSocketConstraint")
  420. RAT.Parent = rightarm
  421. RAT.Attachment0 = RightArmA
  422. RAT.Attachment1 = TorsoA3
  423. RAT.Enabled = true
  424. RAT.LimitsEnabled=true
  425. RAT.UpperAngle=90
  426. local HA = Instance.new("BallSocketConstraint")
  427. HA.Parent = head
  428. HA.Attachment0 = HeadA
  429. HA.Attachment1 = TorsoA4
  430. HA.Enabled = true
  431. local TLL = Instance.new("BallSocketConstraint")
  432. TLL.Parent = torso
  433. TLL.Attachment0 = TorsoA1
  434. TLL.Attachment1 = LeftLegA
  435. TLL.Enabled = true
  436. TLL.LimitsEnabled=true
  437. TLL.UpperAngle=90
  438. local TRL = Instance.new("BallSocketConstraint")
  439. TRL.Parent = torso
  440. TRL.Attachment0 = TorsoA
  441. TRL.Attachment1 = RightLegA
  442. TRL.Enabled = true
  443. TRL.LimitsEnabled=true
  444. TRL.UpperAngle=90
  445. local RTA = Instance.new("BallSocketConstraint")
  446. RTA.Parent = root
  447. RTA.Attachment0 = rootA
  448. RTA.Attachment1 = TorsoA5
  449. RTA.Enabled = true
  450. RTA.LimitsEnabled=true
  451. RTA.UpperAngle=0
  452. head.Velocity = head.CFrame.lookVector*30
  453.  
  454. for _,child in next,plrmodel:GetChildren() do
  455. if child:IsA("Accoutrement") then
  456. for _,part in next,child:GetChildren() do
  457. if part:IsA("BasePart") then
  458. part.Parent = plrmodel
  459. child:remove()
  460. local attachment1 = part:FindFirstChildOfClass("Attachment")
  461. local attachment0 = getAttachment0(attachment1.Name)
  462. if attachment0 and attachment1 then
  463. local constraint = Instance.new("HingeConstraint")
  464. constraint.Attachment0 = attachment0
  465. constraint.Attachment1 = attachment1
  466. constraint.LimitsEnabled = true
  467. constraint.UpperAngle = 0
  468. constraint.LowerAngle = 0
  469. constraint.Parent = plrmodel
  470. end
  471. end
  472. end
  473. end
  474. end
  475. end)
  476.  
  477. end
  478. if humanoid.Health ~= 0 then
  479. local removeHRP = true
  480. local root = plrmodel.HumanoidRootPart
  481. root:Destroy()
  482. humanoid.WalkSpeed = 4
  483. humanoid.JumpPower = 0
  484. humanoid.Health = 50
  485. wait(5)
  486. while true do
  487. if humanoid.Health ~= 0 then
  488. humanoid.Health = 0 --This loop is a strange kill system I know, but this prevents doing 99 damage instead of 100 for some reason.s
  489. else
  490. break
  491. end
  492. wait(0.3)
  493. end
  494. end
  495. end
  496. end
  497. end)
  498.  
  499.  
  500. pistol.Unequipped:connect(function()
  501. wait(0.2)
  502.  
  503. end)
  504. function MakeShell()
  505. Shell = Instance.new("Part", workspace)
  506. Shell.Size = Vector3.new(0.2, 0.2, 0.6)
  507. ShellMesh = Instance.new("SpecialMesh", Shell)
  508. ShellMesh.MeshId = "http://www.roblox.com/asset/?id=94295100"
  509. ShellMesh.Scale = Vector3.new(4, 4, 4)
  510. ShellMesh.TextureId = "http://www.roblox.com/asset/?id=94287792"
  511. Shell.Position = pistolpart.Position
  512. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement