Advertisement
HenloMyDude

HAT KID

Sep 25th, 2019
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.26 KB | None | 0 0
  1.  
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,game,owner = owner,game
  4. local RealPlayer = Player
  5. do
  6. local rp = RealPlayer
  7. script.Parent = rp.Character
  8.  
  9. --RemoteEvent for communicating
  10. local Event = Instance.new("RemoteEvent")
  11. Event.Name = "UserInput_Event"
  12.  
  13. --Fake event to make stuff like Mouse.KeyDown work
  14. local function fakeEvent()
  15. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  16. t.connect = t.Connect
  17. return t
  18. end
  19.  
  20. --Creating fake input objects with fake variables
  21. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  22. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  23. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  24. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  25. end}
  26. --Merged 2 functions into one by checking amount of arguments
  27. CAS.UnbindAction = CAS.BindAction
  28.  
  29. --This function will trigger the events that have been :Connect()'ed
  30. local function te(self,ev,...)
  31. local t = m[ev]
  32. if t and t._fakeEvent then
  33. for _,f in pairs(t.Functions) do
  34. f(...)
  35. end
  36. end
  37. end
  38. m.TrigEvent = te
  39. UIS.TrigEvent = te
  40.  
  41. Event.OnServerEvent:Connect(function(plr,io)
  42. if plr~=rp then return end
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. if not io.isMouse then
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. for _,t in pairs(CAS.Actions) do
  51. for _,k in pairs(t.Keys) do
  52. if k==io.KeyCode then
  53. t.Function(t.Name,io.UserInputState,io)
  54. end
  55. end
  56. end
  57. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59. end
  60. end)
  61. Event.Parent = NLS([==[
  62. local Player = game:GetService("Players").LocalPlayer
  63. local Event = script:WaitForChild("UserInput_Event")
  64.  
  65. local Mouse = Player:GetMouse()
  66. local UIS = game:GetService("UserInputService")
  67. local input = function(io,a)
  68. if a then return end
  69. --Since InputObject is a client-side instance, we create and pass table instead
  70. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  71. end
  72. UIS.InputBegan:Connect(input)
  73. UIS.InputEnded:Connect(input)
  74.  
  75. local h,t
  76. --Give the server mouse data 30 times every second, but only if the values changed
  77. --If player is not moving their mouse, client won't fire events
  78. while wait(1/30) do
  79. if h~=Mouse.Hit or t~=Mouse.Target then
  80. h,t=Mouse.Hit,Mouse.Target
  81. Event:FireServer({isMouse=true,Target=t,Hit=h})
  82. end
  83. end]==],Player.Character)
  84.  
  85. ----Sandboxed game object that allows the usage of client-side methods and services
  86. --Real game object
  87. local _rg = game
  88.  
  89. --Metatable for fake service
  90. local fsmt = {
  91. __index = function(self,k)
  92. local s = rawget(self,"_RealService")
  93. if s then return s[k] end
  94. end,
  95. __newindex = function(self,k,v)
  96. local s = rawget(self,"_RealService")
  97. if s then s[k]=v end
  98. end,
  99. __call = function(self,...)
  100. local s = rawget(self,"_RealService")
  101. if s then return s(...) end
  102. end
  103. }
  104. local function FakeService(t,RealService)
  105. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  106. return setmetatable(t,fsmt)
  107. end
  108.  
  109. --Fake game object
  110. local g = {
  111. GetService = function(self,s)
  112. return self[s]
  113. end,
  114. Players = FakeService({
  115. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  116. },"Players"),
  117. UserInputService = FakeService(UIS,"UserInputService"),
  118. ContextActionService = FakeService(CAS,"ContextActionService"),
  119. }
  120. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  121. g.service = g.GetService
  122.  
  123. g.RunService = FakeService({
  124. RenderStepped = _rg:GetService("RunService").Heartbeat,
  125. BindToRenderStep = function(self,name,_,fun)
  126. self._btrs[name] = self.Heartbeat:Connect(fun)
  127. end,
  128. UnbindFromRenderStep = function(self,name)
  129. self._btrs[name]:Disconnect()
  130. end,
  131. },"RunService")
  132.  
  133. setmetatable(g,{
  134. __index=function(self,s)
  135. return _rg:GetService(s) or typeof(_rg[s])=="function"
  136. and function(_,...)return _rg[s](_rg,...)end or _rg[s]
  137. end,
  138. __newindex = fsmt.__newindex,
  139. __call = fsmt.__call
  140. })
  141. --Changing owner to fake player object to support owner:GetMouse()
  142. game,owner = g,g.Players.LocalPlayer
  143. end
  144.  
  145. Player = owner
  146. PlayerGui = Player.PlayerGui
  147. Cam = workspace.CurrentCamera
  148. Backpack = Player.Backpack
  149. Character = Player.Character
  150. Humanoid = Character.Humanoid
  151. Mouse = Player:GetMouse()
  152. RootPart = Character["HumanoidRootPart"]
  153. Torso = Character["Torso"]
  154. Head = Character["Head"]
  155. RightArm = Character["Right Arm"]
  156. LeftArm = Character["Left Arm"]
  157. RightLeg = Character["Right Leg"]
  158. LeftLeg = Character["Left Leg"]
  159. RootJoint = RootPart["RootJoint"]
  160. Neck = Torso["Neck"]
  161. RightShoulder = Torso["Right Shoulder"]
  162. LeftShoulder = Torso["Left Shoulder"]
  163. RightHip = Torso["Right Hip"]
  164. LeftHip = Torso["Left Hip"]
  165.  
  166. removeuseless = game:GetService("Debris")
  167. laff = Instance.new("Sound",Head)
  168. tauntdebounce = false
  169. Character = Player.Character
  170. Humanoid = Character.Humanoid
  171. ---------
  172. plr = game.Players.LocalPlayer
  173. chara = plr.Character
  174. mouse = plr:GetMouse()
  175. Create = Instance.new
  176. Huge = math.huge
  177.  
  178. Player = game:GetService("Players").LocalPlayer
  179. PlayerGui = Player.PlayerGui
  180. Cam = workspace.CurrentCamera
  181. Backpack = Player.Backpack
  182. Character = Player.Character
  183. char = Player.Character
  184. Humanoid = Character.Humanoid
  185. Mouse = Player:GetMouse()
  186. RootPart = Character["HumanoidRootPart"]
  187. Torso = Character["Torso"]
  188. Head = Character["Head"]
  189. RightArm = Character["Right Arm"]
  190. LeftArm = Character["Left Arm"]
  191. RightLeg = Character["Right Leg"]
  192. LeftLeg = Character["Left Leg"]
  193. RootJoint = RootPart["RootJoint"]
  194. Neck = Torso["Neck"]
  195. RightShoulder = Torso["Right Shoulder"]
  196. LeftShoulder = Torso["Left Shoulder"]
  197. RightHip = Torso["Right Hip"]
  198. LeftHip = Torso["Left Hip"]
  199.  
  200. local Orin = "http://www.roblox.com/asset/?id=1065951398"
  201. Head.face.Texture = Orin
  202. function weld(a, b, acf)
  203. local w = Instance.new("Weld", a)
  204. w.Part0 = a
  205. w.Part1 = b
  206. w.C0 = acf
  207. end
  208. --------------------------------
  209. char.Head.face.Texture = "rbxassetid://1065951398"
  210. --------------------------------
  211.  
  212. -------------------------------------------------------
  213. wait(0.2)
  214. local plr = game:service'Players'.LocalPlayer
  215. local char = plr.Character
  216. local hum = char.Humanoid
  217. local hed = char.Head
  218. local root = char.HumanoidRootPart
  219. local rootj = root.RootJoint
  220. local tors = char.Torso
  221. local ra = char["Right Arm"]
  222. local la = char["Left Arm"]
  223. local rl = char["Right Leg"]
  224. local ll = char["Left Leg"]
  225. local neck = tors["Neck"]
  226. local mouse = plr:GetMouse()
  227. local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  228. local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0)
  229. local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0)
  230. local maincolor = BrickColor.new("Plum")
  231.  
  232. -------------------------------------------------------
  233. --Start Good Stuff--
  234. -------------------------------------------------------
  235. cam = game.Workspace.CurrentCamera
  236. CF = CFrame.new
  237. angles = CFrame.Angles
  238. attack = false
  239. Euler = CFrame.fromEulerAnglesXYZ
  240. Rad = math.rad
  241. IT = Instance.new
  242. BrickC = BrickColor.new
  243. Cos = math.cos
  244. Acos = math.acos
  245. Sin = math.sin
  246. Asin = math.asin
  247. Abs = math.abs
  248. Mrandom = math.random
  249. Floor = math.floor
  250. -------------------------------------------------------
  251. --End Good Stuff--
  252. -------------------------------------------------------
  253. -------------------------------------------------------
  254. --Start HeartBeat--
  255. -------------------------------------------------------
  256. ArtificialHB = Instance.new("BindableEvent", script)
  257. ArtificialHB.Name = "Heartbeat"
  258. script:WaitForChild("Heartbeat")
  259.  
  260. frame = 1 / 60
  261. tf = 0
  262. allowframeloss = false
  263. tossremainder = false
  264.  
  265.  
  266. lastframe = tick()
  267. script.Heartbeat:Fire()
  268.  
  269.  
  270. game:GetService("RunService").Heartbeat:connect(function(s, p)
  271. tf = tf + s
  272. if tf >= frame then
  273. if allowframeloss then
  274. script.Heartbeat:Fire()
  275. lastframe = tick()
  276. else
  277. for i = 1, math.floor(tf / frame) do
  278. script.Heartbeat:Fire()
  279. end
  280. lastframe = tick()
  281. end
  282. if tossremainder then
  283. tf = 0
  284. else
  285. tf = tf - frame * math.floor(tf / frame)
  286. end
  287. end
  288. end)
  289. -------------------------------------------------------
  290. --End HeartBeat--
  291. -------------------------------------------------------
  292.  
  293. -------------------------------------------------------
  294. --Start Important Functions--
  295. -------------------------------------------------------
  296. function swait(num)
  297. if num == 0 or num == nil then
  298. game:service("RunService").Stepped:wait(0)
  299. else
  300. for i = 0, num do
  301. game:service("RunService").Stepped:wait(0)
  302. end
  303. end
  304. end
  305. function thread(f)
  306. coroutine.resume(coroutine.create(f))
  307. end
  308. function clerp(a, b, t)
  309. local qa = {
  310. QuaternionFromCFrame(a)
  311. }
  312. local qb = {
  313. QuaternionFromCFrame(b)
  314. }
  315. local ax, ay, az = a.x, a.y, a.z
  316. local bx, by, bz = b.x, b.y, b.z
  317. local _t = 1 - t
  318. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  319. end
  320. function QuaternionFromCFrame(cf)
  321. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  322. local trace = m00 + m11 + m22
  323. if trace > 0 then
  324. local s = math.sqrt(1 + trace)
  325. local recip = 0.5 / s
  326. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  327. else
  328. local i = 0
  329. if m00 < m11 then
  330. i = 1
  331. end
  332. if m22 > (i == 0 and m00 or m11) then
  333. i = 2
  334. end
  335. if i == 0 then
  336. local s = math.sqrt(m00 - m11 - m22 + 1)
  337. local recip = 0.5 / s
  338. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  339. elseif i == 1 then
  340. local s = math.sqrt(m11 - m22 - m00 + 1)
  341. local recip = 0.5 / s
  342. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  343. elseif i == 2 then
  344. local s = math.sqrt(m22 - m00 - m11 + 1)
  345. local recip = 0.5 / s
  346. return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  347. end
  348. end
  349. end
  350. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  351. local xs, ys, zs = x + x, y + y, z + z
  352. local wx, wy, wz = w * xs, w * ys, w * zs
  353. local xx = x * xs
  354. local xy = x * ys
  355. local xz = x * zs
  356. local yy = y * ys
  357. local yz = y * zs
  358. local zz = z * zs
  359. return CFrame.new(px, py, pz, 1 - (yy + zz), xy - wz, xz + wy, xy + wz, 1 - (xx + zz), yz - wx, xz - wy, yz + wx, 1 - (xx + yy))
  360. end
  361. function QuaternionSlerp(a, b, t)
  362. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  363. local startInterp, finishInterp
  364. if cosTheta >= 1.0E-4 then
  365. if 1 - cosTheta > 1.0E-4 then
  366. local theta = math.acos(cosTheta)
  367. local invSinTheta = 1 / Sin(theta)
  368. startInterp = Sin((1 - t) * theta) * invSinTheta
  369. finishInterp = Sin(t * theta) * invSinTheta
  370. else
  371. startInterp = 1 - t
  372. finishInterp = t
  373. end
  374. elseif 1 + cosTheta > 1.0E-4 then
  375. local theta = math.acos(-cosTheta)
  376. local invSinTheta = 1 / Sin(theta)
  377. startInterp = Sin((t - 1) * theta) * invSinTheta
  378. finishInterp = Sin(t * theta) * invSinTheta
  379. else
  380. startInterp = t - 1
  381. finishInterp = t
  382. end
  383. return a[1] * startInterp + b[1] * finishInterp, a[2] * startInterp + b[2] * finishInterp, a[3] * startInterp + b[3] * finishInterp, a[4] * startInterp + b[4] * finishInterp
  384. end
  385. function rayCast(Position, Direction, Range, Ignore)
  386. return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  387. end
  388. local RbxUtility = LoadLibrary("RbxUtility")
  389. local Create = RbxUtility.Create
  390.  
  391. -------------------------------------------------------
  392. --Start Damage Function--
  393. -------------------------------------------------------
  394. function Damage(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch)
  395. if hit.Parent == nil then
  396. return
  397. end
  398. local h = hit.Parent:FindFirstChildOfClass("Humanoid")
  399. for _, v in pairs(hit.Parent:children()) do
  400. if v:IsA("Humanoid") then
  401. h = v
  402. end
  403. end
  404. if h ~= nil and hit.Parent.Name ~= char.Name and hit.Parent:FindFirstChild("UpperTorso") ~= nil then
  405.  
  406. hit.Parent:FindFirstChild("Head"):BreakJoints()
  407. end
  408.  
  409. if h ~= nil and hit.Parent.Name ~= char.Name and hit.Parent:FindFirstChild("Torso") ~= nil then
  410. if hit.Parent:findFirstChild("DebounceHit") ~= nil then
  411. if hit.Parent.DebounceHit.Value == true then
  412. return
  413. end
  414. end
  415. if insta == true then
  416. hit.Parent:FindFirstChild("Head"):BreakJoints()
  417. end
  418. local c = Create("ObjectValue"){
  419. Name = "creator",
  420. Value = game:service("Players").LocalPlayer,
  421. Parent = h,
  422. }
  423. game:GetService("Debris"):AddItem(c, .5)
  424. if HitSound ~= nil and HitPitch ~= nil then
  425. CFuncs.Sound.Create(HitSound, hit, 1, HitPitch)
  426. end
  427. local Damage = math.random(minim, maxim)
  428. local blocked = false
  429. local block = hit.Parent:findFirstChild("Block")
  430. if block ~= nil then
  431. if block.className == "IntValue" then
  432. if block.Value > 0 then
  433. blocked = true
  434. block.Value = block.Value - 1
  435. print(block.Value)
  436. end
  437. end
  438. end
  439. if blocked == false then
  440. h.Health = h.Health - Damage
  441. ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, tors.BrickColor.Color)
  442. else
  443. h.Health = h.Health - (Damage / 2)
  444. ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, tors.BrickColor.Color)
  445. end
  446. if Type == "Knockdown" then
  447. local hum = hit.Parent.Humanoid
  448. hum.PlatformStand = true
  449. coroutine.resume(coroutine.create(function(HHumanoid)
  450. swait(1)
  451. HHumanoid.PlatformStand = false
  452. end), hum)
  453. local angle = (hit.Position - (Property.Position + Vector3.new(0, 0, 0))).unit
  454. local bodvol = Create("BodyVelocity"){
  455. velocity = angle * knockback,
  456. P = 5000,
  457. maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  458. Parent = hit,
  459. }
  460. local rl = Create("BodyAngularVelocity"){
  461. P = 3000,
  462. maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000,
  463. angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)),
  464. Parent = hit,
  465. }
  466. game:GetService("Debris"):AddItem(bodvol, .5)
  467. game:GetService("Debris"):AddItem(rl, .5)
  468. elseif Type == "Normal" then
  469. local vp = Create("BodyVelocity"){
  470. P = 500,
  471. maxForce = Vector3.new(math.huge, 0, math.huge),
  472. velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05,
  473. }
  474. if knockback > 0 then
  475. vp.Parent = hit.Parent.Torso
  476. end
  477. game:GetService("Debris"):AddItem(vp, .5)
  478. elseif Type == "Up" then
  479. local bodyVelocity = Create("BodyVelocity"){
  480. velocity = Vector3.new(0, 20, 0),
  481. P = 5000,
  482. maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  483. Parent = hit,
  484. }
  485. game:GetService("Debris"):AddItem(bodyVelocity, .5)
  486. elseif Type == "DarkUp" then
  487. coroutine.resume(coroutine.create(function()
  488. for i = 0, 1, 0.1 do
  489. swait()
  490. Effects.Block.Create(BrickColor.new("Really red"), hit.Parent.Torso.CFrame, 5, 5, 5, 1, 1, 1, .08, 1)
  491. end
  492. end))
  493. local bodyVelocity = Create("BodyVelocity"){
  494. velocity = Vector3.new(0, 20, 0),
  495. P = 5000,
  496. maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  497. Parent = hit,
  498. }
  499. game:GetService("Debris"):AddItem(bodyVelocity, 1)
  500. elseif Type == "Snare" then
  501. local bp = Create("BodyPosition"){
  502. P = 2000,
  503. D = 100,
  504. maxForce = Vector3.new(math.huge, math.huge, math.huge),
  505. position = hit.Parent.Torso.Position,
  506. Parent = hit.Parent.Torso,
  507. }
  508. game:GetService("Debris"):AddItem(bp, 1)
  509. elseif Type == "Freeze" then
  510. local BodPos = Create("BodyPosition"){
  511. P = 50000,
  512. D = 1000,
  513. maxForce = Vector3.new(math.huge, math.huge, math.huge),
  514. position = hit.Parent.Torso.Position,
  515. Parent = hit.Parent.Torso,
  516. }
  517. local BodGy = Create("BodyGyro") {
  518. maxTorque = Vector3.new(4e+005, 4e+005, 4e+005) * math.huge ,
  519. P = 20e+003,
  520. Parent = hit.Parent.Torso,
  521. cframe = hit.Parent.Torso.CFrame,
  522. }
  523. hit.Parent.Torso.Anchored = true
  524. coroutine.resume(coroutine.create(function(Part)
  525. swait(1.5)
  526. Part.Anchored = false
  527. end), hit.Parent.Torso)
  528. game:GetService("Debris"):AddItem(BodPos, 3)
  529. game:GetService("Debris"):AddItem(BodGy, 3)
  530. end
  531. local debounce = Create("BoolValue"){
  532. Name = "DebounceHit",
  533. Parent = hit.Parent,
  534. Value = true,
  535. }
  536. game:GetService("Debris"):AddItem(debounce, Delay)
  537. c = Create("ObjectValue"){
  538. Name = "creator",
  539. Value = Player,
  540. Parent = h,
  541. }
  542. game:GetService("Debris"):AddItem(c, .5)
  543. end
  544. end
  545. -------------------------------------------------------
  546. --End Damage Function--
  547. -------------------------------------------------------
  548.  
  549. -------------------------------------------------------
  550. --Start Damage Function Customization--
  551. -------------------------------------------------------
  552. function ShowDamage(Pos, Text, Time, Color)
  553. local Rate = (1 / 30)
  554. local Pos = (Pos or Vector3.new(0, 0, 0))
  555. local Text = (Text or "")
  556. local Time = (Time or 2)
  557. local Color = (Color or Color3.new(255, 255, 1))
  558. local EffectPart = CFuncs.Part.Create(workspace, "SmoothPlastic", 0, 1, BrickColor.new(Color), "Effect", Vector3.new(0, 0, 0))
  559. EffectPart.Anchored = true
  560. local BillboardGui = Create("BillboardGui"){
  561. Size = UDim2.new(3, 0, 3, 0),
  562. Adornee = EffectPart,
  563. Parent = EffectPart,
  564. }
  565. local TextLabel = Create("TextLabel"){
  566. BackgroundTransparency = 1,
  567. Size = UDim2.new(1, 0, 1, 0),
  568. Text = Text,
  569. Font = "Bodoni",
  570. TextColor3 = Color,
  571. TextScaled = true,
  572. TextStrokeColor3 = Color3.fromRGB(0,0,0),
  573. Parent = BillboardGui,
  574. }
  575. game.Debris:AddItem(EffectPart, (Time))
  576. EffectPart.Parent = game:GetService("Workspace")
  577. delay(0, function()
  578. local Frames = (Time / Rate)
  579. for Frame = 1, Frames do
  580. wait(Rate)
  581. local Percent = (Frame / Frames)
  582. EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0)
  583. TextLabel.TextTransparency = Percent
  584. end
  585. if EffectPart and EffectPart.Parent then
  586. EffectPart:Destroy()
  587. end
  588. end)
  589. end
  590. -------------------------------------------------------
  591. --End Damage Function Customization--
  592. -------------------------------------------------------
  593.  
  594. function MagniDamage(Part, magni, mindam, maxdam, knock, Type)
  595. for _, c in pairs(workspace:children()) do
  596. local hum = c:findFirstChild("Humanoid")
  597. if hum ~= nil then
  598. local head = c:findFirstChild("Head")
  599. if head ~= nil then
  600. local targ = head.Position - Part.Position
  601. local mag = targ.magnitude
  602. if magni >= mag and c.Name ~= plr.Name then
  603. Damage(head, head, mindam, maxdam, knock, Type, root, 0.1, "http://www.roblox.com/asset/?id=0", 1.2)
  604. end
  605. end
  606. end
  607. end
  608. end
  609.  
  610.  
  611. CFuncs = {
  612. Part = {
  613. Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  614. local Part = Create("Part")({
  615. Parent = Parent,
  616. Reflectance = Reflectance,
  617. Transparency = Transparency,
  618. CanCollide = false,
  619. Locked = true,
  620. BrickColor = BrickColor.new(tostring(BColor)),
  621. Name = Name,
  622. Size = Size,
  623. Material = Material
  624. })
  625. RemoveOutlines(Part)
  626. return Part
  627. end
  628. },
  629. Mesh = {
  630. Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  631. local Msh = Create(Mesh)({
  632. Parent = Part,
  633. Offset = OffSet,
  634. Scale = Scale
  635. })
  636. if Mesh == "SpecialMesh" then
  637. Msh.MeshType = MeshType
  638. Msh.MeshId = MeshId
  639. end
  640. return Msh
  641. end
  642. },
  643. Mesh = {
  644. Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  645. local Msh = Create(Mesh)({
  646. Parent = Part,
  647. Offset = OffSet,
  648. Scale = Scale
  649. })
  650. if Mesh == "SpecialMesh" then
  651. Msh.MeshType = MeshType
  652. Msh.MeshId = MeshId
  653. end
  654. return Msh
  655. end
  656. },
  657. Weld = {
  658. Create = function(Parent, Part0, Part1, C0, C1)
  659. local Weld = Create("Weld")({
  660. Parent = Parent,
  661. Part0 = Part0,
  662. Part1 = Part1,
  663. C0 = C0,
  664. C1 = C1
  665. })
  666. return Weld
  667. end
  668. },
  669. Sound = {
  670. Create = function(id, par, vol, pit)
  671. coroutine.resume(coroutine.create(function()
  672. local S = Create("Sound")({
  673. Volume = vol,
  674. Pitch = pit or 1,
  675. SoundId = id,
  676. Parent = par or workspace
  677. })
  678. wait()
  679. S:play()
  680. game:GetService("Debris"):AddItem(S, 6)
  681. end))
  682. end
  683. },
  684. ParticleEmitter = {
  685. Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread)
  686. local fp = Create("ParticleEmitter")({
  687. Parent = Parent,
  688. Color = ColorSequence.new(Color1, Color2),
  689. LightEmission = LightEmission,
  690. Size = Size,
  691. Texture = Texture,
  692. Transparency = Transparency,
  693. ZOffset = ZOffset,
  694. Acceleration = Accel,
  695. Drag = Drag,
  696. LockedToPart = LockedToPart,
  697. VelocityInheritance = VelocityInheritance,
  698. EmissionDirection = EmissionDirection,
  699. Enabled = Enabled,
  700. Lifetime = LifeTime,
  701. Rate = Rate,
  702. Rotation = Rotation,
  703. RotSpeed = RotSpeed,
  704. Speed = Speed,
  705. VelocitySpread = VelocitySpread
  706. })
  707. return fp
  708. end
  709. }
  710. }
  711. function RemoveOutlines(part)
  712. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  713. end
  714. function CreatePart(FormFactor, Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  715. local Part = Create("Part")({
  716. formFactor = FormFactor,
  717. Parent = Parent,
  718. Reflectance = Reflectance,
  719. Transparency = Transparency,
  720. CanCollide = false,
  721. Locked = true,
  722. BrickColor = BrickColor.new(tostring(BColor)),
  723. Name = Name,
  724. Size = Size,
  725. Material = Material
  726. })
  727. RemoveOutlines(Part)
  728. return Part
  729. end
  730. function CreateMesh(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  731. local Msh = Create(Mesh)({
  732. Parent = Part,
  733. Offset = OffSet,
  734. Scale = Scale
  735. })
  736. if Mesh == "SpecialMesh" then
  737. Msh.MeshType = MeshType
  738. Msh.MeshId = MeshId
  739. end
  740. return Msh
  741. end
  742. function CreateWeld(Parent, Part0, Part1, C0, C1)
  743. local Weld = Create("Weld")({
  744. Parent = Parent,
  745. Part0 = Part0,
  746. Part1 = Part1,
  747. C0 = C0,
  748. C1 = C1
  749. })
  750. return Weld
  751. end
  752.  
  753.  
  754.  
  755. -------------------------------------------------------
  756. --End Effect Function--
  757. -------------------------------------------------------
  758. function Cso(ID, PARENT, VOLUME, PITCH)
  759. local NSound = nil
  760. coroutine.resume(coroutine.create(function()
  761. NSound = IT("Sound", PARENT)
  762. NSound.Volume = VOLUME
  763. NSound.Pitch = PITCH
  764. NSound.SoundId = "http://www.roblox.com/asset/?id="..ID
  765. swait()
  766. NSound:play()
  767. game:GetService("Debris"):AddItem(NSound, 50)
  768. end))
  769. return NSound
  770. end
  771. function CameraEnshaking(Length, Intensity)
  772. coroutine.resume(coroutine.create(function()
  773. local intensity = 1 * Intensity
  774. local rotM = 0.01 * Intensity
  775. for i = 0, Length, 0.1 do
  776. swait()
  777. intensity = intensity - 0.05 * Intensity / Length
  778. rotM = rotM - 5.0E-4 * Intensity / Length
  779. hum.CameraOffset = Vector3.new(Rad(Mrandom(-intensity, intensity)), Rad(Mrandom(-intensity, intensity)), Rad(Mrandom(-intensity, intensity)))
  780. cam.CFrame = cam.CFrame * CF(Rad(Mrandom(-intensity, intensity)), Rad(Mrandom(-intensity, intensity)), Rad(Mrandom(-intensity, intensity))) * Euler(Rad(Mrandom(-intensity, intensity)) * rotM, Rad(Mrandom(-intensity, intensity)) * rotM, Rad(Mrandom(-intensity, intensity)) * rotM)
  781. end
  782. hum.CameraOffset = Vector3.new(0, 0, 0)
  783. end))
  784. end
  785. -------------------------------------------------------
  786. --End Important Functions--
  787. -------------------------------------------------------
  788.  
  789. ----------------------------------------------------------------------------------
  790. hum.WalkSpeed = 16
  791. hum.JumpPower = 57
  792. ----------------------------------------------------------------------------------
  793. local AddInstance = function(Object, ...)
  794. local Obj = Instance.new(Object)
  795. for i,v in next,(...) do
  796. Obj[i] = v
  797. end
  798. return Obj
  799. end
  800. ----------------------------------------------------
  801.  
  802. local Reaper = AddInstance("Part",{
  803. Parent = hed,
  804. CFrame = hed.CFrame,
  805. formFactor = "Symmetric",
  806. Size = Vector3.new(1, 1, 1),
  807. CanCollide = false,
  808. TopSurface = "Smooth",
  809. BottomSurface = "Smooth",
  810. Locked = true,
  811. })
  812. local Weld = AddInstance("Weld",{
  813. Parent = Reaper,
  814. Part0 = hed,
  815. C0 = CFrame.new(0, 1.45, 0)*CFrame.Angles(0, 0, 0),
  816. Part1 = Reaper,
  817. })
  818. local Mesh = AddInstance("SpecialMesh",{
  819. Parent = Reaper,
  820. MeshId = "rbxassetid://2711178",
  821. TextureId = "rbxassetid://2938935864",
  822. Scale = Vector3.new(0.85,0.85,0.85),
  823. VertexColor = Vector3.new(1, 1, 1),
  824. })
  825.  
  826. -------------------------------------------------------
  827. local Hair = AddInstance("Part",{
  828. Parent = hed,
  829. CFrame = hed.CFrame,
  830. formFactor = "Symmetric",
  831. Size = Vector3.new(1, 1, 1),
  832. CanCollide = false,
  833. TopSurface = "Smooth",
  834. BottomSurface = "Smooth",
  835. Locked = true,
  836. })
  837. local Weld = AddInstance("Weld",{
  838. Parent = Hair,
  839. Part0 = hed,
  840. C0 = CFrame.new(-0.05, 0.35, 0.4)*CFrame.Angles(0, 0, 0),
  841. Part1 = Hair,
  842. })
  843. local Mesh = AddInstance("SpecialMesh",{
  844. Parent = Hair,
  845. MeshId = "rbxassetid://1138830322",
  846. TextureId = "rbxassetid://869796655",
  847. Scale = Vector3.new(0.6,0.6,0.6),
  848. VertexColor = Vector3.new(1, 1, 1),
  849. })
  850. -------------------------------------------------------
  851. local Cape = AddInstance("Part",{
  852. Parent = Torso,
  853. CFrame = Torso.CFrame,
  854. formFactor = "Symmetric",
  855. Size = Vector3.new(1, 1, 1),
  856. CanCollide = false,
  857. TopSurface = "Smooth",
  858. BottomSurface = "Smooth",
  859. Locked = true,
  860. })
  861. local Weld = AddInstance("Weld",{
  862. Parent = Cape,
  863. Part0 = Torso,
  864. C0 = CFrame.new(0, -0.2, 0.35)*CFrame.Angles(0, 0, 0),
  865. Part1 = Cape,
  866. })
  867. local Mesh = AddInstance("SpecialMesh",{
  868. Parent = Cape,
  869. MeshId = "rbxassetid://114046169",
  870. TextureId = "rbxassetid://501524456",
  871. Scale = Vector3.new(1.3,1.3,1.3),
  872. VertexColor = Vector3.new(1, 1, 1),
  873. })
  874. ---------------------------------------------------------------
  875. wait(1)
  876. plr = game.Players.LocalPlayer
  877. char = plr.Character
  878. mouse = plr:GetMouse()
  879. whitecolor = Color3.new(255,255,1)
  880. epicmode = false
  881. normal = true
  882. for i,v in pairs(char:GetChildren()) do
  883. if v.ClassName == "Shirt" or v.ClassName == "Pants" or v.ClassName == "ShirtGraphic" then
  884. v:Destroy()
  885. end
  886. end
  887. local shirt = Instance.new("Shirt",char)
  888. shirt.ShirtTemplate = "rbxassetid://1408840214"
  889. local pants = Instance.new("Pants",char)
  890. pants.PantsTemplate = "rbxassetid://1409282652"
  891. local bdycolors = char["Body Colors"]
  892. bdycolors.HeadColor3 = whitecolor
  893. bdycolors.LeftArmColor3 = whitecolor
  894. bdycolors.LeftLegColor3 = whitecolor
  895. bdycolors.RightArmColor3 = whitecolor
  896. bdycolors.RightLegColor3 = whitecolor
  897. bdycolors.TorsoColor3 = whitecolor
  898. for i,v in pairs(char:GetChildren()) do
  899. if v.ClassName == "Hat" or v.ClassName == "Accessory" then
  900. v:Destroy()
  901. end
  902. end
  903.  
  904.  
  905.  
  906. local BC = Character["Body Colors"]
  907. BC.HeadColor = BrickColor.new("Pastel brown")
  908. BC.LeftArmColor = BrickColor.new("Pastel brown")
  909. BC.LeftLegColor = BrickColor.new("Pastel brown")
  910. BC.RightArmColor = BrickColor.new("Pastel brown")
  911. BC.RightLegColor = BrickColor.new("Pastel brown")
  912. BC.TorsoColor = BrickColor.new("Pastel brown")
  913.  
  914. -----------------------------------------------
  915.  
  916. theme = Instance.new("Sound", Head)
  917. theme.Volume = 0.7
  918. theme.Name = "theme"
  919. theme.Looped = true
  920.  
  921. mouse.KeyDown:connect(function(Press)
  922. Press=Press:lower()
  923. if Press=='z' then
  924. id = 0
  925. theme.SoundId = "rbxassetid://"..id
  926. theme:Play()
  927. end
  928. end)
  929.  
  930. mouse.KeyDown:connect(function(Press)
  931. Press=Press:lower()
  932. if Press=='c' then
  933. id = 1191722766
  934. theme.SoundId = "rbxassetid://"..id
  935. theme:Play()
  936. end
  937. end)
  938.  
  939. mouse.KeyDown:connect(function(Press)
  940. Press=Press:lower()
  941. if Press=='v' then
  942. id = 2377141094
  943. theme.SoundId = "rbxassetid://"..id
  944. theme:Play()
  945. end
  946. end)
  947.  
  948. mouse.KeyDown:connect(function(Press)
  949. Press=Press:lower()
  950. if Press=='b' then
  951. id = 1129466633
  952. theme.SoundId = "rbxassetid://"..id
  953. theme:Play()
  954. end
  955. end)
  956.  
  957. mouse.KeyDown:connect(function(Press)
  958. Press=Press:lower()
  959. if Press=='n' then
  960. id = 1117396305
  961. theme.SoundId = "rbxassetid://"..id
  962. theme:Play()
  963. end
  964. end)
  965.  
  966. mouse.KeyDown:connect(function(Press)
  967. Press=Press:lower()
  968. if Press=='m' then
  969. id = 991980152
  970. theme.SoundId = "rbxassetid://"..id
  971. theme:Play()
  972. end
  973. end)
  974.  
  975. mouse.KeyDown:connect(function(Press)
  976. Press=Press:lower()
  977. if Press=='x' then
  978. id = 2279080577
  979. theme.SoundId = "rbxassetid://"..id
  980. theme:Play()
  981. end
  982. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement