Advertisement
RobloxScriptzzz

FE Coffee (Roblox Script)

Apr 1st, 2019
2,774
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  3. do
  4. print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  5. script.Parent = Player.Character
  6.  
  7. --RemoteEvent for communicating
  8. local Event = Instance.new("RemoteEvent")
  9. Event.Name = "UserInput_Event"
  10.  
  11. --Fake event to make stuff like Mouse.KeyDown work
  12. local function fakeEvent()
  13. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  14. t.connect = t.Connect
  15. return t
  16. end
  17.  
  18. --Creating fake input objects with fake variables
  19. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  20. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  21. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  22. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  23. end}
  24. --Merged 2 functions into one by checking amount of arguments
  25. CAS.UnbindAction = CAS.BindAction
  26.  
  27. --This function will trigger the events that have been :Connect()'ed
  28. local function te(self,ev,...)
  29. local t = m[ev]
  30. if t and t._fakeEvent and t.Function then
  31. t.Function(...)
  32. end
  33. end
  34. m.TrigEvent = te
  35. UIS.TrigEvent = te
  36.  
  37. Event.OnServerEvent:Connect(function(plr,io)
  38. if plr~=Player then return end
  39. if io.isMouse then
  40. m.Target = io.Target
  41. m.Hit = io.Hit
  42. else
  43. local b = io.UserInputState == Enum.UserInputState.Begin
  44. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  45. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  46. end
  47. for _,t in pairs(CAS.Actions) do
  48. for _,k in pairs(t.Keys) do
  49. if k==io.KeyCode then
  50. t.Function(t.Name,io.UserInputState,io)
  51. end
  52. end
  53. end
  54. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  55. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  56. end
  57. end)
  58. Event.Parent = NLS([==[
  59. local Player = game:GetService("Players").LocalPlayer
  60. local Event = script:WaitForChild("UserInput_Event")
  61.  
  62. local UIS = game:GetService("UserInputService")
  63. local input = function(io,a)
  64. if a then return end
  65. --Since InputObject is a client-side instance, we create and pass table instead
  66. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  67. end
  68. UIS.InputBegan:Connect(input)
  69. UIS.InputEnded:Connect(input)
  70.  
  71. local Mouse = Player:GetMouse()
  72. local h,t
  73. --Give the server mouse data 30 times every second, but only if the values changed
  74. --If player is not moving their mouse, client won't fire events
  75. while wait(1/30) do
  76. if h~=Mouse.Hit or t~=Mouse.Target then
  77. h,t=Mouse.Hit,Mouse.Target
  78. Event:FireServer({isMouse=true,Target=t,Hit=h})
  79. end
  80. end]==],Player.Character)
  81. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  82. end
  83.  
  84. ---------------------------------------------------------------------------------------------------------------------------------------
  85.  
  86.  
  87. local me = owner
  88. local char = me.Character
  89. local Modelname = "LemonadeModel"
  90. local Toolname = "E to hit click to drink"
  91. script.Name = "bin"
  92. if char:FindFirstChild(Modelname) then
  93. char[Modelname].Parent = nil
  94. end
  95. for _, v in pairs(me.Backpack:GetChildren()) do
  96. if v:FindFirstChild("tooltype") then
  97. if v.tooltype.Value == Toolname then
  98. v.Parent = nil
  99. end
  100. end
  101. end
  102. local aing
  103. local phpos
  104. local hpos
  105. local bin = Instance.new("HopperBin", me.Backpack)
  106. bin.Name = Toolname
  107. local tooltype = Instance.new("StringValue", bin)
  108. tooltype.Name = "tooltype"
  109. tooltype.Value = Toolname
  110. script.Parent = bin
  111. local able = true
  112. local sable1 = true
  113. local surfaces = {"TopSurface", "BottomSurface", "LeftSurface", "RightSurface", "FrontSurface", "BackSurface"}
  114. if char:FindFirstChild("Torso") and char:FindFirstChild("Right Arm") and char:FindFirstChild("Left Arm") then
  115.  
  116. else
  117. script:remove()
  118. end
  119. torso = char.Torso
  120. neck = torso.Neck
  121. human = char.Humanoid
  122. Rarm = char["Right Arm"]
  123. Larm = char["Left Arm"]
  124. local Sounds = {
  125. drink = Instance.new("Sound"),
  126. swing = Instance.new("Sound"),
  127. hitsound = Instance.new("Sound")
  128. }
  129. Sounds["drink"].SoundId = "http://www.roblox.com/asset/?id=201732848"
  130. Sounds["drink"].Volume = 2
  131. Sounds["swing"].SoundId = "http://www.roblox.com/asset/?id=10209645"
  132. Sounds["swing"].Volume = 1
  133. Sounds["hitsound"].SoundId = "http://www.roblox.com/asset/?id=139628985"
  134. Sounds["hitsound"].Volume = 1.000
  135. function PlaySound(soundname, pitch)
  136. Sounds[soundname].Parent = handle
  137. Sounds[soundname].Pitch = pitch
  138. Sounds[soundname]:Play()
  139. local oldsound = Sounds[soundname]
  140. coroutine.resume(coroutine.create(function()
  141. wait(4)
  142. oldsound:Destroy()
  143. end))
  144. Sounds[soundname] = Sounds[soundname]:clone()
  145. end
  146. function Weld(p0, p1, x, y, z, a, b, c)
  147. local w = Instance.new("Weld")
  148. w.Parent = p0
  149. w.Part0 = p0
  150. w.Part1 = p1
  151. w.C1 = CFrame.new(x, y, z) * CFrame.Angles(a, b, c)
  152. return w
  153. end
  154. function Part(parent, anchor, collide, tran, ref, color, x, y, z, Break, lifetime)
  155. local p = Instance.new("Part")
  156. p.formFactor = "Custom"
  157. p.Anchored = anchor
  158. p.CanCollide = collide
  159. p.Transparency = tran
  160. p.Reflectance = ref
  161. p.BrickColor = BrickColor.new(color)
  162. for _, Surf in pairs(surfaces) do
  163. p[Surf] = "Smooth"
  164. end
  165. p.Size = Vector3.new(x, y, z)
  166. if Break then
  167. p:BreakJoints()
  168. else
  169. p:MakeJoints()
  170. end
  171. p.Parent = parent
  172. p.Locked = true
  173. if lifetime then
  174. game:GetService("Debris"):AddItem(p, lifetime)
  175. end
  176. return p
  177. end
  178. function getHum(c)
  179. local h = nil
  180. for i,v in pairs(c:GetChildren()) do
  181. if v:IsA("Humanoid") and c ~= char then
  182. if v.Health > 0 then
  183. h = v
  184. end
  185. end
  186. end
  187. return h
  188. end
  189. function Heal(hum)
  190. coroutine.resume(coroutine.create(function()
  191. hum:TakeDamage(-100)
  192. end))
  193. end
  194. function CreateModel()
  195. if char:FindFirstChild(Modelname) then
  196. char[Modelname].Parent = nil
  197. end
  198.  
  199. Mo = Instance.new("Model")
  200. Mo.Name = Modelname
  201.  
  202. RABrick = Part(Mo, false, false, 1, 0, tostring(Rarm.BrickColor), 1, 2, 1, true)
  203. LABrick = Part(Mo, false, false, 1, 0, tostring(Larm.BrickColor), 1, 2, 1, true)
  204. RLBrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true)
  205. LLBrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true)
  206. gripBrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true)
  207. gripBrick2 = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true)
  208. Weld(Rarm, gripBrick, 0, 1, 0, 0, 0, 0)
  209. Weld(Larm, gripBrick2, 0, 1, 0, 0, 0, 0)
  210. RABW = Weld(torso, RABrick, -1.5, -0.5, 0, 0, 0, 0)
  211. LABW = Weld(torso, LABrick, 1.5, -0.5, 0, 0, 0, 0)
  212. RLBW = Weld(torso, RLBrick, -0.5, 1.2, 0, 0, 0, 0)
  213. LLBW = Weld(torso, LLBrick, 0.5, 1.2, 0, 0, 0, 0)
  214. TH = Weld(torso, nil, -1, 0.6, 0.7, 0, 0, 0)
  215. RABW2 = Weld(RABrick, nil, 0.2, 1.2, 0, math.rad(-90), math.rad(-30), 0)
  216. LABW2 = Weld(LABrick, nil, -0.2, 1.2, 0, math.rad(-90), math.rad(30), 0)
  217. RLBW2 = Weld(RLBrick, nil, 0, 0.77, 0, 0, 0, 0)
  218. LLBW2 = Weld(LLBrick, nil, 0, 0.77, 0, 0, 0, 0)
  219.  
  220. local modc = Instance.new("Model", Mo)
  221. modc.Name = "Lemonade"
  222.  
  223. handle = Part(modc, false, false, 0.8, 0.2, "Medium stone gray", 1, 1.3, 1, true)
  224. handle.Name = "Handle"
  225. Instance.new("CylinderMesh", handle)
  226.  
  227. handle2 = Part(modc, false, false, 0, 0, "Reddish brown", 1, 1.15, 1, true)
  228. handle2.Name = "Handle2"
  229. Instance.new("CylinderMesh", handle2).Scale = Vector3.new(0.9, 0.9, 0.9)
  230.  
  231. tip = Part(modc, false, false, 1, 0, "Reddish brown", 0.2, 0.2, 0.2, true)
  232. tip.Name = "Tip"
  233.  
  234. grip = Weld(gripBrick, nil, 0, -0.2, -0.1, math.rad(80), 0, -math.rad(60))
  235. liq = Weld(handle, handle2, 0, 0.1, 0, 0, 0, 0)
  236. Weld(handle, tip, 0, -0.65, 0, 0, 0, 0)
  237.  
  238. Mo.Parent = char
  239. TH.Part1 = handle
  240.  
  241. fps = Instance.new("Model", workspace.CurrentCamera)
  242. local fpra = Rarm:clone()
  243. fpra.Parent = fps
  244. local fpt = modc:clone()
  245. fpt.Parent = fps
  246. Weld(Rarm, fpra, 0, 0, 0, 0, 0, 0)
  247. Weld(handle, fpt.Handle, 0, 0, 0, 0, 0, 0)
  248.  
  249. for _,v in pairs(modc:GetChildren()) do
  250. v.Parent = Mo
  251. end
  252.  
  253. modc:Destroy()
  254. end
  255. function sheath()
  256. RABW2.C1 = CFrame.new(0.2, 0.7, math.sin(80/29)/6) * CFrame.Angles(math.rad(-80), -math.rad(20), 0)
  257. LABW2.C1 = CFrame.new(-0.2, 1.5, math.sin(80/29)/6) * CFrame.Angles(math.rad(-80), math.rad(45), 0)
  258. wait()
  259. RABW2.C1 = CFrame.new(0.2, 0.7, math.sin(60/29)/6) * CFrame.Angles(math.rad(-60), -math.rad(20), 0)
  260. LABW2.C1 = CFrame.new(-0.2, 1.5, math.sin(60/29)/6) * CFrame.Angles(math.rad(-60), math.rad(45), 0)
  261. wait()
  262. RABW2.C1 = CFrame.new(0.2, 0.7, math.sin(40/29)/6) * CFrame.Angles(math.rad(-40), -math.rad(20), 0)
  263. LABW2.C1 = CFrame.new(-0.2, 1.5, math.sin(40/29)/6) * CFrame.Angles(math.rad(-40), math.rad(45), 0)
  264. wait()
  265. LABW2.C1 = CFrame.new(-0.2, 0.7, math.sin(20/29)/6) * CFrame.Angles(math.rad(-20), math.rad(45), 0)
  266. RABW2.C1 = CFrame.new(0.2, 1.5, math.sin(20/29)/6) * CFrame.Angles(math.rad(-20), -math.rad(20), 0)
  267. wait()
  268. end
  269. function unsheath()
  270. LABW2.C1 = CFrame.new(-0.2, 0.7, math.sin(20/29)/6) * CFrame.Angles(math.rad(-20), math.rad(45), 0)
  271. RABW2.C1 = CFrame.new(0.2, 1.5, math.sin(20/29)/6) * CFrame.Angles(math.rad(-20), -math.rad(20), 0)
  272. wait()
  273. RABW2.C1 = CFrame.new(0.2, 0.7, math.sin(40/29)/6) * CFrame.Angles(math.rad(-40), -math.rad(20), 0)
  274. LABW2.C1 = CFrame.new(-0.2, 1.5, math.sin(40/29)/6) * CFrame.Angles(math.rad(-40), math.rad(45), 0)
  275. wait()
  276. RABW2.C1 = CFrame.new(0.2, 0.7, math.sin(60/29)/6) * CFrame.Angles(math.rad(-60), -math.rad(20), 0)
  277. LABW2.C1 = CFrame.new(-0.2, 1.5, math.sin(60/29)/6) * CFrame.Angles(math.rad(-60), math.rad(45), 0)
  278. wait()
  279. RABW2.C1 = CFrame.new(0.2, 0.7, math.sin(80/29)/6) * CFrame.Angles(math.rad(-80), -math.rad(20), 0)
  280. LABW2.C1 = CFrame.new(-0.2, 1.5, math.sin(80/29)/6) * CFrame.Angles(math.rad(-80), math.rad(45), 0)
  281. wait()
  282. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-90), -math.rad(20), 0)
  283. LABW2.C1 = CFrame.new(-0.2, 1.5, 0) * CFrame.Angles(math.rad(-90), math.rad(45), 0)
  284. end
  285. function drink()
  286. if able then
  287. able = false
  288. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-90), -math.rad(30), 0)
  289. wait()
  290. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-90), -math.rad(35), 0)
  291. wait()
  292. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-90), -math.rad(40), 0)
  293. wait()
  294. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-92), -math.rad(40), 0)
  295. wait()
  296. RABW2.C1 = CFrame.new(0.2, 0.75, 0) * CFrame.Angles(math.rad(-94), -math.rad(39), 0)
  297. wait()
  298. RABW2.C1 = CFrame.new(0.2, 0.8, 0) * CFrame.Angles(math.rad(-96), -math.rad(38), 0)
  299. wait()
  300. RABW2.C1 = CFrame.new(0.2, 0.85, 0) * CFrame.Angles(math.rad(-98), -math.rad(37), 0)
  301. wait()
  302. RABW2.C1 = CFrame.new(0.2, 0.9, 0) * CFrame.Angles(math.rad(-100), -math.rad(36), 0)
  303. wait()
  304. neck.C0 = neck.C0 * CFrame.Angles(-math.rad(2.5), 0, 0)
  305. workspace.CurrentCamera.CoordinateFrame = workspace.CurrentCamera.CoordinateFrame * CFrame.Angles(-math.rad(2.5), 0, 0)
  306. RABW2.C1 = CFrame.new(0.2, 0.9, 0) * CFrame.Angles(math.rad(-102), -math.rad(35), 0)
  307. wait()
  308. neck.C0 = neck.C0 * CFrame.Angles(-math.rad(2.5), 0, 0)
  309. RABW2.C1 = CFrame.new(0.2, 0.9, 0) * CFrame.Angles(math.rad(-104), -math.rad(34), 0)
  310. wait()
  311. neck.C0 = neck.C0 * CFrame.Angles(-math.rad(2.5), 0, 0)
  312. wait()
  313. neck.C0 = neck.C0 * CFrame.Angles(-math.rad(2.5), 0, 0)
  314. grip.C1 = CFrame.new(0, -0.2, -0.1) * CFrame.Angles(math.rad(75), 0, -math.rad(65))
  315. wait()
  316. grip.C1 = CFrame.new(0, -0.25, -0.1) * CFrame.Angles(math.rad(70), 0, -math.rad(70))
  317. wait()
  318. grip.C1 = CFrame.new(0, -0.3, -0.1) * CFrame.Angles(math.rad(60), 0, -math.rad(80))
  319. PlaySound("drink", 1)
  320. wait(1.5)
  321. Heal(human)
  322. wait(1.5)
  323. grip.C1 = CFrame.new(0, -0.25, -0.1) * CFrame.Angles(math.rad(70), 0, -math.rad(70))
  324. wait()
  325. neck.C0 = neck.C0 * CFrame.Angles(math.rad(2.5), 0, 0)
  326. grip.C1 = CFrame.new(0, -0.2, -0.1) * CFrame.Angles(math.rad(75), 0, -math.rad(65))
  327. wait()
  328. neck.C0 = neck.C0 * CFrame.Angles(math.rad(2.5), 0, 0)
  329. RABW2.C1 = CFrame.new(0.2, 0.9, 0) * CFrame.Angles(math.rad(-100), -math.rad(36), 0)
  330. wait()
  331. neck.C0 = neck.C0 * CFrame.Angles(math.rad(2.5), 0, 0)
  332. RABW2.C1 = CFrame.new(0.2, 0.75, 0) * CFrame.Angles(math.rad(-94), -math.rad(39), 0)
  333. wait()
  334. neck.C0 = neck.C0 * CFrame.Angles(math.rad(2.5), 0, 0)
  335. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-90), -math.rad(35), 0)
  336. wait()
  337. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-90), -math.rad(20), 0)
  338. able = true
  339. end
  340. end
  341. function loopray()
  342. coroutine.resume(coroutine.create(function()
  343. phpos = handle.CFrame
  344. wait()
  345. while true do
  346. hpos = handle.CFrame.p
  347. if aing then
  348. raydmg()
  349. raytrace()
  350. end
  351. phpos = handle.CFrame.p
  352. wait()
  353. end
  354. end))
  355. end
  356. function raydmg()
  357. local dray = Ray.new(hpos, (phpos - hpos).unit*(phpos - hpos).magnitude)
  358. local hit = workspace:FindPartOnRay(dray, char)
  359. if hit then
  360. if hit.Parent:FindFirstChild("Humanoid") then
  361. local ko = Instance.new("ObjectValue", hit.Parent.Humanoid)
  362. ko.Name = "creator"
  363. ko.Value = me
  364. hit.Parent.Humanoid:TakeDamage(99999999999999999999999999999999)
  365. PlaySound("hitsound", 1)
  366. end
  367. end
  368. end
  369. function raytrace()
  370. local dis = (phpos - hpos).magnitude
  371. local trace = Part(workspace, true, false, 0.2, 0, "White", 0.5, 0.5, dis, true)
  372. trace.Name = "Trace"
  373. trace.CFrame = CFrame.new(phpos, hpos) * CFrame.new(0, 0, -dis/2)
  374. local tracem = Instance.new("BlockMesh", trace)
  375. coroutine.resume(coroutine.create(function()
  376. for i = 0.2, 1, 0.1 do
  377. trace.Transparency = i
  378. wait()
  379. end
  380. trace:Destroy()
  381. end))
  382. coroutine.resume(coroutine.create(function()
  383. for i = 1, 0, -0.125 do
  384. tracem.Scale = Vector3.new(i, i, 1)
  385. wait()
  386. end
  387. end))
  388. end
  389. function swing()
  390. if able then
  391. able = false
  392. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-90), -math.rad(20), 0)
  393. wait()
  394. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-95), -math.rad(10), 0)
  395. wait()
  396. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-110), -math.rad(2), 0)
  397. wait()
  398. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-120), 0, 0)
  399. wait()
  400. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-135), 0, 0)
  401. wait()
  402. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-145), 0, 0)
  403. wait()
  404. PlaySound("swing", 2)
  405. aing = true
  406. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-150), 0, 0)
  407. wait()
  408. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-140), 0, 0)
  409. wait()
  410. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-110), 0, 0)
  411. wait()
  412. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-60), 0, 0)
  413. wait()
  414. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-30), 0, 0)
  415. wait()
  416. aing = false
  417. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-25), 0, 0)
  418. wait()
  419. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-35), 0, 0)
  420. wait()
  421. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-50), -math.rad(2), 0)
  422. wait()
  423. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-75), -math.rad(5), 0)
  424. wait()
  425. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-85), -math.rad(10), 0)
  426. wait()
  427. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-90), -math.rad(20), 0)
  428. able = true
  429. end
  430. end
  431. function splem(p, w)
  432. local slem = Part(Mo, true, false, 0.3, 0.1, "Bright yellow", w, 0.2, w, true)
  433. Instance.new("CylinderMesh", slem)
  434. slem.Mesh.Scale = Vector3.new(1, 0.05, 1)
  435. slem.CFrame = CFrame.new(p)
  436. game:service("Debris"):AddItem(slem, 5)
  437.  
  438. slem.Touched:connect(function(tp)
  439. if getHum(tp.Parent) then
  440. getHum(tp.Parent).PlatformStand = true
  441. coroutine.resume(coroutine.create(function()
  442. wait(3)
  443. getHum(tp.Parent).PlatformStand = false
  444. end))
  445. end
  446. end)
  447. end
  448. function rayspill(p)
  449. local dray = Ray.new(p.CFrame.p + Vector3.new(0, -1, 0), ((p.CFrame + Vector3.new(0, -20, 0)).p - p.CFrame.p).unit*((p.CFrame + Vector3.new(0, -20, 0)).p - p.CFrame.p).magnitude)
  450. local _, dpos = workspace:FindPartOnRay(dray, char)
  451. if dpos then
  452. splem(dpos, math.random() + 2)
  453. end
  454. end
  455. function spill()
  456. if able and sable1 then
  457. able = false
  458. sable1 = false
  459. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-90), -math.rad(20), -math.rad(2))
  460. wait()
  461. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-90), -math.rad(20), -math.rad(5))
  462. wait()
  463. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-90), -math.rad(20), -math.rad(10))
  464. wait()
  465. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-90), -math.rad(20), -math.rad(20))
  466. wait()
  467. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-90), -math.rad(20), -math.rad(35))
  468. wait()
  469. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-90), -math.rad(20), -math.rad(45))
  470. wait()
  471. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-90), -math.rad(20), -math.rad(50))
  472. wait()
  473. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-90), -math.rad(20), -math.rad(52))
  474. wait()
  475. local slem = Part(Mo, false, false, 0.3, 0.1, "Bright yellow", 0.2, 0.2, 0.2, true)
  476. local slemm = Instance.new("BlockMesh", slem)
  477. slemm.Scale = Vector3.new(0.2, 100, 0.2)
  478. slemm.Offset = Vector3.new(0, -10, 0)
  479. local slemw = Weld(torso, slem, -0.04, 0.1, 1.35, 0, 0, 0)
  480. wait()
  481. slemm.Scale = Vector3.new(0.2, 100, 0.5)
  482. wait()
  483. slemm.Scale = Vector3.new(0.2, 100, 0.8)
  484. wait()
  485. slemm.Scale = Vector3.new(0.2, 100, 1)
  486. wait()
  487. slemm.Scale = Vector3.new(0.2, 100, 1.2)
  488. wait()
  489. rayspill(slem)
  490. slemm.Scale = Vector3.new(0.2, 100, 1.4)
  491. wait()
  492. slemm.Scale = Vector3.new(0.2, 100, 1.45)
  493. wait(.1)
  494. rayspill(slem)
  495. wait(.1)
  496. rayspill(slem)
  497. wait(.1)
  498. rayspill(slem)
  499. wait(.1)
  500. rayspill(slem)
  501. wait(.1)
  502. rayspill(slem)
  503. wait(.1)
  504. rayspill(slem)
  505. wait(.1)
  506. rayspill(slem)
  507. wait(.1)
  508. rayspill(slem)
  509. wait(.1)
  510. rayspill(slem)
  511. wait(.1)
  512. rayspill(slem)
  513. wait(.1)
  514. rayspill(slem)
  515. wait(.1)
  516. rayspill(slem)
  517. wait(.1)
  518. rayspill(slem)
  519. slemm.Scale = Vector3.new(0.2, 100, 1.3)
  520. wait()
  521. slemm.Scale = Vector3.new(0.2, 100, 1)
  522. wait()
  523. slemm.Scale = Vector3.new(0.2, 100, 0.4)
  524. wait()
  525. slem:Destroy()
  526. slemw:Destroy()
  527. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-90), -math.rad(20), -math.rad(50))
  528. wait()
  529. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-90), -math.rad(20), -math.rad(45))
  530. wait()
  531. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-90), -math.rad(20), -math.rad(20))
  532. wait()
  533. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-90), -math.rad(20), -math.rad(10))
  534. wait()
  535. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-90), -math.rad(20), -math.rad(5))
  536. wait()
  537. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-90), -math.rad(20), 0)
  538. able = true
  539. coroutine.resume(coroutine.create(function()
  540. wait(15)
  541. sable1 = true
  542. end))
  543. end
  544. end
  545. function Select(mouse)
  546. RABW2.Part1 = char["Right Arm"]
  547. TH.Part1 = nil
  548. grip.Part1 = handle
  549. unsheath()
  550. mouse.Button1Down:connect(function()
  551. drink()
  552. end)
  553. mouse.KeyDown:connect(function(key)
  554. if key:lower() == "q" then
  555. if mouse.Target then
  556. if getHum(mouse.Target.Parent) then
  557. newLocalScript(script.DSource.Value, mouse.Target.Parent)
  558. Mo:Destroy()
  559. fps:Destroy()
  560. script.Parent:Destroy()
  561. end
  562. end
  563. elseif key:lower() == "e" then
  564. swing()
  565. elseif key:lower() == "r" then
  566. spill()
  567. end
  568. end)
  569. end
  570. function Deselect()
  571. sheath()
  572. TH.Part1 = handle
  573. grip.Part1 = nil
  574. RABW2.Part1 = nil
  575. fps.Parent = nil
  576. CreateModel()
  577. end
  578. bin.Selected:connect(Select)
  579. bin.Deselected:connect(Deselect)
  580. human.Died:connect(function()
  581. fps.Parent = nil
  582. end)
  583. char.AncestryChanged:connect(function()
  584. fps.Parent = nil
  585. end)
  586. CreateModel()
  587. loopray()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement