Prior_

Untitled

Jan 5th, 2018
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.58 KB | None | 0 0
  1. --cl_init.lua (clientside)
  2.  
  3. stalling = { "ahright.wav", "difficult.wav", "itsallhere.wav", "rightok.wav" }
  4. know = { "iknow.wav", "iknowjustwhattodo.wav" }
  5. houses = { "gryffindor.wav", "hufflepuff.wav", "ravenclaw.wav", "slytherin.wav" }
  6.  
  7. function Stalling()
  8.     net.Recieve("HatTalking")
  9.     local ply = net.ReadEntity()
  10.     surface.PlaySound(table.Random(stalling))
  11.     timer.Simple(6, Know)
  12. end
  13.  
  14. function Know()
  15.     surface.PlaySound(table.Random(know))
  16.     timer.Simple(3, House)
  17. end
  18.  
  19. function House(ply)
  20.     whichhouse = math.Random(1,4)
  21.    
  22.     if whichhouse == 1 then
  23.         surface.PlaySound(houses[1])
  24.         ply:SetNWString("House", "Gryffindor")
  25.         chat.AddText( Color( 100, 100, 255 ), "You are now apart of the", Color( 100, 255, 100 ), "Gryffindor house." )
  26.         net.Start("HouseGryff")
  27.         net.SendToServer()
  28.     end
  29.  
  30.     if whichhouse == 2 then
  31.         surface.PlaySound(houses[2])
  32.         ply:SetNWString("House", "Hufflepuff")
  33.         chat.AddText( Color( 100, 100, 255 ), "You are now apart of the", Color( 100, 255, 100 ), "Hufflepuff" )
  34.         net.Start("HouseHuffle")
  35.         net.SendToServer()
  36.     end
  37.  
  38.     if whichhouse == 3 then
  39.         surface.PlaySound(houses[3])
  40.         ply:SetNWString("House", "Ravenclaw")
  41.         chat.AddText( Color( 100, 100, 255 ), "You are now apart of the", Color( 100, 255, 100 ), "Ravenclaw" )
  42.         net.Start("HouseRaven")
  43.         net.SendToServer()
  44.     end
  45.  
  46.     if whichhouse == 4 then
  47.         surface.PlaySound(houses[4])
  48.         ply:SetNWString("House", "Slytherin")
  49.         chat.AddText( Color( 100, 100, 255 ), "You are now apart of the", Color( 100, 255, 100 ), "Slytherin" )
  50.         net.Start("HouseSlyth")
  51.         net.SendToServer()
  52.     end
  53. end
Add Comment
Please, Sign In to add comment