Advertisement
aaaay63746

CocaCola FE Script

Mar 26th, 2020
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.76 KB | None | 0 0
  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")
  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. --Made by Ahtoh13131423144235, Rufus14
  85. --Credit to ttyyuu12345 for the model to script plugin v4
  86. --Credit to Rufus14 for helping
  87.  
  88. --[[
  89. Change log:
  90. -Added u attack
  91. --]]
  92.  
  93. wait(2)
  94.  
  95. local player = owner
  96. local char = player.Character
  97. local canAttack = false
  98. local damage = false
  99. local rootJointC0 = char.HumanoidRootPart.RootJoint.C0
  100. char.Torso["Right Shoulder"]:Remove()
  101.  
  102. --Converted with ttyyuu12345's model to script plugin v4
  103. function sandbox(var,func)
  104. local env = getfenv(func)
  105. local newenv = setmetatable({},{
  106. __index = function(self,k)
  107. if k=="script" then
  108. return var
  109. else
  110. return env[k]
  111. end
  112. end,
  113. })
  114. setfenv(func,newenv)
  115. return func
  116. end
  117. cors = {}
  118. mas = Instance.new("Model",game:GetService("Lighting"))
  119. Part0 = Instance.new("Part")
  120. Part0:BreakJoints()
  121. Weld1 = Instance.new("Weld")
  122. Weld2 = Instance.new("Weld")
  123. Weld3 = Instance.new("Weld")
  124. SpecialMesh2 = Instance.new("SpecialMesh")
  125. Part0.Name = "Handle"
  126. Part0.Parent = mas
  127. Part0.BrickColor = BrickColor.new("Mid gray")
  128. Part0.Rotation = Vector3.new(-180, 0, 180)
  129. Part0.FormFactor = Enum.FormFactor.Plate
  130. Part0.Size = Vector3.new(1, 1.20000005, 1)
  131. Part0.CFrame = CFrame.new(-18.1699982, 0.600000024, -0.639984131, -1, -1.21401766e-17, -2.78761293e-23, -1.21401766e-17, 1, 1.21401766e-17, 2.78761293e-23, 1.21401766e-17, -1)
  132. Part0.BottomSurface = Enum.SurfaceType.Smooth
  133. Part0.TopSurface = Enum.SurfaceType.Smooth
  134. Part0.Color = Color3.new(0.803922, 0.803922, 0.803922)
  135. Part0.Position = Vector3.new(-18.1699982, 0.600000024, -0.639984131)
  136. Part0.Orientation = Vector3.new(0, -180, 0)
  137. Part0.Color = Color3.new(0.803922, 0.803922, 0.803922)
  138. Weld1.C0 = Weld1.C0 * CFrame.new(0,-1,-0.5) * CFrame.fromEulerAnglesXYZ(-1.5,0,0)
  139. Weld1.Parent = char["Right Arm"]
  140. Weld1.Part0 = char["Right Arm"]
  141. Weld1.Part1 = Part0
  142. Weld2.C0 = CFrame.new(1.5,0.5,0)
  143. Weld2.C1 = CFrame.new(0,0.5,0)
  144. Weld2.Parent = char.Torso
  145. Weld2.Part0 = char.Torso
  146. Weld2.Part1 = char["Right Arm"]
  147. Weld3.C0 = CFrame.new(-1.5,0.5,0)
  148. Weld3.C1 = CFrame.new(0,0.5,0)
  149. Weld3.Parent = char.Torso
  150. Weld3.Part0 = char.Torso
  151. Weld3.Part1 = nil
  152. SpecialMesh2.Parent = Part0
  153. SpecialMesh2.MeshId = "http://www.roblox.com/asset/?id=10470609"
  154. SpecialMesh2.Scale = Vector3.new(1.5, 1.5, 1.5)
  155. SpecialMesh2.TextureId = "http://www.roblox.com/asset/?id=10483355"
  156. SpecialMesh2.MeshType = Enum.MeshType.FileMesh
  157. SpecialMesh2.Scale = Vector3.new(1.5, 1.5, 1.5)
  158. for i,v in pairs(mas:GetChildren()) do
  159. v.Parent = char
  160. pcall(function() v:MakeJoints() end)
  161. end
  162. mas:Destroy()
  163. for i,v in pairs(cors) do
  164. spawn(function()
  165. pcall(v)
  166. end)
  167. end
  168.  
  169. for i = 1,15 do
  170. Weld2.C0 = Weld2.C0 * CFrame.Angles(0.1,0,0)
  171. wait()
  172. end
  173.  
  174. canAttack = true
  175.  
  176. char.Humanoid.Died:connect(function()
  177. local sound = Instance.new("Sound",char)
  178. sound.SoundId = "rbxassetid://182003383"
  179. sound.Pitch = 1
  180. sound:Play()
  181. end)
  182.  
  183. mouse.Button1Down:connect(function()
  184. if canAttack == true then
  185. canAttack = false
  186. for i = 1,10 do
  187. Weld2.C0 = Weld2.C0 * CFrame.Angles(0,0,-0.1)
  188. wait()
  189. end
  190. for i = 1,5 do
  191. Weld1.C0 = Weld1.C0 * CFrame.Angles(0,0,0.1)
  192. wait()
  193. end
  194. local drink = Instance.new("Sound", char)
  195. drink.SoundId = "rbxassetid://10722059"
  196. drink.Volume = 5
  197. drink:Play()
  198. wait(3)
  199. char:FindFirstChild("Humanoid").Health = char:FindFirstChild("Humanoid").Health + 20
  200. char:FindFirstChild("Humanoid").WalkSpeed = char:FindFirstChild("Humanoid").WalkSpeed + 0.1
  201. for i = 1,5 do
  202. Weld1.C0 = Weld1.C0 * CFrame.Angles(0,0,-0.1)
  203. wait()
  204. end
  205. for i = 1,10 do
  206. Weld2.C0 = Weld2.C0 * CFrame.Angles(0,0,0.1)
  207. wait()
  208. end
  209. canAttack = true
  210. end
  211. end)
  212.  
  213. mouse.KeyDown:connect(function(key)
  214. if key:lower() == "q" and canAttack == true then
  215. canAttack = false
  216. for i = 1,10 do
  217. Weld2.C0 = Weld2.C0 * CFrame.Angles(0.1,0,0)
  218. wait()
  219. end
  220. damage = true
  221. for i = 1,19 do
  222. Weld2.C0 = Weld2.C0 * CFrame.Angles(-0.1,0,0)
  223. wait()
  224. end
  225. for i = 1,9 do
  226. Weld2.C0 = Weld2.C0 * CFrame.Angles(0.1,0,0)
  227. wait()
  228. end
  229. damage = false
  230. canAttack = true
  231. elseif key:lower() == "e" and canAttack == true then
  232. canAttack = false
  233. Weld3.Part1 = char["Left Arm"]
  234. char.Torso["Left Shoulder"].Part1 = nil
  235. for i = 1,15 do
  236. Weld3.C0 = Weld3.C0 * CFrame.Angles(0.1,0,0)
  237. wait()
  238. end
  239. for i = 1,15 do
  240. Weld2.C0 = Weld2.C0 * CFrame.Angles(0,0,0.1)
  241. Weld3.C0 = Weld3.C0 * CFrame.Angles(0,0,-0.1)
  242. wait()
  243. end
  244. damage = true
  245. for i = 1,400 do
  246. char.HumanoidRootPart.RootJoint.C0 = char.HumanoidRootPart.RootJoint.C0 * CFrame.Angles(0,0,0.1)
  247. wait()
  248. end
  249. char.HumanoidRootPart.RootJoint.C0 = rootJointC0
  250. damage = false
  251. for i = 1,15 do
  252. Weld2.C0 = Weld2.C0 * CFrame.Angles(0,0,-0.1)
  253. wait()
  254. end
  255. Weld3.C0 = CFrame.new(-1.5,0.5,0)
  256. char.Torso["Left Shoulder"].Part1 = char["Left Arm"]
  257. Weld3.Part1 = nil
  258. canAttack = true
  259. elseif key:lower() == "r" and canAttack == true then
  260. canAttack = false
  261. for i = 1,13 do
  262. Weld2.C0 = Weld2.C0 * CFrame.Angles(0.1,0,0)
  263. wait()
  264. end
  265. wait(5)
  266. Part0.Transparency = 1
  267. local fake = Part0:Clone()
  268. fake.Parent = char
  269. fake.CanCollide = false
  270. fake.Position = Part0.Position
  271. fake.Transparency = 0
  272. local bodyVelocity = Instance.new("BodyVelocity")
  273. bodyVelocity.Parent = fake
  274. bodyVelocity.Velocity = char.Torso.CFrame.lookVector * 90
  275. fake.Touched:connect(function(hit)
  276. if hit.Parent:FindFirstChild("Humanoid") and hit.Parent ~= char then
  277. hit.Parent:FindFirstChild("Humanoid").Health = hit.Parent:FindFirstChild("Humanoid").Health - 10
  278. hit.Parent:FindFirstChild("Humanoid").Sit = true
  279. fake:Remove()
  280. end
  281. end)
  282. for i = 1,13 do
  283. Weld2.C0 = Weld2.C0 * CFrame.Angles(-0.1,0,0)
  284. wait()
  285. end
  286. for i = 1,100 do
  287. Part0.Transparency = Part0.Transparency - 0.01
  288. wait()
  289. end
  290. Part0.Transparency = 0
  291. canAttack = true
  292. elseif key:lower() == "t" and canAttack == true and mouse.Target ~= nil then
  293. canAttack = false
  294. local victim = mouse.Target.Parent
  295. local humanoid = victim:FindFirstChild("Humanoid")
  296. if humanoid == nil then
  297. canAttack = true
  298. return
  299. end
  300. humanoid.WalkSpeed = 0
  301. char.Humanoid.WalkSpeed = 0
  302. Part0.Transparency = 1
  303. Weld2.C0 = CFrame.new(1.5,0.5,0)
  304. local fake = Part0:Clone()
  305. fake.Parent = char
  306. fake.Transparency = 0
  307. local fakeWeld = Instance.new("Weld")
  308. fakeWeld.C0 = fakeWeld.C0 * CFrame.new(0,-1,-0.5) * CFrame.fromEulerAnglesXYZ(-1.5,0,0)
  309. fakeWeld.Part0 = victim["Right Arm"]
  310. fakeWeld.Part1 = fake
  311. fakeWeld.Parent = victim["Right Arm"]
  312. local armWeld = Instance.new("Weld")
  313. armWeld.C0 = CFrame.new(1.5,0.5,0)
  314. armWeld.C1 = CFrame.new(0,0.5,0)
  315. armWeld.Parent = victim.Torso
  316. armWeld.Part0 = victim.Torso
  317. armWeld.Part1 = victim["Right Arm"]
  318. for i = 1,15 do
  319. armWeld.C0 = armWeld.C0 * CFrame.Angles(0.1,0,0)
  320. wait()
  321. end
  322. for i = 1,10 do
  323. armWeld.C0 = armWeld.C0 * CFrame.Angles(0,0,-0.1)
  324. wait()
  325. end
  326. for i = 1,5 do
  327. fakeWeld.C0 = fakeWeld.C0 * CFrame.Angles(0,0,0.1)
  328. wait()
  329. end
  330. local drink = Instance.new("Sound", victim)
  331. drink.SoundId = "rbxassetid://10722059"
  332. drink.Volume = 5
  333. drink:Play()
  334. wait(3)
  335. fakeWeld:Remove()
  336. victim.Head.BrickColor = BrickColor.new("Medium green")
  337. if victim.Head:FindFirstChild("face") then
  338. victim.Head.face.Texture = "http://www.roblox.com/asset/?id=137852314"
  339. end
  340. humanoid.PlatformStand = true
  341. for i = 1,humanoid.MaxHealth do
  342. humanoid.Health = humanoid.Health - 1
  343. wait()
  344. end
  345. char.Humanoid.WalkSpeed = 16
  346. for i = 1,100 do
  347. Part0.Transparency = Part0.Transparency - 0.01
  348. wait()
  349. end
  350. Part0.Transparency = 0
  351. for i = 1,15 do
  352. Weld2.C0 = Weld2.C0 * CFrame.Angles(0.1,0,0)
  353. wait()
  354. end
  355. canAttack = true
  356. elseif key:lower() == "y" and canAttack == true and mouse.Target ~= nil then
  357. canAttack = false
  358. local victim = mouse.Target.Parent
  359. local humanoid = victim:FindFirstChild("Humanoid")
  360. if humanoid == nil then
  361. canAttack = true
  362. return
  363. end
  364. humanoid.WalkSpeed = 0
  365. char.Humanoid.WalkSpeed = 0
  366. Part0.Transparency = 1
  367. Weld2.C0 = CFrame.new(1.5,0.5,0)
  368. local fake = Part0:Clone()
  369. fake.Parent = char
  370. fake.Transparency = 0
  371. local fakeWeld = Instance.new("Weld")
  372. fakeWeld.C0 = fakeWeld.C0 * CFrame.new(0,-1,-0.5) * CFrame.fromEulerAnglesXYZ(-1.5,0,0)
  373. fakeWeld.Part0 = victim["Right Arm"]
  374. fakeWeld.Part1 = fake
  375. fakeWeld.Parent = victim["Right Arm"]
  376. local armWeld = Instance.new("Weld")
  377. armWeld.C0 = CFrame.new(1.5,0.5,0)
  378. armWeld.C1 = CFrame.new(0,0.5,0)
  379. armWeld.Parent = victim.Torso
  380. armWeld.Part0 = victim.Torso
  381. armWeld.Part1 = victim["Right Arm"]
  382. for i = 1,15 do
  383. armWeld.C0 = armWeld.C0 * CFrame.Angles(0.1,0,0)
  384. wait()
  385. end
  386. for i = 1,10 do
  387. armWeld.C0 = armWeld.C0 * CFrame.Angles(0,0,-0.1)
  388. wait()
  389. end
  390. for i = 1,5 do
  391. fakeWeld.C0 = fakeWeld.C0 * CFrame.Angles(0,0,0.1)
  392. wait()
  393. end
  394. local drink = Instance.new("Sound", victim)
  395. drink.SoundId = "rbxassetid://10722059"
  396. drink.Volume = 5
  397. drink:Play()
  398. wait(3)
  399. fake:Remove()
  400. humanoid.Health = humanoid.Health + 20
  401. char.Humanoid.WalkSpeed = 16
  402. for i = 1,10 do
  403. armWeld.C0 = armWeld.C0 * CFrame.Angles(0,0,0.1)
  404. wait()
  405. end
  406. for i = 1,15 do
  407. armWeld.C0 = armWeld.C0 * CFrame.Angles(-0.1,0,0)
  408. wait()
  409. end
  410. for i = 1,100 do
  411. Part0.Transparency = Part0.Transparency - 0.01
  412. wait()
  413. end
  414. Part0.Transparency = 0
  415. for i = 1,15 do
  416. Weld2.C0 = Weld2.C0 * CFrame.Angles(0.1,0,0)
  417. wait()
  418. end
  419. canAttack = true
  420. elseif key:lower() == "u" and canAttack == true and mouse.Target ~= nil then
  421. canAttack = false
  422. local victim = mouse.Target.Parent
  423. local humanoid = victim:FindFirstChild("Humanoid")
  424. if humanoid == nil then
  425. canAttack = true
  426. return
  427. end
  428. humanoid.WalkSpeed = 0
  429. char.Humanoid.WalkSpeed = 0
  430. Part0.Transparency = 1
  431. Weld2.C0 = CFrame.new(1.5,0.5,0)
  432. local fake = Part0:Clone()
  433. fake.Parent = char
  434. fake.Transparency = 0
  435. local fakeWeld = Instance.new("Weld")
  436. fakeWeld.C0 = fakeWeld.C0 * CFrame.new(0,-1,-0.5) * CFrame.fromEulerAnglesXYZ(-1.5,0,0)
  437. fakeWeld.Part0 = victim["Right Arm"]
  438. fakeWeld.Part1 = fake
  439. fakeWeld.Parent = victim["Right Arm"]
  440. local armWeld = Instance.new("Weld")
  441. armWeld.C0 = CFrame.new(1.5,0.5,0)
  442. armWeld.C1 = CFrame.new(0,0.5,0)
  443. armWeld.Parent = victim.Torso
  444. armWeld.Part0 = victim.Torso
  445. armWeld.Part1 = victim["Right Arm"]
  446. for i = 1,15 do
  447. armWeld.C0 = armWeld.C0 * CFrame.Angles(0.1,0,0)
  448. wait()
  449. end
  450. for i = 1,10 do
  451. armWeld.C0 = armWeld.C0 * CFrame.Angles(0,0,-0.1)
  452. wait()
  453. end
  454. for i = 1,5 do
  455. fakeWeld.C0 = fakeWeld.C0 * CFrame.Angles(0,0,0.1)
  456. wait()
  457. end
  458. local drink = Instance.new("Sound", victim)
  459. drink.SoundId = "rbxassetid://10722059"
  460. drink.Volume = 5
  461. drink:Play()
  462. wait(3)
  463. local freezing = Instance.new("Sound", victim)
  464. freezing.SoundId = "rbxassetid://268249319"
  465. freezing.Volume = 5
  466. freezing:Play()
  467. local value = Instance.new("BoolValue",victim)
  468. value.Name = "Frozen"
  469. value.Value = true
  470. for i,v in pairs(victim:GetChildren()) do
  471. if v.ClassName == "Part" then
  472. v.BrickColor = BrickColor.new("Bright blue")
  473. v.Anchored = true
  474. end
  475. end
  476. char.Humanoid.WalkSpeed = 16
  477. for i = 1,100 do
  478. Part0.Transparency = Part0.Transparency - 0.01
  479. wait()
  480. end
  481. Part0.Transparency = 0
  482. for i = 1,15 do
  483. Weld2.C0 = Weld2.C0 * CFrame.Angles(0.1,0,0)
  484. wait()
  485. end
  486. canAttack = true
  487. end
  488. end)
  489.  
  490. Part0.Touched:connect(function(hit)
  491. if damage == true then
  492. if hit.Parent:FindFirstChild("Humanoid") and hit.Parent ~= char then
  493. hit.Parent:FindFirstChild("Humanoid").Health = hit.Parent:FindFirstChild("Humanoid").Health - 10
  494. hit.Parent:FindFirstChild("Humanoid").Sit = true
  495. local hit0 = Instance.new("Sound", hit)
  496. hit0.SoundId = "rbxassetid://260430060"
  497. hit0.Volume = 3
  498. local hit1 = Instance.new("Sound", hit)
  499. hit1.SoundId = "rbxassetid://138087186"
  500. hit1.Volume = 3
  501. local hit2 = Instance.new("Sound", hit)
  502. hit2.SoundId = "rbxassetid://131237241"
  503. hit2.Volume = 3
  504. local hit3 = Instance.new("Sound", hit)
  505. hit3.SoundId = "rbxassetid://278062209"
  506. hit3.Volume = 3
  507. hit3.TimePosition = 0.33
  508. local math1 = math.random(1,4)
  509. if math1 == 1 then
  510. hit0:Play()
  511. end
  512. if math1 == 2 then
  513. hit1:Play()
  514. end
  515. if math1 == 3 then
  516. hit2:Play()
  517. end
  518. if math1 == 4 then
  519. hit3:Play()
  520. end
  521. if hit.Parent:FindFirstChild("Frozen") then
  522. local hit0 = Instance.new("Sound", hit)
  523. hit0.SoundId = "rbxassetid://516789356"
  524. hit0.Volume = 5
  525. hit0:Play()
  526. hit.Parent.Frozen:Remove()
  527. for i,v in pairs(hit.Parent:GetChildren()) do
  528. if v.ClassName == "Part" then
  529. v.Anchored = false
  530. end
  531. end
  532. end
  533. end
  534. end
  535. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement