Advertisement
Fluxushr

Untitled

Apr 27th, 2023
569
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.85 KB | None | 0 0
  1. --[[Converted By Keyer]]--
  2. --[[Suggested by ?????]]--
  3.  
  4. game.Players.LocalPlayer.Character.Torso.Anchored = true
  5.  
  6. loadstring(game:HttpGet(('https://pastebin.com/raw/70Eqz9aP'),true))()
  7.  
  8. game.Players.LocalPlayer.Character.Torso.Anchored = false
  9. local lp = game:GetService("Players").LocalPlayer
  10. local rs = game:GetService("RunService")
  11. local stepped = rs.Stepped
  12. local heartbeat = rs.Heartbeat
  13. local renderstepped = rs.RenderStepped
  14. local sg = game:GetService("StarterGui")
  15. local ws = game:GetService("Workspace")
  16. local cf = CFrame.new
  17. local v3 = Vector3.new
  18. local v3_0 = Vector3.zero
  19. local inf = math.huge
  20.  
  21. local cplayer = lp.Character
  22.  
  23. local v3 = Vector3.new
  24.  
  25. local function gp(parent, name, className)
  26. if typeof(parent) == "Instance" then
  27. for i, v in pairs(parent:GetChildren()) do
  28. if (v.Name == name) and v:IsA(className) then
  29. return v
  30. end
  31. end
  32. end
  33. return nil
  34. end
  35.  
  36. local hat2 = gp(cplayer, "SpikeyHair", "Accessory")
  37. local handle2 = gp(hat2, "Handle", "BasePart")
  38. local att2 = gp(handle2, "att1_Handle", "Attachment")
  39. att2.Parent = cplayer["Right Arm"]
  40. att2.Position = Vector3.new(0.2, -2.6, -0.7)
  41. att2.Rotation = Vector3.new(90, 0, 0)
  42.  
  43. local hat2 = gp(cplayer, "MeshPartAccessory", "Accessory")
  44. local handle2 = gp(hat2, "Handle", "BasePart")
  45. local att2 = gp(handle2, "att1_Handle", "Attachment")
  46. att2.Parent = cplayer["Right Arm"]
  47. att2.Position = Vector3.new(0.2, -1.68, -0.7)
  48. att2.Rotation = Vector3.new(90, 0, 0)
  49.  
  50. local hat2 = gp(cplayer, "International Fedora", "Accessory")
  51. local handle2 = gp(hat2, "Handle", "BasePart")
  52. local att2 = gp(handle2, "att1_Handle", "Attachment")
  53. att2.Parent = cplayer["Right Arm"]
  54. att2.Position = Vector3.new(0.2, -1.68, -0.2)
  55. att2.Rotation = Vector3.new(90, 0, 0)
  56.  
  57. local ORIGCF=CFrame.new
  58. local math=setmetatable({random=function(Arg1,Arg2,DIV) DIV=DIV or 1 return math.random(Arg1*DIV,Arg2*DIV)/DIV end;CosSin=function(Arg) return (math.sin(Arg/2)*math.cos(Arg/2)) end;},{__index=math;})
  59. local CFrame=setmetatable({new=function(Arg1,Arg2,Arg3,Angles) if not Angles then return CFrame.new(Arg1,Arg2,Arg3) else return CFrame.Angles(math.rad(Arg1),math.rad(Arg2),math.rad(Arg3)) end end;},{__index=CFrame;})
  60. local Instance=setmetatable({new = function(type,args) local instance = Instance.new(type) pcall(function() if args then if string.lower(typeof(args)) == "instance" then instance.Parent = args elseif string.lower(typeof(args)) == "table" then for i,v in pairs(args) do pcall(function() instance[i] = v end) end end end end) return instance end;Remove=function(Instance_,Time) if string.lower(typeof(Instance_))=="instance" then game:GetService("Debris"):AddItem(Instance_,Time or 0) elseif string.lower(typeof(Instance_))=="table" then table.foreach(Instance_,function(_,v) game:GetService("Debris"):AddItem(v,Time or 0) end) end end},{__index=Instance;})
  61. local Player,Mouse = game.Players.LocalPlayer,game.Players.LocalPlayer:GetMouse()
  62.  
  63. --}{ Default Functions }{--
  64. local ins=Instance.new
  65. local v3=Vector3.new
  66. local v2=Vector2.new
  67. local cf=CFrame.new
  68. local angles=CFrame.Angles
  69. local ud=UDim.new
  70. local ud2=UDim2.new
  71. local c3=Color3.new
  72. local rgb=Color3.fromRGB
  73. local hsv=Color3.fromHSV
  74. local bc=BrickColor.new
  75. local bcRandom=BrickColor.Random
  76. local palette=BrickColor.palatte
  77. local cs=ColorSequence.new
  78. local ns=NumberSequence.new
  79. local nsk=NumberSequenceKeypoint.new
  80. local nr=NumberRange.new
  81. local random=math.random
  82. local rad=math.rad
  83. local sin=math.sin
  84. local cos=math.cos
  85. local tan=math.tan
  86. local CosSin=math.CosSin
  87. local floor=math.floor
  88. local pi=math.floor
  89. local abs=math.abs
  90. local sqrt=math.sqrt
  91. local clamp=math.clamp
  92. local ray=Ray.new
  93. local huge=math.huge
  94. --}{ Useful Functions }{--
  95. function Tween(Object,Args,Info)
  96. if Object and Args then
  97. Info = Info or TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.In,0,false,0)
  98. if typeof(Info) == "table" then Info = TweenInfo.new(unpack(Info)) end
  99. game:GetService("TweenService"):Create(Object,Info,Args):Play()
  100. end
  101. end
  102. function Sound(Id,Volume,Pitch,Parent,MaxDistance,EmitterSize,Looped)
  103. local S=ins("Sound",{Volume=Volume or 1;Pitch=Pitch or 1;MaxDistance=MaxDistance or 500;EmitterSize=EmitterSize or 5;Looped=Looped or false;SoundId="rbxassetid://"..Id,Parent=Parent})
  104. S:Play()
  105. coroutine.wrap(function()
  106. if S.Looped then return end
  107. if S.IsLoaded then
  108. Instance.Remove(S,S.TimeLength/S.Pitch)
  109. else
  110. S.Loaded:Connect(function()
  111. Instance.Remove(S,S.TimeLength/S.Pitch)
  112. end)
  113. end
  114. end)()
  115. return S
  116. end
  117. function Raycast(Origin,Direction,Blacklist,MaxDistance,IgnoreWater)
  118. return workspace:FindPartOnRayWithIgnoreList(ray(Origin,Direction.Unit*MaxDistance),Blacklist or {},false,IgnoreWater)
  119. end
  120. --}{ Character }{--
  121. local char=Player.Character
  122. local hum=char:FindFirstChildOfClass("Humanoid")
  123. local h=char.Head
  124. local t=char.Torso
  125. local hrp=char.HumanoidRootPart
  126. local ra=char["Right Arm"]
  127. local la=char["Left Arm"]
  128. local rl=char["Right Leg"]
  129. local ll=char["Left Leg"]
  130. local nec=t.Neck
  131. local rutj=hrp.RootJoint
  132. local rs=t["Right Shoulder"]
  133. local ls=t["Left Shoulder"]
  134. local rh=t["Right Hip"]
  135. local lh=t["Left Hip"]
  136. local Bullets=ins("Model",{Name="Bullets";Parent=char;})
  137. --}{ Character Funtions }{--
  138. local Hats={}
  139. local Clothes={}
  140. table.foreach(char:GetChildren(),function(_,v) if v:IsA("Accessory") or v:IsA("Hat") then table.insert(Hats,v) elseif v:IsA("Shirt") then Clothes.Shirt=v elseif v:IsA("Pants") then Clothes.Pants=v end end)
  141. Hats.RemoveAll=function()
  142. for i,v in pairs(Hats) do
  143. Instance.Remove(v)
  144. end
  145. end
  146. Clothes.RemoveAll=function()
  147. for i,v in pairs(Hats) do
  148. Instance.Remove(v)
  149. end
  150. end
  151. --}{ Stopping }{--
  152. for i,v in pairs(char:GetDescendants()) do
  153. if (v.Name=="Animate" and v:IsA("LocalScript")) or v:IsA("Animator") then
  154. Instance.Remove(v)
  155. end
  156. end
  157. --}{ Modules }{--
  158. -- Modules Setup --
  159. --}{ Variables }{--
  160. local Using=false
  161. local Holding=false
  162. local Muted=false
  163. local TimePos=0
  164. local Sine=0
  165. local Change=1
  166. local Pool=0
  167. local WS,JP=50,50
  168. local Step="R"
  169. --}{ Other Values }{--
  170. local necC0,necC1=cf(0,t.Size.Y/2,0),cf(0,-h.Size.Y/2,0)
  171. local rutjC0,rutjC1=cf(0,0,0),cf(0,0,0)
  172. local rsC0,rsC1=cf(t.Size.X/2,t.Size.Y/4,0),cf(-ra.Size.X/2,ra.Size.Y/4,0)
  173. local lsC0,lsC1=cf(-t.Size.X/2,t.Size.Y/4,0),cf(la.Size.X/2,la.Size.Y/4,0)
  174. local rhC0,rhC1=cf(t.Size.X/4,-t.Size.Y/2,0),cf(0,rl.Size.Y/2,0)
  175. local lhC0,lhC1=cf(-t.Size.X/4,-t.Size.Y/2,0),cf(0,ll.Size.Y/2,0)
  176. local StepSounds={
  177. Plastic=2812418291;
  178. SmoothPlastic=2812418291;
  179. Neon=2812418291;
  180. ForceField=2812418291;
  181. Metal=2812417769;
  182. DiamondPlate=2812417769;
  183. CorrodedMetal=2812417769;
  184. Foil=2812417769;
  185. Sand=619188333;
  186. Grass=619188333;
  187. Slate=941640049;
  188. Concrete=941640049;
  189. Granite=941640049;
  190. Pebble=941640049;
  191. Marble=941640049;
  192. Cobblestone=941640049;
  193. Brick=941640049;
  194. Water=685857471;
  195. Wood=2812419402;
  196. WoodPlanks=2812419402;
  197. Fabric=133705377;
  198. Snow=619083295;
  199. }
  200. local ragdollJoints = {
  201. ["R6"] = {
  202. ["Neck"] = {
  203. ["Att0Rotation"] = v3(0,-90,90),
  204. ["Att1Rotation"] = v3(0,-90,90),
  205. ["Position0"] = v3(0,.5,0),
  206. ["Position1"] = v3(0,-.5,0),
  207. ["BallSocketProps"] = {
  208. LimitsEnabled = true,
  209. TwistLimitsEnabled = true,
  210. UpperAngle = 90,
  211. TwistLowerAngle = -90,
  212. TwistUpperAngle = 90
  213. }
  214. },
  215. ["Right Shoulder"] = {
  216. ["Att0Rotation"] = v3(0,0,0),
  217. ["Att1Rotation"] = v3(0,0,-90),
  218. ["Position0"] = v3(.75,.333,0),
  219. ["Position1"] = v3(0,.333,0),
  220. ["BallSocketProps"] = {
  221. LimitsEnabled = true,
  222. TwistLimitsEnabled = true,
  223. UpperAngle = 165,
  224. TwistLowerAngle = -135,
  225. TwistUpperAngle = 135
  226. }
  227. },
  228. ["Left Shoulder"] = {
  229. ["Att0Rotation"] = v3(0,0,0),
  230. ["Att1Rotation"] = v3(0,0,90),
  231. ["Position0"] = v3(-.75,.333,0),
  232. ["Position1"] = v3(0,.333,0),
  233. ["BallSocketProps"] = {
  234. LimitsEnabled = true,
  235. TwistLimitsEnabled = true,
  236. UpperAngle = 165,
  237. TwistLowerAngle = -135,
  238. TwistUpperAngle = 135
  239. }
  240. },
  241. ["Right Hip"] = {
  242. ["Att0Rotation"] = v3(0,-90,-90),
  243. ["Att1Rotation"] = v3(0,-90,-90),
  244. ["Position0"] = v3(.25,-.5,0),
  245. ["Position1"] = v3(0,.5,0),
  246. ["BallSocketProps"] = {
  247. LimitsEnabled = true,
  248. TwistLimitsEnabled = true,
  249. UpperAngle = 100,
  250. TwistLowerAngle = -45,
  251. TwistUpperAngle = 45
  252. }
  253. },
  254. ["Left Hip"] = {
  255. ["Att0Rotation"] = v3(0,-90,-90),
  256. ["Att1Rotation"] = v3(0,-90,-90),
  257. ["Position0"] = v3(-.25,-.5,0),
  258. ["Position1"] = v3(0,.5,0),
  259. ["BallSocketProps"] = {
  260. LimitsEnabled = true,
  261. TwistLimitsEnabled = true,
  262. UpperAngle = 100,
  263. TwistLowerAngle = -45,
  264. TwistUpperAngle = 45
  265. }
  266. }
  267. },
  268. ["R15"] = {
  269. ["Neck"] = {
  270. ["Att0Rotation"] = v3(0,-90,90),
  271. ["Att1Rotation"] = v3(0,-90,90),
  272. ["BallSocketProps"] = {
  273. LimitsEnabled = true,
  274. TwistLimitsEnabled = true,
  275. UpperAngle = 80,
  276. TwistLowerAngle = -75,
  277. TwistUpperAngle = 75
  278. }
  279. },
  280. ["Waist"] = {
  281. ["Att0Rotation"] = v3(0,-90,90),
  282. ["Att1Rotation"] = v3(0,-90,90),
  283. ["BallSocketProps"] = {
  284. LimitsEnabled = true,
  285. TwistLimitsEnabled = true,
  286. UpperAngle = 25,
  287. TwistLowerAngle = -30,
  288. TwistUpperAngle = 30
  289. }
  290. },
  291. ["RightShoulder"] = {
  292. ["Att0Rotation"] = v3(0,0,0),
  293. ["Att1Rotation"] = v3(0,0,-90),
  294. ["BallSocketProps"] = {
  295. LimitsEnabled = true,
  296. TwistLimitsEnabled = true,
  297. UpperAngle = 105,
  298. TwistLowerAngle = -115,
  299. TwistUpperAngle = 115
  300. }
  301. },
  302. ["LeftShoulder"] = {
  303. ["Att0Rotation"] = v3(0,0,0),
  304. ["Att1Rotation"] = v3(0,0,90),
  305. ["BallSocketProps"] = {
  306. LimitsEnabled = true,
  307. TwistLimitsEnabled = true,
  308. UpperAngle = 105,
  309. TwistLowerAngle = -115,
  310. TwistUpperAngle = 115
  311. }
  312. },
  313. ["RightHip"] = {
  314. ["Att0Rotation"] = v3(0,-90,-90),
  315. ["Att1Rotation"] = v3(0,-90,-90),
  316. ["BallSocketProps"] = {
  317. LimitsEnabled = true,
  318. TwistLimitsEnabled = true,
  319. UpperAngle = 80,
  320. TwistLowerAngle = -35,
  321. TwistUpperAngle = 35
  322. }
  323. },
  324. ["LeftHip"] = {
  325. ["Att0Rotation"] = v3(0,-90,-90),
  326. ["Att1Rotation"] = v3(0,-90,-90),
  327. ["BallSocketProps"] = {
  328. LimitsEnabled = true,
  329. TwistLimitsEnabled = true,
  330. UpperAngle = 80,
  331. TwistLowerAngle = -35,
  332. TwistUpperAngle = 35
  333. }
  334. },
  335. ["RightElbow"] = {
  336. ["Att0Rotation"] = v3(0,0,0),
  337. ["Att1Rotation"] = v3(0,0,0),
  338. ["BallSocketProps"] = {
  339. LimitsEnabled = true,
  340. TwistLimitsEnabled = true,
  341. UpperAngle = 0,
  342. TwistLowerAngle = 105,
  343. TwistUpperAngle = 0
  344. }
  345. },
  346. ["LeftElbow"] = {
  347. ["Att0Rotation"] = v3(0,0,0),
  348. ["Att1Rotation"] = v3(0,0,0),
  349. ["BallSocketProps"] = {
  350. LimitsEnabled = true,
  351. TwistLimitsEnabled = true,
  352. UpperAngle = 0,
  353. TwistLowerAngle = 105,
  354. TwistUpperAngle = 0
  355. }
  356. },
  357. ["RightKnee"] = {
  358. ["Att0Rotation"] = v3(0,0,0),
  359. ["Att1Rotation"] = v3(0,0,0),
  360. ["BallSocketProps"] = {
  361. LimitsEnabled = true,
  362. TwistLimitsEnabled = true,
  363. UpperAngle = 0,
  364. TwistLowerAngle = 0,
  365. TwistUpperAngle = -105
  366. }
  367. },
  368. ["LeftKnee"] = {
  369. ["Att0Rotation"] = v3(0,0,0),
  370. ["Att1Rotation"] = v3(0,0,0),
  371. ["BallSocketProps"] = {
  372. LimitsEnabled = true,
  373. TwistLimitsEnabled = true,
  374. UpperAngle = 0,
  375. TwistLowerAngle = 0,
  376. TwistUpperAngle = -105
  377. }
  378. },
  379. ["RightWrist"] = {
  380. ["Att0Rotation"] = v3(0,-90,-90),
  381. ["Att1Rotation"] = v3(0,-90,-90),
  382. ["BallSocketProps"] = {
  383. LimitsEnabled = true,
  384. TwistLimitsEnabled = true,
  385. UpperAngle = 10,
  386. TwistLowerAngle = -35,
  387. TwistUpperAngle = 35
  388. }
  389. },
  390. ["LeftWrist"] = {
  391. ["Att0Rotation"] = v3(0,-90,-90),
  392. ["Att1Rotation"] = v3(0,-90,-90),
  393. ["BallSocketProps"] = {
  394. LimitsEnabled = true,
  395. TwistLimitsEnabled = true,
  396. UpperAngle = 10,
  397. TwistLowerAngle = -35,
  398. TwistUpperAngle = 35
  399. }
  400. },
  401. ["RightAnkle"] = {
  402. ["Att0Rotation"] = v3(0,-90,-90),
  403. ["Att1Rotation"] = v3(0,-90,-90),
  404. ["BallSocketProps"] = {
  405. LimitsEnabled = true,
  406. TwistLimitsEnabled = true,
  407. UpperAngle = 10,
  408. TwistLowerAngle = -35,
  409. TwistUpperAngle = 35
  410. }
  411. },
  412. ["LeftAnkle"] = {
  413. ["Att0Rotation"] = v3(0,-90,-90),
  414. ["Att1Rotation"] = v3(0,-90,-90),
  415. ["BallSocketProps"] = {
  416. LimitsEnabled = true,
  417. TwistLimitsEnabled = true,
  418. UpperAngle = 10,
  419. TwistLowerAngle = -35,
  420. TwistUpperAngle = 35
  421. }
  422. }
  423. }
  424. }
  425. --}{ Creates }{--
  426. ins("ForceField",{Visible=false;Parent=char})
  427. nec=ins("Motor6D",{Name="Neck";Part0=t;Part1=h;C0=necC0;C1=necC1;Parent=t;})
  428. rutj=ins("Motor6D",{Name="RootJoint";Part0=hrp;Part1=t;C0=rutjC0;C1=rutjC1;Parent=hrp;})
  429. rs=ins("Motor6D",{Name="Right Shoulder";Part0=t;Part1=ra;C0=rsC0;C1=rsC1;Parent=t;})
  430. ls=ins("Motor6D",{Name="Left Shoulder";Part0=t;Part1=la;C0=lsC0;C1=lsC1;Parent=t;})
  431. rh=ins("Motor6D",{Name="Right Hip";Part0=t;Part1=rl;C0=rhC0;C1=rhC1;Parent=t;})
  432. lh=ins("Motor6D",{Name="Left Hip";Part0=t;Part1=ll;C0=lhC0;C1=lhC1;Parent=t;})
  433. local Theme=ins("Sound",{SoundId="rbxassetid://1033438052";Volume=1;Pitch=1;Looped=true;Name="Theme";Parent=t;})
  434. Theme:Play()
  435. local Gun=ins("Part",{Size=v3(0,0,0);CanCollide=false;Anchored=false;Massless=false;Locked=true;Name="none of your business";Color=bc("Really black").Color;Parent=ra;})
  436. local Mesh=ins("SpecialMesh",{MeshType="FileMesh";MeshId="rbxassetid://3798133326";Offset=v3(0,0,-.3);Parent=Gun;})
  437. local HandleWeld=ins("Motor6D",{Part0=ra;Part1=Gun;C0=cf(-.2,-.7,-.2)*cf(-90,0,0,true);C1=cf(2.5,-2.5,-1.25,true);Parent=ra;})
  438. local BulletRemote=ins("RemoteEvent",{Name="BulletEvent",Parent=char})
  439. hum.WalkSpeed=WS
  440. --}{ Functions }{--
  441. function kill(who,kill_)
  442. if who and not who:FindFirstChild("urdedxdxdxddxdxdxxddxd") then
  443. if kill_ then
  444. ins("StringValue",{Name = "urdedxdxdxddxdxdxxddxd",Parent = who})
  445. else
  446. ins("StringValue",{Name = "urstunnddxdxdxddxdxdxxddxd",Parent = who})
  447. end
  448. local head
  449. local human = who:FindFirstChildOfClass("Humanoid")
  450. if human then
  451. human.PlatformStand = true
  452. end
  453. if kill_ then
  454. for i,v in pairs(who:GetDescendants()) do
  455. if v.Name == "RagdollHB" then
  456. Instance.Remove(v)
  457. end
  458. end
  459. end
  460. for i,v in pairs(who:GetDescendants()) do
  461. if v:IsA("Motor6D") or v:IsA("Motor6D") then
  462. for _,r in pairs(ragdollJoints) do
  463. for w,j in pairs(r) do
  464. if v.Name == w then
  465. local att0 = ins("Attachment",{Position = v.C0.Position,Orientation = j["Att0Rotation"],Parent = v.Part0})
  466. local att1 = ins("Attachment",{Position = v.C1.Position,Orientation = j["Att1Rotation"],Parent = v.Part1})
  467. if j["Position0"] then
  468. att0.Position = v.Part0.Size * j["Position0"]
  469. end
  470. if j["Position1"] then
  471. att1.Position = v.Part1.Size * j["Position1"]
  472. if not kill_ then
  473. local p = ins("Part",{Name = "RagdollHB",Locked = true,Massless = true,Anchored = false,CanCollide = true,Transparency = 1,Size = v.Part1.Size * v3(.75,.75,.75),Parent = v.Part1})
  474. local w=ins("Motor6D",{Parent=v.Part1;Part0=v.Part1;Part1=p;})
  475. if string.find(v.Part1.Name,"Arm") or string.find(v.Part1.Name,"Leg") then
  476. w.C0 = cf(0,(-v.Part1.Size.Y/2) + p.Size.Y/2,0)
  477. end
  478. end
  479. else
  480. if not kill_ then
  481. local p = ins("Part",{Name = "RagdollHB",Locked = true,Massless = true,Anchored = false,CanCollide = true,Transparency = 1,Size = v.Part1.Size * v3(.5,.3,.5),Parent = v.Part1})
  482. local w=ins("Motor6D",{Parent=v.Part1;Part0=v.Part1;Part1=p;})
  483. elseif v.Part1.Name == "Head" then
  484. local p = ins("Part",{Name = "RagdollHB",Locked = true,Massless = true,Anchored = false,CanCollide = true,Transparency = 1,Size = v.Part1.Size * v3(.5,.3,.5),Parent = v.Part1})
  485. local w=ins("Motor6D",{Parent=v.Part1;Part0=v.Part1;Part1=p;})
  486. end
  487. end
  488. ins("NoCollisionConstraint",{Part0 = v.Part0,Part1 = v.Part1,Parent = v.Part0})
  489. local socket = ins("BallSocketConstraint",{Attachment0 = att0,Attachment1 = att1,Name = w,Parent = att0})
  490. for i,v in pairs(j["BallSocketProps"]) do
  491. socket[i] = v
  492. end
  493. Instance.Remove(v)
  494. end
  495. end
  496. end
  497. elseif v.Name == "HumanoidRootPart" then
  498. Instance.Remove(v)
  499. end
  500. if v:IsA("BasePart") and v.Name ~= "RagdollHB" then
  501. v.Anchored = false
  502. v.TopSurface,v.BottomSurface = 10,10
  503. v.CanCollide = false
  504. if kill_ then
  505. Instance.Remove(v,6.5)
  506. end
  507. if v.Name == "Head" then
  508. head = v
  509. end
  510. elseif v:IsA("Decal") then
  511. if kill_ then
  512. Instance.Remove(v,6.5)
  513. end
  514. end
  515. end
  516. if kill_ then
  517. Instance.Remove(who,10)
  518. end
  519. if human then
  520. if kill_ then
  521. human.BreakJointsOnDeath = false
  522. human.Health = 0
  523. end
  524. human.PlatformStand = true
  525. end
  526. return head
  527. end
  528. end
  529. local function CreateBullet(Pos,Direction,Damage)
  530. local Bullet=ins("Part",{Locked=true;CanCollide=false;Massless=true;Name="Bullet";Transparency=1;CFrame=ORIGCF(Pos.Position,Direction);Size=v3(0,0,0);Parent=Bullets;})
  531. local Att0=ins("Attachment",{Parent=Bullet;Position=v3(0,.5,0)})
  532. local Att1=ins("Attachment",{Parent=Bullet;Position=v3(0,-.5,0)})
  533. local Trail=ins("Trail",{Texture="rbxassetid://3472578683";LightEmission=1;Lifetime=.15;Transparency=NumberSequence.new(0,1);FaceCamera=true;Attachment0=Att0;Attachment1=Att1;Parent=Bullet;})
  534. ins("NumberValue",{Name="Damage";Value=Damage;Parent=Bullet;})
  535. pcall(function()
  536. Bullet:SetNetworkOwner(Player)
  537. end)
  538. Instance.Remove(Bullet,5)
  539. end
  540. function Shoot()
  541. Pool=25
  542. Sound(2757012511,1.5,random(.9,1.1,100),Gun,100,5)
  543. CreateBullet(ra.CFrame*cf(-.2,-1.3,-.35),Mouse.Hit.Position,15)
  544. rs.C1=rsC1*cf(-35,0,0,true)*cf(0,-.1,0)
  545. end
  546. --}{ Connections }{--
  547. Mouse.KeyDown:Connect(function(PLR,Bullet,RHit,RPos,RNID,Direction)
  548. pcall(function()
  549. if PLR~=Player then return end;
  550. local Damage=(Bullet.Damage or Bullet:WaitForChild("Damage",1)).Value
  551. Instance.Remove(Bullet)
  552. Bullet.Parent=nil
  553. local HUM
  554. if (RHit.Parent and RHit.Parent:FindFirstChildOfClass("Humanoid")) or (RHit.Parent.Parent and RHit.Parent.Parent:FindFirstChildOfClass("Humanoid")) then
  555. HUM=RHit.Parent:FindFirstChildOfClass("Humanoid") or RHit.Parent.Parent:FindFirstChildOfClass("Humanoid")
  556. end
  557. local Impact=ins("Part",{Locked=true;Massless=true;CanCollide=false;Name="BulletImpact";Size=v3(.125,.125,0);Material=RHit.Material;Color=bc("Really black").Color;CFrame=ORIGCF(RPos,RPos-RNID)})
  558. if HUM then
  559. Impact.Color=bc("Maroon").Color
  560. if RHit.Name=="Head" then
  561. Damage=Damage*2
  562. end
  563. local Health=HUM.Health
  564. if HUM.MaxHealth>100000000 then
  565. kill(HUM.Parent,true)
  566. ins("Explosion",{Parent=workspace;Position=RHit.Position;BlastRadius=0})
  567. HUM.Health=0
  568. local S=Sound(3008598428,4,1,RHit,250,7.5)
  569. Instance.Remove(HUM.Parent,S.TimeLength-.175)
  570. coroutine.wrap(function()
  571. wait(S.TimeLength-.175)
  572. ins("Explosion",{Parent=workspace;Position=RHit.Position;BlastRadius=0})
  573. end)()
  574. end
  575. local Dead=false
  576. if HUM.Health<=(Damage+(1*(HUM.MaxHealth/100))) and HUM.Health>.1 then
  577. kill(HUM.Parent,true)
  578. Dead=true
  579. end
  580. if not Dead then
  581. HUM.Health=HUM.Health-(Damage+(1*(HUM.MaxHealth/100)))
  582. end
  583. coroutine.wrap(function()
  584. wait(1)
  585. if HUM.Health==Health and HUM.Health>.1 then
  586. kill(HUM.Parent,true)
  587. ins("Explosion",{Parent=workspace;Position=RHit.Position;BlastRadius=0})
  588. HUM.Health=0
  589. local S=Sound(3008598428,4,1,RHit,250,7.5)
  590. Instance.Remove(HUM.Parent,S.TimeLength-.175)
  591. coroutine.wrap(function()
  592. wait(S.TimeLength-.175)
  593. ins("Explosion",{Parent=workspace;Position=RHit.Position;BlastRadius=0})
  594. end)()
  595. end
  596. end)()
  597. end
  598. local ImpactP2=ins("Part",{Locked=true;Massless=true;CanCollide=false;Transparency=.65;Size=v3(.25,.25,0);Material=RHit.Material;Color=Impact.Color;Parent=Impact})
  599. local M1=ins("SpecialMesh",{MeshType="Brick";Scale=v3(1,1,.3);Parent=Impact})
  600. local M2=ins("SpecialMesh",{MeshType="Brick";Scale=v3(1,1,.2);Parent=ImpactP2})
  601. if RHit.Material==Enum.Material.Metal or RHit.Material==Enum.Material.DiamondPlate or RHit.Material==Enum.Material.CorrodedMetal then
  602. M1.MeshType="Sphere"
  603. M2.MeshType="Sphere"
  604. end
  605. local CF=RHit.CFrame:ToObjectSpace(Impact.CFrame)
  606. local MainWeld=ins("Motor6D",{Part0=RHit;Part1=Impact;C0=CF*cf(0,0,random(-180,180),true);Parent=RHit})
  607. ins("Motor6D",{Part0=Impact;Part1=ImpactP2;C0=cf(0,0,random(-180,180),true);Parent=Impact})
  608. Impact.Parent=MainWeld
  609. Instance.Remove(Impact,5)
  610. Instance.Remove(ins("BodyVelocity",{Parent=RHit,MaxForce=v3(7500,0,7500);Velocity=v3(clamp(Direction.X,-1,1),clamp(Direction.Y,-1,1),clamp(Direction.Z,-1,1))*15}),.1)
  611. end)
  612. end)
  613. Mouse.Button1Down:connect(function(key)
  614. Shoot()
  615. end)
  616. wait(.1)
  617. game:GetService("RunService").Heartbeat:Connect(function()
  618. Pool=clamp(Pool-1,0,25)
  619. if Pool==0 then
  620. Using=false
  621. else
  622. Using=true
  623. end
  624. if Theme.Parent~=t then
  625. Instance.Remove(Theme)
  626. Theme=ins("Sound",{SoundId="rbxassetid://213693358";TimePosition=TimePos;Volume=1;Pitch=.935;Looped=true;Parent=t;})
  627. end
  628. if not Bullets or Bullets.Parent~=char then
  629. Instance.Remove(Bullets)
  630. Bullets=ins("Model",{Name="Bullets";Parent=char;})
  631. end
  632. Theme.Pitch=1
  633. Theme.Name="Theme"
  634. if not Muted then
  635. Theme.Volume=.45
  636. else
  637. Theme.Volume=0
  638. end
  639. Theme.SoundId="rbxassetid://1033438052"
  640. Theme:Resume()
  641. TimePos=Theme.TimePosition
  642. Sine=Sine+Change
  643. local Direction=hum.MoveDirection
  644. if Direction.Magnitude==0 then Direction=hrp.Velocity/7.5 end;
  645. local MoveZ=clamp((Direction*hrp.CFrame.LookVector).X+(Direction*hrp.CFrame.LookVector).Z,-1,1)
  646. local MoveX=clamp((Direction*hrp.CFrame.RightVector).X+(Direction*hrp.CFrame.RightVector).Z,-1,1)
  647. local Moving=(hrp.Velocity*v3(1,0,1)).Magnitude>1
  648. local VerY=hrp.Velocity.Y
  649. local StandR,RPos,RNID=Raycast(t.CFrame*cf(t.Size.X/4,-t.Size.Y/2,0).Position,-hrp.CFrame.UpVector,{char},3,false)
  650. local StandL,LPos,LNID=Raycast(t.CFrame*cf(-t.Size.X/4,-t.Size.Y/2,0).Position,-hrp.CFrame.UpVector,{char},3,false)
  651. local CF=cf()
  652. pcall(function()
  653. CF=(hrp.CFrame*cf(0,t.Size.Y/2+h.Size.Y/2,0)):ToObjectSpace(ORIGCF((hrp.CFrame*cf(0,t.Size.Y/2+h.Size.Y/2,0)).Position,Mouse.Hit.Position))
  654. end)
  655. hum.JumpPower=JP
  656. if not Moving and (StandR or StandL) then
  657. local IdleVal=20
  658. Change=1
  659. nec.C0=nec.C0:Lerp(necC0*(CF-CF.Position)*cf(0,0,0)*cf(-sin(Sine/IdleVal)*3,CosSin(Sine/(IdleVal*2.5))*5,0,true)*cf(0,0,0)*cf(0,-30,0,true),.2)
  660. rutj.C0=rutj.C0:Lerp(rutjC0*cf(0,.05*cos(Sine/IdleVal),0)*cf(CosSin(Sine/IdleVal)*3,sin(Sine/(IdleVal*4))*5,0,true)*cf(0,0,0)*cf(0,30,0,true),.2)
  661. if not Using then
  662. rs.C0=rs.C0:Lerp(rsC0*cf(0,-.05*cos(Sine/IdleVal),0)*cf(sin(Sine/IdleVal)*5,0,0,true)*cf(-.3,-.65,.15)*cf(130,20,-10,true),.2)
  663. else
  664. rs.C0=rs.C0:Lerp(rsC0*(CF-CF.Position)*cf(0,-30,0,true)*cf(90,0,0,true),.65)
  665. end
  666. ls.C0=ls.C0:Lerp(lsC0*cf(0,-.05*cos(Sine/IdleVal),0)*cf(-sin(Sine/IdleVal)*3,0,CosSin(Sine/(IdleVal*2))*5,true)*cf(.1,-.05,0)*cf(0,-2.5,4,true),.2)
  667. rh.C0=rh.C0:Lerp(rhC0*cf(0,-30,0,true)*cf(0,-.05*cos(Sine/IdleVal),0)*cf((-CosSin(Sine/IdleVal)*4.5)-(sin(Sine/(IdleVal*4))*3.5),0,0,true)*cf(0,0,-.2)*cf(-5,0,2.5,true),.2)
  668. lh.C0=lh.C0:Lerp(lhC0*cf(0,-30,0,true)*cf(0,-.05*cos(Sine/IdleVal),0)*cf((-CosSin(Sine/IdleVal)*4.5)+(sin(Sine/(IdleVal*4))*3.5),0,0,true)*cf(0,0,0)*cf(0,35,-3,true),.2)
  669. elseif Moving and (StandR or StandL) then
  670. local WSVal=6/clamp(hum.WalkSpeed/16,.25,2)*t.Size.Y/2
  671. local WSMul=(1+(WSVal/4))
  672. Change=.875
  673. nec.C0=nec.C0:Lerp(necC0*cf(0,0,0)*cf(0,0,0,true)*cf(0,0,0)*cf(sin(Sine/(WSVal/2))*7.5,-sin(Sine/WSVal)*15,0,true)*angles(MoveZ/12,-MoveX/1.5,0)*(CF-CF.Position),.2/(t.Size.Y/2)*(hum.WalkSpeed/16)/3)
  674. rutj.C0=rutj.C0:Lerp(rutjC0*cf(0,0,0)*cf(0,0,0,true)*cf(-.5*(t.Size.Y/2)*sin(Sine/(WSVal/2))/(1+(WSVal/4))*MoveX,1.5*(t.Size.Y/2)*cos(Sine/(WSVal/2))/(1+(WSVal/4)),-.5*(t.Size.Y/2)*sin(Sine/(WSVal/2))/(1+(WSVal/4))*MoveZ)*cf(cos(Sine/(WSVal/2))*7.5*MoveZ,math.CosSin(Sine/WSVal)*20,cos(Sine/(WSVal/2))*7.5*MoveX,true)*angles((-MoveZ/7.5)*math.clamp((hum.WalkSpeed/16)/(t.Size.Y/2),.5,3.5),0,-MoveX/5),.2/(t.Size.Y/2)*(hum.WalkSpeed/16)/3)
  675. if not Using then
  676. rs.C0=rs.C0:Lerp(rsC0*cf(0,0,0)*cf(0,0,0,true)*cf(0,0,.75*(t.Size.Y/2)*sin(Sine/WSVal)/(1+(WSVal/4))*math.abs(MoveZ))*cf(7.5-sin(Sine/WSVal)*200/(1+(WSVal/4))*MoveZ,-sin(Sine/WSVal)*30,-15*MoveZ,true),.2/(t.Size.Y/2)*(hum.WalkSpeed/16)/3)
  677. else
  678. rs.C0=rs.C0:Lerp(rsC0*(CF-CF.Position)*cf(90,0,0,true),.65)
  679. end
  680. ls.C0=ls.C0:Lerp(lsC0*cf(0,0,0)*cf(0,0,0,true)*cf(0,0,-.75*(t.Size.Y/2)*sin(Sine/WSVal)/(1+(WSVal/4))*math.abs(MoveZ))*cf(7.5+sin(Sine/WSVal)*200/(1+(WSVal/4))*MoveZ,-sin(Sine/WSVal)*30,15*MoveZ,true),.2/(t.Size.Y/2)*(hum.WalkSpeed/16)/3)
  681. rh.C0=rh.C0:Lerp(rhC0*cf(0,0,0)*cf(0,0,0,true)*cf(0,.5*(t.Size.Y/2)*cos(Sine/WSVal),(.1-.8)*(t.Size.Y/2)*cos(Sine/WSVal))*cf(-5+math.clamp((sin(Sine/WSVal)*200/(1+(WSVal/4)))*MoveZ,-130,130),cos(Sine/WSVal)*5,(sin(Sine/WSVal)*60)*MoveX,true),.2/(t.Size.Y/2)*(hum.WalkSpeed/16)/3)
  682. lh.C0=lh.C0:Lerp(lhC0*cf(0,0,0)*cf(0,0,0,true)*cf(0,-.5*(t.Size.Y/2)*cos(Sine/WSVal),(.1+.8)*(t.Size.Y/2)*cos(Sine/WSVal))*cf(-5-math.clamp((sin(Sine/WSVal)*200/(1+(WSVal/4)))*MoveZ,-130,130),cos(Sine/WSVal)*5,-(sin(Sine/WSVal)*60)*MoveX,true),.2/(t.Size.Y/2)*(hum.WalkSpeed/16)/3)
  683. --thanks to kyu or neb.. whatever
  684. if cos(Sine/WSVal)/2>.2 and Step=="L" then
  685. Step="R"
  686. if StandR then
  687. local SoundId=StepSounds[StandR.Material.Name] or 0
  688. if StandR.Material=="Sand" and (StandR.Color.r>.7 and StandR.Color.g>.7 and StandR.Color.b>.7) then
  689. SoundId=StepSounds["Snow"]
  690. end
  691. local SizeVal=StandR.Size*RNID
  692. if SoundId==941640049 then
  693. SizeVal=SizeVal/2
  694. end
  695. Sound(SoundId,(.35*clamp((hum.WalkSpeed/16)/1.5,.5,3.5))/clamp(math.max(SizeVal.X,SizeVal.Y,SizeVal.Z),.5,1.25),random(.9,1.1,100)*clamp(math.max(SizeVal.X,SizeVal.Y,SizeVal.Z)/10,.5,1.2)*clamp((hum.WalkSpeed/16)/1.5,.5,2),t)
  696. end
  697. end
  698. if cos(Sine/WSVal)/2<-.2 and Step=="R" then
  699. Step="L"
  700. if StandL then
  701. local SoundId=StepSounds[StandL.Material.Name] or 0
  702. if StandL.Material==Enum.Material.Sand and (StandL.Color.r>.7 and StandL.Color.g>.7 and StandL.Color.b>.7) then
  703. SoundId=StepSounds["Snow"]
  704. end
  705. local SizeVal=StandL.Size*LNID
  706. if SoundId==941640049 then
  707. SizeVal=SizeVal/2
  708. end
  709. Sound(SoundId,(.35*clamp((hum.WalkSpeed/16)/1.5,.5,3.5))/clamp(math.max(SizeVal.X,SizeVal.Y,SizeVal.Z),.5,1.25),random(.9,1.1,100)*clamp(math.max(SizeVal.X,SizeVal.Y,SizeVal.Z)/2,.5,1.2)*clamp((hum.WalkSpeed/16)/1.5,.5,2),t)
  710. end
  711. end
  712. elseif not(StandR and StandL) then
  713. Change=1
  714. nec.C0=nec.C0:Lerp(necC0*cf(0,0,0)*cf(0,0,0,true)*cf(0,0,0)*cf(clamp(hrp.Velocity.Y,-15,15),0,0,true)*(CF-CF.Position),.2)
  715. rutj.C0=rutj.C0:Lerp(rutjC0*cf(0,0,0)*cf(0,0,0,true)*cf(0,0,0)*cf(clamp(hrp.Velocity.Y,-30,20),0,0,true),.2)
  716. if not Using then
  717. rs.C0=rs.C0:Lerp(rsC0*cf(0,0,0)*cf(0,5,-7.5,true)*cf(-(clamp(hrp.Velocity.Y/20,-.45,0)),0,0)*cf((clamp(hrp.Velocity.Y*4,0,150)),0,-(clamp(hrp.Velocity.Y*4,-120,0)),true),.2)
  718. else
  719. rs.C0=rs.C0:Lerp(rsC0*(CF-CF.Position)*cf(90,0,0,true),.65)
  720. end
  721. ls.C0=ls.C0:Lerp(lsC0*cf(0,0,0)*cf(0,-5,7.5,true)*cf((clamp(hrp.Velocity.Y/20,-.45,0)),0,0)*cf((clamp(hrp.Velocity.Y*4,0,150)),0,(clamp(hrp.Velocity.Y*4,-120,0)),true),.2)
  722. rh.C0=rh.C0:Lerp(rhC0*cf(0,0,0)*cf(0,0,0,true)*cf(0,.4,-.35)*cf(-10,-5,5,true),.2)
  723. lh.C0=lh.C0:Lerp(lhC0*cf(0,0,0)*cf(clamp(-hrp.Velocity.Y,-25,35),0,0,true)*cf(0,.2,-.15)*cf(-2.5,5,-5,true),.2)
  724. end
  725. nec.C1=nec.C1:Lerp(necC1,.2)
  726. rutj.C1=rutj.C1:Lerp(rutjC1,.2)
  727. rs.C1=rs.C1:Lerp(rsC1,.2)
  728. ls.C1=ls.C1:Lerp(lsC1,.2)
  729. rh.C1=rh.C1:Lerp(rhC1,.2)
  730. lh.C1=lh.C1:Lerp(lhC1,.2)
  731. necC0,necC1=cf(0,t.Size.Y/2,0),cf(0,-h.Size.Y/2,0)
  732. rutjC0,rutjC1=cf(0,0,0),cf(0,0,0)
  733. rsC0,rsC1=cf(t.Size.X/2,t.Size.Y/4,0),cf(-ra.Size.X/2,ra.Size.Y/4,0)
  734. lsC0,lsC1=cf(-t.Size.X/2,t.Size.Y/4,0),cf(la.Size.X/2,la.Size.Y/4,0)
  735. rhC0,rhC1=cf(t.Size.X/4,-t.Size.Y/2,0),cf(0,rl.Size.Y/2,0)
  736. lhC0,lhC1=cf(-t.Size.X/4,-t.Size.Y/2,0),cf(0,ll.Size.Y/2,0)
  737. end)
  738. --}{ Loops }{--
  739.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement