Advertisement
The_God_M8

TEC AAAAAAAAA

May 10th, 2019
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.77 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 Hum = Char:FindFirstChild("Humanoid")
  214. local Tor = Char:FindFirstChild("Torso") or Char:FindFirstChild("UpperTorso")
  215. local Health = Hum.Health
  216.  
  217. local M = math.random
  218. local R = math.rad
  219. local rates = {.05, .075, .1, .15}
  220.  
  221. local smooth = function(P)
  222. local SM = Enum.SurfaceType.SmoothNoOutlines
  223. P.TopSurface = SM
  224. P.BottomSurface = SM
  225. P.RightSurface = SM
  226. P.LeftSurface = SM
  227. P.FrontSurface = SM
  228. P.BackSurface = SM
  229. end
  230.  
  231. local function BloodPool(Part,Size)
  232. local Pool = Instance.new("Part",game.Workspace)
  233. Pool.TopSurface = 0
  234. Pool.CanCollide = true
  235. Pool.BrickColor = BrickColor.new("Crimson")
  236. Pool.Transparency = 0
  237. Instance.new("CylinderMesh",Pool)
  238. Pool.Anchored = false
  239. Pool.Name = "BloodPoolPart"
  240. smooth(Pool)
  241. Pool.FormFactor = Enum.FormFactor.Custom
  242. Pool.Size = Size
  243. local c = Part.CFrame*CFrame.new(M(-3.01,3.01),-2.9,M(-3.01,3.01))
  244. coroutine.resume(coroutine.create(function()
  245. local rate = rates[M(1,#rates)]
  246. game.Debris:AddItem(Pool,15)
  247. for i = 1,M(25,70) do
  248. wait()
  249. Pool.CFrame = c
  250. Pool.Size = Pool.Size+Vector3.new(rate,0,rate)
  251. end
  252. wait(5)
  253. Pool:Destroy()
  254. end))
  255. end
  256.  
  257. local function BloodDrops(Size,Area)
  258. local Blood = Instance.new("Part",game.Workspace)
  259. Blood.BrickColor = BrickColor.new("Crimson")
  260. Blood.Parent = plrmodel
  261. Blood.TopSurface = 0
  262. Blood.CanCollide = false
  263. Blood.Anchored = false
  264. Blood.FormFactor = Enum.FormFactor.Custom
  265. Blood.Size = Size
  266. Blood.CFrame = Area*CFrame.new(M(-1.00,1.00),M(-1.00,1.00),M(-1.00,1.00))
  267. return Blood
  268. end
  269.  
  270.  
  271.  
  272. Hum.Changed:connect(function()
  273. if Hum.Health < Health then
  274.  
  275. Health = Hum.Health
  276. for i = 1, math.random(4,10)do
  277. local Size = Vector3.new(M(-0.25,0.25),.2,M(-.25,.25))
  278. local Blood = BloodDrops(Size,Tor.CFrame)
  279. local Stopper = false
  280. local Size2 = Vector3.new(M(-0.25,0.25),.2,M(-.25,.25))
  281. BloodPool(Tor,Size2)
  282. end
  283. end
  284. end)
  285. end
  286. --Ragdoll
  287. wait()
  288. function getAttachment0(attachmentName)
  289. for _,child in next,plrmodel:GetChildren() do
  290. local attachment = child:FindFirstChild(attachmentName)
  291. if attachment then
  292. return attachment
  293. end
  294. end
  295. end
  296. plrmodel.Humanoid.Died:Connect(function(var)
  297. local removeHRP = true
  298. local head = plrmodel["Head"]
  299. local leftarm = plrmodel["Left Arm"]
  300. local leftleg = plrmodel["Left Leg"]
  301. local rightleg = plrmodel["Right Leg"]
  302. local rightarm = plrmodel["Right Arm"]
  303. local torso = plrmodel.Torso
  304. local root = plrmodel.HumanoidRootPart
  305. if removeHRP == true then
  306. root:Destroy()
  307. end
  308. local rootA =Instance.new("Attachment")
  309. local HeadA = Instance.new("Attachment")
  310. local LeftArmA = Instance.new("Attachment")
  311. local LeftLegA = Instance.new("Attachment")
  312. local RightArmA = Instance.new("Attachment")
  313. local RightLegA = Instance.new("Attachment")
  314. local TorsoA = Instance.new("Attachment")
  315. local TorsoA1 = Instance.new("Attachment")
  316. local TorsoA2 = Instance.new("Attachment")
  317. local TorsoA3 = Instance.new("Attachment")
  318. local TorsoA4 = Instance.new("Attachment")
  319. local TorsoA5 = Instance.new("Attachment")
  320. local function set1()
  321. HeadA.Name = "HeadA"
  322. HeadA.Parent = head
  323. HeadA.Position = Vector3.new(0, -0.5, 0)
  324. HeadA.Rotation = Vector3.new(0, 0, 0)
  325. HeadA.Axis = Vector3.new(1, 0, 0)
  326. HeadA.SecondaryAxis = Vector3.new(0, 1, 0)
  327. LeftArmA.Name = "LeftArmA"
  328. LeftArmA.Parent = leftarm
  329. LeftArmA.Position = Vector3.new(0.5, 1, 0)
  330. LeftArmA.Rotation = Vector3.new(0, 0, 0)
  331. LeftArmA.Axis = Vector3.new(1, 0, 0)
  332. LeftArmA.SecondaryAxis = Vector3.new(0, 1, 0)
  333. LeftLegA.Name = "LeftLegA"
  334. LeftLegA.Parent = leftleg
  335. LeftLegA.Position = Vector3.new(0, 1, 0)
  336. LeftLegA.Rotation = Vector3.new(0, 0, 0)
  337. LeftLegA.Axis = Vector3.new(1, 0, 0)
  338. LeftLegA.SecondaryAxis = Vector3.new(0, 1, 0)
  339. RightArmA.Name = "RightArmA"
  340. RightArmA.Parent = rightarm
  341. RightArmA.Position = Vector3.new(-0.5, 1, 0)
  342. RightArmA.Rotation = Vector3.new(0, 0, 0)
  343. RightArmA.Axis = Vector3.new(1, 0, 0)
  344. RightArmA.SecondaryAxis = Vector3.new(0, 1, 0)
  345. RightLegA.Name = "RightLegA"
  346. RightLegA.Parent = rightleg
  347. RightLegA.Position = Vector3.new(0, 1, 0)
  348. RightLegA.Rotation = Vector3.new(0, 0, 0)
  349. RightLegA.Axis = Vector3.new(1, 0, 0)
  350. RightLegA.SecondaryAxis = Vector3.new(0, 1, 0)
  351. rootA.Name= "rootA"
  352. rootA.Parent = root
  353. rootA.Position = Vector3.new(0, 0, 0)
  354. rootA.Rotation = Vector3.new(0, 90, 0)
  355. rootA.Axis = Vector3.new(0, 0, -1)
  356. rootA.SecondaryAxis = Vector3.new(0, 1, 0)
  357. end
  358. local function set2()
  359. TorsoA.Name = "TorsoA"
  360. TorsoA.Parent = torso
  361. TorsoA.Position = Vector3.new(0.5, -1, 0)
  362. TorsoA.Rotation = Vector3.new(0, 0, 0)
  363. TorsoA.Axis = Vector3.new(1, 0, 0)
  364. TorsoA.SecondaryAxis = Vector3.new(0, 1, 0)
  365. TorsoA1.Name = "TorsoA1"
  366. TorsoA1.Parent = torso
  367. TorsoA1.Position = Vector3.new(-0.5, -1, 0)
  368. TorsoA1.Rotation = Vector3.new(0, 0, 0)
  369. TorsoA1.Axis = Vector3.new(1, 0, 0)
  370. TorsoA1.SecondaryAxis = Vector3.new(0, 1, 0)
  371. TorsoA2.Name = "TorsoA2"
  372. TorsoA2.Parent = torso
  373. TorsoA2.Position = Vector3.new(-1, 1, 0)
  374. TorsoA2.Rotation = Vector3.new(0, 0, 0)
  375. TorsoA2.Axis = Vector3.new(1, 0, 0)
  376. TorsoA2.SecondaryAxis = Vector3.new(0, 1, 0)
  377. TorsoA3.Name = "TorsoA3"
  378. TorsoA3.Parent = torso
  379. TorsoA3.Position = Vector3.new(1, 1, 0)
  380. TorsoA3.Rotation = Vector3.new(0, 0, 0)
  381. TorsoA3.Axis = Vector3.new(1, 0, 0)
  382. TorsoA3.SecondaryAxis = Vector3.new(0, 1, 0)
  383. TorsoA4.Name = "TorsoA4"
  384. TorsoA4.Parent = torso
  385. TorsoA4.Position = Vector3.new(0, 1, 0)
  386. TorsoA4.Rotation = Vector3.new(0, 0, 0)
  387. TorsoA4.Axis = Vector3.new(1, 0, 0)
  388. TorsoA4.SecondaryAxis = Vector3.new(0, 1, 0)
  389. TorsoA5.Name = "TorsoA5"
  390. TorsoA5.Parent = torso
  391. TorsoA5.Position = Vector3.new(0, 0, 0)
  392. TorsoA5.Rotation = Vector3.new(0, 90, 0)
  393. TorsoA5.Axis = Vector3.new(0, 0, -1)
  394. TorsoA5.SecondaryAxis = Vector3.new(0, 1, 0)
  395. end
  396. local function set3()
  397. end
  398. spawn(set1);
  399. spawn(set2);
  400. local HA = Instance.new("HingeConstraint")
  401. HA.Parent = head
  402. HA.Attachment0 = HeadA
  403. HA.Attachment1 = TorsoA4
  404. HA.Enabled = true
  405. HA.LimitsEnabled=true
  406. HA.LowerAngle=0
  407. HA.UpperAngle=0
  408. local LAT = Instance.new("BallSocketConstraint")
  409. LAT.Parent = leftarm
  410. LAT.Attachment0 = LeftArmA
  411. LAT.Attachment1 = TorsoA2
  412. LAT.Enabled = true
  413. LAT.LimitsEnabled=true
  414. LAT.UpperAngle=90
  415. local RAT = Instance.new("BallSocketConstraint")
  416. RAT.Parent = rightarm
  417. RAT.Attachment0 = RightArmA
  418. RAT.Attachment1 = TorsoA3
  419. RAT.Enabled = true
  420. RAT.LimitsEnabled=true
  421. RAT.UpperAngle=90
  422. local HA = Instance.new("BallSocketConstraint")
  423. HA.Parent = head
  424. HA.Attachment0 = HeadA
  425. HA.Attachment1 = TorsoA4
  426. HA.Enabled = true
  427. local TLL = Instance.new("BallSocketConstraint")
  428. TLL.Parent = torso
  429. TLL.Attachment0 = TorsoA1
  430. TLL.Attachment1 = LeftLegA
  431. TLL.Enabled = true
  432. TLL.LimitsEnabled=true
  433. TLL.UpperAngle=90
  434. local TRL = Instance.new("BallSocketConstraint")
  435. TRL.Parent = torso
  436. TRL.Attachment0 = TorsoA
  437. TRL.Attachment1 = RightLegA
  438. TRL.Enabled = true
  439. TRL.LimitsEnabled=true
  440. TRL.UpperAngle=90
  441. local RTA = Instance.new("BallSocketConstraint")
  442. RTA.Parent = root
  443. RTA.Attachment0 = rootA
  444. RTA.Attachment1 = TorsoA5
  445. RTA.Enabled = true
  446. RTA.LimitsEnabled=true
  447. RTA.UpperAngle=0
  448. head.Velocity = head.CFrame.lookVector*30
  449.  
  450. for _,child in next,plrmodel:GetChildren() do
  451. if child:IsA("Accoutrement") then
  452. for _,part in next,child:GetChildren() do
  453. if part:IsA("BasePart") then
  454. part.Parent = plrmodel
  455. child:remove()
  456. local attachment1 = part:FindFirstChildOfClass("Attachment")
  457. local attachment0 = getAttachment0(attachment1.Name)
  458. if attachment0 and attachment1 then
  459. local constraint = Instance.new("HingeConstraint")
  460. constraint.Attachment0 = attachment0
  461. constraint.Attachment1 = attachment1
  462. constraint.LimitsEnabled = true
  463. constraint.UpperAngle = 0
  464. constraint.LowerAngle = 0
  465. constraint.Parent = plrmodel
  466. end
  467. end
  468. end
  469. end
  470. end
  471. end)
  472.  
  473. end
  474. if humanoid.Health ~= 0 then
  475. humanoid.Health = 0
  476. wait(3)
  477. while true do
  478. if humanoid.Health ~= 0 then
  479. 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
  480. else
  481. break
  482. end
  483. wait(0.3)
  484. end
  485. end
  486. end
  487. end)
  488.  
  489. pistol.Unequipped:connect(function()
  490. wait(0.2)
  491.  
  492. end)
  493. function MakeShell()
  494. Shell = Instance.new("Part", workspace)
  495. Shell.Size = Vector3.new(0.2, 0.2, 0.6)
  496. ShellMesh = Instance.new("SpecialMesh", Shell)
  497. ShellMesh.MeshId = "http://www.roblox.com/asset/?id=94295100"
  498. ShellMesh.Scale = Vector3.new(4, 4, 4)
  499. ShellMesh.TextureId = "http://www.roblox.com/asset/?id=94287792"
  500. Shell.Position = pistolpart.Position
  501. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement