Advertisement
EmeraldIT

uwu

Sep 28th, 2019
679
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.82 KB | None | 0 0
  1. warn([[
  2. You know, sometimes you're gonna wish you could just have your own
  3. empty space. No one around to gaze at you; No one in your space;
  4. No one judging. But sometimes, you should just shrug it off.
  5. Be yourself. You do you. The only one who decides..
  6.  
  7. Is you.
  8.  
  9. And you, yes you my friend.
  10.  
  11. YOU are one and only. no one else can change THAT.
  12. ]])
  13. wait(1/60)
  14.  
  15. --// Shortcut Variables \\--
  16. local S = setmetatable({},{__index = function(s,i) return game:service(i) end})
  17. local CF = {N=CFrame.new,A=CFrame.Angles,fEA=CFrame.fromEulerAnglesXYZ}
  18. local C3 = {tRGB= function(c3) return c3.r*255,c3.g*255,c3.b*255 end,N=Color3.new,RGB=Color3.fromRGB,HSV=Color3.fromHSV,tHSV=Color3.toHSV}
  19. local V3 = {N=Vector3.new,FNI=Vector3.FromNormalId,A=Vector3.FromAxis}
  20. local M = {C=math.cos,R=math.rad,S=math.sin,P=math.pi,RNG=math.random,MRS=math.randomseed,H=math.huge,RRNG = function(min,max,div) return math.rad(math.random(min,max)/(div or 1)) end}
  21. local R3 = {N=Region3.new}
  22. local De = S.Debris
  23. local WS = workspace
  24. local Lght = S.Lighting
  25. local RepS = S.ReplicatedStorage
  26. local IN = Instance.new
  27. local Plrs = S.Players
  28.  
  29. --// Initializing \\--
  30. local Plr = owner
  31. local Char = Plr.Character
  32. local Hum = Char:FindFirstChildOfClass'Humanoid'
  33. local RArm = Char["Right Arm"]
  34. local LArm = Char["Left Arm"]
  35. local RLeg = Char["Right Leg"]
  36. local LLeg = Char["Left Leg"]
  37. local Root = Char:FindFirstChild'HumanoidRootPart'
  38. local Torso = Char.Torso
  39. local Head = Char.Head
  40. local NeutralAnims = true
  41. local Attack = false
  42. local Debounces = {Debounces={}}
  43. local Mouse = Plr:GetMouse()
  44. local Hit = {}
  45. local Sine = 0
  46. local Change = 1
  47. local BloodPuddles = {}
  48. local Awakened = false
  49.  
  50. local Effects = IN("Folder",Char)
  51. Effects.Name = "Effects"
  52.  
  53.  
  54. --// Debounce System \\--
  55.  
  56.  
  57. function Debounces:New(name,cooldown)
  58. local aaaaa = {Usable=true,Cooldown=cooldown or 2,CoolingDown=false,LastUse=0}
  59. setmetatable(aaaaa,{__index = Debounces})
  60. Debounces.Debounces[name] = aaaaa
  61. return aaaaa
  62. end
  63.  
  64. function Debounces:Use(overrideUsable)
  65. assert(self.Usable ~= nil and self.LastUse ~= nil and self.CoolingDown ~= nil,"Expected ':' not '.' calling member function Use")
  66. if(self.Usable or overrideUsable)then
  67. self.Usable = false
  68. self.CoolingDown = true
  69. local LastUse = time()
  70. self.LastUse = LastUse
  71. delay(self.Cooldown or 2,function()
  72. if(self.LastUse == LastUse)then
  73. self.CoolingDown = false
  74. self.Usable = true
  75. end
  76. end)
  77. end
  78. end
  79.  
  80. function Debounces:Get(name)
  81. assert(typeof(name) == 'string',("bad argument #1 to 'get' (string expected, got %s)"):format(typeof(name) == nil and "no value" or typeof(name)))
  82. for i,v in next, Debounces.Debounces do
  83. if(i == name)then
  84. return v;
  85. end
  86. end
  87. end
  88.  
  89. function Debounces:GetProgressPercentage()
  90. assert(self.Usable ~= nil and self.LastUse ~= nil and self.CoolingDown ~= nil,"Expected ':' not '.' calling member function Use")
  91. if(self.CoolingDown and not self.Usable)then
  92. return math.max(
  93. math.floor(
  94. (
  95. (time()-self.LastUse)/self.Cooldown or 2
  96. )*100
  97. )
  98. )
  99. else
  100. return 100
  101. end
  102. end
  103.  
  104. --// Instance Creation Functions \\--
  105. local baseSound = IN("Sound")
  106. function Sound(parent,id,pitch,volume,looped,effect,autoPlay)
  107. local Sound = baseSound:Clone()
  108. Sound.SoundId = "rbxassetid://".. tostring(id or 0)
  109. Sound.Pitch = pitch or 1
  110. Sound.Volume = volume or 1
  111. Sound.Looped = looped or false
  112. if(autoPlay)then
  113. coroutine.wrap(function()
  114. repeat wait() until Sound.IsLoaded
  115. Sound.Playing = autoPlay or false
  116. end)()
  117. end
  118. if(not looped and effect)then
  119. Sound.Stopped:connect(function()
  120. Sound.Volume = 0
  121. Sound:destroy()
  122. end)
  123. elseif(effect)then
  124. warn("Sound can't be looped and a sound effect!")
  125. end
  126. Sound.Parent =parent or Torso
  127. return Sound
  128. end
  129. function Part(parent,color,material,size,cframe,anchored,cancollide)
  130. local part = IN("Part")
  131. part.Parent = parent or Char
  132. part[typeof(color) == 'BrickColor' and 'BrickColor' or 'Color'] = color or C3.N(0,0,0)
  133. part.Material = material or Enum.Material.SmoothPlastic
  134. part.TopSurface,part.BottomSurface=10,10
  135. part.Size = size or V3.N(1,1,1)
  136. part.CFrame = cframe or CF.N(0,0,0)
  137. part.CanCollide = cancollide or false
  138. part.Anchored = anchored or false
  139. return part
  140. end
  141.  
  142. function Weld(part0,part1,c0,c1)
  143. local weld = IN("Weld")
  144. weld.Parent = part0
  145. weld.Part0 = part0
  146. weld.Part1 = part1
  147. weld.C0 = c0 or CF.N()
  148. weld.C1 = c1 or CF.N()
  149. return weld
  150. end
  151.  
  152. function Mesh(parent,meshtype,meshid,textid,scale,offset)
  153. local part = IN("SpecialMesh")
  154. part.MeshId = meshid or ""
  155. part.TextureId = textid or ""
  156. part.Scale = scale or V3.N(1,1,1)
  157. part.Offset = offset or V3.N(0,0,0)
  158. part.MeshType = meshtype or Enum.MeshType.Sphere
  159. part.Parent = parent
  160. return part
  161. end
  162.  
  163. NewInstance = function(instance,parent,properties)
  164. local inst = Instance.new(instance)
  165. inst.Parent = parent
  166. if(properties)then
  167. for i,v in next, properties do
  168. pcall(function() inst[i] = v end)
  169. end
  170. end
  171. return inst;
  172. end
  173.  
  174.  
  175. local Frame_Speed = 60 -- The frame speed for swait. 1 is automatically divided by this
  176. local Remove_Hats = false
  177. local Remove_Clothing = false
  178. local PlayerSize = 1
  179. local DamageColor = BrickColor.new'CGA brown'
  180. local MusicID = 2327416065
  181. local God = true
  182. local Muted = false
  183.  
  184. Sound(Root,MusicID,1,100,true,false,true)
  185.  
  186. local WalkSpeed = 100
  187.  
  188. --// Weapon and GUI creation, and Character Customization \\--
  189.  
  190. if(Remove_Hats)then Instance.ClearChildrenOfClass(Char,"Accessory",true) end
  191. if(Remove_Clothing)then Instance.ClearChildrenOfClass(Char,"Clothing",true) Instance.ClearChildrenOfClass(Char,"ShirtGraphic",true) end
  192.  
  193. if(PlayerSize ~= 1)then
  194. for _,v in next, Char:GetDescendants() do
  195. if(v:IsA'BasePart')then
  196. v.Size = v.Size * PlayerSize
  197. end
  198. end
  199. end
  200.  
  201. --// Stop animations \\--
  202. for _,v in next, Hum:GetPlayingAnimationTracks() do
  203. v:Stop();
  204. end
  205.  
  206. pcall(game.Destroy,Char:FindFirstChild'Animate')
  207. pcall(game.Destroy,Hum:FindFirstChild'Animator')
  208.  
  209. --// Joints \\--
  210.  
  211. local LS = NewInstance('Motor',Char,{Part0=Torso,Part1=LArm,C0 = CF.N(-1.5 * PlayerSize,0.5 * PlayerSize,0),C1 = CF.N(0,.5 * PlayerSize,0)})
  212. local RS = NewInstance('Motor',Char,{Part0=Torso,Part1=RArm,C0 = CF.N(1.5 * PlayerSize,0.5 * PlayerSize,0),C1 = CF.N(0,.5 * PlayerSize,0)})
  213. local NK = NewInstance('Motor',Char,{Part0=Torso,Part1=Head,C0 = CF.N(0,1.5 * PlayerSize,0)})
  214. local LH = NewInstance('Motor',Char,{Part0=Torso,Part1=LLeg,C0 = CF.N(-.5 * PlayerSize,-1 * PlayerSize,0),C1 = CF.N(0,1 * PlayerSize,0)})
  215. local RH = NewInstance('Motor',Char,{Part0=Torso,Part1=RLeg,C0 = CF.N(.5 * PlayerSize,-1 * PlayerSize,0),C1 = CF.N(0,1 * PlayerSize,0)})
  216. local RJ = NewInstance('Motor',Char,{Part0=Root,Part1=Torso})
  217.  
  218. local LSC0 = LS.C0
  219. local RSC0 = RS.C0
  220. local NKC0 = NK.C0
  221. local LHC0 = LH.C0
  222. local RHC0 = RH.C0
  223. local RJC0 = RJ.C0
  224.  
  225. --// Artificial HB \\--
  226.  
  227. local ArtificialHB = IN("BindableEvent", script)
  228. ArtificialHB.Name = "Heartbeat"
  229.  
  230. script:WaitForChild("Heartbeat")
  231.  
  232. local tf = 0
  233. local allowframeloss = false
  234. local tossremainder = false
  235. local lastframe = tick()
  236. local frame = 1/Frame_Speed
  237. ArtificialHB:Fire()
  238.  
  239. game:GetService("RunService").Heartbeat:connect(function(s, p)
  240. tf = tf + s
  241. if tf >= frame then
  242. if allowframeloss then
  243. script.Heartbeat:Fire()
  244. lastframe = tick()
  245. else
  246. for i = 1, math.floor(tf / frame) do
  247. ArtificialHB:Fire()
  248. end
  249. lastframe = tick()
  250. end
  251. if tossremainder then
  252. tf = 0
  253. else
  254. tf = tf - frame * math.floor(tf / frame)
  255. end
  256. end
  257. end)
  258.  
  259. function swait(num)
  260. if num == 0 or num == nil then
  261. ArtificialHB.Event:wait()
  262. else
  263. for i = 0, num do
  264. ArtificialHB.Event:wait()
  265. end
  266. end
  267. end
  268.  
  269. function CastRay(startPos,endPos,range,ignoreList)
  270. local ray = Ray.new(startPos,(endPos-startPos).unit*range)
  271. local part,pos,norm = workspace:FindPartOnRayWithIgnoreList(ray,ignoreList or {Char},false,true)
  272. return part,pos,norm,(pos and (startPos-pos).magnitude)
  273. end
  274.  
  275. function getRegion(point,range,ignore)
  276. return workspace:FindPartsInRegion3WithIgnoreList(R3.N(point-V3.N(1,1,1)*range/2,point+V3.N(1,1,1)*range/2),ignore,100)
  277. end
  278.  
  279. function clerp(startCF,endCF,alpha)
  280. return startCF:lerp(endCF, alpha)
  281. end
  282.  
  283. function GetTorso(char)
  284. return char:FindFirstChild'Torso' or char:FindFirstChild'UpperTorso' or char:FindFirstChild'LowerTorso' or char:FindFirstChild'HumanoidRootPart'
  285. end
  286.  
  287.  
  288.  
  289. while true do
  290. swait()
  291. Sine = Sine + Change
  292.  
  293. if(God)then
  294. Hum.MaxHealth = 1e100
  295. Hum.Health = 1e100
  296. if(not Char:FindFirstChildOfClass'ForceField')then IN("ForceField",Char).Visible = false end
  297. Hum.Name = M.RNG()*100
  298. Hum.HipHeight = 6
  299. Hum.JumpPower = 100
  300. end
  301.  
  302. local hitfloor,posfloor = workspace:FindPartOnRay(Ray.new(Root.CFrame.p,((CFrame.new(Root.Position,Root.Position - Vector3.new(0,1,0))).lookVector).unit * ((6+Hum.HipHeight)*PlayerSize)), Char)
  303.  
  304. local Walking = (math.abs(Root.Velocity.x) > 1 or math.abs(Root.Velocity.z) > 1)
  305. local State = (Hum.PlatformStand and 'Paralyzed' or Hum.Sit and 'Sit' or not hitfloor and Root.Velocity.y < -1 and "Fall" or not hitfloor and Root.Velocity.y > 1 and "Jump" or hitfloor and Walking and "Walk" or hitfloor and "Idle")
  306. if(not Effects or not Effects.Parent)then
  307. Effects = IN("Model",Char)
  308. Effects.Name = "Effects"
  309. end
  310. Hum.WalkSpeed = WalkSpeed
  311.  
  312. if(NeutralAnims)then
  313. if(State == 'Idle')then
  314. local Alpha = .1
  315. Change = 1
  316. RJ.C0 = RJ.C0:lerp(RJC0*CF.N(0,0+.6*M.C(Sine/20),0)*CF.A(M.R(20-2.5*M.S(Sine/20)),0,0),Alpha)
  317. NK.C0 = NK.C0:lerp(NKC0*CF.A(M.R(-20+2.5*M.S(Sine/30)),0,0),Alpha)
  318. LS.C0 = LS.C0:lerp(LSC0*CF.N(0,.1*M.S(Sine/20),0)*CF.A(M.R(-20-7.5*M.S(Sine/20)),0,M.R(-5-5*M.S(Sine/20))),Alpha)
  319. RS.C0 = RS.C0:lerp(RSC0*CF.N(0,.1*M.S(Sine/20),0)*CF.A(M.R(-20-7.5*M.S(Sine/20)),0,M.R(5+5*M.S(Sine/20))),Alpha)
  320. LH.C0 = LH.C0:lerp(LHC0*CF.N(0,.1-.15*M.S(Sine/20),0)*CF.A(M.R(0+7.5*M.S(Sine/20)),0,M.R(-5-2.5*M.S(Sine/20)))*CF.A(M.R(-7.5),0,M.R(-5)),Alpha)
  321. RH.C0 = RH.C0:lerp(RHC0*CF.N(0,.6-.25*M.S(Sine/20),-.6)*CF.A(M.R(0+7.5*M.S(Sine/20)),0,M.R(5+2.5*M.S(Sine/20)))*CF.A(M.R(-7.5),0,M.R(5)),Alpha)
  322.  
  323. elseif(State == 'Run')then
  324. local Alpha = .1
  325. Change = 1
  326. RJ.C0 = RJ.C0:lerp(RJC0,Alpha)
  327. NK.C0 = NK.C0:lerp(NKC0,Alpha)
  328. LS.C0 = LS.C0:lerp(LSC0,Alpha)
  329. RS.C0 = RS.C0:lerp(RSC0,Alpha)
  330. LH.C0 = LH.C0:lerp(LHC0,Alpha)
  331. RH.C0 = RH.C0:lerp(RHC0,Alpha)
  332. elseif(State == 'Walk')then
  333. local Alpha = .1
  334. Change = 1
  335. RJ.C0 = RJ.C0:lerp(RJC0*CF.N(0,0+.6*M.C(Sine/20),0)*CF.A(M.R(-25-2.5*M.S(Sine/20)),0,0),Alpha)
  336. NK.C0 = NK.C0:lerp(NKC0*CF.A(M.R(-20+2.5*M.S(Sine/30)),0,0),Alpha)
  337. LS.C0 = LS.C0:lerp(LSC0*CF.N(0,.1*M.S(Sine/20),0)*CF.A(M.R(25-2.5*M.S(Sine/20)),0,M.R(-5-2.5*M.S(Sine/20))),Alpha)
  338. RS.C0 = RS.C0:lerp(RSC0*CF.N(0,.1*M.S(Sine/20),0)*CF.A(M.R(25-2.5*M.S(Sine/20)),0,M.R(5+2.5*M.S(Sine/20))),Alpha)
  339. LH.C0 = LH.C0:lerp(LHC0*CF.N(0,.1-.15*M.S(Sine/20),0)*CF.A(M.R(-10+7.5*M.S(Sine/20)),0,M.R(-5-2.5*M.S(Sine/20)))*CF.A(M.R(-7.5),0,M.R(-5)),Alpha)
  340. RH.C0 = RH.C0:lerp(RHC0*CF.N(0,.1-.15*M.S(Sine/20),0)*CF.A(M.R(-10+7.5*M.S(Sine/20)),0,M.R(5+2.5*M.S(Sine/20)))*CF.A(M.R(-7.5),0,M.R(5)),Alpha)
  341.  
  342. elseif(State == 'Jump')then
  343. local Alpha = .1
  344. local idk = math.min(math.max(Root.Velocity.Y/50,-M.R(90)),M.R(90))
  345. LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-90)),Alpha)
  346. RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(90)),Alpha)
  347. RJ.C0 = RJ.C0:lerp(RJC0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(45)),M.R(45)),0,0),Alpha)
  348. NK.C0 = NK.C0:lerp(NKC0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(45)),M.R(45)),0,0),Alpha)
  349. LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha)
  350. RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha)
  351. elseif(State == 'Fall')then
  352. local Alpha = .1
  353. local idk = math.min(math.max(Root.Velocity.Y/50,-M.R(90)),M.R(90))
  354. LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-90)+idk),Alpha)
  355. RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(90)-idk),Alpha)
  356. RJ.C0 = RJ.C0:lerp(RJC0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(45)),M.R(45)),0,0),Alpha)
  357. NK.C0 = NK.C0:lerp(NKC0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(45)),M.R(45)),0,0),Alpha)
  358. LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha)
  359. RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha)
  360. elseif(State == 'Paralyzed')then
  361. -- paralyzed
  362. elseif(State == 'Sit')then
  363. -- sit
  364. end
  365. end
  366.  
  367. for i,v in next, BloodPuddles do
  368. local mesh = i:FindFirstChild'CylinderMesh'
  369. BloodPuddles[i] = v + 1
  370. if(not mesh or i.Transparency >= 1)then
  371. i:destroy()
  372. BloodPuddles[i] = nil
  373. elseif(v >= Frame_Speed*4)then
  374. local trans = (v-Frame_Speed*4)/(Frame_Speed*2)
  375. i.Transparency = trans
  376. if(mesh.Scale.Z > 0)then
  377. mesh.Scale = mesh.Scale-V3.N(.05,0,.05)
  378. end
  379. else
  380. i.Transparency = 0
  381. end
  382. end
  383. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement