Advertisement
samuelrichter66

sonic.exe

May 29th, 2019
1,273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 44.21 KB | None | 0 0
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  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. print("FE Compatibility code V2 by Mokiros")
  7. local RealPlayer = RealPlayer
  8. script.Parent = RealPlayer.Character
  9.  
  10. --Fake event to make stuff like Mouse.KeyDown work
  11. local Disconnect_Function = function(this)
  12. this[1].Functions[this[2]] = nil
  13. end
  14. local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
  15. local FakeEvent_Metatable = {__index={
  16. Connect = function(this,f)
  17. local i = tostring(math.random(0,10000))
  18. while this.Functions[i] do
  19. i = tostring(math.random(0,10000))
  20. end
  21. this.Functions[i] = f
  22. return setmetatable({this,i},Disconnect_Metatable)
  23. end
  24. }}
  25. FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
  26. local function fakeEvent()
  27. return setmetatable({Functions={}},FakeEvent_Metatable)
  28. end
  29.  
  30. --Creating fake input objects with fake variables
  31. local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  32. FakeMouse.keyUp = FakeMouse.KeyUp
  33. FakeMouse.keyDown = FakeMouse.KeyDown
  34. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  35. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  36. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  37. end}
  38. --Merged 2 functions into one by checking amount of arguments
  39. CAS.UnbindAction = CAS.BindAction
  40.  
  41. --This function will trigger the events that have been :Connect()'ed
  42. local function TriggerEvent(self,ev,...)
  43. for _,f in pairs(self[ev].Functions) do
  44. f(...)
  45. end
  46. end
  47. FakeMouse.TriggerEvent = TriggerEvent
  48. UIS.TriggerEvent = TriggerEvent
  49.  
  50. --Client communication
  51. local Event = Instance.new("RemoteEvent")
  52. Event.Name = "UserInput_Event"
  53. Event.OnServerEvent:Connect(function(plr,io)
  54. if plr~=RealPlayer then return end
  55. FakeMouse.Target = io.Target
  56. FakeMouse.Hit = io.Hit
  57. if not io.isMouse then
  58. local b = io.UserInputState == Enum.UserInputState.Begin
  59. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  60. return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
  61. end
  62. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  63. return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
  64. end
  65. for _,t in pairs(CAS.Actions) do
  66. for _,k in pairs(t.Keys) do
  67. if k==io.KeyCode then
  68. t.Function(t.Name,io.UserInputState,io)
  69. end
  70. end
  71. end
  72. FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  73. UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
  74. end
  75. end)
  76. Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
  77. local Mouse = owner:GetMouse()
  78. local UIS = game:GetService("UserInputService")
  79. local input = function(io,RobloxHandled)
  80. if RobloxHandled then return end
  81. --Since InputObject is a client-side instance, we create and pass table instead
  82. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  83. end
  84. UIS.InputBegan:Connect(input)
  85. UIS.InputEnded:Connect(input)
  86.  
  87. local h,t
  88. --Give the server mouse data every second frame, but only if the values changed
  89. --If player is not moving their mouse, client won't fire events
  90. local HB = game:GetService("RunService").Heartbeat
  91. while true do
  92. if h~=Mouse.Hit or t~=Mouse.Target then
  93. h,t=Mouse.Hit,Mouse.Target
  94. Event:FireServer({isMouse=true,Target=t,Hit=h})
  95. end
  96. --Wait 2 frames
  97. for i=1,2 do
  98. HB:Wait()
  99. end
  100. end]==],script)
  101.  
  102. ----Sandboxed game object that allows the usage of client-side methods and services
  103. --Real game object
  104. local RealGame = game
  105.  
  106. --Metatable for fake service
  107. local FakeService_Metatable = {
  108. __index = function(self,k)
  109. local s = rawget(self,"_RealService")
  110. if s then
  111. return typeof(s[k])=="function"
  112. and function(_,...)return s[k](s,...)end or s[k]
  113. end
  114. end,
  115. __newindex = function(self,k,v)
  116. local s = rawget(self,"_RealService")
  117. if s then s[k]=v end
  118. end
  119. }
  120. local function FakeService(t,RealService)
  121. t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
  122. return setmetatable(t,FakeService_Metatable)
  123. end
  124.  
  125. --Fake game object
  126. local FakeGame = {
  127. GetService = function(self,s)
  128. return rawget(self,s) or RealGame:GetService(s)
  129. end,
  130. Players = FakeService({
  131. LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
  132. },"Players"),
  133. UserInputService = FakeService(UIS,"UserInputService"),
  134. ContextActionService = FakeService(CAS,"ContextActionService"),
  135. RunService = FakeService({
  136. _btrs = {},
  137. RenderStepped = RealGame:GetService("RunService").Heartbeat,
  138. BindToRenderStep = function(self,name,_,fun)
  139. self._btrs[name] = self.Heartbeat:Connect(fun)
  140. end,
  141. UnbindFromRenderStep = function(self,name)
  142. self._btrs[name]:Disconnect()
  143. end,
  144. },"RunService")
  145. }
  146. rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
  147. FakeGame.service = FakeGame.GetService
  148. FakeService(FakeGame,game)
  149. --Changing owner to fake player object to support owner:GetMouse()
  150. game,owner = FakeGame,FakeGame.Players.LocalPlayer
  151. end
  152.  
  153.  
  154.  
  155. --[[ last updated: 2018/5/13, 15:30
  156.  
  157. Pen by oilsauce.]]
  158.  
  159. print("Pen Script by Oilsauce.")
  160. print("Click: Stab")
  161. print("E: Toggle Pen")
  162. print("F: Throw Pen")
  163.  
  164. wait(0.6)
  165. -----------------------------------------------------------------------------------
  166.  
  167. local plrs = game:GetService("Players")
  168. local plr = plrs.LocalPlayer
  169. local char = plr.Character
  170. local sound = Instance.new("Sound",char.Torso)
  171. sound.SoundId = "rbxassetid://2329002275"
  172. sound.Volume = 10
  173. plr:ClearCharacterAppearance()
  174. local tweenserv = game:GetService("TweenService")
  175. local lighting = game:GetService("Lighting")
  176. local hum = char:FindFirstChildOfClass("Humanoid")
  177. local mou = plr:GetMouse()
  178. local tor = char:FindFirstChild("Torso") or char:FindFirstChild("UpperTorso")
  179. local root = char:FindFirstChild("HumanoidRootPart")
  180. local head = char:FindFirstChild("Head")
  181. local face = head:FindFirstChildOfClass("Decal")
  182. local larm = char:FindFirstChild("Left Arm") or char:FindFirstChild("LeftUpperArm")
  183. local rarm = char:FindFirstChild("Right Arm") or char:FindFirstChild("RightUpperArm")
  184. local rleg = char:FindFirstChild("Right Leg") or char:FindFirstChild("RightUpperLeg")
  185. local lleg = char:FindFirstChild("Left Leg") or char:FindFirstChild("LeftUpperLeg")
  186. local neck = tor:FindFirstChild("Neck")
  187. local rootj = root:FindFirstChild("RootJoint")
  188. local LS = tor:FindFirstChild("Left Shoulder")
  189. local RS = tor:FindFirstChild("Right Shoulder")
  190. local LH = tor:FindFirstChild("Left Hip")
  191. local RH = tor:FindFirstChild("Right Hip")
  192. local bp = plr:FindFirstChild("Backpack")
  193. canglitch = true
  194.  
  195. hum:ClearAllChildren()
  196. char.Animate:remove()
  197.  
  198. local shirt = Instance.new("Shirt",char)
  199. shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=162252272"
  200. local pants = Instance.new("Pants",char)
  201. pants.PantsTemplate = "http://www.roblox.com/asset/?id=162252073"
  202.  
  203. --Converted with ttyyuu12345's model to script plugin v4
  204. function sandbox(var,func)
  205. local env = getfenv(func)
  206. local newenv = setmetatable({},{
  207. __index = function(self,k)
  208. if k=="script" then
  209. return var
  210. else
  211. return env[k]
  212. end
  213. end,
  214. })
  215. setfenv(func,newenv)
  216. return func
  217. end
  218. cors = {}
  219. mas = Instance.new("Model",game:GetService("Lighting"))
  220. Model0 = Instance.new("Model")
  221. Part1 = Instance.new("Part")
  222. Part2 = Instance.new("Part")
  223. ManualWeld3 = Instance.new("ManualWeld")
  224. Part4 = Instance.new("Part")
  225. ManualWeld5 = Instance.new("ManualWeld")
  226. Part6 = Instance.new("Part")
  227. ManualWeld7 = Instance.new("ManualWeld")
  228. Part8 = Instance.new("Part")
  229. ManualWeld9 = Instance.new("ManualWeld")
  230. Part10 = Instance.new("Part")
  231. ManualWeld11 = Instance.new("ManualWeld")
  232. Part12 = Instance.new("Part")
  233. ManualWeld13 = Instance.new("ManualWeld")
  234. Model0.Name = "pen"
  235. Model0.Parent = mas
  236. Part1.Name = "handler2"
  237. Part1.Parent = Model0
  238. Part1.Material = Enum.Material.Glass
  239. Part1.BrickColor = BrickColor.new("Really black")
  240. Part1.Shape = Enum.PartType.Cylinder
  241. Part1.Size = Vector3.new(0.099999927, 0.075000003, 0.075000003)
  242. Part1.CFrame = CFrame.new(0.422837317, 4.01673937, 24.1206856, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  243. Part1.BottomSurface = Enum.SurfaceType.Smooth
  244. Part1.TopSurface = Enum.SurfaceType.Smooth
  245. Part1.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  246. Part1.Position = Vector3.new(0.422837317, 4.01673937, 24.1206856)
  247. Part1.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  248. Part2.Name = "handler1"
  249. Part2.Parent = Model0
  250. Part2.Material = Enum.Material.Glass
  251. Part2.BrickColor = BrickColor.new("Really black")
  252. Part2.Shape = Enum.PartType.Cylinder
  253. Part2.Size = Vector3.new(0.099999927, 0.100000001, 0.100000001)
  254. Part2.CFrame = CFrame.new(0.356837302, 4.02223921, 24.1206856, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  255. Part2.BottomSurface = Enum.SurfaceType.Smooth
  256. Part2.TopSurface = Enum.SurfaceType.Smooth
  257. Part2.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  258. Part2.Position = Vector3.new(0.356837302, 4.02223921, 24.1206856)
  259. Part2.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  260. ManualWeld3.Name = "Weld"
  261. ManualWeld3.Parent = Part2
  262. ManualWeld3.C1 = CFrame.new(-0.0660000145, 0.00549983978, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  263. ManualWeld3.Part0 = Part2
  264. ManualWeld3.Part1 = Part1
  265. Part4.Name = "body"
  266. Part4.Parent = Model0
  267. Part4.Material = Enum.Material.Glass
  268. Part4.BrickColor = BrickColor.new("Really black")
  269. Part4.Shape = Enum.PartType.Cylinder
  270. Part4.Size = Vector3.new(1.27499998, 0.125, 0.125)
  271. Part4.CFrame = CFrame.new(-0.320662677, 4.02673912, 24.1206856, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  272. Part4.BottomSurface = Enum.SurfaceType.Smooth
  273. Part4.TopSurface = Enum.SurfaceType.Smooth
  274. Part4.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  275. Part4.Position = Vector3.new(-0.320662677, 4.02673912, 24.1206856)
  276. Part4.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  277. ManualWeld5.Name = "Weld"
  278. ManualWeld5.Parent = Part4
  279. ManualWeld5.C1 = CFrame.new(-0.743499994, 0.00999975204, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  280. ManualWeld5.Part0 = Part4
  281. ManualWeld5.Part1 = Part1
  282. Part6.Name = "clipholder"
  283. Part6.Parent = Model0
  284. Part6.Material = Enum.Material.Glass
  285. Part6.BrickColor = BrickColor.new("Really black")
  286. Part6.Shape = Enum.PartType.Cylinder
  287. Part6.Size = Vector3.new(0.2, 0.150000006, 0.150000006)
  288. Part6.CFrame = CFrame.new(-0.986662686, 4.02623892, 24.1206856, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  289. Part6.BottomSurface = Enum.SurfaceType.Smooth
  290. Part6.TopSurface = Enum.SurfaceType.Smooth
  291. Part6.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  292. Part6.Position = Vector3.new(-0.986662686, 4.02623892, 24.1206856)
  293. Part6.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  294. ManualWeld7.Name = "Weld"
  295. ManualWeld7.Parent = Part6
  296. ManualWeld7.C1 = CFrame.new(-1.4095, 0.00949954987, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  297. ManualWeld7.Part0 = Part6
  298. ManualWeld7.Part1 = Part1
  299. Part8.Name = "clip"
  300. Part8.Parent = Model0
  301. Part8.Material = Enum.Material.Glass
  302. Part8.BrickColor = BrickColor.new("Really black")
  303. Part8.Size = Vector3.new(0.724999905, 0.0500000119, 0.100000001)
  304. Part8.CFrame = CFrame.new(-0.663956106, 4.10453987, 24.1179676, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  305. Part8.BottomSurface = Enum.SurfaceType.Smooth
  306. Part8.TopSurface = Enum.SurfaceType.Smooth
  307. Part8.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  308. Part8.Position = Vector3.new(-0.663956106, 4.10453987, 24.1179676)
  309. Part8.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  310. ManualWeld9.Name = "Weld"
  311. ManualWeld9.Parent = Part8
  312. ManualWeld9.C1 = CFrame.new(-1.08679342, 0.0878005028, -0.0027179718, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  313. ManualWeld9.Part0 = Part8
  314. ManualWeld9.Part1 = Part1
  315. Part10.Name = "button"
  316. Part10.Parent = Model0
  317. Part10.Material = Enum.Material.Glass
  318. Part10.BrickColor = BrickColor.new("Dark indigo")
  319. Part10.Shape = Enum.PartType.Cylinder
  320. Part10.Size = Vector3.new(0.14, 0.125, 0.125)
  321. Part10.CFrame = CFrame.new(-1.09316278, 4.02473927, 24.1206856, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  322. Part10.BottomSurface = Enum.SurfaceType.Smooth
  323. Part10.TopSurface = Enum.SurfaceType.Smooth
  324. Part10.Color = Color3.new(0.239216, 0.0823529, 0.521569)
  325. Part10.Position = Vector3.new(-1.09316278, 4.02473927, 24.1206856)
  326. Part10.Color = Color3.new(0.239216, 0.0823529, 0.521569)
  327. ManualWeld11.Name = "Weld"
  328. ManualWeld11.Parent = Part10
  329. ManualWeld11.C1 = CFrame.new(-1.51600003, 0.007999897, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  330. ManualWeld11.Part0 = Part10
  331. ManualWeld11.Part1 = Part1
  332. Part12.Name = "sharp"
  333. Part12.Parent = Model0
  334. Part12.Material = Enum.Material.Glass
  335. Part12.Shape = Enum.PartType.Cylinder
  336. Part12.Size = Vector3.new(0.099999927, 0.0500000007, 0.0500000007)
  337. Part12.CFrame = CFrame.new(0.484837323, 4.01723957, 24.1206856, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  338. Part12.BottomSurface = Enum.SurfaceType.Smooth
  339. Part12.TopSurface = Enum.SurfaceType.Smooth
  340. Part12.Position = Vector3.new(0.484837323, 4.01723957, 24.1206856)
  341. ManualWeld13.Name = "Weld"
  342. ManualWeld13.Parent = Part12
  343. ManualWeld13.C1 = CFrame.new(0.0620000064, 0.000500202179, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  344. ManualWeld13.Part0 = Part12
  345. ManualWeld13.Part1 = Part1
  346. for i,v in pairs(mas:GetChildren()) do
  347. v.Parent = char
  348. pen = v
  349. body = Part4
  350. button = Part10
  351. pcall(function() v:MakeJoints() end)
  352. end
  353. local knife = Instance.new("Part",char)
  354. knife.CanCollide = false
  355. knife.Size = Vector3.new(0.2, 2, 2)
  356. local knifem = Instance.new("FileMesh",knife)
  357. knifem.MeshId = "rbxassetid://3270017"
  358. knifem.TextureId = "http://www.roblox.com/asset/?id=3270066"
  359. knifem.Scale = Vector3.new(0.2,0.2,0.2)
  360. local knifew = Instance.new("Weld",knife)
  361. knifew.Part0 = knife
  362. knifew.Part1 = char["Right Arm"]
  363. knifew.C0 = CFrame.new(0.0950660706, 1.32505798, -0.203226089, 0.995430529, 0.0954888016, 3.47819062e-09, -0.0619644187, 0.645952582, 0.760858297, 0.072653465, -0.757381439, 0.648918033)
  364.  
  365. mas:Destroy()
  366. for i,v in pairs(cors) do
  367. spawn(function()
  368. pcall(v)
  369. end)
  370. end
  371. for i,v in pairs(Model0:GetChildren()) do
  372. if v.ClassName == "Part" then
  373. v.Transparency = 1
  374. end
  375. end
  376.  
  377.  
  378. local rootj0 = rootj.C0
  379. local neck0 = neck.C0
  380. local LS0 = LS.C0
  381. local RS0 = RS.C0
  382. local LH0 = LH.C0
  383. local RH0 = RH.C0
  384. local rootj1 = rootj.C1
  385. local neck1 = neck.C1
  386. local LS1 = LS.C1
  387. local RS1 = RS.C1
  388. local LH1 = LH.C1
  389. local RH1 = RH.C1
  390.  
  391. -----------------------------------------------------------------------------------
  392.  
  393. local CFn = CFrame.new
  394. local CFa = CFrame.Angles
  395. local Rad = math.rad
  396. local Sin = math.sin
  397. local Cos = math.cos
  398. local sine = 1
  399.  
  400. local penp = Instance.new("Part", char)
  401. penp.Size = Vector3.new(1, 1, 1)
  402. penp.CanCollide = false
  403. penp.Transparency = 1
  404. local penpw = Instance.new("Weld", penp)
  405. penpw.Part0 = rarm
  406. penpw.Part1 = penp
  407. penpw.C1 = CFn(0, -1, 0) * CFa(0, 0, Rad(180))
  408. local penpw0 = penpw.C0
  409. local penpw1 = penpw.C1
  410.  
  411. local penw = Instance.new("Weld", body)
  412. penw.Name = "penWeld22"
  413. penw.Part0 = penp
  414. penw.Part1 = body
  415. penw.C1 = CFa(0, 0, Rad(180))
  416. local penw0 = penw.C0
  417. local penw1 = penw.C1
  418.  
  419. local sharpw = ManualWeld13
  420. local sharpw0 = ManualWeld13.C0
  421. local sharpw1 = ManualWeld13.C1
  422. local sharpw02 = CFn(0.3, 0, 0)
  423. sharpw.C0 = sharpw02
  424.  
  425. local botw = ManualWeld11
  426. local botw0 = ManualWeld11.C0
  427. local botw1 = ManualWeld11.C1
  428. local botw02 = CFn(-0.07, 0, 0)
  429. botw.C0 = botw0
  430.  
  431. -----------------------------------------------------------------------------------
  432.  
  433. local ws = 16
  434. local jp = 50
  435. local out = false
  436. local ouch = false
  437. local hitok = false
  438. local canattack = true
  439. local stabstate = 1
  440. local Stabbing = false
  441. local Throwing = false
  442. local rot = 1
  443. local dmg = 5
  444.  
  445. -----------------------------------------------------------------------------------
  446.  
  447. ArtificialHB = Instance.new("BindableEvent", script)
  448. ArtificialHB.Name = "Heartbeat"
  449. script:WaitForChild("Heartbeat")
  450.  
  451. frame = 1 / 60
  452. tf = 0
  453. allowframeloss = false
  454. tossremainder = false
  455.  
  456.  
  457. lastframe = tick()
  458. script.Heartbeat:Fire()
  459.  
  460.  
  461. game:GetService("RunService").Heartbeat:connect(function(s, p)
  462. tf = tf + s
  463. if tf >= frame then
  464. if allowframeloss then
  465. script.Heartbeat:Fire()
  466. lastframe = tick()
  467. else
  468. for i = 1, math.floor(tf / frame) do
  469. script.Heartbeat:Fire()
  470. end
  471. lastframe = tick()
  472. end
  473. if tossremainder then
  474. tf = 0
  475. else
  476. tf = tf - frame * math.floor(tf / frame)
  477. end
  478. end
  479. end)
  480.  
  481. function swait(num)
  482. if num == 0 or num == nil then
  483. game:service("RunService").Stepped:wait(0)
  484. else
  485. for i = 0, num do
  486. game:service("RunService").Stepped:wait(0)
  487. end
  488. end
  489. end
  490.  
  491. function clerp(a, b, t)
  492. return a:lerp(b, t)
  493. end
  494. out = true
  495.  
  496. function Stab()
  497. if stabstate == 1 and canattack == true then
  498. Stabbing = true
  499. canattack = false
  500. stabstate = 2
  501. hum.WalkSpeed = 3
  502. hum.JumpPower = 7
  503. hitok = true
  504. body.Touched:connect(function(hit)
  505. if hitok == true and not hit:IsDescendantOf(char) and hit.Parent:FindFirstChildOfClass("Humanoid") then
  506. hitok = false
  507. local owdude = hit.Parent
  508. local owhum = owdude:FindFirstChildOfClass("Humanoid")
  509. owhum.Health = owhum.Health - math.huge
  510. if out == true then
  511. local bloodsound = Instance.new("Sound", hit)
  512. bloodsound.Volume = 10
  513. bloodsound.SoundId = "rbxassetid://180083298"
  514. bloodsound:Play()
  515. game:GetService("Debris"):AddItem(bloodsound, 1)
  516. local bloodsplash = Instance.new("ParticleEmitter", hit)
  517. bloodsplash.Lifetime = NumberRange.new(0.7, 1)
  518. bloodsplash.Speed = NumberRange.new(6)
  519. bloodsplash.SpreadAngle = Vector2.new(-360, 360)
  520. bloodsplash.Rate = 1000
  521. bloodsplash.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, 3), NumberSequenceKeypoint.new(1, 0)})
  522. bloodsplash.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.2), NumberSequenceKeypoint.new(1, 1)})
  523. bloodsplash.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 255, 255)), ColorSequenceKeypoint.new(1, Color3.fromRGB(0, 0, 0))})
  524. bloodsplash.Texture = "rbxassetid://771221224"
  525. game:GetService("Debris"):AddItem(bloodsplash, 1)
  526. wait(0.25)
  527. bloodsplash.Enabled = false
  528. end
  529. end
  530. if hitok == true and not hit:IsDescendantOf(char) and hit.Parent.Parent:FindFirstChildOfClass("Humanoid") then
  531. hitok = false
  532. local owdude = hit.Parent.Parent
  533. local owhum = owdude:FindFirstChildOfClass("Humanoid")
  534. owhum.Health = owhum.Health - math.huge
  535. if out == true then
  536. local bloodsound = Instance.new("Sound", hit)
  537. bloodsound.Volume = 10
  538. bloodsound.SoundId = "rbxassetid://180083298"
  539. bloodsound:Play()
  540. game:GetService("Debris"):AddItem(bloodsound, 1)
  541. local bloodsplash = Instance.new("ParticleEmitter", hit)
  542. bloodsplash.Lifetime = NumberRange.new(0.7, 1)
  543. bloodsplash.Speed = NumberRange.new(6)
  544. bloodsplash.SpreadAngle = Vector2.new(-360, 360)
  545. bloodsplash.Rate = 1000
  546. bloodsplash.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, 3), NumberSequenceKeypoint.new(1, 0)})
  547. bloodsplash.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.2), NumberSequenceKeypoint.new(1, 1)})
  548. bloodsplash.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 255, 255)), ColorSequenceKeypoint.new(1, Color3.fromRGB(0, 0, 0))})
  549. bloodsplash.Texture = "rbxassetid://771221224"
  550. game:GetService("Debris"):AddItem(bloodsplash, 1)
  551. wait(0.25)
  552. bloodsplash.Enabled = false
  553. end
  554. end
  555. end)
  556. for i = 0,1,.15 do
  557. penw.C1 = clerp(penw.C1, penw1 * CFa(0, Rad(-90), 0), i)
  558. neck.C1 = clerp(neck.C1, neck1 * CFa(Rad(-2), 0, 0), i)
  559. rootj.C1 = clerp(rootj.C1, rootj1 * CFn(0, 0, 0.025), i)
  560. LS.C1 = clerp(LS.C1, LS1 * CFa(Rad(-30), 0, Rad(-40)), i)
  561. RS.C1 = clerp(RS.C1, RS1 * CFa(Rad(-30), Rad(-30), Rad(-3)), i)
  562. LH.C1 = clerp(LH.C1, LH1 * CFn(0, -0.025, 0) * CFa(Rad(5), Rad(-5), 0), i)
  563. RH.C1 = clerp(RH.C1, RH1 * CFn(0, -0.025, 0) * CFa(Rad(5), Rad(5), 0), i)
  564. LS.C0 = clerp(LS.C0, LS0, i)
  565. RS.C0 = clerp(RS.C0, RS0 * CFa(0, 0, Rad(150)), i)
  566. LH.C0 = clerp(LH.C0, LH0, i)
  567. RH.C0 = clerp(RH.C0, RH0, i)
  568. swait()
  569. end
  570. for i = 0,1,.15 do
  571. penw.C1 = clerp(penw.C1, penw1 * CFa(0, Rad(-90), 0), i)
  572. neck.C1 = clerp(neck.C1, neck1 * CFa(Rad(-2), 0, 0), i)
  573. rootj.C1 = clerp(rootj.C1, rootj1 * CFn(0, 0, 0.025), i)
  574. LS.C1 = clerp(LS.C1, LS1 * CFa(Rad(-30), 0, Rad(-40)), i)
  575. RS.C1 = clerp(RS.C1, RS1 * CFa(Rad(20), Rad(-30), Rad(-3)), i)
  576. LH.C1 = clerp(LH.C1, LH1 * CFn(0, -0.025, 0) * CFa(Rad(5), Rad(-5), 0), i)
  577. RH.C1 = clerp(RH.C1, RH1 * CFn(0, -0.025, 0) * CFa(Rad(5), Rad(5), 0), i)
  578. LS.C0 = clerp(LS.C0, LS0, i)
  579. RS.C0 = clerp(RS.C0, RS0 * CFa(0, 0, Rad(20)), i)
  580. LH.C0 = clerp(LH.C0, LH0, i)
  581. RH.C0 = clerp(RH.C0, RH0, i)
  582. swait()
  583. end
  584. hitok = false
  585. hum.WalkSpeed = ws
  586. hum.JumpPower = jp
  587. canattack = true
  588. Stabbing = false
  589. elseif stabstate == 2 and canattack == true then
  590. canattack = false
  591. stabstate = 1
  592. hum.WalkSpeed = 3
  593. hum.JumpPower = 7
  594. hitok = true
  595. body.Touched:connect(function(hit)
  596. if hitok == true and not hit:IsDescendantOf(char) and hit.Parent:FindFirstChildOfClass("Humanoid") then
  597. local owdude = hit.Parent
  598. local owhum = owdude:FindFirstChildOfClass("Humanoid")
  599. owhum.Health = owhum.Health - math.huge
  600. if out == true then
  601. local bloodsound = Instance.new("Sound", hit)
  602. bloodsound.Volume = 10
  603. bloodsound.SoundId = "rbxassetid://180083298"
  604. bloodsound:Play()
  605. game:GetService("Debris"):AddItem(bloodsound, 1)
  606. local bloodsplash = Instance.new("ParticleEmitter", hit)
  607. bloodsplash.Lifetime = NumberRange.new(0.7, 1)
  608. bloodsplash.Speed = NumberRange.new(6)
  609. bloodsplash.SpreadAngle = Vector2.new(-360, 360)
  610. bloodsplash.Rate = 1000
  611. bloodsplash.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, 3), NumberSequenceKeypoint.new(1, 0)})
  612. bloodsplash.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.2), NumberSequenceKeypoint.new(1, 1)})
  613. bloodsplash.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 255, 255)), ColorSequenceKeypoint.new(1, Color3.fromRGB(0, 0, 0))})
  614. bloodsplash.Texture = "rbxassetid://771221224"
  615. game:GetService("Debris"):AddItem(bloodsplash, 1)
  616. wait(0.25)
  617. bloodsplash.Enabled = false
  618. end
  619. end
  620. if hitok == true and not hit:IsDescendantOf(char) and hit.Parent.Parent:FindFirstChildOfClass("Humanoid") then
  621. hitok = false
  622. local owdude = hit.Parent.Parent
  623. local owhum = owdude:FindFirstChildOfClass("Humanoid")
  624. owhum.Health = owhum.Health - math.huge
  625. if out == true then
  626. local bloodsound = Instance.new("Sound", hit)
  627. bloodsound.Volume = 10
  628. bloodsound.SoundId = "rbxassetid://180083298"
  629. bloodsound:Play()
  630. game:GetService("Debris"):AddItem(bloodsound, 1)
  631. local bloodsplash = Instance.new("ParticleEmitter", hit)
  632. bloodsplash.Lifetime = NumberRange.new(0.7, 1)
  633. bloodsplash.Speed = NumberRange.new(6)
  634. bloodsplash.SpreadAngle = Vector2.new(-360, 360)
  635. bloodsplash.Rate = 1000
  636. bloodsplash.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, 3), NumberSequenceKeypoint.new(1, 0)})
  637. bloodsplash.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.2), NumberSequenceKeypoint.new(1, 1)})
  638. bloodsplash.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 255, 255)), ColorSequenceKeypoint.new(1, Color3.fromRGB(0, 0, 0))})
  639. bloodsplash.Texture = "rbxassetid://771221224"
  640. game:GetService("Debris"):AddItem(bloodsplash, 1)
  641. wait(0.25)
  642. bloodsplash.Enabled = false
  643. end
  644. end
  645. end)
  646. for i = 0,1,.15 do
  647. penw.C1 = clerp(penw.C1, penw1 * CFa(0, Rad(-90), 0), i)
  648. neck.C1 = clerp(neck.C1, neck1 * CFa(Rad(-2), 0, 0), i)
  649. rootj.C1 = clerp(rootj.C1, rootj1 * CFn(0, 0, 0.025), i)
  650. LS.C1 = clerp(LS.C1, LS1 * CFa(Rad(-30), 0, Rad(-40)), i)
  651. RS.C1 = clerp(RS.C1, RS1 * CFa(Rad(30), Rad(30), Rad(-3)), i)
  652. LH.C1 = clerp(LH.C1, LH1 * CFn(0, -0.025, 0) * CFa(Rad(5), Rad(-5), 0), i)
  653. RH.C1 = clerp(RH.C1, RH1 * CFn(0, -0.025, 0) * CFa(Rad(5), Rad(5), 0), i)
  654. LS.C0 = clerp(LS.C0, LS0, i)
  655. RS.C0 = clerp(RS.C0, RS0 * CFa(0, 0, Rad(150)), i)
  656. LH.C0 = clerp(LH.C0, LH0, i)
  657. RH.C0 = clerp(RH.C0, RH0, i)
  658. swait()
  659. end
  660. for i = 0,1,.15 do
  661. penw.C1 = clerp(penw.C1, penw1 * CFa(0, Rad(-90), 0), i)
  662. neck.C1 = clerp(neck.C1, neck1 * CFa(Rad(-2), 0, 0), i)
  663. rootj.C1 = clerp(rootj.C1, rootj1 * CFn(0, 0, 0.025), i)
  664. LS.C1 = clerp(LS.C1, LS1 * CFa(Rad(-30), 0, Rad(-40)), i)
  665. RS.C1 = clerp(RS.C1, RS1 * CFa(Rad(-20), Rad(30), Rad(-3)), i)
  666. LH.C1 = clerp(LH.C1, LH1 * CFn(0, -0.025, 0) * CFa(Rad(5), Rad(-5), 0), i)
  667. RH.C1 = clerp(RH.C1, RH1 * CFn(0, -0.025, 0) * CFa(Rad(5), Rad(5), 0), i)
  668. LS.C0 = clerp(LS.C0, LS0, i)
  669. RS.C0 = clerp(RS.C0, RS0 * CFa(0, 0, Rad(20)), i)
  670. LH.C0 = clerp(LH.C0, LH0, i)
  671. RH.C0 = clerp(RH.C0, RH0, i)
  672. swait()
  673. end
  674. hitok = false
  675. hum.WalkSpeed = ws
  676. hum.JumpPower = jp
  677. canattack = true
  678. Stabbing = false
  679. end
  680. end
  681.  
  682. local hair = Instance.new("Part",char)
  683. hair.CanCollide = false
  684. local m = Instance.new("FileMesh",hair)
  685. m.MeshId = "http://www.roblox.com/asset/?id=430064078"
  686. m.TextureId = "http://www.roblox.com/asset/?id=430064079"
  687. local w = Instance.new("Weld",hair)
  688. w.Part0 = hair
  689. w.Part1 = char.Head
  690. w.C0 = CFrame.new(0, -0.450000286, -0.00027179718, 1.00000095, 7.87137822e-09, -3.7608805e-15, -7.87138266e-09, 1.00000048, -4.76837158e-07, 0, -4.76837158e-07, 1.00000048)
  691. local sick = Instance.new("Sound",char.Torso)
  692. sick.SoundId = "rbxassetid://0"
  693. sick.Looped = true
  694. sick.Pitch = 0.7
  695. sick.Volume = 3
  696. sick:Play()
  697.  
  698. function Throw()
  699. if canattack == true then
  700. Throwing = true
  701. canattack = false
  702. hum.WalkSpeed = 3
  703. hum.JumpPower = 7
  704. ouch = true
  705. for i = 0,1,.15 do
  706. penw.C1 = clerp(penw.C1, penw1 * CFa(0, 0, Rad(-90)), i)
  707. neck.C1 = clerp(neck.C1, neck1 * CFa(Rad(-2), 0, 0), i)
  708. rootj.C1 = clerp(rootj.C1, rootj1 * CFn(0, 0, 0.025), i)
  709. LS.C1 = clerp(LS.C1, LS1 * CFa(Rad(-30), 0, Rad(-40)), i)
  710. RS.C1 = clerp(RS.C1, RS1 * CFa(0, Rad(-30), Rad(-3)), i)
  711. LH.C1 = clerp(LH.C1, LH1 * CFn(0, -0.025, 0) * CFa(Rad(5), Rad(-5), 0), i)
  712. RH.C1 = clerp(RH.C1, RH1 * CFn(0, -0.025, 0) * CFa(Rad(5), Rad(5), 0), i)
  713. LS.C0 = clerp(LS.C0, LS0, i)
  714. RS.C0 = clerp(RS.C0, RS0 * CFa(0, Rad(90), Rad(90)), i)
  715. LH.C0 = clerp(LH.C0, LH0, i)
  716. RH.C0 = clerp(RH.C0, RH0, i)
  717. swait()
  718. end
  719. local throwknife = knife:Clone()
  720. throwknife.Parent = workspace
  721. throwknife:BreakJoints()
  722. throwknife.CanCollide = false
  723. knife.Transparency = 1
  724. local vel = Instance.new("BodyVelocity",throwknife)
  725. vel.Velocity = mou.Hit.lookVector * 150
  726. local throwpen = pen:Clone()
  727. for i,v in pairs(throwpen:GetChildren()) do
  728. if v:IsA("BasePart") and v.CanCollide == true then
  729. v.CanCollide = false
  730. end
  731. end
  732. throwpen.Parent = workspace
  733. local throwbod = throwpen:FindFirstChild("body")
  734. if throwbod:FindFirstChild("penWeld22") then
  735. throwbod:FindFirstChild("penWeld22"):Destroy()
  736. end
  737. local throwbv = Instance.new("BodyVelocity", throwbod)
  738. throwbv.Velocity = mou.Hit.lookVector * 100
  739. throwbv.MaxForce = Vector3.new(100000000000000000, 100000000000000000, 100000000000000000)
  740. throwknife.Touched:connect(function(hit)
  741. if ouch == true and not hit:IsDescendantOf(char) then
  742. ouch = false
  743. throwpen:Destroy()
  744. if hit.Parent:FindFirstChildOfClass("Humanoid") then
  745. local throwhum = hit.Parent:FindFirstChildOfClass("Humanoid")
  746. throwhum.Health = throwhum.Health - math.huge
  747. if out == true then
  748. local bloodsound = Instance.new("Sound", hit)
  749. bloodsound.Volume = 10
  750. bloodsound.SoundId = "rbxassetid://180083286"
  751. bloodsound:Play()
  752. game:GetService("Debris"):AddItem(bloodsound, 1)
  753. local bloodsplash = Instance.new("ParticleEmitter", hit)
  754. bloodsplash.Lifetime = NumberRange.new(0.7, 1)
  755. bloodsplash.Speed = NumberRange.new(6)
  756. bloodsplash.SpreadAngle = Vector2.new(-360, 360)
  757. bloodsplash.Rate = 1000
  758. bloodsplash.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, 3), NumberSequenceKeypoint.new(1, 0)})
  759. bloodsplash.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.2), NumberSequenceKeypoint.new(1, 1)})
  760. bloodsplash.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 255, 255)), ColorSequenceKeypoint.new(1, Color3.fromRGB(0, 0, 0))})
  761. bloodsplash.Texture = "rbxassetid://771221224"
  762. game:GetService("Debris"):AddItem(bloodsplash, 1)
  763. wait(0.25)
  764. bloodsplash.Enabled = false
  765. end
  766. end
  767. if hit.Parent.Parent:FindFirstChildOfClass("Humanoid") then
  768. local throwhum = hit.Parent.Parent:FindFirstChildOfClass("Humanoid")
  769. throwhum.Health = throwhum.Health - math.huge
  770. if out == true then
  771. local bloodsound = Instance.new("Sound", hit)
  772. bloodsound.Volume = 10
  773. bloodsound.SoundId = "rbxassetid://180083286"
  774. bloodsound:Play()
  775. game:GetService("Debris"):AddItem(bloodsound, 1)
  776. local bloodsplash = Instance.new("ParticleEmitter", hit)
  777. bloodsplash.Lifetime = NumberRange.new(0.7, 1)
  778. bloodsplash.Speed = NumberRange.new(6)
  779. bloodsplash.SpreadAngle = Vector2.new(-360, 360)
  780. bloodsplash.Rate = 1000
  781. bloodsplash.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, 3), NumberSequenceKeypoint.new(1, 0)})
  782. bloodsplash.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.2), NumberSequenceKeypoint.new(1, 1)})
  783. bloodsplash.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 255, 255)), ColorSequenceKeypoint.new(1, Color3.fromRGB(0, 0, 0))})
  784. bloodsplash.Texture = "rbxassetid://771221224"
  785. game:GetService("Debris"):AddItem(bloodsplash, 1)
  786. wait(0.25)
  787. bloodsplash.Enabled = false
  788. end
  789. end
  790. end
  791. end)
  792. for i,v in pairs(pen:GetChildren()) do
  793. if v:IsA("BasePart") then
  794. v.Transparency = 1
  795. end
  796. end
  797. for i = 0,1,.1 do
  798. penw.C1 = clerp(penw.C1, penw1 * CFa(0, 0, Rad(-90)), i)
  799. neck.C1 = clerp(neck.C1, neck1 * CFa(Rad(-2), 0, 0), i)
  800. rootj.C1 = clerp(rootj.C1, rootj1 * CFn(0, 0, 0.025) * CFa(Rad(-20), 0, 0), i)
  801. LS.C1 = clerp(LS.C1, LS1 * CFa(Rad(-30), 0, Rad(-40)), i)
  802. RS.C1 = clerp(RS.C1, RS1 * CFa(0, Rad(-30), Rad(-3)), i)
  803. LH.C1 = clerp(LH.C1, LH1 * CFn(0, -0.025, 0) * CFa(Rad(5), Rad(-5), Rad(-20)), i)
  804. RH.C1 = clerp(RH.C1, RH1 * CFn(0, -0.025, 0) * CFa(Rad(5), Rad(5), Rad(-20)), i)
  805. LS.C0 = clerp(LS.C0, LS0, i)
  806. RS.C0 = clerp(RS.C0, RS0 * CFa(0, Rad(-80), Rad(90)), i)
  807. LH.C0 = clerp(LH.C0, LH0, i)
  808. RH.C0 = clerp(RH.C0, RH0, i)
  809. swait()
  810. end
  811. for i = 0,1,.1 do
  812. penw.C1 = clerp(penw.C1, penw1 * CFa(0, 0, Rad(-90)), i)
  813. neck.C1 = clerp(neck.C1, neck1 * CFa(Rad(-30), 0, 0), i)
  814. rootj.C1 = clerp(rootj.C1, rootj1 * CFn(0, 0, 0.025) * CFa(0, 0, Rad(-30)), i)
  815. LS.C1 = clerp(LS.C1, LS1 * CFa(Rad(-30), 0, Rad(-40)), i)
  816. RS.C1 = clerp(RS.C1, RS1 * CFa(0, Rad(-30), Rad(-3)), i)
  817. LH.C1 = clerp(LH.C1, LH1 * CFn(0, -0.025, 0) * CFa(Rad(5), Rad(35), 0), i)
  818. RH.C1 = clerp(RH.C1, RH1 * CFn(0, -0.025, 0) * CFa(Rad(5), Rad(35), 0), i)
  819. LS.C0 = clerp(LS.C0, LS0, i)
  820. RS.C0 = clerp(RS.C0, RS0 * CFn(0, 0, -0.5) * CFa(0, Rad(90), Rad(30)), i)
  821. LH.C0 = clerp(LH.C0, LH0, i)
  822. RH.C0 = clerp(RH.C0, RH0, i)
  823. swait()
  824. end
  825. for i,v in pairs(pen:GetChildren()) do
  826. if v:IsA("BasePart") then
  827. v.Transparency = 0
  828. end
  829. end
  830. hum.WalkSpeed = ws
  831. hum.JumpPower = jp
  832. canattack = true
  833. Throwing = false
  834. knife.Transparency = 0
  835. end
  836. end
  837.  
  838. -----------------------------------------------------------------------------------
  839.  
  840. function kdown(k)
  841. if k == "e" then
  842. Throw()
  843. end
  844. end
  845.  
  846. mou.KeyDown:connect(kdown)
  847. mou.Button1Down:connect(Stab)
  848.  
  849. for i,v in pairs(char:GetChildren()) do
  850. if v.ClassName == "Part" then
  851. v.BrickColor = BrickColor.new("Really black")
  852. end
  853. end
  854. -----------------------------------------------------------------------------------
  855.  
  856. local right = Instance.new("CharacterMesh",char)
  857. right.BodyPart = Enum.BodyPart.RightArm
  858. right.MeshId = 27111864
  859. local tors = Instance.new("CharacterMesh",char)
  860. tors.BodyPart = Enum.BodyPart.Torso
  861. tors.MeshId = 27111894
  862. local left = Instance.new("CharacterMesh",char)
  863. left.MeshId = 27111419
  864. left.BodyPart = Enum.BodyPart.LeftArm
  865. local leftl = Instance.new("CharacterMesh",char)
  866. leftl.BodyPart = Enum.BodyPart.LeftLeg
  867. leftl.MeshId = 27111857
  868. local rightl = Instance.new("CharacterMesh",char)
  869. rightl.BodyPart = Enum.BodyPart.RightLeg
  870. rightl.MeshId = 27111882
  871. local BODY = {}
  872. LeftArm = char["Left Arm"]
  873. RightLeg = char["Right Leg"]
  874. LeftLeg = char["Left Leg"]
  875. for _, c in pairs(char:GetDescendants()) do
  876. if c:IsA("BasePart") and c.Name ~= "Handle" then
  877. if c ~= char.HumanoidRootPart and c ~= char.Torso and c ~= char.Head and c ~= char["Right Arm"] and c ~= LeftArm and c ~= RightLeg and c ~= LeftLeg then
  878. c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  879. end
  880. table.insert(BODY,{c,c.Parent,c.Material,c.Color,c.Transparency})
  881. elseif c:IsA("JointInstance") then
  882. table.insert(BODY,{c,c.Parent,nil,nil,nil})
  883. end
  884. end
  885. for e = 1, #BODY do
  886. if BODY[e] ~= nil then
  887. local STUFF = BODY[e]
  888. local PART = STUFF[1]
  889. local PARENT = STUFF[2]
  890. local MATERIAL = STUFF[3]
  891. local TRANSPARENCY = STUFF[5]
  892. if PART.ClassName == "Part" and PART ~= char.HumanoidRootPart then
  893. PART.Material = MATERIAL
  894. PART.Transparency = TRANSPARENCY
  895. end
  896. PART.AncestryChanged:Connect(function()
  897. PART.Parent = PARENT
  898. end)
  899. end
  900. end
  901. function refit()
  902. char.Parent = workspace
  903. for e = 1, #BODY do
  904. if BODY[e] ~= nil then
  905. local STUFF = BODY[e]
  906. local PART = STUFF[1]
  907. local PARENT = STUFF[2]
  908. local MATERIAL = STUFF[3]
  909. local TRANSPARENCY = STUFF[5]
  910. if PART.ClassName == "Part" and PART ~= char.HumanoidRootPart then
  911. PART.Material = MATERIAL
  912. PART.Transparency = TRANSPARENCY
  913. end
  914. if PART.Parent ~= PARENT then
  915. char:FindFirstChildOfClass("Humanoid"):remove()
  916. PART.Parent = PARENT
  917. Humanoid = Instance.new("Humanoid",char)
  918. end
  919. end
  920. end
  921. end
  922. char.Humanoid.Died:connect(function()
  923. refit()
  924. sound.Parent = char
  925. sound:Play()
  926. end)
  927. local glitch = Instance.new("Sound",char)
  928. glitch.SoundId = "rbxassetid://372770465"
  929. glitch.Volume = 4
  930.  
  931. normalface = {"http://www.roblox.com/asset/?id=173083239"}
  932. glitchface = {"rbxassetid://592123389", "http://www.roblox.com/asset/?id=752001939", "http://www.roblox.com/asset/?id=1083992759"}
  933.  
  934. local naeeym2 = Instance.new("BillboardGui",char)
  935. naeeym2.AlwaysOnTop = true
  936. naeeym2.Size = UDim2.new(5,35,2,35)
  937. naeeym2.StudsOffset = Vector3.new(0,2,0)
  938. naeeym2.Adornee = hed
  939. naeeym2.Name = "Name"
  940.  
  941. local tecks2 = Instance.new("TextLabel",naeeym2)
  942. tecks2.BackgroundTransparency = 1
  943. tecks2.TextScaled = true
  944. tecks2.BorderSizePixel = 0
  945. tecks2.Text = "Sonic"
  946. tecks2.Font = "Garamond"
  947. tecks2.TextSize = 30
  948. tecks2.TextStrokeTransparency = 0
  949. tecks2.TextColor3 = BrickColor.new('Really red').Color
  950. tecks2.TextStrokeColor3 = BrickColor.new('Really red').Color
  951. tecks2.Size = UDim2.new(1,0,0.5,0)
  952. tecks2.Parent = naeeym2
  953. textfag = tecks2
  954. tecks2.Text = "Guest"
  955. function swait(num)
  956. if num == 0 or num == nil then
  957. game:service("RunService").Stepped:wait(0)
  958. else
  959. for i = 0, num do
  960. game:service("RunService").Stepped:wait(0)
  961. end
  962. end
  963. end
  964. coroutine.resume(coroutine.create(function()
  965. while textfag ~= nil do
  966. swait()
  967. textfag.Position = UDim2.new(math.random(-.2,.2),math.random(-3,3),.05,math.random(-3,3))
  968. textfag.Rotation = math.random(-3,3)
  969. end
  970. end))
  971.  
  972. textrandom = {"Guest", "gUeStTTR", "dIEEEEEEEEE", "Guest 6 6 6", "begone thot", "Guest", "Guest", "Guest", "iNsAnItY", "Guest", "Guest", "Guest"}
  973. normaltext = {"Guest"}
  974.  
  975. while true do
  976. swait()
  977. if canglitch then
  978. for i,v in pairs(char:GetChildren()) do
  979. if v.ClassName == "Part" then
  980. v.BrickColor = BrickColor.new("Institutional white")
  981. end
  982. end
  983. local change = math.random(1,50)
  984. if change == 1 then
  985. glitch:Play()
  986. textfag.Text = textrandom[math.random(1,12)]
  987. char.Head.face.Texture = glitchface[math.random(1,3)]
  988. for i,v in pairs(char:GetChildren()) do
  989. if v.ClassName == "Part" then
  990. v.BrickColor = BrickColor.new("Really black")
  991. end
  992. end
  993. end
  994. if change == 2 then
  995. glitch:Pause()
  996. textfag.Text = normaltext[math.random(1,1)]
  997. char.Head.face.Texture = normalface[math.random(1,1)]
  998. for i,v in pairs(char:GetChildren()) do
  999. if v.ClassName == "Part" then
  1000. v.BrickColor = BrickColor.new("Institutional white")
  1001. end
  1002. end
  1003. end
  1004. if change == 3 then
  1005. char.Head.face.Texture = normalface[math.random(1,1)]
  1006. textfag.Text = normaltext[math.random(1,1)]
  1007. for i,v in pairs(char:GetChildren()) do
  1008. if v.ClassName == "Part" then
  1009. v.BrickColor = BrickColor.new("Institutional white")
  1010. end
  1011. end
  1012. end
  1013. if change == 4 then
  1014. char.Head.face.Texture = normalface[math.random(1,1)]
  1015. textfag.Text = normaltext[math.random(1,1)]
  1016. glitch:Pause()
  1017. for i,v in pairs(char:GetChildren()) do
  1018. if v.ClassName == "Part" then
  1019. v.BrickColor = BrickColor.new("Institutional white")
  1020. end
  1021. end
  1022. end
  1023. if change == 5 then
  1024. char.Head.face.Texture = normalface[math.random(1,1)]
  1025. textfag.Text = normaltext[math.random(1,1)]
  1026. glitch:Pause()
  1027. for i,v in pairs(char:GetChildren()) do
  1028. if v.ClassName == "Part" then
  1029. v.BrickColor = BrickColor.new("Institutional white")
  1030. end
  1031. end
  1032. end
  1033. if change == 6 then
  1034. char.Head.face.Texture = normalface[math.random(1,1)]
  1035. textfag.Text = normaltext[math.random(1,1)]
  1036. glitch:Pause()
  1037. for i,v in pairs(char:GetChildren()) do
  1038. if v.ClassName == "Part" then
  1039. v.BrickColor = BrickColor.new("Institutional white")
  1040. end
  1041. end
  1042. end
  1043. if change == 7 then
  1044. char.Head.face.Texture = normalface[math.random(1,1)]
  1045. textfag.Text = normaltext[math.random(1,1)]
  1046. glitch:Pause()
  1047. for i,v in pairs(char:GetChildren()) do
  1048. if v.ClassName == "Part" then
  1049. v.BrickColor = BrickColor.new("Institutional white")
  1050. end
  1051. end
  1052. end
  1053. if change == 8 then
  1054. char.Head.face.Texture = normalface[math.random(1,1)]
  1055. textfag.Text = normaltext[math.random(1,1)]
  1056. glitch:Pause()
  1057. for i,v in pairs(char:GetChildren()) do
  1058. if v.ClassName == "Part" then
  1059. v.BrickColor = BrickColor.new("Institutional white")
  1060. end
  1061. end
  1062. end
  1063. if change == 9 then
  1064. char.Head.face.Texture = normalface[math.random(1,1)]
  1065. textfag.Text = normaltext[math.random(1,1)]
  1066. glitch:Pause()
  1067. for i,v in pairs(char:GetChildren()) do
  1068. if v.ClassName == "Part" then
  1069. v.BrickColor = BrickColor.new("Institutional white")
  1070. end
  1071. end
  1072. end
  1073. if change == 10 then
  1074. char.Head.face.Texture = normalface[math.random(1,1)]
  1075. textfag.Text = normaltext[math.random(1,1)]
  1076. glitch:Pause()
  1077. for i,v in pairs(char:GetChildren()) do
  1078. if v.ClassName == "Part" then
  1079. v.BrickColor = BrickColor.new("Institutional white")
  1080. end
  1081. end
  1082. end
  1083. if change == 11 then
  1084. char.Head.face.Texture = normalface[math.random(1,1)]
  1085. textfag.Text = normaltext[math.random(1,1)]
  1086. glitch:Pause()
  1087. for i,v in pairs(char:GetChildren()) do
  1088. if v.ClassName == "Part" then
  1089. v.BrickColor = BrickColor.new("Institutional white")
  1090. end
  1091. end
  1092. end
  1093. if change == 12 then
  1094. char.Head.face.Texture = normalface[math.random(1,1)]
  1095. textfag.Text = normaltext[math.random(1,1)]
  1096. glitch:Pause()
  1097. for i,v in pairs(char:GetChildren()) do
  1098. if v.ClassName == "Part" then
  1099. v.BrickColor = BrickColor.new("Institutional white")
  1100. end
  1101. end
  1102. end
  1103. if change == 13 then
  1104. char.Head.face.Texture = normalface[math.random(1,1)]
  1105. textfag.Text = normaltext[math.random(1,1)]
  1106. glitch:Pause()
  1107. for i,v in pairs(char:GetChildren()) do
  1108. if v.ClassName == "Part" then
  1109. v.BrickColor = BrickColor.new("Institutional white")
  1110. end
  1111. end
  1112. end
  1113. if change == 14 then
  1114. char.Head.face.Texture = normalface[math.random(1,1)]
  1115. textfag.Text = normaltext[math.random(1,1)]
  1116. glitch:Pause()
  1117. for i,v in pairs(char:GetChildren()) do
  1118. if v.ClassName == "Part" then
  1119. v.BrickColor = BrickColor.new("Institutional white")
  1120. end
  1121. end
  1122. end
  1123. if change == 15 then
  1124. char.Head.face.Texture = normalface[math.random(1,1)]
  1125. textfag.Text = normaltext[math.random(1,1)]
  1126. glitch:Pause()
  1127. for i,v in pairs(char:GetChildren()) do
  1128. if v.ClassName == "Part" then
  1129. v.BrickColor = BrickColor.new("Institutional white")
  1130. end
  1131. end
  1132. end
  1133. end
  1134. refit()
  1135. sine = sine + 1
  1136. rot = rot + 25
  1137. if rot == 360 then
  1138. rot = 1
  1139. end
  1140. local torvel = (root.Velocity * Vector3.new(1, 0, 1)).magnitude
  1141. if Stabbing == true then
  1142. state = "Stabbing"
  1143. elseif Throwing == true then
  1144. state = "Throwing"
  1145. elseif 1 < root.Velocity.y then
  1146. state = "Jump"
  1147. elseif -1 > root.Velocity.y then
  1148. state = "Fall"
  1149. elseif torvel < 1 then
  1150. state = "Idle"
  1151. elseif tor.Velocity.magnitude < 50 then
  1152. state = "Walk"
  1153. end
  1154. if state == "Jump" then
  1155. penw.C1 = clerp(penw.C1, penw1 * CFa(0, Rad(-90), 0), 0.15)
  1156. neck.C1 = clerp(neck.C1, neck1 * CFa(Rad(-2), 0, 0), 0.15)
  1157. rootj.C1 = clerp(rootj.C1, rootj1 * CFa(Rad(-15), 0, 0), 0.15)
  1158. LS.C1 = clerp(LS.C1, LS1 * CFa(Rad(10), 0, 0), 0.15)
  1159. RS.C1 = clerp(RS.C1, RS1 * CFa(Rad(10), 0, 0), 0.15)
  1160. LH.C1 = clerp(LH.C1, LH1 * CFn(0, -0.2, 0) * CFa(Rad(2), 0, Rad(-15)), 0.15)
  1161. RH.C1 = clerp(RH.C1, RH1 * CFn(0, -0.5, 0) * CFa(Rad(2), 0, Rad(15)), 0.15)
  1162. LS.C0 = clerp(LS.C0, LS0, 0.15)
  1163. RS.C0 = clerp(RS.C0, RS0, 0.15)
  1164. LH.C0 = clerp(LH.C0, LH0 * CFn(-0.2, 0, 0), 0.15)
  1165. RH.C0 = clerp(RH.C0, RH0 * CFn(0.5, 0, 0), 0.15)
  1166. elseif state == "Fall" then
  1167. penw.C1 = clerp(penw.C1, penw1 * CFa(0, Rad(-90), 0), 0.15)
  1168. neck.C1 = clerp(neck.C1, neck1 * CFa(0, 0, 0), 0.15)
  1169. rootj.C1 = clerp(rootj.C1, rootj1 * CFa(Rad(15), 0, 0), 0.15)
  1170. LS.C1 = clerp(LS.C1, LS1 * CFa(Rad(35), 0, 0), 0.15)
  1171. RS.C1 = clerp(RS.C1, RS1 * CFa(Rad(35), 0, 0), 0.15)
  1172. LH.C1 = clerp(LH.C1, LH1 * CFn(0.2, -0.2, -0.1) * CFa(Rad(15), 0, Rad(10)), 0.15)
  1173. RH.C1 = clerp(RH.C1, RH1 * CFn(-0.2, -0.2, -0.1) * CFa(Rad(15), 0, Rad(-10)), 0.15)
  1174. LS.C0 = clerp(LS.C0, LS0, 0.15)
  1175. RS.C0 = clerp(RS.C0, RS0, 0.15)
  1176. LH.C0 = clerp(LH.C0, LH0 * CFa(0, 0, Rad(-20)), 0.15)
  1177. RH.C0 = clerp(RH.C0, RH0 * CFa(0, 0, Rad(20)), 0.15)
  1178. elseif state == "Idle" then
  1179. penw.C1 = clerp(penw.C1, penw1 * CFn(0, 0, 0.5) * CFa(0, 0, Rad(rot)), 0.15)
  1180. neck.C1 = clerp(neck.C1, neck1 * CFa(Rad(-2 * Cos(sine / 15)), 0, 0), 0.15)
  1181. rootj.C1 = clerp(rootj.C1, rootj1 * CFn(0, 0, 0.025 * Cos(sine / 15)), 0.15)
  1182. LS.C1 = clerp(LS.C1, LS1 * CFa(Rad(-30), 0, Rad(-40)), 0.15)
  1183. RS.C1 = clerp(RS.C1, RS1 * CFa(Rad(2), 0, Rad(-3 * Cos(sine / 15))), 0.15)
  1184. LH.C1 = clerp(LH.C1, LH1 * CFn(0, -0.025 * Cos(sine / 15), 0) * CFa(Rad(5), Rad(-5), 0), 0.15)
  1185. RH.C1 = clerp(RH.C1, RH1 * CFn(0, -0.025 * Cos(sine / 15), 0) * CFa(Rad(5), Rad(5), 0), 0.15)
  1186. LS.C0 = clerp(LS.C0, LS0, 0.15)
  1187. RS.C0 = clerp(RS.C0, RS0 * CFa(0, 0, Rad(80)), 0.15)
  1188. LH.C0 = clerp(LH.C0, LH0, 0.15)
  1189. RH.C0 = clerp(RH.C0, RH0, 0.15)
  1190. elseif state == "Walk" then
  1191. penw.C1 = clerp(penw.C1, penw1 * CFa(0, Rad(-90), 0), 0.15)
  1192. neck.C1 = clerp(neck.C1, neck1 * CFa(Rad(-5), 0, 0), 0.15)
  1193. rootj.C1 = clerp(rootj.C1, rootj1 * CFn(0, 0.1 * Cos(sine /3), 0.1 * Cos(sine /3)) * CFa(Rad(-5), 0, Rad(5 * Cos(sine / 6))), 0.15)
  1194. LS.C1 = clerp(LS.C1, LS1 * CFa(0, 0, Rad(-50 * Cos(sine / 6))), 0.15)
  1195. RS.C1 = clerp(RS.C1, RS1 * CFa(0, 0, Rad(-50 * Cos(sine / 6))), 0.15)
  1196. LH.C1 = clerp(LH.C1, LH1 * CFa(Rad(2), Rad(-5), Rad(50 * Cos(sine / 6))), 0.15)
  1197. RH.C1 = clerp(RH.C1, RH1 * CFa(Rad(2), Rad(5), Rad(50 * Cos(sine / 6))), 0.15)
  1198. LS.C0 = clerp(LS.C0, LS0, 0.15)
  1199. RS.C0 = clerp(RS.C0, RS0, 0.15)
  1200. LH.C0 = clerp(LH.C0, LH0, 0.15)
  1201. RH.C0 = clerp(RH.C0, RH0, 0.15)
  1202. end
  1203. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement