Advertisement
HoneyBadger69

Untitled

Sep 15th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 31.16 KB | None | 0 0
  1. -- This script has been converted to FE by iPxter
  2.  
  3.  
  4. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  5. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  6. do
  7. print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  8. script.Parent = Player.Character
  9.  
  10. --RemoteEvent for communicating
  11. local Event = Instance.new("RemoteEvent")
  12. Event.Name = "UserInput_Event"
  13.  
  14. --Fake event to make stuff like Mouse.KeyDown work
  15. local function fakeEvent()
  16. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  17. t.connect = t.Connect
  18. return t
  19. end
  20.  
  21. --Creating fake input objects with fake variables
  22. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  23. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  24. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  25. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  26. end}
  27. --Merged 2 functions into one by checking amount of arguments
  28. CAS.UnbindAction = CAS.BindAction
  29.  
  30. --This function will trigger the events that have been :Connect()'ed
  31. local function te(self,ev,...)
  32. local t = m[ev]
  33. if t and t._fakeEvent and t.Function then
  34. t.Function(...)
  35. end
  36. end
  37. m.TrigEvent = te
  38. UIS.TrigEvent = te
  39.  
  40. Event.OnServerEvent:Connect(function(plr,io)
  41. if plr~=Player then return end
  42. if io.isMouse then
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. else
  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 UIS = game:GetService("UserInputService")
  66. local input = function(io,a)
  67. if a then return end
  68. --Since InputObject is a client-side instance, we create and pass table instead
  69. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  70. end
  71. UIS.InputBegan:Connect(input)
  72. UIS.InputEnded:Connect(input)
  73.  
  74. local Mouse = Player:GetMouse()
  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. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  85. end
  86.  
  87.  
  88.  
  89. --[[ last updated: 2018/5/13, 15:30
  90.  
  91. Pen by oilsauce.]]
  92.  
  93. print("Pen Script by Oilsauce.")
  94. print("Click: Stab")
  95. print("E: Toggle Pen")
  96. print("F: Throw Pen")
  97.  
  98. -----------------------------------------------------------------------------------
  99.  
  100. local plrs = game:GetService("Players")
  101. local plr = owner
  102. local char = plr.Character
  103. local tweenserv = game:GetService("TweenService")
  104. local lighting = game:GetService("Lighting")
  105. local hum = char:FindFirstChildOfClass("Humanoid")
  106. local tor = char:FindFirstChild("Torso") or char:FindFirstChild("UpperTorso")
  107. local root = char:FindFirstChild("HumanoidRootPart")
  108. local head = char:FindFirstChild("Head")
  109. local face = head:FindFirstChildOfClass("Decal")
  110. local larm = char:FindFirstChild("Left Arm") or char:FindFirstChild("LeftUpperArm")
  111. local rarm = char:FindFirstChild("Right Arm") or char:FindFirstChild("RightUpperArm")
  112. local rleg = char:FindFirstChild("Right Leg") or char:FindFirstChild("RightUpperLeg")
  113. local lleg = char:FindFirstChild("Left Leg") or char:FindFirstChild("LeftUpperLeg")
  114. local neck = tor:FindFirstChild("Neck")
  115. local rootj = root:FindFirstChild("RootJoint")
  116. local LS = tor:FindFirstChild("Left Shoulder")
  117. local RS = tor:FindFirstChild("Right Shoulder")
  118. local LH = tor:FindFirstChild("Left Hip")
  119. local RH = tor:FindFirstChild("Right Hip")
  120. local bp = plr:FindFirstChild("Backpack")
  121.  
  122. hum:ClearAllChildren()
  123. char.Animate:remove()
  124.  
  125.  
  126. --Converted with ttyyuu12345's model to script plugin v4
  127. function sandbox(var,func)
  128. local env = getfenv(func)
  129. local newenv = setmetatable({},{
  130. __index = function(self,k)
  131. if k=="script" then
  132. return var
  133. else
  134. return env[k]
  135. end
  136. end,
  137. })
  138. setfenv(func,newenv)
  139. return func
  140. end
  141. cors = {}
  142. mas = Instance.new("Model",game:GetService("Lighting"))
  143. Model0 = Instance.new("Model")
  144. Part1 = Instance.new("Part")
  145. Part2 = Instance.new("Part")
  146. ManualWeld3 = Instance.new("ManualWeld")
  147. Part4 = Instance.new("Part")
  148. ManualWeld5 = Instance.new("ManualWeld")
  149. Part6 = Instance.new("Part")
  150. ManualWeld7 = Instance.new("ManualWeld")
  151. Part8 = Instance.new("Part")
  152. ManualWeld9 = Instance.new("ManualWeld")
  153. Part10 = Instance.new("Part")
  154. ManualWeld11 = Instance.new("ManualWeld")
  155. Part12 = Instance.new("Part")
  156. ManualWeld13 = Instance.new("ManualWeld")
  157. Model0.Name = "pen"
  158. Model0.Parent = mas
  159. Part1.Name = "handler2"
  160. Part1.Parent = Model0
  161. Part1.Material = Enum.Material.Glass
  162. Part1.BrickColor = BrickColor.new("Really black")
  163. Part1.Shape = Enum.PartType.Cylinder
  164. Part1.Size = Vector3.new(0.099999927, 0.075000003, 0.075000003)
  165. Part1.CFrame = CFrame.new(0.422837317, 4.01673937, 24.1206856, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  166. Part1.BottomSurface = Enum.SurfaceType.Smooth
  167. Part1.TopSurface = Enum.SurfaceType.Smooth
  168. Part1.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  169. Part1.Position = Vector3.new(0.422837317, 4.01673937, 24.1206856)
  170. Part1.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  171. Part2.Name = "handler1"
  172. Part2.Parent = Model0
  173. Part2.Material = Enum.Material.Glass
  174. Part2.BrickColor = BrickColor.new("Really black")
  175. Part2.Shape = Enum.PartType.Cylinder
  176. Part2.Size = Vector3.new(0.099999927, 0.100000001, 0.100000001)
  177. Part2.CFrame = CFrame.new(0.356837302, 4.02223921, 24.1206856, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  178. Part2.BottomSurface = Enum.SurfaceType.Smooth
  179. Part2.TopSurface = Enum.SurfaceType.Smooth
  180. Part2.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  181. Part2.Position = Vector3.new(0.356837302, 4.02223921, 24.1206856)
  182. Part2.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  183. ManualWeld3.Name = "Weld"
  184. ManualWeld3.Parent = Part2
  185. ManualWeld3.C1 = CFrame.new(-0.0660000145, 0.00549983978, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  186. ManualWeld3.Part0 = Part2
  187. ManualWeld3.Part1 = Part1
  188. Part4.Name = "body"
  189. Part4.Parent = Model0
  190. Part4.Material = Enum.Material.Glass
  191. Part4.BrickColor = BrickColor.new("Really black")
  192. Part4.Shape = Enum.PartType.Cylinder
  193. Part4.Size = Vector3.new(1.27499998, 0.125, 0.125)
  194. Part4.CFrame = CFrame.new(-0.320662677, 4.02673912, 24.1206856, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  195. Part4.BottomSurface = Enum.SurfaceType.Smooth
  196. Part4.TopSurface = Enum.SurfaceType.Smooth
  197. Part4.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  198. Part4.Position = Vector3.new(-0.320662677, 4.02673912, 24.1206856)
  199. Part4.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  200. ManualWeld5.Name = "Weld"
  201. ManualWeld5.Parent = Part4
  202. ManualWeld5.C1 = CFrame.new(-0.743499994, 0.00999975204, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  203. ManualWeld5.Part0 = Part4
  204. ManualWeld5.Part1 = Part1
  205. Part6.Name = "clipholder"
  206. Part6.Parent = Model0
  207. Part6.Material = Enum.Material.Glass
  208. Part6.BrickColor = BrickColor.new("Really black")
  209. Part6.Shape = Enum.PartType.Cylinder
  210. Part6.Size = Vector3.new(0.2, 0.150000006, 0.150000006)
  211. Part6.CFrame = CFrame.new(-0.986662686, 4.02623892, 24.1206856, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  212. Part6.BottomSurface = Enum.SurfaceType.Smooth
  213. Part6.TopSurface = Enum.SurfaceType.Smooth
  214. Part6.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  215. Part6.Position = Vector3.new(-0.986662686, 4.02623892, 24.1206856)
  216. Part6.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  217. ManualWeld7.Name = "Weld"
  218. ManualWeld7.Parent = Part6
  219. ManualWeld7.C1 = CFrame.new(-1.4095, 0.00949954987, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  220. ManualWeld7.Part0 = Part6
  221. ManualWeld7.Part1 = Part1
  222. Part8.Name = "clip"
  223. Part8.Parent = Model0
  224. Part8.Material = Enum.Material.Glass
  225. Part8.BrickColor = BrickColor.new("Really black")
  226. Part8.Size = Vector3.new(0.724999905, 0.0500000119, 0.100000001)
  227. Part8.CFrame = CFrame.new(-0.663956106, 4.10453987, 24.1179676, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  228. Part8.BottomSurface = Enum.SurfaceType.Smooth
  229. Part8.TopSurface = Enum.SurfaceType.Smooth
  230. Part8.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  231. Part8.Position = Vector3.new(-0.663956106, 4.10453987, 24.1179676)
  232. Part8.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  233. ManualWeld9.Name = "Weld"
  234. ManualWeld9.Parent = Part8
  235. ManualWeld9.C1 = CFrame.new(-1.08679342, 0.0878005028, -0.0027179718, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  236. ManualWeld9.Part0 = Part8
  237. ManualWeld9.Part1 = Part1
  238. Part10.Name = "button"
  239. Part10.Parent = Model0
  240. Part10.Material = Enum.Material.Glass
  241. Part10.BrickColor = BrickColor.new("Dark indigo")
  242. Part10.Shape = Enum.PartType.Cylinder
  243. Part10.Size = Vector3.new(0.14, 0.125, 0.125)
  244. Part10.CFrame = CFrame.new(-1.09316278, 4.02473927, 24.1206856, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  245. Part10.BottomSurface = Enum.SurfaceType.Smooth
  246. Part10.TopSurface = Enum.SurfaceType.Smooth
  247. Part10.Color = Color3.new(0.239216, 0.0823529, 0.521569)
  248. Part10.Position = Vector3.new(-1.09316278, 4.02473927, 24.1206856)
  249. Part10.Color = Color3.new(0.239216, 0.0823529, 0.521569)
  250. ManualWeld11.Name = "Weld"
  251. ManualWeld11.Parent = Part10
  252. ManualWeld11.C1 = CFrame.new(-1.51600003, 0.007999897, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  253. ManualWeld11.Part0 = Part10
  254. ManualWeld11.Part1 = Part1
  255. Part12.Name = "sharp"
  256. Part12.Parent = Model0
  257. Part12.Material = Enum.Material.Glass
  258. Part12.Shape = Enum.PartType.Cylinder
  259. Part12.Size = Vector3.new(0.099999927, 0.0500000007, 0.0500000007)
  260. Part12.CFrame = CFrame.new(0.484837323, 4.01723957, 24.1206856, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  261. Part12.BottomSurface = Enum.SurfaceType.Smooth
  262. Part12.TopSurface = Enum.SurfaceType.Smooth
  263. Part12.Position = Vector3.new(0.484837323, 4.01723957, 24.1206856)
  264. ManualWeld13.Name = "Weld"
  265. ManualWeld13.Parent = Part12
  266. ManualWeld13.C1 = CFrame.new(0.0620000064, 0.000500202179, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  267. ManualWeld13.Part0 = Part12
  268. ManualWeld13.Part1 = Part1
  269. for i,v in pairs(mas:GetChildren()) do
  270. v.Parent = char
  271. pen = v
  272. body = Part4
  273. button = Part10
  274. pcall(function() v:MakeJoints() end)
  275. end
  276. mas:Destroy()
  277. for i,v in pairs(cors) do
  278. spawn(function()
  279. pcall(v)
  280. end)
  281. end
  282.  
  283. local rootj0 = rootj.C0
  284. local neck0 = neck.C0
  285. local LS0 = LS.C0
  286. local RS0 = RS.C0
  287. local LH0 = LH.C0
  288. local RH0 = RH.C0
  289. local rootj1 = rootj.C1
  290. local neck1 = neck.C1
  291. local LS1 = LS.C1
  292. local RS1 = RS.C1
  293. local LH1 = LH.C1
  294. local RH1 = RH.C1
  295.  
  296. -----------------------------------------------------------------------------------
  297.  
  298. local CFn = CFrame.new
  299. local CFa = CFrame.Angles
  300. local Rad = math.rad
  301. local Sin = math.sin
  302. local Cos = math.cos
  303. local sine = 1
  304.  
  305. local penp = Instance.new("Part", char)
  306. penp.Size = Vector3.new(1, 1, 1)
  307. penp.CanCollide = false
  308. penp.Transparency = 1
  309. local penpw = Instance.new("Weld", penp)
  310. penpw.Part0 = rarm
  311. penpw.Part1 = penp
  312. penpw.C1 = CFn(0, -1, 0) * CFa(0, 0, Rad(180))
  313. local penpw0 = penpw.C0
  314. local penpw1 = penpw.C1
  315.  
  316. local penw = Instance.new("Weld", body)
  317. penw.Name = "penWeld22"
  318. penw.Part0 = penp
  319. penw.Part1 = body
  320. penw.C1 = CFa(0, 0, Rad(180))
  321. local penw0 = penw.C0
  322. local penw1 = penw.C1
  323.  
  324. local sharpw = ManualWeld13
  325. local sharpw0 = ManualWeld13.C0
  326. local sharpw1 = ManualWeld13.C1
  327. local sharpw02 = CFn(0.3, 0, 0)
  328. sharpw.C0 = sharpw02
  329.  
  330. local botw = ManualWeld11
  331. local botw0 = ManualWeld11.C0
  332. local botw1 = ManualWeld11.C1
  333. local botw02 = CFn(-0.07, 0, 0)
  334. botw.C0 = botw0
  335.  
  336. -----------------------------------------------------------------------------------
  337.  
  338. local ws = 16
  339. local jp = 50
  340. local out = false
  341. local ouch = false
  342. local hitok = false
  343. local canattack = true
  344. local stabstate = 1
  345. local Stabbing = false
  346. local Throwing = false
  347. local rot = 1
  348. local dmg = 5
  349.  
  350. -----------------------------------------------------------------------------------
  351.  
  352. ArtificialHB = Instance.new("BindableEvent", script)
  353. ArtificialHB.Name = "Heartbeat"
  354. script:WaitForChild("Heartbeat")
  355.  
  356. frame = 1 / 60
  357. tf = 0
  358. allowframeloss = false
  359. tossremainder = false
  360.  
  361.  
  362. lastframe = tick()
  363. script.Heartbeat:Fire()
  364.  
  365.  
  366. game:GetService("RunService").Heartbeat:connect(function(s, p)
  367. tf = tf + s
  368. if tf >= frame then
  369. if allowframeloss then
  370. script.Heartbeat:Fire()
  371. lastframe = tick()
  372. else
  373. for i = 1, math.floor(tf / frame) do
  374. script.Heartbeat:Fire()
  375. end
  376. lastframe = tick()
  377. end
  378. if tossremainder then
  379. tf = 0
  380. else
  381. tf = tf - frame * math.floor(tf / frame)
  382. end
  383. end
  384. end)
  385.  
  386. function swait(num)
  387. if num == 0 or num == nil then
  388. game:service("RunService").Stepped:wait(0)
  389. else
  390. for i = 0, num do
  391. game:service("RunService").Stepped:wait(0)
  392. end
  393. end
  394. end
  395.  
  396. function clerp(a, b, t)
  397. return a:lerp(b, t)
  398. end
  399.  
  400. function ToggleSharp()
  401. if not button:FindFirstChild("Penclickit360") then
  402. local clickso = Instance.new("Sound", button)
  403. clickso.SoundId = "rbxassetid://537744814"
  404. clickso.Name = "Penclickit360"
  405. clickso.Volume = 5
  406. clickso:Play()
  407. else
  408. local clickso = button:FindFirstChild("Penclickit360")
  409. clickso:Play()
  410. end
  411. if out == false then
  412. sharpw.C0 = sharpw0
  413. botw.C0 = botw02
  414. dmg = 30
  415. out = true
  416. else
  417. sharpw.C0 = sharpw02
  418. botw.C0 = botw0
  419. dmg = 5
  420. out = false
  421. end
  422. end
  423.  
  424. function Stab()
  425. if stabstate == 1 and canattack == true then
  426. Stabbing = true
  427. canattack = false
  428. stabstate = 2
  429. hum.WalkSpeed = 3
  430. hum.JumpPower = 7
  431. hitok = true
  432. body.Touched:connect(function(hit)
  433. if hitok == true and not hit:IsDescendantOf(char) and hit.Parent:FindFirstChildOfClass("Humanoid") then
  434. hitok = false
  435. local owdude = hit.Parent
  436. local owhum = owdude:FindFirstChildOfClass("Humanoid")
  437. owhum.Health = owhum.Health - dmg
  438. if out == true then
  439. local bloodsound = Instance.new("Sound", hit)
  440. bloodsound.Volume = 10
  441. bloodsound.SoundId = "rbxassetid://180083298"
  442. bloodsound:Play()
  443. game:GetService("Debris"):AddItem(bloodsound, 1)
  444. local bloodsplash = Instance.new("ParticleEmitter", hit)
  445. bloodsplash.Lifetime = NumberRange.new(0.7, 1)
  446. bloodsplash.Speed = NumberRange.new(6)
  447. bloodsplash.SpreadAngle = Vector2.new(-360, 360)
  448. bloodsplash.Rate = 1000
  449. bloodsplash.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, 3), NumberSequenceKeypoint.new(1, 0)})
  450. bloodsplash.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.2), NumberSequenceKeypoint.new(1, 1)})
  451. bloodsplash.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 255, 255)), ColorSequenceKeypoint.new(1, Color3.fromRGB(0, 0, 0))})
  452. bloodsplash.Texture = "rbxassetid://771221224"
  453. game:GetService("Debris"):AddItem(bloodsplash, 1)
  454. wait(0.25)
  455. bloodsplash.Enabled = false
  456. end
  457. end
  458. if hitok == true and not hit:IsDescendantOf(char) and hit.Parent.Parent:FindFirstChildOfClass("Humanoid") then
  459. hitok = false
  460. local owdude = hit.Parent.Parent
  461. local owhum = owdude:FindFirstChildOfClass("Humanoid")
  462. owhum.Health = owhum.Health - dmg
  463. if out == true then
  464. local bloodsound = Instance.new("Sound", hit)
  465. bloodsound.Volume = 10
  466. bloodsound.SoundId = "rbxassetid://180083298"
  467. bloodsound:Play()
  468. game:GetService("Debris"):AddItem(bloodsound, 1)
  469. local bloodsplash = Instance.new("ParticleEmitter", hit)
  470. bloodsplash.Lifetime = NumberRange.new(0.7, 1)
  471. bloodsplash.Speed = NumberRange.new(6)
  472. bloodsplash.SpreadAngle = Vector2.new(-360, 360)
  473. bloodsplash.Rate = 1000
  474. bloodsplash.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, 3), NumberSequenceKeypoint.new(1, 0)})
  475. bloodsplash.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.2), NumberSequenceKeypoint.new(1, 1)})
  476. bloodsplash.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 255, 255)), ColorSequenceKeypoint.new(1, Color3.fromRGB(0, 0, 0))})
  477. bloodsplash.Texture = "rbxassetid://771221224"
  478. game:GetService("Debris"):AddItem(bloodsplash, 1)
  479. wait(0.25)
  480. bloodsplash.Enabled = false
  481. end
  482. end
  483. end)
  484. for i = 0,1,.15 do
  485. penw.C1 = clerp(penw.C1, penw1 * CFa(0, Rad(-90), 0), i)
  486. neck.C1 = clerp(neck.C1, neck1 * CFa(Rad(-2), 0, 0), i)
  487. rootj.C1 = clerp(rootj.C1, rootj1 * CFn(0, 0, 0.025), i)
  488. LS.C1 = clerp(LS.C1, LS1 * CFa(Rad(-30), 0, Rad(-40)), i)
  489. RS.C1 = clerp(RS.C1, RS1 * CFa(Rad(-30), Rad(-30), Rad(-3)), i)
  490. LH.C1 = clerp(LH.C1, LH1 * CFn(0, -0.025, 0) * CFa(Rad(5), Rad(-5), 0), i)
  491. RH.C1 = clerp(RH.C1, RH1 * CFn(0, -0.025, 0) * CFa(Rad(5), Rad(5), 0), i)
  492. LS.C0 = clerp(LS.C0, LS0, i)
  493. RS.C0 = clerp(RS.C0, RS0 * CFa(0, 0, Rad(150)), i)
  494. LH.C0 = clerp(LH.C0, LH0, i)
  495. RH.C0 = clerp(RH.C0, RH0, i)
  496. swait()
  497. end
  498. for i = 0,1,.15 do
  499. penw.C1 = clerp(penw.C1, penw1 * CFa(0, Rad(-90), 0), i)
  500. neck.C1 = clerp(neck.C1, neck1 * CFa(Rad(-2), 0, 0), i)
  501. rootj.C1 = clerp(rootj.C1, rootj1 * CFn(0, 0, 0.025), i)
  502. LS.C1 = clerp(LS.C1, LS1 * CFa(Rad(-30), 0, Rad(-40)), i)
  503. RS.C1 = clerp(RS.C1, RS1 * CFa(Rad(20), Rad(-30), Rad(-3)), i)
  504. LH.C1 = clerp(LH.C1, LH1 * CFn(0, -0.025, 0) * CFa(Rad(5), Rad(-5), 0), i)
  505. RH.C1 = clerp(RH.C1, RH1 * CFn(0, -0.025, 0) * CFa(Rad(5), Rad(5), 0), i)
  506. LS.C0 = clerp(LS.C0, LS0, i)
  507. RS.C0 = clerp(RS.C0, RS0 * CFa(0, 0, Rad(20)), i)
  508. LH.C0 = clerp(LH.C0, LH0, i)
  509. RH.C0 = clerp(RH.C0, RH0, i)
  510. swait()
  511. end
  512. hitok = false
  513. hum.WalkSpeed = ws
  514. hum.JumpPower = jp
  515. canattack = true
  516. Stabbing = false
  517. elseif stabstate == 2 and canattack == true then
  518. canattack = false
  519. stabstate = 1
  520. hum.WalkSpeed = 3
  521. hum.JumpPower = 7
  522. hitok = true
  523. body.Touched:connect(function(hit)
  524. if hitok == true and not hit:IsDescendantOf(char) and hit.Parent:FindFirstChildOfClass("Humanoid") then
  525. local owdude = hit.Parent
  526. local owhum = owdude:FindFirstChildOfClass("Humanoid")
  527. owhum.Health = owhum.Health - dmg
  528. if out == true then
  529. local bloodsound = Instance.new("Sound", hit)
  530. bloodsound.Volume = 10
  531. bloodsound.SoundId = "rbxassetid://180083298"
  532. bloodsound:Play()
  533. game:GetService("Debris"):AddItem(bloodsound, 1)
  534. local bloodsplash = Instance.new("ParticleEmitter", hit)
  535. bloodsplash.Lifetime = NumberRange.new(0.7, 1)
  536. bloodsplash.Speed = NumberRange.new(6)
  537. bloodsplash.SpreadAngle = Vector2.new(-360, 360)
  538. bloodsplash.Rate = 1000
  539. bloodsplash.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, 3), NumberSequenceKeypoint.new(1, 0)})
  540. bloodsplash.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.2), NumberSequenceKeypoint.new(1, 1)})
  541. bloodsplash.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 255, 255)), ColorSequenceKeypoint.new(1, Color3.fromRGB(0, 0, 0))})
  542. bloodsplash.Texture = "rbxassetid://771221224"
  543. game:GetService("Debris"):AddItem(bloodsplash, 1)
  544. wait(0.25)
  545. bloodsplash.Enabled = false
  546. end
  547. end
  548. if hitok == true and not hit:IsDescendantOf(char) and hit.Parent.Parent:FindFirstChildOfClass("Humanoid") then
  549. hitok = false
  550. local owdude = hit.Parent.Parent
  551. local owhum = owdude:FindFirstChildOfClass("Humanoid")
  552. owhum.Health = owhum.Health - dmg
  553. if out == true then
  554. local bloodsound = Instance.new("Sound", hit)
  555. bloodsound.Volume = 10
  556. bloodsound.SoundId = "rbxassetid://180083298"
  557. bloodsound:Play()
  558. game:GetService("Debris"):AddItem(bloodsound, 1)
  559. local bloodsplash = Instance.new("ParticleEmitter", hit)
  560. bloodsplash.Lifetime = NumberRange.new(0.7, 1)
  561. bloodsplash.Speed = NumberRange.new(6)
  562. bloodsplash.SpreadAngle = Vector2.new(-360, 360)
  563. bloodsplash.Rate = 1000
  564. bloodsplash.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, 3), NumberSequenceKeypoint.new(1, 0)})
  565. bloodsplash.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.2), NumberSequenceKeypoint.new(1, 1)})
  566. bloodsplash.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 255, 255)), ColorSequenceKeypoint.new(1, Color3.fromRGB(0, 0, 0))})
  567. bloodsplash.Texture = "rbxassetid://771221224"
  568. game:GetService("Debris"):AddItem(bloodsplash, 1)
  569. wait(0.25)
  570. bloodsplash.Enabled = false
  571. end
  572. end
  573. end)
  574. for i = 0,1,.15 do
  575. penw.C1 = clerp(penw.C1, penw1 * CFa(0, Rad(-90), 0), i)
  576. neck.C1 = clerp(neck.C1, neck1 * CFa(Rad(-2), 0, 0), i)
  577. rootj.C1 = clerp(rootj.C1, rootj1 * CFn(0, 0, 0.025), i)
  578. LS.C1 = clerp(LS.C1, LS1 * CFa(Rad(-30), 0, Rad(-40)), i)
  579. RS.C1 = clerp(RS.C1, RS1 * CFa(Rad(30), Rad(30), Rad(-3)), i)
  580. LH.C1 = clerp(LH.C1, LH1 * CFn(0, -0.025, 0) * CFa(Rad(5), Rad(-5), 0), i)
  581. RH.C1 = clerp(RH.C1, RH1 * CFn(0, -0.025, 0) * CFa(Rad(5), Rad(5), 0), i)
  582. LS.C0 = clerp(LS.C0, LS0, i)
  583. RS.C0 = clerp(RS.C0, RS0 * CFa(0, 0, Rad(150)), i)
  584. LH.C0 = clerp(LH.C0, LH0, i)
  585. RH.C0 = clerp(RH.C0, RH0, i)
  586. swait()
  587. end
  588. for i = 0,1,.15 do
  589. penw.C1 = clerp(penw.C1, penw1 * CFa(0, Rad(-90), 0), i)
  590. neck.C1 = clerp(neck.C1, neck1 * CFa(Rad(-2), 0, 0), i)
  591. rootj.C1 = clerp(rootj.C1, rootj1 * CFn(0, 0, 0.025), i)
  592. LS.C1 = clerp(LS.C1, LS1 * CFa(Rad(-30), 0, Rad(-40)), i)
  593. RS.C1 = clerp(RS.C1, RS1 * CFa(Rad(-20), Rad(30), Rad(-3)), i)
  594. LH.C1 = clerp(LH.C1, LH1 * CFn(0, -0.025, 0) * CFa(Rad(5), Rad(-5), 0), i)
  595. RH.C1 = clerp(RH.C1, RH1 * CFn(0, -0.025, 0) * CFa(Rad(5), Rad(5), 0), i)
  596. LS.C0 = clerp(LS.C0, LS0, i)
  597. RS.C0 = clerp(RS.C0, RS0 * CFa(0, 0, Rad(20)), i)
  598. LH.C0 = clerp(LH.C0, LH0, i)
  599. RH.C0 = clerp(RH.C0, RH0, i)
  600. swait()
  601. end
  602. hitok = false
  603. hum.WalkSpeed = ws
  604. hum.JumpPower = jp
  605. canattack = true
  606. Stabbing = false
  607. end
  608. end
  609.  
  610. function Throw()
  611. if canattack == true then
  612. Throwing = true
  613. canattack = false
  614. hum.WalkSpeed = 3
  615. hum.JumpPower = 7
  616. ouch = true
  617. for i = 0,1,.15 do
  618. penw.C1 = clerp(penw.C1, penw1 * CFa(0, 0, Rad(-90)), i)
  619. neck.C1 = clerp(neck.C1, neck1 * CFa(Rad(-2), 0, 0), i)
  620. rootj.C1 = clerp(rootj.C1, rootj1 * CFn(0, 0, 0.025), i)
  621. LS.C1 = clerp(LS.C1, LS1 * CFa(Rad(-30), 0, Rad(-40)), i)
  622. RS.C1 = clerp(RS.C1, RS1 * CFa(0, Rad(-30), Rad(-3)), i)
  623. LH.C1 = clerp(LH.C1, LH1 * CFn(0, -0.025, 0) * CFa(Rad(5), Rad(-5), 0), i)
  624. RH.C1 = clerp(RH.C1, RH1 * CFn(0, -0.025, 0) * CFa(Rad(5), Rad(5), 0), i)
  625. LS.C0 = clerp(LS.C0, LS0, i)
  626. RS.C0 = clerp(RS.C0, RS0 * CFa(0, Rad(90), Rad(90)), i)
  627. LH.C0 = clerp(LH.C0, LH0, i)
  628. RH.C0 = clerp(RH.C0, RH0, i)
  629. swait()
  630. end
  631. local throwpen = pen:Clone()
  632. for i,v in pairs(throwpen:GetChildren()) do
  633. if v:IsA("BasePart") and v.CanCollide == true then
  634. v.CanCollide = false
  635. end
  636. end
  637. throwpen.Parent = workspace
  638. local throwbod = throwpen:FindFirstChild("body")
  639. if throwbod:FindFirstChild("penWeld22") then
  640. throwbod:FindFirstChild("penWeld22"):Destroy()
  641. end
  642. local throwbv = Instance.new("BodyVelocity", throwbod)
  643. throwbv.Velocity = mou.Hit.lookVector * 100
  644. throwbv.MaxForce = Vector3.new(100000000000000000, 100000000000000000, 100000000000000000)
  645. throwbod.Touched:connect(function(hit)
  646. if ouch == true and not hit:IsDescendantOf(char) then
  647. ouch = false
  648. throwpen:Destroy()
  649. if hit.Parent:FindFirstChildOfClass("Humanoid") then
  650. local throwhum = hit.Parent:FindFirstChildOfClass("Humanoid")
  651. throwhum.Health = throwhum.Health - dmg
  652. if out == true then
  653. local bloodsound = Instance.new("Sound", hit)
  654. bloodsound.Volume = 10
  655. bloodsound.SoundId = "rbxassetid://180083286"
  656. bloodsound:Play()
  657. game:GetService("Debris"):AddItem(bloodsound, 1)
  658. local bloodsplash = Instance.new("ParticleEmitter", hit)
  659. bloodsplash.Lifetime = NumberRange.new(0.7, 1)
  660. bloodsplash.Speed = NumberRange.new(6)
  661. bloodsplash.SpreadAngle = Vector2.new(-360, 360)
  662. bloodsplash.Rate = 1000
  663. bloodsplash.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, 3), NumberSequenceKeypoint.new(1, 0)})
  664. bloodsplash.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.2), NumberSequenceKeypoint.new(1, 1)})
  665. bloodsplash.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 255, 255)), ColorSequenceKeypoint.new(1, Color3.fromRGB(0, 0, 0))})
  666. bloodsplash.Texture = "rbxassetid://771221224"
  667. game:GetService("Debris"):AddItem(bloodsplash, 1)
  668. wait(0.25)
  669. bloodsplash.Enabled = false
  670. end
  671. end
  672. if hit.Parent.Parent:FindFirstChildOfClass("Humanoid") then
  673. local throwhum = hit.Parent.Parent:FindFirstChildOfClass("Humanoid")
  674. throwhum.Health = throwhum.Health - dmg
  675. if out == true then
  676. local bloodsound = Instance.new("Sound", hit)
  677. bloodsound.Volume = 10
  678. bloodsound.SoundId = "rbxassetid://180083286"
  679. bloodsound:Play()
  680. game:GetService("Debris"):AddItem(bloodsound, 1)
  681. local bloodsplash = Instance.new("ParticleEmitter", hit)
  682. bloodsplash.Lifetime = NumberRange.new(0.7, 1)
  683. bloodsplash.Speed = NumberRange.new(6)
  684. bloodsplash.SpreadAngle = Vector2.new(-360, 360)
  685. bloodsplash.Rate = 1000
  686. bloodsplash.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, 3), NumberSequenceKeypoint.new(1, 0)})
  687. bloodsplash.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.2), NumberSequenceKeypoint.new(1, 1)})
  688. bloodsplash.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 255, 255)), ColorSequenceKeypoint.new(1, Color3.fromRGB(0, 0, 0))})
  689. bloodsplash.Texture = "rbxassetid://771221224"
  690. game:GetService("Debris"):AddItem(bloodsplash, 1)
  691. wait(0.25)
  692. bloodsplash.Enabled = false
  693. end
  694. end
  695. end
  696. end)
  697. for i,v in pairs(pen:GetChildren()) do
  698. if v:IsA("BasePart") then
  699. v.Transparency = 1
  700. end
  701. end
  702. for i = 0,1,.1 do
  703. penw.C1 = clerp(penw.C1, penw1 * CFa(0, 0, Rad(-90)), i)
  704. neck.C1 = clerp(neck.C1, neck1 * CFa(Rad(-2), 0, 0), i)
  705. rootj.C1 = clerp(rootj.C1, rootj1 * CFn(0, 0, 0.025) * CFa(Rad(-20), 0, 0), i)
  706. LS.C1 = clerp(LS.C1, LS1 * CFa(Rad(-30), 0, Rad(-40)), i)
  707. RS.C1 = clerp(RS.C1, RS1 * CFa(0, Rad(-30), Rad(-3)), i)
  708. LH.C1 = clerp(LH.C1, LH1 * CFn(0, -0.025, 0) * CFa(Rad(5), Rad(-5), Rad(-20)), i)
  709. RH.C1 = clerp(RH.C1, RH1 * CFn(0, -0.025, 0) * CFa(Rad(5), Rad(5), Rad(-20)), i)
  710. LS.C0 = clerp(LS.C0, LS0, i)
  711. RS.C0 = clerp(RS.C0, RS0 * CFa(0, Rad(-80), Rad(90)), i)
  712. LH.C0 = clerp(LH.C0, LH0, i)
  713. RH.C0 = clerp(RH.C0, RH0, i)
  714. swait()
  715. end
  716. for i = 0,1,.1 do
  717. penw.C1 = clerp(penw.C1, penw1 * CFa(0, 0, Rad(-90)), i)
  718. neck.C1 = clerp(neck.C1, neck1 * CFa(Rad(-30), 0, 0), i)
  719. rootj.C1 = clerp(rootj.C1, rootj1 * CFn(0, 0, 0.025) * CFa(0, 0, Rad(-30)), i)
  720. LS.C1 = clerp(LS.C1, LS1 * CFa(Rad(-30), 0, Rad(-40)), i)
  721. RS.C1 = clerp(RS.C1, RS1 * CFa(0, Rad(-30), Rad(-3)), i)
  722. LH.C1 = clerp(LH.C1, LH1 * CFn(0, -0.025, 0) * CFa(Rad(5), Rad(35), 0), i)
  723. RH.C1 = clerp(RH.C1, RH1 * CFn(0, -0.025, 0) * CFa(Rad(5), Rad(35), 0), i)
  724. LS.C0 = clerp(LS.C0, LS0, i)
  725. RS.C0 = clerp(RS.C0, RS0 * CFn(0, 0, -0.5) * CFa(0, Rad(90), Rad(30)), i)
  726. LH.C0 = clerp(LH.C0, LH0, i)
  727. RH.C0 = clerp(RH.C0, RH0, i)
  728. swait()
  729. end
  730. for i,v in pairs(pen:GetChildren()) do
  731. if v:IsA("BasePart") then
  732. v.Transparency = 0
  733. end
  734. end
  735. hum.WalkSpeed = ws
  736. hum.JumpPower = jp
  737. canattack = true
  738. Throwing = false
  739. end
  740. end
  741.  
  742. -----------------------------------------------------------------------------------
  743.  
  744. function kdown(k)
  745. if k == "e" then
  746. ToggleSharp()
  747. elseif k == "f" then
  748. Throw()
  749. end
  750. end
  751.  
  752. mou.KeyDown:connect(kdown)
  753. mou.Button1Down:connect(Stab)
  754.  
  755. -----------------------------------------------------------------------------------
  756.  
  757. while true do
  758. swait()
  759. sine = sine + 1
  760. rot = rot + 25
  761. if rot == 360 then
  762. rot = 1
  763. end
  764. local torvel = (root.Velocity * Vector3.new(1, 0, 1)).magnitude
  765. if Stabbing == true then
  766. state = "Stabbing"
  767. elseif Throwing == true then
  768. state = "Throwing"
  769. elseif 1 < root.Velocity.y then
  770. state = "Jump"
  771. elseif -1 > root.Velocity.y then
  772. state = "Fall"
  773. elseif torvel < 1 then
  774. state = "Idle"
  775. elseif tor.Velocity.magnitude < 50 then
  776. state = "Walk"
  777. end
  778. if state == "Jump" then
  779. penw.C1 = clerp(penw.C1, penw1 * CFa(0, Rad(-90), 0), 0.15)
  780. neck.C1 = clerp(neck.C1, neck1 * CFa(Rad(-2), 0, 0), 0.15)
  781. rootj.C1 = clerp(rootj.C1, rootj1 * CFa(Rad(-15), 0, 0), 0.15)
  782. LS.C1 = clerp(LS.C1, LS1 * CFa(Rad(10), 0, 0), 0.15)
  783. RS.C1 = clerp(RS.C1, RS1 * CFa(Rad(10), 0, 0), 0.15)
  784. LH.C1 = clerp(LH.C1, LH1 * CFn(0, -0.2, 0) * CFa(Rad(2), 0, Rad(-15)), 0.15)
  785. RH.C1 = clerp(RH.C1, RH1 * CFn(0, -0.5, 0) * CFa(Rad(2), 0, Rad(15)), 0.15)
  786. LS.C0 = clerp(LS.C0, LS0, 0.15)
  787. RS.C0 = clerp(RS.C0, RS0, 0.15)
  788. LH.C0 = clerp(LH.C0, LH0 * CFn(-0.2, 0, 0), 0.15)
  789. RH.C0 = clerp(RH.C0, RH0 * CFn(0.5, 0, 0), 0.15)
  790. elseif state == "Fall" then
  791. penw.C1 = clerp(penw.C1, penw1 * CFa(0, Rad(-90), 0), 0.15)
  792. neck.C1 = clerp(neck.C1, neck1 * CFa(0, 0, 0), 0.15)
  793. rootj.C1 = clerp(rootj.C1, rootj1 * CFa(Rad(15), 0, 0), 0.15)
  794. LS.C1 = clerp(LS.C1, LS1 * CFa(Rad(35), 0, 0), 0.15)
  795. RS.C1 = clerp(RS.C1, RS1 * CFa(Rad(35), 0, 0), 0.15)
  796. LH.C1 = clerp(LH.C1, LH1 * CFn(0.2, -0.2, -0.1) * CFa(Rad(15), 0, Rad(10)), 0.15)
  797. RH.C1 = clerp(RH.C1, RH1 * CFn(-0.2, -0.2, -0.1) * CFa(Rad(15), 0, Rad(-10)), 0.15)
  798. LS.C0 = clerp(LS.C0, LS0, 0.15)
  799. RS.C0 = clerp(RS.C0, RS0, 0.15)
  800. LH.C0 = clerp(LH.C0, LH0 * CFa(0, 0, Rad(-20)), 0.15)
  801. RH.C0 = clerp(RH.C0, RH0 * CFa(0, 0, Rad(20)), 0.15)
  802. elseif state == "Idle" then
  803. penw.C1 = clerp(penw.C1, penw1 * CFn(0, 0, 0.5) * CFa(0, 0, Rad(rot)), 0.15)
  804. neck.C1 = clerp(neck.C1, neck1 * CFa(Rad(-2 * Cos(sine / 15)), 0, 0), 0.15)
  805. rootj.C1 = clerp(rootj.C1, rootj1 * CFn(0, 0, 0.025 * Cos(sine / 15)), 0.15)
  806. LS.C1 = clerp(LS.C1, LS1 * CFa(Rad(-30), 0, Rad(-40)), 0.15)
  807. RS.C1 = clerp(RS.C1, RS1 * CFa(Rad(2), 0, Rad(-3 * Cos(sine / 15))), 0.15)
  808. LH.C1 = clerp(LH.C1, LH1 * CFn(0, -0.025 * Cos(sine / 15), 0) * CFa(Rad(5), Rad(-5), 0), 0.15)
  809. RH.C1 = clerp(RH.C1, RH1 * CFn(0, -0.025 * Cos(sine / 15), 0) * CFa(Rad(5), Rad(5), 0), 0.15)
  810. LS.C0 = clerp(LS.C0, LS0, 0.15)
  811. RS.C0 = clerp(RS.C0, RS0 * CFa(0, 0, Rad(80)), 0.15)
  812. LH.C0 = clerp(LH.C0, LH0, 0.15)
  813. RH.C0 = clerp(RH.C0, RH0, 0.15)
  814. elseif state == "Walk" then
  815. penw.C1 = clerp(penw.C1, penw1 * CFa(0, Rad(-90), 0), 0.15)
  816. neck.C1 = clerp(neck.C1, neck1 * CFa(Rad(-5), 0, 0), 0.15)
  817. 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)
  818. LS.C1 = clerp(LS.C1, LS1 * CFa(0, 0, Rad(-50 * Cos(sine / 6))), 0.15)
  819. RS.C1 = clerp(RS.C1, RS1 * CFa(0, 0, Rad(-50 * Cos(sine / 6))), 0.15)
  820. LH.C1 = clerp(LH.C1, LH1 * CFa(Rad(2), Rad(-5), Rad(50 * Cos(sine / 6))), 0.15)
  821. RH.C1 = clerp(RH.C1, RH1 * CFa(Rad(2), Rad(5), Rad(50 * Cos(sine / 6))), 0.15)
  822. LS.C0 = clerp(LS.C0, LS0, 0.15)
  823. RS.C0 = clerp(RS.C0, RS0, 0.15)
  824. LH.C0 = clerp(LH.C0, LH0, 0.15)
  825. RH.C0 = clerp(RH.C0, RH0, 0.15)
  826. end
  827. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement